:root {
  color-scheme: dark;
  --background: #131313;
  --surface: #1c1b1b;
  --surface-2: #20201f;
  --surface-3: #2a2a2a;
  --surface-4: #353535;
  --text: #e5e2e1;
  --muted: #e2bfb0;
  --primary: #ffb693;
  --primary-strong: #ff6b00;
  --secondary: #f7bb7e;
  --danger: #ffb4ab;
  --danger-bg: #93000a;
  --border: #5a4136;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: "Work Sans", system-ui, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0;
}

.topbar {
  align-items: center;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  display: flex;
  height: 64px;
  justify-content: space-between;
  left: 0;
  padding: 0 20px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 50;
}

.brand {
  color: var(--primary);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.icon-button:hover {
  background: var(--surface-2);
  color: var(--primary);
}

.layout {
  min-height: 100vh;
  padding-top: 64px;
}

.sidebar {
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  bottom: 0;
  display: none;
  flex-direction: column;
  left: 0;
  position: fixed;
  top: 64px;
  width: 256px;
  z-index: 40;
}

.sidebar-header {
  border-bottom: 1px solid rgba(90, 65, 54, 0.7);
  padding: 24px;
}

.sidebar-title {
  color: var(--primary);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.sidebar-subtitle {
  color: var(--muted);
  margin: 6px 0 0;
}

.nav-links {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.nav-link {
  align-items: center;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  font-weight: 600;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
}

.nav-link:hover {
  background: var(--surface-4);
  color: var(--text);
}

.nav-link.active {
  background: #663d0b;
  color: var(--secondary);
}

.nav-link.active .material-symbols-outlined {
  font-variation-settings: "FILL" 1;
}

.sidebar-footer {
  padding: 16px;
}

.main {
  padding: 24px 20px 96px;
}

.page-header {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-title {
  color: var(--primary);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 32px;
  line-height: 1.2;
  margin: 0;
}

.page-subtitle {
  color: var(--muted);
  margin: 8px 0 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.live-pill {
  align-items: center;
  background: rgba(102, 61, 11, 0.72);
  border: 1px solid rgba(255, 182, 147, 0.32);
  border-radius: 999px;
  color: var(--secondary);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
}

.live-pill .material-symbols-outlined {
  color: var(--primary);
  font-size: 20px;
}

.live-pill[data-state="error"] {
  background: rgba(147, 0, 10, 0.32);
  border-color: rgba(255, 180, 171, 0.42);
  color: var(--danger);
}

.field,
.select {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  min-height: 44px;
  outline: none;
  padding: 10px 12px;
}

.field:focus,
.select:focus {
  border-color: var(--primary);
}

.button {
  align-items: center;
  background: var(--primary-strong);
  border: 0;
  border-radius: 8px;
  color: #351000;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
}

.button.secondary {
  background: var(--surface-4);
  color: var(--text);
}

.button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.card {
  background: var(--surface-2);
  border: 1px solid rgba(90, 65, 54, 0.8);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  padding: 18px;
}

.card.low {
  border-color: rgba(255, 180, 171, 0.75);
}

.card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.pill {
  align-items: center;
  background: var(--surface-4);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  padding: 4px 9px;
}

.pill.warn {
  background: rgba(147, 0, 10, 0.55);
  color: var(--danger);
}

.muted {
  color: var(--muted);
}

.metric {
  align-items: end;
  display: flex;
  gap: 6px;
  margin: 12px 0;
}

.metric-value {
  color: var(--primary);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.card-actions .field {
  flex: 1;
  min-width: 0;
}

.items {
  border-left: 2px solid var(--surface-4);
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-left: 12px;
}

.stock-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.stock-chip {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid rgba(90, 65, 54, 0.8);
  border-radius: 8px;
  display: inline-flex;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
}

.stock-chip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stock-chip strong {
  color: var(--primary);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 22px;
  line-height: 1;
}

.stock-chip.low {
  border-color: rgba(255, 180, 171, 0.62);
}

.stock-chip.low strong {
  color: var(--danger);
}

.order-card {
  border-color: rgba(255, 182, 147, 0.18);
  display: grid;
  gap: 16px;
  min-height: 280px;
  padding: 0;
  overflow: hidden;
}

.order-card.pending {
  border-color: rgba(255, 107, 0, 0.48);
}

.order-card.done {
  opacity: 0.74;
}

.order-card-top {
  align-items: center;
  background: linear-gradient(90deg, rgba(255, 107, 0, 0.22), rgba(53, 53, 53, 0.18));
  border-bottom: 1px solid rgba(90, 65, 54, 0.7);
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.order-number {
  color: var(--primary);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.order-main {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
}

.order-customer {
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 24px;
  line-height: 1.15;
  margin: 0;
}

.order-table {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-weight: 700;
  gap: 6px;
  margin: 8px 0 0;
}

.order-table .material-symbols-outlined {
  color: var(--primary);
  font-size: 20px;
}

.order-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px;
}

.order-items span {
  background: var(--surface-3);
  border: 1px solid rgba(90, 65, 54, 0.72);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  padding: 7px 10px;
}

.order-actions {
  border-top: 1px solid rgba(90, 65, 54, 0.7);
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: auto;
  padding: 14px 16px 16px;
}

.order-actions .button {
  min-width: 0;
  width: 100%;
}

.order-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.empty-state {
  align-items: center;
  background: var(--surface-2);
  border: 1px dashed rgba(255, 182, 147, 0.28);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 10px;
  justify-items: center;
  min-height: 220px;
  padding: 28px;
  text-align: center;
}

.empty-state .material-symbols-outlined {
  color: var(--primary);
  font-size: 44px;
}

.status {
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.status.info {
  background: rgba(156, 202, 255, 0.12);
  color: #9ccaff;
}

.status.error {
  background: rgba(147, 0, 10, 0.35);
  color: var(--danger);
}

.status:empty {
  display: none;
}

.popup {
  align-items: flex-start;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 84px 18px 18px;
  pointer-events: none;
  position: fixed;
  z-index: 100;
}

.popup-card {
  background: var(--surface-2);
  border: 1px solid rgba(255, 182, 147, 0.34);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
  display: grid;
  gap: 12px;
  max-width: 420px;
  padding: 18px;
  pointer-events: auto;
  position: relative;
  width: min(100%, 420px);
}

.popup.error .popup-card {
  border-color: rgba(255, 180, 171, 0.62);
}

.popup-card p {
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
  padding-right: 34px;
}

.popup-close {
  position: absolute;
  right: 10px;
  top: 10px;
}

.bottom-nav {
  align-items: center;
  background: #0e0e0e;
  border-top: 1px solid var(--border);
  bottom: 0;
  display: flex;
  justify-content: space-around;
  left: 0;
  padding: 8px 12px;
  position: fixed;
  right: 0;
  z-index: 50;
}

.bottom-nav .nav-link {
  flex-direction: column;
  font-size: 12px;
  gap: 2px;
  min-height: 56px;
  min-width: 72px;
}

.order-builder {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.hero {
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.28), rgba(53, 53, 53, 0.4));
  display: grid;
  min-height: 260px;
  overflow: hidden;
  padding: 24px;
  place-items: end start;
}

.hero h1 {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 34px;
  margin: 0 0 8px;
}

.toggle-row {
  align-items: center;
  border-bottom: 1px solid rgba(90, 65, 54, 0.7);
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
}

.toggle-row input {
  height: 20px;
  width: 20px;
}

.customer-page {
  background:
    radial-gradient(circle at top left, rgba(255, 107, 0, 0.2), transparent 32rem),
    linear-gradient(180deg, #131313 0%, #171312 48%, #0e0e0e 100%);
}

.customer-topbar {
  border-bottom-color: rgba(90, 65, 54, 0.45);
  backdrop-filter: blur(14px);
  background: rgba(19, 19, 19, 0.86);
}

.customer-main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 88px 20px 36px;
}

.customer-order {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.customer-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 182, 147, 0.16), rgba(255, 107, 0, 0.08)),
    var(--surface-2);
  border: 1px solid rgba(255, 182, 147, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 28px;
  min-height: 360px;
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy h1 {
  color: var(--primary);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.95;
  margin: 18px 0 14px;
  max-width: 680px;
}

.hero-copy p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
  max-width: 520px;
}

.burger-stack {
  align-items: center;
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: 0 auto;
  min-height: 220px;
  position: relative;
  width: min(340px, 84vw);
  z-index: 1;
}

.burger-stack span {
  border-radius: 999px;
  display: block;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.32));
}

.burger-stack .bun {
  background: linear-gradient(180deg, #f7bb7e, #a04100);
  height: 58px;
  width: 76%;
}

.burger-stack .bun.top {
  border-radius: 999px 999px 28px 28px;
}

.burger-stack .bun.bottom {
  border-radius: 28px 28px 999px 999px;
  height: 44px;
}

.burger-stack .lettuce {
  background: linear-gradient(90deg, #79b85a, #b7df78);
  height: 20px;
  width: 86%;
}

.burger-stack .cheese {
  background: linear-gradient(90deg, #ffb000, #ffdc69);
  height: 24px;
  width: 82%;
}

.burger-stack .meat {
  background: linear-gradient(180deg, #6b2f1c, #2c1600);
  height: 46px;
  width: 88%;
}

.order-panel,
.summary-card {
  background: rgba(32, 32, 31, 0.86);
  border: 1px solid rgba(90, 65, 54, 0.82);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
  padding: 18px;
}

.section-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.section-head h2,
.summary-card h2 {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 22px;
  margin: 0;
}

.section-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.input-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.input-grid label span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.input-grid .field {
  width: 100%;
}

.stepper {
  align-items: center;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  gap: 8px;
  padding: 6px;
}

.stepper button {
  align-items: center;
  background: var(--surface-4);
  border: 0;
  border-radius: 999px;
  color: var(--secondary);
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.stepper input {
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  width: 42px;
}

.extra-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.extra-card {
  align-items: center;
  background: var(--surface-3);
  border: 1px solid rgba(90, 65, 54, 0.9);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 14px;
  position: relative;
}

.extra-card input {
  opacity: 0;
  position: absolute;
}

.extra-card .material-symbols-outlined {
  color: var(--muted);
  font-size: 30px;
}

.extra-card strong {
  line-height: 1.2;
}

.extra-card:has(input:checked) {
  background: rgba(102, 61, 11, 0.72);
  border-color: var(--primary-strong);
  color: var(--secondary);
}

.extra-card:has(input:checked) .material-symbols-outlined {
  color: var(--primary);
  font-variation-settings: "FILL" 1;
}

.order-summary-panel {
  display: block;
}

.summary-card {
  display: grid;
  gap: 14px;
}

.summary-items {
  border-left: 2px solid var(--surface-4);
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding-left: 12px;
}

.summary-item {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.summary-item span:first-child {
  color: var(--text);
}

.summary-item span:last-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

@media (min-width: 768px) {
  .topbar {
    padding: 0 80px;
  }

  .sidebar {
    display: flex;
  }

  .main {
    margin-left: 256px;
    padding: 56px 80px;
  }

  .page-header {
    align-items: center;
    flex-direction: row;
  }

  .toolbar {
    justify-content: flex-end;
    width: auto;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    display: none;
  }

  .order-builder {
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  }

  .customer-main {
    padding: 104px 32px 48px;
  }

  .customer-order {
    grid-template-columns: minmax(0, 1.5fr) minmax(340px, 0.8fr);
  }

  .customer-hero {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    padding: 42px;
  }

  .order-summary-panel {
    grid-column: 2;
    grid-row: 2 / span 3;
  }

  .summary-card {
    position: sticky;
    top: 92px;
  }

  .input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .extra-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
