:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #111827;
  background: #f4f5f7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
}
button,
input,
textarea,
select {
  font: inherit;
}
.app-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 16px;
  color: #e5e7eb;
  background: #111827;
}
.brand {
  display: grid;
  gap: 2px;
  padding: 0 10px 28px;
}
.brand strong {
  font-size: 20px;
  letter-spacing: 0.16em;
}
.brand span {
  font-size: 12px;
  color: #9ca3af;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav-item {
  padding: 11px 12px;
  color: #cbd5e1;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 9px;
}
.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: #1f2937;
}
.sidebar-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding: 12px 10px 0;
  font-size: 12px;
  color: #9ca3af;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
}
.workspace {
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: rgb(244 245 247 / 94%);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(10px);
}
.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 800;
  color: #6b7280;
  letter-spacing: 0.13em;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 0;
  font-size: 25px;
}
h2 {
  margin-bottom: 0;
  font-size: 20px;
}
.primary-button,
.actions button {
  padding: 10px 14px;
  color: #fff;
  cursor: pointer;
  background: #111827;
  border: 0;
  border-radius: 9px;
}
.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.text-button {
  padding: 6px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  background: transparent;
  border: 0;
}
main {
  padding: 26px 28px 40px;
}
.view {
  display: none;
}
.view.active {
  display: block;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metric-card,
.panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgb(17 24 39 / 4%);
}
.metric-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}
.metric-card span {
  font-size: 13px;
  color: #6b7280;
}
.metric-card strong {
  font-size: 25px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
  gap: 18px;
}
.panel {
  padding: 20px;
}
.panel-heading,
.section-heading,
.catalog-title,
.category-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.panel-heading,
.section-heading {
  margin-bottom: 18px;
}
.section-heading > div:last-child {
  display: flex;
  gap: 8px;
}
.summary-list,
.stage-summary {
  display: grid;
}
.summary-row,
.stage-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 4px;
  border-bottom: 1px solid #f0f1f3;
}
.summary-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border-top: 0;
  border-right: 0;
  border-left: 0;
}
.summary-row span:first-child,
.menu-row span:first-child {
  display: grid;
  gap: 3px;
}
.summary-row small,
.menu-row small,
.muted {
  color: #6b7280;
}
.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(250px, 1fr));
  gap: 14px;
  align-items: start;
  overflow-x: auto;
}
.column {
  min-height: 220px;
  padding: 12px;
  background: #e5e7eb;
  border-radius: 14px;
}
.column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.column h3 {
  margin: 0;
  font-size: 14px;
}
.column header span {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  font-weight: 700;
  background: #fff;
  border-radius: 999px;
  place-items: center;
}
.cards {
  display: grid;
  gap: 10px;
}
.order-card {
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgb(17 24 39 / 8%);
}
.card-main {
  display: block;
  width: 100%;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
}
.card-main h3 {
  margin: 10px 0;
  font-size: 17px;
}
.order-meta {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  font-size: 13px;
  color: #6b7280;
}
.order-meta strong {
  color: #111827;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 14px;
}
.actions button {
  padding: 8px 10px;
  font-size: 13px;
}
.actions button:last-child:not(:first-child) {
  background: #7f1d1d;
}
.empty-state {
  max-width: 680px;
  padding: 36px;
}
.empty-state p:last-child {
  margin: 12px 0 0;
  color: #6b7280;
}
.catalog-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.7fr);
  gap: 18px;
  align-items: start;
}
.menu-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 62px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #f0f1f3;
  border-radius: 8px;
}
.menu-row:hover,
.menu-row.selected {
  background: #f3f4f6;
}
.badge {
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  background: #e5e7eb;
  border-radius: 999px;
}
.badge.success {
  color: #166534;
  background: #dcfce7;
}
.catalog-title {
  padding-bottom: 18px;
  border-bottom: 1px solid #e5e7eb;
}
.catalog-title .muted {
  margin: 7px 0 0;
}
.catalog-categories {
  display: grid;
  gap: 22px;
  margin-top: 20px;
}
.catalog-category {
  display: grid;
  gap: 8px;
}
.category-heading {
  padding-bottom: 8px;
}
.category-heading h3 {
  margin: 0;
}
.category-heading span {
  font-size: 12px;
  color: #6b7280;
}
.catalog-item {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-top: 1px solid #f0f1f3;
}
.catalog-item > div:first-child {
  display: grid;
  gap: 4px;
}
.catalog-item small {
  color: #6b7280;
}
.catalog-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}
.catalog-item-actions button,
.category-heading button {
  padding: 7px 10px;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}
.empty-catalog {
  padding: 24px 0;
}
dialog {
  width: min(620px, calc(100vw - 32px));
  padding: 22px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgb(0 0 0 / 24%);
}
dialog::backdrop {
  background: rgb(17 24 39 / 55%);
}
dialog ul,
dialog ol {
  padding-left: 20px;
}
.order-items {
  display: grid;
  gap: 12px;
}
.order-item-note,
.order-note-section {
  margin-top: 7px;
  padding: 9px 11px;
  color: #713f12;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 5px;
}
.order-item-note p,
.order-note-section p {
  margin: 4px 0 0;
}
#catalog-form {
  display: grid;
  gap: 18px;
}
#access-form {
  display: grid;
  gap: 16px;
}
.access-error {
  min-height: 18px;
  margin: 0;
  color: #991b1b;
}
.access-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
#catalog-form-fields {
  display: grid;
  gap: 14px;
}
#catalog-form-fields h2 {
  margin-bottom: 4px;
}
.form-field {
  display: grid;
  gap: 6px;
}
.form-field span {
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 10px 11px;
  color: #111827;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 9px;
}
.form-field textarea {
  min-height: 90px;
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
#catalog-form .actions {
  justify-content: flex-end;
  padding: 0;
}
#catalog-form .actions button:first-child {
  color: #374151;
  background: #fff;
  border: 1px solid #d1d5db;
}
#catalog-form-error {
  min-height: 18px;
  margin: 0;
  color: #991b1b;
}
.settings-message {
  padding: 24px;
  color: #6b7280;
}
.settings-message.error {
  color: #991b1b;
  border-color: #fecaca;
}
.settings-message.error p {
  margin-bottom: 10px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.settings-section {
  display: grid;
  gap: 16px;
}
.settings-section .panel-heading {
  margin-bottom: 0;
}
.settings-identity,
.settings-schedule,
.settings-coupons {
  grid-column: 1 / -1;
}
.settings-wide {
  grid-column: 1 / -1;
}
.settings-fields {
  margin-top: 4px;
}
.toggle-list {
  display: grid;
}
.toggle-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f1f3;
}
.toggle-row span {
  display: grid;
  gap: 3px;
}
.toggle-row small {
  color: #6b7280;
}
.toggle-row input,
.schedule-day input {
  width: 20px;
  height: 20px;
  accent-color: #111827;
}
.schedule-list {
  display: grid;
}
.schedule-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 0.45fr) minmax(120px, 0.45fr);
  gap: 14px;
  align-items: end;
  padding: 12px 0;
  border-top: 1px solid #f0f1f3;
}
.schedule-day {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 42px;
}
.form-field input:disabled {
  color: #9ca3af;
  cursor: not-allowed;
  background: #f3f4f6;
}
.settings-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 18px;
  padding: 14px 0;
  background: rgb(244 245 247 / 96%);
}
.settings-actions p {
  margin: 0 auto 0 0;
}
.coupon-list {
  display: grid;
  gap: 10px;
}
.coupon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.coupon-row-main,
.coupon-row-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.coupon-row-main {
  flex-wrap: wrap;
}
.coupon-row-main small {
  width: 100%;
  color: #6b7280;
}
.coupon-active {
  align-self: end;
  border-bottom: 0;
}
#coupon-form {
  display: grid;
  gap: 18px;
  width: min(720px, calc(100vw - 48px));
}
@media (max-width: 1000px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid,
  .catalog-layout,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-identity,
  .settings-schedule,
  .settings-coupons {
    grid-column: auto;
  }
  .board {
    grid-template-columns: repeat(5, 280px);
  }
}
@media (max-width: 700px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }
  .brand {
    padding-bottom: 12px;
  }
  .nav {
    grid-template-columns: repeat(4, minmax(max-content, 1fr));
    overflow-x: auto;
  }
  .sidebar-footer {
    display: none;
  }
  .topbar {
    padding: 16px;
  }
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }
  main {
    padding: 18px 16px 30px;
  }
  .metrics,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .catalog-item {
    align-items: flex-start;
  }
  .catalog-item-actions {
    display: grid;
    justify-items: end;
  }
  .schedule-row {
    grid-template-columns: 1fr 1fr;
  }
  .schedule-day {
    grid-column: 1 / -1;
  }
  .settings-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .settings-actions p {
    margin: 0;
  }
  .settings-actions button {
    width: 100%;
  }
  .coupon-row {
    grid-template-columns: 1fr;
  }
  .coupon-row-actions {
    justify-content: flex-start;
  }
}
