/* BamBam Admin — brand theme (black + yellow), same 3 brand variables as the apps. */
@import url('https://fonts.googleapis.com/css2?family=Baloo+Bhaijaan+2:wght@600;700;800&family=Rubik:wght@400;500;600;700&display=swap');

:root {
  /* Brand: change these 3 to re-skin the admin (mirrors the apps' theme). */
  --primary: #FFD60A;      /* yellow: highlights, active items */
  --secondary: #111111;    /* black: sidebar, primary buttons */
  --alert: #FF5A36;        /* orange: urgent */
  --on-primary: #111111;
  --accent: var(--secondary);
  --accent-d: #000000;
  --accent-soft: #FFF6C2;
  --ink: #111111;
  --muted: #5C5C63;
  --line: #ECECEE;
  --bg: #FCFCFB;
  --surface: #ffffff;
  --surface-2: #F4F4F2;
  --danger: #C93A14;
  --danger-soft: #FFE9E3;
  --success: #17A34A;
  --success-soft: #E3F7EA;
  --warning: #d98a00;
  --warning-soft: #fff4dc;
  --info: #2b7fff;
  --info-soft: #e8f0ff;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(20,30,40,.05);
  --shadow: 0 2px 10px rgba(20,30,40,.06);
  --sidebar-w: 224px;
  --topbar-h: 56px;
  --font: 'Rubik', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-brand: 'Baloo Bhaijaan 2', var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* icon spans */
[data-ic] { display: inline-flex; align-items: center; justify-content: center; width: 1em; height: 1em; line-height: 0; }
[data-ic] svg { width: 1em; height: 1em; display: block; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 40;
}
.sidebar .brand {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.logo-chip {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.logo-word { font-family: var(--font-brand); font-weight: 800; font-size: 19px; letter-spacing: -.3px; }
.logo-word b { color: var(--primary); font-weight: 800; display: inline-block; transform: rotate(-6deg); }

.nav { padding: 10px 10px; overflow-y: auto; flex: 1; }
.nav .nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 12px 10px 6px; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 600; font-size: 13px;
  margin-bottom: 2px; position: relative;
}
.nav a [data-ic] { font-size: 17px; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent-d); }
.nav a.active [data-ic] { color: var(--accent); }
.nav a .tag { margin-left: auto; font-size: 9.5px; background: var(--bg); color: var(--muted); padding: 1px 6px; border-radius: var(--radius-full); font-weight: 700; }

/* ---------- Topbar ---------- */
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  position: sticky; top: 0; z-index: 30;
}
.topbar .page-title { font-size: 15px; font-weight: 700; }
.search {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-full); padding: 6px 12px;
  width: 260px; max-width: 34vw; color: var(--muted);
}
.search [data-ic] { font-size: 15px; }
.search input { border: 0; background: transparent; outline: none; font: inherit; color: var(--ink); width: 100%; font-size: 12.5px; }
.avatar {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  background: var(--secondary); color: #4a3500;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; flex: 0 0 auto;
}
.icon-btn { width: 32px; height: 32px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--bg); border: 1px solid var(--line); cursor: pointer; font-size: 16px; }
.icon-btn:hover { color: var(--ink); }

/* ---------- Content ---------- */
.content { padding: 20px; width: 100%; flex: 1; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 19px; font-weight: 800; margin: 0; letter-spacing: -.3px; }
.page-head .sub { color: var(--muted); font-size: 12.5px; }
.page-head .spacer { flex: 1; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 16px; }
.card-head { padding: 13px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.card-head h2 { font-size: 13.5px; font-weight: 700; margin: 0; }
.card-head .spacer { flex: 1; }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; box-shadow: var(--shadow-sm); }
.stat .s-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.stat .s-ic { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; background: var(--accent-soft); color: var(--accent-d); }
.stat .s-label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat .s-val { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.stat .s-delta { font-size: 11px; font-weight: 700; margin-top: 2px; }
.stat .s-delta.up { color: var(--success); }
.stat .s-delta.down { color: var(--danger); }
.stat.i-blue .s-ic { background: var(--info-soft); color: var(--info); }
.stat.i-amber .s-ic { background: var(--warning-soft); color: var(--warning); }
.stat.i-green .s-ic { background: var(--success-soft); color: var(--success); }
.stat.i-red .s-ic { background: var(--danger-soft); color: var(--danger); }

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

/* ---------- Chart (pure CSS bars) ---------- */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding: 8px 4px 0; }
.chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.chart .bar { width: 62%; max-width: 34px; background: var(--primary); border-radius: 6px 6px 3px 3px; position: relative; transition: filter .15s; min-height: 3px; }
.chart .bar:hover { filter: brightness(1.08); }
.chart .bar .bval { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10.5px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.chart .bar-col .blabel { font-size: 10.5px; color: var(--muted); font-weight: 600; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfc; }
table.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl tbody tr.clickable:hover { background: var(--bg); }
table.tbl td.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; }
.cell-strong { font-weight: 700; }
.cell-sub { color: var(--muted); font-size: 11.5px; }
.muted { color: var(--muted); }
.id-pill { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; font-weight: 700; color: var(--accent-d); }

/* ---------- Badges / pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: var(--radius-full); line-height: 1.5; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-ok { background: var(--success-soft); color: var(--success); }
.b-wait { background: var(--warning-soft); color: var(--warning); }
.b-info { background: var(--info-soft); color: var(--info); }
.b-danger { background: var(--danger-soft); color: var(--danger); }
.b-muted { background: var(--bg); color: var(--muted); }
.b-accent { background: var(--accent-soft); color: var(--accent-d); }
.doc-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.doc-badge.ok { background: var(--success-soft); color: var(--success); border-color: transparent; }
.doc-badge.missing { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.doc-badge [data-ic] { font-size: 12px; }

/* ---------- Chips / tabs ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 12px; padding: 6px 13px; border-radius: var(--radius-full); cursor: pointer; user-select: none; }
.chip:hover { color: var(--ink); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .cnt { opacity: .75; margin-left: 4px; font-weight: 700; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tab { padding: 8px 14px; font-weight: 700; font-size: 12.5px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent-d); border-bottom-color: var(--accent); }
.tab .cnt { display: inline-block; margin-left: 5px; font-size: 10.5px; background: var(--bg); color: var(--muted); padding: 0 6px; border-radius: var(--radius-full); font-weight: 700; }
.tab.active .cnt { background: var(--accent-soft); color: var(--accent-d); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--bg); }
.btn [data-ic] { font-size: 14px; }
.btn.primary { background: var(--secondary); border-color: var(--secondary); color: var(--primary); }
.btn.primary:hover { background: var(--accent-d); }
.btn.ok { background: var(--success); border-color: var(--success); color: #fff; }
.btn.ok:hover { filter: brightness(.95); }
.btn.danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { padding: 4px 9px; font-size: 11.5px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--bg); color: var(--ink); }
.btn-group { display: flex; gap: 6px; }
.btn[disabled] { opacity: .5; cursor: default; pointer-events: none; }

/* toggle */
.toggle { position: relative; width: 38px; height: 21px; border-radius: var(--radius-full); background: var(--line); cursor: pointer; transition: background .15s; flex: 0 0 auto; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: left .15s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { left: 19px; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(20,30,40,.42); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-back.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 460px; box-shadow: 0 20px 50px rgba(20,30,40,.2); max-height: 88vh; overflow: auto; }
.modal .m-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.modal .m-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.modal .m-head .spacer { flex: 1; }
.modal .m-body { padding: 16px 18px; }
.modal .m-foot { padding: 13px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
/* Right-side drawer (large detail panel, slides in from the right). */
.drawer-back { position: fixed; inset: 0; background: rgba(20,30,40,.42); display: flex; justify-content: flex-end; z-index: 110; opacity: 0; transition: opacity .2s ease; }
.drawer-back.in { opacity: 1; }
.drawer { background: var(--surface); width: 640px; max-width: 94vw; height: 100%; display: flex; flex-direction: column; box-shadow: -18px 0 50px rgba(20,30,40,.22); transform: translateX(24px); transition: transform .22s cubic-bezier(.22,.61,.36,1); }
.drawer-back.in .drawer { transform: translateX(0); }
.drawer .d-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer .d-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.drawer .d-head .d-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.drawer .d-head .spacer { flex: 1; }
.drawer .d-tabs { padding: 0 20px; border-bottom: 1px solid var(--line); }
.drawer .d-body { padding: 18px 20px; overflow: auto; flex: 1; }
.drawer .d-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; }
.timeline { list-style: none; margin: 14px 0 0; padding: 0; }
.timeline li { display: flex; gap: 10px; padding-bottom: 12px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: #fff; flex: 0 0 auto; margin-top: 2px; z-index: 1; }
.timeline li.done .tl-dot { background: var(--accent); border-color: var(--accent); }
.timeline .tl-txt { font-size: 12px; font-weight: 600; }
.timeline .tl-time { font-size: 11px; color: var(--muted); }

/* menu preview note */
.note { display: flex; gap: 8px; align-items: flex-start; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12px; color: var(--muted); }
.note [data-ic] { font-size: 15px; color: var(--accent); margin-top: 1px; }

/* rating stars */
.rating { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--ink); }
.rating [data-ic] { color: var(--secondary); font-size: 13px; }

/* avatar in cells */
.u-cell { display: flex; align-items: center; gap: 9px; }
.u-av { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-d); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11px; flex: 0 0 auto; }
.u-av.g { background: var(--secondary); color: #4a3500; }
.u-av.b { background: var(--info-soft); color: var(--info); }

.empty { text-align: center; color: var(--muted); padding: 30px; font-size: 12.5px; }

/* mobile menu button (hidden desktop) */
.menu-btn { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-btn { display: flex; }
  .search { width: 150px; }
  .sidebar-scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 39; }
  .sidebar-scrim.show { display: block; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .content { padding: 14px; }
  .search { display: none; }
}

/* ---------- Forms ---------- */
.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
/* Drag-and-drop image tile (square crop preview). */
.img-tile { width: 96px; height: 96px; border-radius: 12px; border: 1.5px dashed var(--line); background: var(--surface-2) center/cover no-repeat; display: grid; place-items: center; cursor: pointer; position: relative; color: var(--muted); font-size: 11px; text-align: center; transition: border-color .15s, transform .1s; overflow: hidden; }
.img-tile:hover { border-color: var(--accent); }
.img-tile.drag { border-color: var(--accent); border-style: solid; transform: scale(1.02); }
.img-tile.has-img { border-style: solid; border-color: var(--line); }
.img-tile.has-img .img-hint { position: absolute; inset: 0; background: rgba(15,25,35,.36); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.img-tile.has-img:hover .img-hint { opacity: 1; }
.img-tile.loading::after { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(17,17,17,.2); border-top-color: var(--accent); animation: spin .7s linear infinite; }
.img-tile [data-ic] { font-size: 22px; }
/* Category chooser (business type). */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat { border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 6px; text-align: center; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--muted); transition: all .15s; }
.cat.on { border-color: var(--accent); background: var(--accent-soft, #FFF6C2); color: var(--accent); }

/* Menu organiser (drag-drop categories + products) */
.org-cat { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; background: var(--surface); }
.org-cat.dragging { opacity: .4; }
.org-cat.drop-hi { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.org-chead { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface-2); }
.org-chead .grip { cursor: grab; color: var(--muted); display: grid; place-items: center; width: 22px; }
.org-chead input { flex: 1; border: 0; background: transparent; font: inherit; font-weight: 800; font-size: 13px; color: var(--ink); outline: none; min-width: 0; }
.org-cnt { font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 2px 8px; }
.org-cdel { color: var(--danger); cursor: pointer; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; }
.org-cdel.dis { opacity: .3; pointer-events: none; }
.org-prow { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-top: 1px solid var(--line); background: var(--surface); font-size: 12.5px; cursor: grab; }
.org-prow.dragging { opacity: .4; }
.org-prow .grip { color: var(--muted); display: grid; place-items: center; width: 22px; }
.org-prow .thumb { width: 30px; height: 30px; border-radius: 7px; background: var(--surface-2) center/cover; flex: 0 0 auto; }
.org-prow .name { flex: 1; font-weight: 600; }
.org-prow .price { font-weight: 800; color: var(--accent); }
.org-empty { padding: 10px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); }
.org-prow.drop-hi { box-shadow: inset 0 2px 0 var(--accent); }
.field label { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.field label .hint { color: var(--muted); font-weight: 600; font-size: 10.5px; margin-left: 4px; }
.input, select.input, textarea.input {
  width: 100%; font: inherit; font-size: 12.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 7px 10px; outline: none;
}
.input:focus, select.input:focus, textarea.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 72px; }
input[type=color].input { padding: 3px; height: 34px; cursor: pointer; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .field-row, .field-row-3 { grid-template-columns: 1fr; } }

/* segmented radio group */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.seg label { padding: 7px 14px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; border-right: 1px solid var(--line); user-select: none; }
.seg label:last-child { border-right: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:hover { background: var(--bg); color: var(--ink); }
.seg label.on { background: var(--accent); color: #fff; }

/* toggle row */
.tog-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tog-row:last-child { border-bottom: 0; }
.tog-row .tr-main { flex: 1; min-width: 0; }
.tog-row .tr-title { font-size: 12.5px; font-weight: 700; }
.tog-row .tr-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }

.grid-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid-cards { grid-template-columns: 1fr; } }

/* color dot for zone lists */
.cdot { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }

/* ---------- Zones (city-zones) layout ---------- */
.zones-grid { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media (max-width: 980px) { .zones-grid { grid-template-columns: 1fr; } }
#zoneMap { height: 620px; width: 100%; border-radius: var(--radius); overflow: hidden; z-index: 1; }
.leaflet-container { font: inherit; }
.zone-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 7px; cursor: pointer; background: var(--surface); }
.zone-item:hover { background: var(--bg); }
.zone-item.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.zone-item .z-info { flex: 1; min-width: 0; }
.zone-item .z-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-item .z-fees { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.zone-item .z-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.map-hint { display: flex; gap: 8px; align-items: center; background: var(--accent-soft); color: var(--accent-d); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; font-weight: 600; margin-bottom: 10px; }
.map-hint [data-ic] { font-size: 15px; }
.zone-list { max-height: 320px; overflow-y: auto; }
.mini-stat { display: flex; align-items: center; gap: 10px; }
.mini-stat .ms-val { font-size: 18px; font-weight: 800; letter-spacing: -.4px; }
.mini-stat .ms-label { font-size: 11px; color: var(--muted); font-weight: 600; }

/* toast */
.toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: 0 6px 20px rgba(20,30,40,.25); display: flex; align-items: center; gap: 8px; animation: toastIn .2s ease-out; max-width: 320px; }
.toast.ok { background: var(--success); }
.toast.err { background: var(--danger); }
.toast [data-ic] { font-size: 15px; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Workspace switcher (topbar) ---------- */
.ws-switch { display: flex; align-items: center; gap: 8px; margin-left: 4px; }
.ws-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2, #f1f6f5);
  border: 1px solid var(--line, #e8eeec); border-radius: 999px; padding: 6px 12px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2, #566360); white-space: nowrap; }
.ws-btn:hover { border-color: var(--accent); }
.ws-btn b { color: var(--ink, #14211f); font-weight: 800; }
.ws-btn [data-ic] { color: var(--accent); display: inline-flex; }
.ws-btn [data-ic] svg { width: 15px; height: 15px; }
.ws-caret { color: var(--ink-3, #93a09d); font-size: 10px; }
.ws-menu { position: fixed; z-index: 9000; min-width: 190px; background: #fff;
  border: 1px solid var(--line, #e8eeec); border-radius: 12px; box-shadow: 0 14px 40px rgba(20,33,31,.16);
  padding: 5px; max-height: 320px; overflow-y: auto; }
.ws-item { padding: 9px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink, #14211f); cursor: pointer; }
.ws-item:hover { background: var(--surface-2, #f1f6f5); }
.ws-item.on { color: var(--accent); font-weight: 800; }
@media (max-width: 900px) { .ws-switch .ws-btn b { max-width: 70px; overflow: hidden; text-overflow: ellipsis; } }

/* ---------- Account menu (topbar right) ---------- */
.acct-menu { margin-left: auto; position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2, #f1f6f5);
  border: 1px solid var(--line, #e8eeec); border-radius: 999px; padding: 5px 12px 5px 6px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink, #14211f); white-space: nowrap; }
.acct-btn:hover { border-color: var(--accent); }
.acct-av { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display: grid; place-items: center; }
.acct-av svg { width: 15px; height: 15px; }
.acct-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 9000; min-width: 200px; background: #fff;
  border: 1px solid var(--line, #e8eeec); border-radius: 12px; box-shadow: 0 14px 40px rgba(20,33,31,.16); padding: 6px; }
.acct-hd { padding: 8px 12px 10px; border-bottom: 1px solid var(--line, #e8eeec); margin-bottom: 4px; }
.acct-hd b { display: block; font-size: 14px; color: var(--ink, #14211f); }
.acct-hd span { font-size: 11.5px; color: var(--muted, #6b7885); }
.acct-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; font-size: 13px;
  font-weight: 600; color: var(--danger, #e5484d); cursor: pointer; }
.acct-item:hover { background: var(--danger-soft, #fdecec); }
.acct-item [data-ic] svg { width: 15px; height: 15px; }

/* ---------- Brand skin: black sidebar, yellow active item ---------- */
.sidebar { background: var(--secondary); border-right: 0; color: #fff; }
.sidebar .brand { border-bottom-color: rgba(255,255,255,.08); }
.sidebar .logo-word { color: #fff; }
.nav .nav-group { color: #8A8A92; }
.nav a { color: #D4D4D8; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: var(--primary); color: var(--on-primary); font-weight: 700; }
.nav a.active [data-ic] { color: var(--on-primary); }
.sidebar .side-foot, .sidebar .side-foot * { color: #A6A6AE; border-color: rgba(255,255,255,.08); }
h1, h2, .page-title, .card-head h2 { font-family: var(--font-brand); }
.card, .stat { border-radius: var(--radius); }
.btn { border-radius: 12px; }
.logo-chip.bb { font-family: var(--font-brand); font-weight: 800; font-size: 15px; letter-spacing: -.5px; position: relative; }
.logo-chip.bb::before { content: ''; position: absolute; left: -9px; top: 9px; width: 6px; height: 12px;
  background: linear-gradient(var(--primary) 0 2px, transparent 2px 5px, var(--primary) 5px 7px, transparent 7px 10px, var(--primary) 10px 12px); }
.avatar { background: var(--primary) !important; color: var(--on-primary) !important; }
.seg label.on, .chip.active { color: var(--primary); }


/* ---------- Ops console additions ---------- */
/* Sidebar queue badges */
.nav-badge { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.nav-badge.hot { background: var(--alert); color: #fff; }
.nav a.active .nav-badge { background: var(--secondary); color: var(--primary); }
.icon-btn.has-alert { position: relative; color: var(--alert); border-color: var(--alert); }
.icon-btn.has-alert::after { content: ''; position: absolute; top: 4px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--alert); box-shadow: 0 0 0 2px var(--surface); }

/* Phone links, stars, kind chips */
.tel-link { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; border-bottom: 1px dashed var(--line); }
.tel-link:hover { color: var(--info); border-color: var(--info); }
.tel-link [data-ic] { font-size: 13px; color: var(--muted); }
.stars { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-size: 12px; }
.stars [data-ic] { font-size: 12px; }
.stars small { color: var(--muted); font-weight: 600; }
.stars.good { color: var(--success); }
.stars.mid { color: var(--warning); }
.stars.bad { color: var(--danger); }
.kind-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .3px; }
.kind-chip [data-ic] { font-size: 12px; }
.kind-chip.food { background: var(--surface-2); color: var(--muted); }
.kind-chip.courier { background: var(--secondary); color: var(--primary); }

/* Toolbar: filters on the left, search on the right */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.toolbar .search { margin-left: 0; width: 260px; }
.seg-btns { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg-btns button { border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 700; color: var(--muted); padding: 5px 11px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.seg-btns button:hover { color: var(--ink); }
.seg-btns button.on { background: var(--secondary); color: var(--primary); }
.seg-btns button .cnt { opacity: .7; }

/* Alert rows (watchdog) */
.alert-list { display: flex; flex-direction: column; }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.alert-row:last-child { border-bottom: 0; }
.alert-row .a-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; background: var(--danger-soft); color: var(--danger); font-size: 16px; }
.alert-row.kitchen_late .a-ic { background: var(--warning-soft); color: var(--warning); }
.alert-row .a-main { flex: 1; min-width: 0; }
.alert-row .a-title { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alert-row .a-sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.alert-row .a-min { font-size: 18px; font-weight: 800; color: var(--danger); font-variant-numeric: tabular-nums; min-width: 54px; text-align: right; }
.alert-row.kitchen_late .a-min { color: var(--warning); }
.alert-row .a-min small { font-size: 10.5px; font-weight: 700; color: var(--muted); display: block; }
.card.hot { border-color: var(--alert); box-shadow: 0 0 0 3px rgba(255,90,54,.12); }
.card-head .count-pill { background: var(--alert); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; }
.ok-state { display: flex; align-items: center; gap: 10px; padding: 16px; color: var(--success); font-weight: 700; }
.ok-state [data-ic] { width: 28px; height: 28px; border-radius: 50%; background: var(--success-soft); display: grid; place-items: center; font-size: 15px; }

/* Empty states */
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state .es-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--surface-2); display: inline-grid; place-items: center; font-size: 22px; color: var(--muted); margin-bottom: 10px; }
.empty-state .es-title { font-weight: 800; color: var(--ink); font-size: 14px; margin-bottom: 3px; }

/* Detail sections inside drawers */
.d-section { margin-top: 18px; }
.d-section > .d-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; font-weight: 800; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.d-banner { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; margin-bottom: 14px; font-size: 12.5px; font-weight: 600; }
.d-banner [data-ic] { font-size: 16px; margin-top: 1px; }
.d-banner.danger { background: var(--danger-soft); color: var(--danger); }
.d-banner.warn { background: var(--warning-soft); color: #8a5800; }
.d-banner.info { background: var(--info-soft); color: var(--info); }
.d-banner b { font-weight: 800; }
.party-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 620px) { .party-grid { grid-template-columns: 1fr; } }
.party { background: var(--surface-2); border-radius: 12px; padding: 11px 12px; min-width: 0; }
.party .p-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.party .p-name { font-weight: 800; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party .p-line { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.party .p-line .tel-link { font-size: 12px; }
.money-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.money-tbl td { padding: 5px 0; }
.money-tbl td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.money-tbl tr.total td { border-top: 1px solid var(--line); padding-top: 9px; font-weight: 800; font-size: 14px; }
.money-tbl tr.sub td { color: var(--muted); font-size: 11.5px; }
.ops-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; background: var(--surface-2); border-radius: 12px; }
.ops-actions .btn { background: var(--surface); }
.ops-actions .btn.primary { background: var(--secondary); }

/* Restaurant applications (cards) */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.app-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.app-card .ac-cover { height: 120px; background: var(--surface-2) center/cover no-repeat; position: relative; cursor: pointer; }
.app-card .ac-logo { position: absolute; left: 14px; bottom: -22px; width: 52px; height: 52px; border-radius: 14px; border: 3px solid var(--surface); background: var(--surface-2) center/cover no-repeat; box-shadow: var(--shadow); }
.app-card .ac-when { position: absolute; right: 10px; top: 10px; }
.app-card .ac-body { padding: 30px 14px 12px; flex: 1; }
.app-card .ac-name { font-weight: 800; font-size: 15px; }
.app-card .ac-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.app-card .ac-rows { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.app-card .ac-rows > div { display: flex; align-items: center; gap: 7px; min-width: 0; }
.app-card .ac-rows [data-ic] { color: var(--muted); font-size: 13px; flex: 0 0 auto; }
.app-card .ac-rows .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-card .ac-foot { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.app-card .ac-foot .btn { flex: 1; justify-content: center; }
.mini-map { height: 180px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.thumb-sm { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2) center/cover no-repeat; flex: 0 0 auto; display: grid; place-items: center; color: var(--muted); }
.doc-img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; display: block; }

@media (min-width: 1081px) { .stats.stats-5 { grid-template-columns: repeat(5, 1fr); } }

/* ---------- Settings & forms: help text, sticky save bar, simulator ---------- */
.help { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.sec-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 16px 0 8px; }
.savebar { position: sticky; bottom: 12px; z-index: 50; margin-top: 16px; display: none; align-items: center; gap: 10px;
  background: #111; color: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 13px; font-weight: 600; }
.savebar.show { display: flex; }
.savebar .spacer { flex: 1; }
.savebar .btn.ghost { color: #fff; border-color: rgba(255,255,255,.3); background: transparent; }
.sim { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.sim .sim-cell { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.sim .sim-l { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.sim .sim-v { font-size: 17px; font-weight: 800; margin-top: 4px; }
@media (max-width: 900px) { .sim { grid-template-columns: repeat(2, 1fr); } }
.ref-big { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; font-weight: 800; letter-spacing: .5px;
  background: var(--primary); color: var(--on-primary); padding: 3px 8px; border-radius: 6px; display: inline-block; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.status-pill.on { background: var(--warning-soft); color: #8a5800; }
.status-pill.off { background: var(--surface-2); color: var(--muted); }
.card.search-hidden { display: none; }
