:root {
  --primary: #ab3500;
  --primary-container: #ff6b35;
  --on-primary: #ffffff;
  --surface: #f8f9fa;
  --surface-container: #edeeef;
  --surface-high: #e7e8e9;
  --on-surface: #191c1d;
  --on-surface-variant: #594139;
  --secondary: #5f5e5e;
  --tertiary: #006a62;
  --tertiary-container: #00ac9f;
  --error: #ba1a1a;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--on-surface);
  background: var(--surface);
  line-height: 1.5;
}

h1, h2, h3, .brand-mark {
  font-family: var(--font-display);
  margin: 0;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--secondary); margin: 0.25rem 0 0; }
.material-symbols-outlined { font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24; vertical-align: middle; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.1rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; opacity: 0.95; }
.btn-primary { background: var(--primary-container); color: var(--on-primary); }
.btn-ghost { background: transparent; border: 1px solid #cfcfcf; color: var(--on-surface); }
.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.stack { display: grid; gap: 1rem; }
.stack label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.9rem; }
.stack input, .stack select, .stack textarea {
  width: 100%;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: #fff;
}
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  padding-right: 4.25rem;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
}
.password-toggle:hover {
  background: rgba(171, 53, 0, 0.08);
}
.stack input:focus, .stack select:focus {
  outline: 2px solid rgba(255, 107, 53, 0.35);
  border-color: var(--primary-container);
}
.checkbox { display: flex !important; align-items: center; gap: 0.55rem; font-weight: 500 !important; }
.checkbox input { width: auto; }
.form-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 0.5rem; }
.form-error, .field-error { color: var(--error); font-size: 0.875rem; font-weight: 500; }
.form-panel { max-width: 520px; }
.form-panel.form-panel-wide,
.form-panel-wide { max-width: min(1100px, 100%); }
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1.15rem;
  align-items: start;
}
.form-grid-2 > .form-error,
.form-grid-2 > .form-actions,
.form-grid-2 > .form-span-2,
.form-grid-2 > .role-fieldset,
.form-grid-2 > .form-intro,
.form-grid-2 > h2,
.form-grid-2 > .checkbox-row {
  grid-column: 1 / -1;
}
.form-grid-2 textarea { min-height: 2.75rem; resize: vertical; }
.form-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.form-split > .panel { margin-bottom: 0; }
.form-split-body {
  display: flex !important;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: flex-start;
}
.form-split-body > .form-error,
.form-split-body > .form-actions {
  flex: 1 1 100%;
  width: 100%;
}
.form-split-body > .form-col {
  flex: 1 1 calc(50% - 1rem);
  min-width: min(100%, 320px);
  display: grid;
  gap: 0.65rem;
  align-content: start;
}
.form-col > label {
  display: grid;
  gap: 0.25rem;
  font-weight: 600;
  font-size: 0.88rem;
}
.form-col input,
.form-col select,
.form-col textarea {
  width: 100%;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  background: #fff;
  box-sizing: border-box;
}
.form-col input:focus,
.form-col select:focus,
.form-col textarea:focus {
  outline: 2px solid rgba(255, 107, 53, 0.35);
  border-color: var(--primary-container);
}
.form-compact.panel { padding: 1rem 1.15rem; }
.form-compact .stack input,
.form-compact .stack select,
.form-compact .stack textarea,
.form-compact .form-col input,
.form-compact .form-col select,
.form-compact .form-col textarea {
  padding: 0.5rem 0.7rem;
}
.form-compact .form-actions { margin-top: 0.15rem; }
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}
.ingredient-rows { display: grid; gap: 0.75rem; }
.ingredient-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 0.8fr) minmax(0, 0.8fr) auto;
  gap: 0.5rem;
  align-items: end;
}

@media (max-width: 480px) {
  .form-grid-2,
  .form-split { grid-template-columns: 1fr; }
  .form-split-body > .form-col { flex: 1 1 100%; min-width: 0; }
  .ingredient-row { grid-template-columns: 1fr; }
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(255, 107, 53, 0.18), transparent 40%),
    linear-gradient(180deg, #fff 0%, var(--surface) 100%);
}
.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--surface-high);
  text-align: center;
}
.brand-mark {
  color: var(--primary);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  font-size: 1.25rem;
}
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.35rem;
}
.auth-logo {
  width: 5.5rem;
  height: 5.5rem;
  margin-bottom: 0.25rem;
  border-radius: 0.65rem;
}
.auth-card h1 {
  font-size: 1.55rem;
  margin: 0.15rem 0 0;
}
.auth-card .muted {
  margin: 0;
  max-width: 18rem;
}
.auth-card .stack {
  text-align: left;
}
.auth-card .btn { width: 100%; margin-top: 0.5rem; }

.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: #f1f2f3;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-right: 1px solid var(--surface-high);
}
.sidebar-brand strong { display: block; color: var(--primary); font-family: var(--font-display); font-size: 1.1rem; }
.sidebar-brand span { color: var(--secondary); font-size: 0.8rem; }
.sidebar-nav { display: grid; gap: 0.35rem; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  color: var(--on-surface);
  text-decoration: none;
  font-weight: 500;
}
.sidebar-nav a.active {
  background: #fff;
  color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary-container);
}
.sidebar-footer { margin-top: auto; }
.admin-main { padding: 1.5rem 2rem 2.5rem; }
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.admin-topbar h1 { font-size: 1.75rem; }

.panel {
  background: #fff;
  border: 1px solid var(--surface-high);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.panel h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.flash.success {
  background: #e7f7f5;
  color: var(--tertiary);
  border: 1px solid #b7ebe4;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-weight: 600;
}
.flash.error {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
  text-align: left;
  padding: 0.85rem 0.65rem;
  border-bottom: 1px solid var(--surface-high);
  vertical-align: middle;
}
.data-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--secondary);
}
.data-table .empty { text-align: center; color: var(--secondary); padding: 2rem 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.inline-form { display: inline; }

.report-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.report-kpis > div {
  background: var(--surface-container);
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.report-kpis strong {
  font-size: 1.35rem;
  font-family: Montserrat, sans-serif;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.75rem;
}
.permission-chip {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--surface-high);
  border-radius: 0.65rem;
  background: var(--surface-container);
  cursor: pointer;
}
.permission-chip input { margin-top: 0.2rem; }
.permission-chip span { display: flex; flex-direction: column; gap: 0.2rem; }
.permission-chip small { line-height: 1.3; }
@media (max-width: 900px) {
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-ok { background: #fff1eb; color: var(--primary); }
.badge-teal { background: #dff8f4; color: var(--tertiary); }
.badge-muted { background: var(--surface-container); color: var(--secondary); }

.qr-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
}
.preview-panel { min-height: 420px; }
.preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.qr-preview {
  display: grid;
  place-items: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1rem;
}
.qr-preview img {
  width: min(240px, 100%);
  aspect-ratio: 1;
  border: 2px solid var(--primary-container);
  border-radius: 16px;
  padding: 0.75rem;
  background: #fff;
}
.brand-small {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 700;
}
.scan-url {
  font-size: 0.8rem;
  color: var(--secondary);
  word-break: break-all;
  max-width: 320px;
}
.empty-preview { color: var(--secondary); min-height: 280px; }
.empty-preview .material-symbols-outlined { font-size: 3rem; opacity: 0.5; }

.menu-shell { min-height: 100vh; background: #fff; padding-bottom: 6.5rem; }
.menu-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.menu-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.brand-logo {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  background: #141414;
  border-radius: 0.45rem;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand-link:hover {
  text-decoration: none;
  color: inherit;
  opacity: 0.92;
}
.brand-link__text,
.menu-brand-text {
  letter-spacing: -0.02em;
  font-weight: 700;
  white-space: nowrap;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.auth-brand-link {
  flex-direction: column;
  gap: 0.45rem;
}
.auth-brand-link .brand-mark {
  margin: 0;
}
.menu-topbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
}
.icon-btn {
  position: relative;
  border: none;
  background: transparent;
  color: var(--on-surface-variant);
  cursor: pointer;
  padding: 0.25rem;
}
.cart-badge {
  position: absolute;
  top: -0.15rem;
  right: -0.25rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.cart-badge[hidden] {
  display: none !important;
}
.staff-login-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
}
.staff-login-link .material-symbols-outlined {
  font-size: 1.25rem;
}
.staff-login-link:hover {
  text-decoration: underline;
}
.avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8a5b, #ab3500);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  border: 2px solid #ffd0bd;
}
.table-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 172, 159, 0.12);
  border: 1px solid rgba(0, 172, 159, 0.2);
  color: var(--tertiary);
  font-size: 0.8rem;
  font-weight: 600;
}
.table-chip-center { justify-self: center; }
.table-chip .dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--tertiary);
}
.menu-main { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; }
.menu-landing .menu-hero h1 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  color: var(--on-surface);
}
.menu-landing .menu-hero p {
  color: var(--on-surface-variant);
  font-size: 1.05rem;
  margin: 0;
}
.category-row {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 1.25rem 0 0.5rem;
  margin-bottom: 0.75rem;
  scrollbar-width: none;
}
.category-row::-webkit-scrollbar { display: none; }
.chip {
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  background: var(--surface-high);
  color: var(--on-surface-variant);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
}
.chip:hover { text-decoration: none; opacity: 0.92; }
.chip.active {
  background: var(--primary-container);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 0.75rem;
}
.menu-card {
  background: #fff;
  border: 1px solid var(--surface-high);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.menu-card-media {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--surface-container);
}
.menu-card-media img,
.menu-card-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.menu-card:hover .menu-card-media img { transform: scale(1.05); }
.menu-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.menu-badge-chef { background: var(--primary); }
.menu-badge-veg { background: #1f6f5b; }
.menu-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.menu-card-body {
  padding: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}
.menu-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.menu-card-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}
.menu-price {
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
  font-size: 1.05rem;
}
.menu-card-body p {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: 0.92rem;
  flex: 1;
}
.menu-card-actions {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 0.25rem;
  width: 100%;
  min-height: 2.6rem;
  border-radius: var(--radius);
  background: var(--primary-container);
  color: var(--on-primary);
  overflow: hidden;
}
.menu-card-actions button {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.menu-card-actions button:hover { background: rgba(0, 0, 0, 0.12); }
.menu-card-actions button:active { transform: scale(0.97); }
.add-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  padding: 0.5rem 0.25rem;
}
.add-btn.added { transform: scale(0.98); }
.qty-btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  flex: 0 0 auto;
}
.qty-btn[hidden] {
  display: none !important;
}
.menu-card-actions.has-qty .qty-dec { border-right: 1px solid rgba(255, 255, 255, 0.35); }
.menu-card-actions.has-qty .qty-inc { border-left: 1px solid rgba(255, 255, 255, 0.35); }
.menu-placeholder {
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.menu-placeholder .material-symbols-outlined {
  font-size: 2.5rem;
  color: var(--primary-container);
  margin-bottom: 0.75rem;
}
.order-bar {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  width: min(640px, calc(100% - 2rem));
  z-index: 40;
}
.order-bar-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  background: var(--primary-container);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.1rem;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.35);
  cursor: pointer;
}
.order-bar-left {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.order-count {
  background: #fff;
  color: var(--primary);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Cart / checkout */
.cart-shell { padding-bottom: 7rem; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--on-surface);
  text-decoration: none;
  font-weight: 600;
}
.cart-hero h1 {
  font-family: Montserrat, sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin: 0 0 0.35rem;
}
.cart-hero p { margin: 0; color: var(--on-surface-variant); }
.cart-lines {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.cart-line {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.9rem;
  padding: 0.85rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--surface-high, #e8eaed);
}
.cart-line-static { grid-template-columns: 1fr; }
.cart-line-media,
.cart-line-fallback {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffe0d1, #ffb08a);
}
.cart-line-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cart-line-body { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.cart-line-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}
.cart-line-top h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}
.cart-line-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.35rem;
}
.cart-qty {
  width: auto;
  min-width: 8.5rem;
  max-width: 10rem;
}
.cart-qty .add-btn { pointer-events: none; }
.link-remove {
  border: none;
  background: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem;
}
.cart-notes,
.cart-totals {
  margin-top: 1rem;
}
.cart-notes label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.45rem;
}
.cart-notes textarea {
  width: 100%;
  border: 1px solid #d7dde3;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  resize: vertical;
  background: #fff;
}
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.45rem 0;
}
.muted-row { color: var(--on-surface-variant); font-size: 0.95rem; }
.total-row-grand {
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e9ee;
  font-size: 1.1rem;
}
.cart-error {
  margin: 1rem 0 0;
  color: #b42318;
  font-weight: 600;
}
.confirm-hero {
  text-align: center;
  padding: 1.75rem 1.25rem;
}
.confirm-icon {
  font-size: 3rem;
  color: #1b7f46;
}
.confirm-meta { margin-top: 0.75rem; }
.confirm-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}
.order-bar-btn.is-loading { opacity: 0.75; pointer-events: none; }

.role-fieldset {
  border: 1px solid var(--surface-high, #e8eaed);
  border-radius: 12px;
  padding: 0.85rem 1rem 0.5rem;
  margin: 0;
}
.role-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Kitchen / Bar board */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.sidebar-logo {
  width: 2.4rem;
  height: 2.4rem;
}
.board-live-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
}
.board-live-left {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}
.live-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: #1b7f46;
  box-shadow: 0 0 0 4px rgba(27, 127, 70, 0.15);
}
.board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: start;
}
.board-column {
  background: var(--surface);
  border: 1px solid var(--surface-high, #e8eaed);
  border-radius: var(--radius);
  min-height: 18rem;
  display: flex;
  flex-direction: column;
}
.board-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid #e5e9ee;
}
.board-column-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}
.board-count {
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e9ee;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.board-column-body {
  padding: 0.75rem;
  display: grid;
  gap: 0.65rem;
}
.board-empty { margin: 0.5rem 0; font-size: 0.9rem; }
.ticket-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 0.85rem;
  display: grid;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}
.ticket-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}
.ticket-order {
  font-size: 0.75rem;
  color: var(--on-surface-variant);
  font-weight: 600;
}
.ticket-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}
.ticket-notes {
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #fff4ef;
  color: #8a3b12;
  font-size: 0.85rem;
}
.ticket-time { margin: 0; font-size: 0.8rem; }
.ticket-action { width: 100%; margin-top: 0.25rem; }
.col-new .board-column-head { border-top: 3px solid var(--primary-container); }
.col-accepted .board-column-head { border-top: 3px solid #3b82f6; }
.col-preparing .board-column-head { border-top: 3px solid #f59e0b; }
.col-ready .board-column-head { border-top: 3px solid #1b7f46; }

.pay-bank-card h2 {
  margin: 0 0 1rem;
  font-family: Montserrat, sans-serif;
  font-size: 1.1rem;
}
.pay-details {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}
.pay-details > div {
  display: grid;
  gap: 0.15rem;
}
.pay-details dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #667085);
}
.pay-details dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.pay-account-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
  font-size: 1.25rem !important;
}
.pay-hint { margin: 1rem 0 0; }
.pay-waiting {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
}
.pay-waiting p { margin: 0; font-weight: 600; }
.pay-board {
  display: grid;
  grid-template-columns: minmax(0, 28rem);
  gap: 1rem;
}
.pay-ticket-lines {
  margin: 0.35rem 0 0.5rem;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}
.pay-ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.pay-ticket-actions .btn { flex: 1 1 auto; }

@media (max-width: 960px) {
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { border-right: none; border-bottom: 1px solid var(--surface-high); }
  .qr-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 1rem; }
}
@media (max-width: 640px) {
  .menu-grid { grid-template-columns: 1fr; }
  .menu-card-media { height: 220px; }
  .menu-topbar { padding-inline: 1rem; }
  .cart-line { grid-template-columns: 72px 1fr; }
  .cart-line-media,
  .cart-line-fallback { width: 72px; height: 72px; }
  .board-grid { grid-template-columns: 1fr; }
}
