:root {
  --ink: #0e0d0b;
  --dark: #1a1a1a;
  --paper: #ffffff;
  --cream: #f5f0e8;
  --bg: #f7f5f0;
  --surface: #ffffff;
  --border: #e6e0d3;
  --border-hover: #c9a962;
  --gold: #c9a962;
  --gold-deep: #9a7f3f;
  --text-dark: #2c2c2c;
  --text-muted: #666666;
  --fresh: #4caf50;
  --soldout: #f44336;
  --special: #ff9800;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
  --font-arabic:  'Reem Kufi', 'Amiri', 'Noto Sans Arabic', serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold-deep); }

button { font-family: inherit; }

/* ─── Shell layout ──────────────────────────────────────────────────── */
.adm-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.adm-shell--no-sidebar { grid-template-columns: 1fr; }

.adm-sidebar {
  background: var(--ink);
  color: #cdc4b0;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}
.adm-sidebar__brand {
  padding: 0 20px 24px;
  border-bottom: 1px solid #2c2c2c;
}
.adm-sidebar__brand img { width: 140px; }
.adm-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.adm-nav a {
  padding: 11px 14px;
  border-radius: 6px;
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 500;
  color: #cdc4b0;
  border-left: 2px solid transparent;
}
.adm-nav a:hover { background: rgba(201,169,98,0.08); color: var(--gold); }
.adm-nav a.is-active {
  background: rgba(201,169,98,0.13);
  color: var(--gold);
  font-weight: 600;
  border-left-color: var(--gold);
}
.adm-nav .icon { width: 18px; text-align: center; font-size: 16px; }
.adm-sidebar__user {
  padding: 14px 20px;
  border-top: 1px solid #2c2c2c;
  display: flex; align-items: center; gap: 10px;
}
.adm-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.adm-sidebar__user .name { color: #fff; font-size: 13px; font-weight: 600; }
.adm-sidebar__user .role { color: #888; font-size: 11px; }

.adm-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.adm-header {
  height: 60px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Sticky across every backend page so the breadcrumb, online indicator,
     publish button, and Sign out / + Add buttons stay in reach as the
     content column scrolls. z-index sits above .quick-search (30) and
     content cards but under the modal backdrop (40) and the sidebar
     drawer overlay (50+). */
  position: sticky;
  top: 0;
  z-index: 35;
}
.adm-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  min-width: 0;
}
.adm-crumbs strong { color: var(--ink); font-weight: 600; }
.adm-crumbs .sep { margin: 0 4px; color: #ccc; }
.adm-crumbs__brand { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-hamburger {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  margin-right: 4px;
}
.adm-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,18,14,0.45);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms;
}
body.is-sidebar-open .adm-backdrop {
  opacity: 1;
  pointer-events: auto;
}
.adm-header__right { display: flex; align-items: center; gap: 12px; }
.adm-status {
  font-size: 11px; color: var(--fresh);
  letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.adm-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fresh);
  box-shadow: 0 0 8px var(--fresh);
}

/* Publish button — flagged when there are unpublished changes. */
.publish-btn {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold-deep);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.publish-btn:hover { background: var(--gold-deep); color: #fff; border-color: var(--gold-deep); }
.publish-btn .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--soldout);
  box-shadow: 0 0 8px rgba(244,67,54,0.6);
}
.publish-btn .sep { opacity: 0.4; margin: 0 1px; }
.publish-btn strong { font-weight: 700; letter-spacing: 0.04em; }

.published-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--fresh);
  letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700;
}
.published-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fresh);
  box-shadow: 0 0 8px rgba(76,175,80,0.5);
}

.adm-flash {
  margin: 0 28px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}
.adm-flash--ok  { background: rgba(76,175,80,0.10); border: 1px solid rgba(76,175,80,0.4); color: var(--fresh); }
.adm-flash--err { background: rgba(244,67,54,0.10); border: 1px solid rgba(244,67,54,0.4); color: var(--soldout); }

/* Pre-publish diff block (publish modal) */
.diff-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.diff-block--empty {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}
.diff-block__head {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.diff-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.diff-list__item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.diff-list__item:last-child { border-bottom: none; }
.diff-mark {
  width: 22px; height: 22px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 14px;
  flex: 0 0 auto;
}
.diff-list__item--add .diff-mark  { background: rgba(76,175,80,0.18); color: var(--fresh); }
.diff-list__item--edit .diff-mark { background: rgba(201,169,98,0.22); color: var(--gold-deep); }
.diff-list__item--rm .diff-mark   { background: rgba(244,67,54,0.18); color: var(--soldout); }
.diff-count { font-family: var(--font-mono); font-weight: 700; min-width: 24px; text-align: right; }
.diff-label { flex: 1; }
.diff-details { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.diff-details summary {
  cursor: pointer; user-select: none;
  padding: 2px 6px; border-radius: 4px;
}
.diff-details summary:hover { background: rgba(0,0,0,0.04); }
.diff-details[open] summary { color: var(--ink); }
.diff-details ul {
  margin: 8px 0 4px; padding: 0 0 0 18px;
  font-size: 12px; color: var(--text-dark); line-height: 1.5;
}

.adm-body { padding: 28px; flex: 1; overflow-y: auto; }
.adm-body h1 {
  font-size: 28px;
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 0 16px;
}

/* ─── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  font-size: 13px; font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
}
.btn:hover { border-color: var(--border-hover); }
.btn--primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn--primary:hover { background: #2a251f; border-color: #2a251f; }
.btn--gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.btn--danger {
  color: var(--soldout);
  border-color: rgba(244, 67, 54, 0.2);
}
.btn--ghost { background: transparent; }

/* ─── Cards & panels ────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.card__head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card__head h2 { font-size: 14px; font-weight: 700; margin: 0; }
.card__body { padding: 18px; }

.panel-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ─── Forms ─────────────────────────────────────────────────────────── */
.field { display: block; }
.field__label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}
.field__input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--ink);
  background: #fff;
}
.field__input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--border-hover);
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.15);
}
.field--rtl .field__input { text-align: right; direction: rtl; font-family: var(--font-arabic); }

/* Hours-of-day picker — 12 cells × 2 rows = 24h. Click to toggle. */
.hours-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  margin-top: 6px;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.hours-cell {
  height: 30px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 100ms, color 100ms, border-color 100ms;
}
.hours-cell:hover { border-color: var(--gold); }
.hours-cell.is-on {
  background: var(--gold);
  border-color: var(--gold-deep);
  color: var(--ink);
}

.checkrow { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; cursor: pointer; }
.checkrow input { margin-top: 2px; }
.checkrow .label { font-size: 13px; font-weight: 600; }
.checkrow .sub { font-size: 11px; color: var(--text-muted); }

/* ─── Tables / product rows ─────────────────────────────────────────── */
.product-row {
  display: grid;
  grid-template-columns: 30px 56px 1fr 100px 90px 100px 30px;
  gap: 12px;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.product-row .grip { color: var(--text-muted); cursor: grab; }
.product-row .thumb { width: 44px; height: 44px; border-radius: 6px; overflow: hidden; }
.product-row .thumb .product-photo { width: 44px; height: 44px; }
.product-row .name { font-weight: 600; color: var(--ink); }
.product-row .name-ar { font-family: var(--font-arabic); font-size: 13px; color: var(--text-muted); margin-left: 6px; }
.product-row .meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.product-row .price { font-weight: 600; font-family: var(--font-mono); }
.product-row .actions { display: flex; gap: 4px; }
.product-row .menu { color: var(--text-muted); font-size: 16px; }
.product-row[draggable="true"] { user-select: none; }
.product-row[draggable="true"] .grip { cursor: grab; }
.product-row.is-dragging { opacity: 0.4; }
.product-row.is-drop-before { box-shadow: inset 0 2px 0 0 var(--gold); }
.product-row.is-drop-after  { box-shadow: inset 0 -2px 0 0 var(--gold); }

.product-row--selectable {
  grid-template-columns: 30px 30px 56px 1fr 100px 90px 100px 30px;
}
.bulk-cell {
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.bulk-cell input { width: 16px; height: 16px; cursor: pointer; }

.bulk-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  font-size: 13px;
}
.bulk-bar__count {
  font-weight: 600;
  margin-right: 12px;
  letter-spacing: 0.04em;
}
.bulk-bar .btn {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
}
.bulk-bar .btn:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.3); }

[data-inline-price] {
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 6px;
  margin: 0 -6px;
  transition: background 100ms;
}
[data-inline-price]:hover { background: rgba(201,169,98,0.12); }
[data-inline-price]:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

/* Compact icon-only chip — used on the dashboard + products list. The
   /admin/quick/ page uses .qchip (defined further down) for full-label
   tap targets on phones. Each chip is colour-coded to match its pip on
   the displays: terracotta = In Oven, green = Just Baked, amber = Out
   today, red = Sold out. */
.toggle-chip {
  width: 30px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  font-size: 12px; font-weight: 700; color: #999;
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.toggle-chip:hover { border-color: rgba(0,0,0,0.25); }
.toggle-chip svg { display: block; }
/* Text-only variant of the compact chip (e.g. "JB" on the Just Baked chip
   — the In Oven chip carries the flame SVG instead). Nudge font down so
   two letters fit centred in the 30×26 box. */
.toggle-chip--fresh:not(:has(svg)) { font-size: 11px; letter-spacing: 0.04em; }

/* Per-variant ON colours. Order in CSS doesn't matter (specificity is the
   same) — selectors are class-based. */
.toggle-chip--oven.is-on    { color: #c2410c;       border-color: #c2410c;       background: rgba(194, 65, 12, 0.10); }
.toggle-chip--fresh.is-on   { color: var(--fresh);   border-color: var(--fresh);   background: rgba(76, 175, 80, 0.10); }
.toggle-chip--today.is-on   { color: var(--special); border-color: var(--special); background: rgba(255, 152, 0, 0.12); }
.toggle-chip--soldout.is-on { color: var(--soldout); border-color: var(--soldout); background: rgba(244, 67, 54, 0.10); }
/* Legacy chips with no variant class default to Just Baked colours, and
   data-kind="soldout" overrides to red — preserves behaviour for any
   page that still uses the unmodified 2-chip layout. */
.toggle-chip.is-on { color: var(--fresh); border-color: var(--fresh); background: rgba(76, 175, 80, 0.10); }
.toggle-chip[data-kind="soldout"].is-on { color: var(--soldout); border-color: var(--soldout); background: rgba(244, 67, 54, 0.10); }

/* Status pill — compact label shown in the rightmost column of the
   product row to mirror the chip state at a glance. */
.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pill--oven    { background: #c2410c;       color: #fff; }
.pill--fresh   { background: var(--fresh);   color: #fff; }
.pill--today   { background: var(--special); color: #fff; }
.pill--special { background: var(--special); color: #fff; }
.pill--soldout { background: var(--soldout); color: #fff; }
.pill--active  { color: #888; border: 1px solid rgba(0,0,0,0.15); }

/* ─── Empty states & onboarding ─────────────────────────────────────── */
.empty-state {
  padding: 56px 32px;
  text-align: center;
  color: var(--text-muted);
}
.empty-state__icon {
  font-size: 56px;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 16px;
}
.empty-state h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}
.empty-state p {
  margin: 0 auto 18px;
  max-width: 440px;
  font-size: 14px;
  line-height: 1.55;
}
.empty-state .btn { font-size: 14px; padding: 10px 18px; }

.onboard-card {
  background: linear-gradient(135deg, var(--cream) 0%, #fff 100%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 22px;
  box-shadow: 0 4px 14px rgba(60, 40, 10, 0.06);
}
.onboard-card__icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 8px;
}
.onboard-card h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}
.onboard-card p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 14px;
}
.onboard-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: onb;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.onboard-steps li {
  counter-increment: onb;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px 14px 44px;
  position: relative;
  font-size: 13px;
}
.onboard-steps li::before {
  content: counter(onb);
  position: absolute;
  left: 14px; top: 14px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 12px;
  font-family: var(--font-mono);
}
.onboard-steps strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}
.onboard-steps span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}
@media (max-width: 720px) {
  .onboard-steps { grid-template-columns: 1fr; }
}

/* ─── Quick actions grid ────────────────────────────────────────────── */
.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.qa-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  transition: border-color 120ms, transform 120ms;
}
.qa-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.qa-card .icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.qa-card .title { font-size: 14px; font-weight: 700; }
.qa-card .sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ─── Modal ─────────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  background: rgba(20, 18, 14, 0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal__panel {
  background: #fff;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  display: flex; flex-direction: column;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  overflow: hidden;
}
.modal__head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal__head h2 { font-size: 16px; margin: 0; }
.modal__body { padding: 18px 20px; overflow-y: auto; }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ─── Login screen ──────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-side {
  background: var(--ink) url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2780%27%20height%3D%2780%27%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27%23c9a962%27%20stroke-opacity%3D%270.1%27%20stroke-width%3D%271%27%3E%3Ccircle%20cx%3D%270%27%20cy%3D%270%27%20r%3D%2720%27%2F%3E%3Ccircle%20cx%3D%2740%27%20cy%3D%270%27%20r%3D%2720%27%2F%3E%3Ccircle%20cx%3D%2780%27%20cy%3D%270%27%20r%3D%2720%27%2F%3E%3Ccircle%20cx%3D%2720%27%20cy%3D%2734.6%27%20r%3D%2720%27%2F%3E%3Ccircle%20cx%3D%2760%27%20cy%3D%2734.6%27%20r%3D%2720%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / 200px;
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.login-side__inner { text-align: center; max-width: 380px; }
.login-side__inner img { width: 240px; margin-bottom: 32px; }
.login-side__inner h1 { font-family: var(--font-display); font-size: 36px; font-weight: 600; color: var(--gold-hi); margin: 0 0 12px; }
.login-side__inner p { color: #cdc4b0; font-size: 14px; line-height: 1.6; }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-form { width: 100%; max-width: 380px; }
.login-form h2 { font-family: var(--font-display); font-size: 28px; margin: 0 0 6px; }
.login-form .sub { color: var(--text-muted); margin-bottom: 24px; font-size: 13px; }
.login-form .field { margin-bottom: 14px; }
.login-form .btn--primary { width: 100%; justify-content: center; padding: 12px; }

/* Password show/hide toggle on the login form. The wrapper is positioned
   so the eye button overlays the right edge of the input without
   shifting the input itself. */
.pw-wrap { position: relative; }
.pw-wrap .field__input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 4px;
  padding: 0;
}
.pw-toggle:hover { color: var(--ink); background: rgba(0,0,0,0.04); }
.pw-toggle:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.pw-icon { display: block; }
.login-error {
  background: rgba(244, 67, 54, 0.08);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: var(--soldout);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ─── Mobile ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-sidebar {
    position: fixed;
    top: 0; left: -260px;
    width: 240px;
    height: 100vh;
    transition: left 220ms;
    z-index: 50;
    box-shadow: 0 0 40px rgba(0,0,0,0.3);
  }
  body.is-sidebar-open .adm-sidebar { left: 0; }
  .adm-hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .adm-header { padding: 0 12px; }
  .adm-header__right { gap: 6px; }
  .adm-header__right .btn { padding: 7px 10px; font-size: 12px; }
  .adm-status { display: none; }
  .adm-body { padding: 14px; }
  .qa-grid { grid-template-columns: 1fr 1fr; }
  .qa-card { padding: 12px; }
  .qa-card .icon { width: 36px; height: 36px; font-size: 18px; }
  /* Stack the dashboard's two-column main grid */
  .adm-body > div[style*="grid-template-columns:1fr 360px"],
  .adm-body > div[style*="grid-template-columns: 1fr 360px"] {
    grid-template-columns: 1fr !important;
  }
  /* Forms collapse to single column */
  .adm-body div[style*="grid-template-columns:1fr 320px"],
  .adm-body div[style*="grid-template-columns: 1fr 320px"],
  .adm-body div[style*="grid-template-columns:1fr 1fr 1fr"],
  .adm-body div[style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* Product row tightens up */
  .product-row { grid-template-columns: 24px 44px 1fr 80px; gap: 8px; padding: 8px 12px; }
  .product-row .price, .product-row > div:nth-child(5),
  .product-row > div:nth-child(6), .product-row > div:nth-child(7) { display: none; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { display: none; }
}

@media (max-width: 560px) {
  .qa-grid { grid-template-columns: 1fr; }
  .adm-crumbs__brand { display: none; }
}

/* ─── Field error / hint helpers (used on Users add/edit) ───────── */
.field__error {
  color: var(--soldout);
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}
.field__hint {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

/* ─── Users page (admin only) ───────────────────────────────────── */
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.adm-table th,
.adm-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.adm-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0,0,0,0.02);
}
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover { background: rgba(0,0,0,0.015); }

.users-table__you {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--gold-deep);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.role-badge--admin  { background: rgba(154,127,63,0.18); color: var(--gold-deep); }
.role-badge--editor { background: rgba(76,175,80,0.18); color: var(--fresh); }
.role-badge--staff  { background: rgba(244,67,54,0.18); color: var(--soldout); }

/* ─── Quick Update page (staff role) ────────────────────────────── */
/* ── /admin/quick/ — staff page ───────────────────────────────────────────
   One card per product. Each card carries a coloured left-edge bar that
   reflects its current state (terracotta / green / amber / red), so a
   counter-staff glance at the page reads "what's on" instantly. Each
   card: name + price on top row, four chip toggles on the bottom row
   (In Oven / Just Baked / Out today / Sold out).
   Mobile-first — chips are equal-width via flex, wrap to 2x2 on phones
   below 460px so the labels don't truncate. */
body[data-page="quick"] {
  background: linear-gradient(180deg, #faf6ee 0%, #f5f0e8 240px, #f5f0e8 100%);
}
body[data-page="quick"] .adm-body { padding: 16px 14px 40px; }
body[data-page="quick"] .quick-page { max-width: 720px; margin: 0 auto; }

/* Sticky search bar — anchored to the top of the scroll area below the
   global .adm-header. Cream wash behind it so cards bleed cleanly under
   when scrolling. */
body[data-page="quick"] .quick-search {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: -16px -14px 16px;
  padding: 14px;
  background: linear-gradient(180deg, #faf6ee 0%, #faf6ee 70%, rgba(250, 246, 238, 0.92) 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
body[data-page="quick"] .quick-search__icon {
  flex-shrink: 0;
  color: var(--text-muted);
  margin-left: 4px;
}
body[data-page="quick"] .quick-search__input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  font-size: 16px; /* 16px = no iOS zoom on focus */
  font-family: var(--font-sans);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color 120ms;
  -webkit-appearance: none;
  appearance: none;
}
body[data-page="quick"] .quick-search__input:focus {
  outline: none;
  border-color: var(--gold);
}
body[data-page="quick"] .quick-search__input::-webkit-search-cancel-button { display: none; }
body[data-page="quick"] .quick-search__clear {
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  border-radius: 50%;
}
body[data-page="quick"] .quick-search__clear:hover { background: rgba(0, 0, 0, 0.05); color: var(--ink); }

/* Filter result helpers */
body[data-page="quick"] .is-hidden { display: none !important; }
body[data-page="quick"] .quick-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Intro block — gold-accented card to set the page tone. */
body[data-page="quick"] .quick-intro {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
  box-shadow: 0 1px 2px rgba(14, 13, 11, 0.04);
}
body[data-page="quick"] .quick-intro strong { color: var(--ink); }

body[data-page="quick"] .quick-cat { margin-bottom: 28px; }
body[data-page="quick"] .quick-cat__name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 14px;
  padding: 4px 4px 10px;
  border-bottom: 2px solid var(--gold);
  letter-spacing: 0.01em;
  position: relative;
}
/* Subtle gold dot marker before the category name — echoes the section
   icon used on the menu-board template. */
body[data-page="quick"] .quick-cat__name::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold-deep);
  margin-right: 12px;
  vertical-align: 4px;
  opacity: 0.55;
}
body[data-page="quick"] .quick-cat__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body[data-page="quick"] .quick-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px 14px 20px;
  box-shadow: 0 1px 2px rgba(14, 13, 11, 0.04);
  transition: box-shadow 150ms, transform 150ms;
}
body[data-page="quick"] .quick-card:hover {
  box-shadow: 0 4px 14px rgba(14, 13, 11, 0.08);
}
/* Coloured left-edge bar — reflects the active state at a glance. The
   --state-color variable is set by the .quick-card--state-* modifier
   below so this single rule covers all four states. */
body[data-page="quick"] .quick-card::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: transparent;
  transition: background 150ms;
}
body[data-page="quick"] .quick-card.is-oven::before    { background: #c2410c; }
body[data-page="quick"] .quick-card.is-fresh::before   { background: var(--fresh); }
body[data-page="quick"] .quick-card.is-today::before   { background: var(--special); }
body[data-page="quick"] .quick-card.is-soldout::before { background: var(--soldout); }

body[data-page="quick"] .quick-card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
body[data-page="quick"] .quick-card__name {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}
body[data-page="quick"] .quick-card__name-ar {
  display: inline-block;
  margin-left: 8px;
  color: var(--gold-deep);
  font-family: 'Reem Kufi', sans-serif;
  font-size: 15px;
  font-weight: 500;
}
body[data-page="quick"] .quick-card__price {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink);
  font-size: 16px;
  white-space: nowrap;
}
body[data-page="quick"] .quick-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Chip — equal-width via flex:1, min 46px tap target. Four colour variants
   matching the lifecycle (terracotta / green / amber / red). */
body[data-page="quick"] .qchip {
  flex: 1 1 0;
  min-width: 88px;
  min-height: 46px;
  padding: 8px 10px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fafafa;
  color: var(--text-muted);
  cursor: pointer;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 130ms, color 130ms, border-color 130ms, transform 80ms, box-shadow 130ms;
  user-select: none;
}
body[data-page="quick"] .qchip:hover { border-color: rgba(0, 0, 0, 0.2); }
body[data-page="quick"] .qchip:active { transform: scale(0.97); }
body[data-page="quick"] .qchip.is-on { box-shadow: 0 2px 6px rgba(14, 13, 11, 0.18); }
body[data-page="quick"] .qchip svg { flex-shrink: 0; }

/* Four colour-coded states, mapped to the lifecycle:
     In Oven    → deep terracotta (warm, "being cooked")
     Just Baked → green (fresh, ready)
     Out today  → amber (temporary)
     Sold out   → red (permanent)
   The colours intentionally walk from warm-active to neutral-warning
   so a glance at a card tells you where in the lifecycle each item is. */
body[data-page="quick"] .qchip--oven.is-on {
  background: #c2410c;
  color: #ffffff;
  border-color: #c2410c;
}
body[data-page="quick"] .qchip--fresh.is-on {
  background: var(--fresh);
  color: #ffffff;
  border-color: var(--fresh);
}
body[data-page="quick"] .qchip--today.is-on {
  background: var(--special);
  color: #ffffff;
  border-color: var(--special);
}
body[data-page="quick"] .qchip--soldout.is-on {
  background: var(--soldout);
  color: #ffffff;
  border-color: var(--soldout);
}

/* With 4 chips per card the labels need a bit of headroom on phones — drop
   to a 2x2 grid below 460px (most phone viewports including iPhone Pro
   Max). flex:1 still shares each row evenly. */
@media (max-width: 460px) {
  body[data-page="quick"] .qchip {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
}
