/* ==========================================================================
   QRush — shared design system
   Used by every screen (customer menu, kitchen, cashier, admin).
   Brand: teal ("rush") on deep slate. Rounded, airy, professional.
   ========================================================================== */

:root {
  --primary: #ea580c;
  --primary-500: #f97316;
  --primary-600: #c2410c;
  --primary-700: #9a3412;
  --primary-50: #fff7ed;
  --primary-100: #ffedd5;

  --ink: #0b1220;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e6ebf3;
  --line-strong: #d5deea;
  --bg: #f6f8fb;
  --card: #ffffff;

  --green: #16a34a;
  --green-bg: #e8f9ee;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --blue: #2563eb;
  --blue-bg: #e6efff;
  --red: #dc2626;
  --red-bg: #fee9e9;
  --violet: #7c3aed;
  --violet-bg: #f1ecff;

  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px -20px rgba(16, 24, 40, .28);
  --shadow-md: 0 2px 4px rgba(16, 24, 40, .05), 0 18px 38px -22px rgba(16, 24, 40, .35);
  --shadow-lg: 0 24px 60px -24px rgba(15, 23, 42, .35);
  --ring: 0 0 0 4px rgba(234, 88, 12, .14);

  --brand-grad: linear-gradient(135deg, #fb923c 0%, #ea580c 55%, #c2410c 100%);
  --nav-grad: linear-gradient(180deg, #0a1120 0%, #0e1a30 55%, #0b1526 100%);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --------------------------- Color themes ------------------------------- */
html[data-color-theme="spice"] {
  --primary: #ea580c;
  --primary-500: #f97316;
  --primary-600: #c2410c;
  --primary-700: #9a3412;
  --primary-50: #fff7ed;
  --primary-100: #ffedd5;
  --brand-grad: linear-gradient(135deg, #fb923c 0%, #ea580c 55%, #c2410c 100%);
  --ring: 0 0 0 4px rgba(234, 88, 12, .14);
}
html[data-color-theme="royal"] {
  --primary: #7c3aed;
  --primary-500: #8b5cf6;
  --primary-600: #6d28d9;
  --primary-700: #5b21b6;
  --primary-50: #f5f3ff;
  --primary-100: #ede9fe;
  --brand-grad: linear-gradient(135deg, #a78bfa 0%, #7c3aed 55%, #5b21b6 100%);
  --ring: 0 0 0 4px rgba(124, 58, 237, .14);
}
html[data-color-theme="garden"] {
  --primary: #16a34a;
  --primary-500: #22c55e;
  --primary-600: #15803d;
  --primary-700: #166534;
  --primary-50: #f0fdf4;
  --primary-100: #dcfce7;
  --brand-grad: linear-gradient(135deg, #4ade80 0%, #16a34a 55%, #15803d 100%);
  --ring: 0 0 0 4px rgba(22, 163, 74, .14);
}
html[data-color-theme="ocean"] {
  --primary: #2563eb;
  --primary-500: #3b82f6;
  --primary-600: #1d4ed8;
  --primary-700: #1e40af;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --brand-grad: linear-gradient(135deg, #60a5fa 0%, #2563eb 55%, #1d4ed8 100%);
  --ring: 0 0 0 4px rgba(37, 99, 235, .14);
}
html[data-color-theme="rose"] {
  --primary: #e11d48;
  --primary-500: #f43f5e;
  --primary-600: #be123c;
  --primary-700: #9f1239;
  --primary-50: #fff1f2;
  --primary-100: #ffe4e6;
  --brand-grad: linear-gradient(135deg, #fb7185 0%, #e11d48 55%, #be123c 100%);
  --ring: 0 0 0 4px rgba(225, 29, 72, .14);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--primary-600); text-decoration: none; }
a:hover { color: var(--primary-700); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
img { max-width: 100%; display: block; }
button { font-family: inherit; transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
.btn:hover:not(:disabled) { box-shadow: var(--shadow); }
.card, .step, .screen-card, .item, .ccard, .ocard {
  transition: box-shadow .18s ease, border-color .18s ease;
}
.card:hover, .step:hover, .screen-card:hover { box-shadow: var(--shadow-md); }
::selection { background: rgba(234, 88, 12, .22); }

/* Slim, quiet scrollbars */
* { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #cbd5e1; border: 3px solid transparent; background-clip: content-box; border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: #94a3b8; border: 3px solid transparent; background-clip: content-box; }

/* ------------------------------- Buttons -------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  font-size: 14px; font-weight: 600; cursor: pointer; background: #fff; color: var(--ink-2);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .06s;
  white-space: nowrap; line-height: 1.2; box-shadow: var(--shadow-xs);
}
.btn:hover { border-color: #c3cfdd; background: #fbfcfe; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--brand-grad); color: #fff; border-color: transparent;
  box-shadow: 0 1px 2px rgba(13, 148, 136, .35), 0 10px 20px -14px rgba(13, 148, 136, .9);
}
.btn-primary:hover { background: var(--brand-grad); filter: brightness(1.04); color: #fff; border-color: transparent; }

.btn-danger { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 8px 18px -14px rgba(220, 38, 38, .9); }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn-success { background: var(--green); color: #fff; border-color: var(--green); box-shadow: 0 8px 18px -14px rgba(22, 163, 74, .9); }
.btn-success:hover { background: #15803d; border-color: #15803d; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn-ghost:hover { background: #eef2f7; border-color: transparent; color: var(--ink); }
.btn-outline { background: #fff; border-color: var(--line-strong); color: var(--ink-2); box-shadow: var(--shadow-xs); }
.btn-outline:hover { background: #fff; border-color: var(--primary); color: var(--primary-700); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn svg { flex: none; }

/* -------------------------------- Forms --------------------------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); transition: .15s;
  box-shadow: var(--shadow-xs);
}
.input::placeholder { color: var(--muted-2); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
textarea.input { resize: vertical; min-height: 60px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

/* Switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; background: #cbd5e1; border-radius: 24px; cursor: pointer; transition: .2s;
}
.slider:before {
  content: ''; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider:before { transform: translateX(18px); }

/* -------------------------------- Cards --------------------------------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 18px; }
.card-head {
  padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  background: linear-gradient(180deg, #fcfdff, #fff);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-head h3 { font-size: 15.5px; letter-spacing: -.01em; }

/* ------------------------------ Badges ---------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; text-transform: capitalize; letter-spacing: .01em;
  border: 1px solid transparent;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.no-dot::before, .badge.muted::before { display: none; }
.badge.placed { background: var(--blue-bg); color: var(--blue); border-color: rgba(37, 99, 235, .12); }
.badge.accepted { background: var(--violet-bg); color: var(--violet); border-color: rgba(124, 58, 237, .12); }
.badge.preparing { background: var(--amber-bg); color: var(--amber); border-color: rgba(180, 83, 9, .14); }
.badge.ready { background: var(--green-bg); color: var(--green); border-color: rgba(22, 163, 74, .14); }
.badge.served { background: var(--primary-100); color: var(--primary-700); border-color: rgba(13, 148, 136, .16); }
.badge.paid { background: var(--green-bg); color: #15803d; border-color: rgba(22, 163, 74, .14); }
.badge.cancelled { background: var(--red-bg); color: var(--red); border-color: rgba(220, 38, 38, .12); }
.badge.veg { background: var(--green-bg); color: var(--green); }
.badge.nonveg { background: var(--red-bg); color: var(--red); }
.badge.muted { background: #f1f5f9; color: var(--muted); border-color: #e9eef5; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ------------------------------- Toast ---------------------------------- */
#toasts {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px;
  font-weight: 500; box-shadow: var(--shadow-lg); animation: pop .25s ease; max-width: 90vw;
  border: 1px solid rgba(255,255,255,.08);
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }
@keyframes pop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ------------------------------- Modal ---------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 15, 30, .55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 500; padding: 16px;
}
.modal {
  background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 460px; max-height: 90vh;
  overflow: auto; box-shadow: var(--shadow-lg); animation: pop .2s ease; border: 1px solid rgba(255,255,255,.4);
}
.modal-head { padding: 20px 22px 0; }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 16px 22px; }
.modal-foot { padding: 0 22px 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* ------------------------------ Data table ------------------------------ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.data th {
  text-align: left; padding: 11px 14px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); background: #f8fafc;
  border-bottom: 1px solid var(--line); font-weight: 700; position: sticky; top: 0; z-index: 1;
}
table.data td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #f8fbfd; }

/* ------------------------------ Topbar ---------------------------------- */
.topbar {
  height: 62px; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line); display: flex;
  align-items: center; justify-content: space-between; padding: 0 22px; position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.03em; }
.brand .brand-name { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.brand .logo {
  width: 32px; height: 32px; border-radius: 10px; background: var(--brand-grad);
  color: #fff; display: grid; place-items: center; font-size: 17px;
}
.brand .brand-mark {
  height: 42px; width: auto; max-width: 130px; display: block; flex: none;
  object-fit: contain; background: #fff; border-radius: 9px; padding: 3px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.brand:hover .brand-mark {
  transform: translateY(-1px) rotate(-6deg) scale(1.05);
  box-shadow: 0 12px 24px -10px rgba(13, 148, 136, .95);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }

/* ------------------------------ Shell (admin) --------------------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 242px; background: var(--nav-grad); color: #c7d2e2; padding: 18px 14px; flex: none;
  display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.sidebar::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 180px; pointer-events: none;
  background: radial-gradient(240px 140px at 20% 0%, rgba(20, 184, 166, .18), transparent 70%);
}
.sidebar .brand { color: #fff; padding: 6px 10px 20px; position: relative; }
.sidebar .brand .logo { background: var(--brand-grad); }
.side-nav-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: #64748b;
  font-weight: 700; padding: 14px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px;
  color: #b7c3d6; font-size: 14px; font-weight: 500; cursor: pointer; transition: .15s; border: none;
  background: transparent; width: 100%; text-align: left; position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(20, 184, 166, .22), rgba(20, 184, 166, .05));
  color: #5eead4; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .18);
}
.nav-item.active svg { opacity: 1; }
.nav-item.active::before {
  content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: #2dd4bf;
}
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 26px; max-width: 1240px; width: 100%; margin: 0 auto; }

/* ------------------------------- Stats ---------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  position: relative; overflow: hidden; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #2dd4bf, #0d9488 60%, transparent);
  opacity: .85;
}
.stat .stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat .stat-ico {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary-50); color: var(--primary-600); flex: none;
}
.stat .stat-ico svg { width: 17px; height: 17px; }
.stat .value { font-size: 30px; font-weight: 800; margin-top: 6px; letter-spacing: -.03em; line-height: 1.1; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* --------------------------- Page headings ------------------------------ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.eyebrow {
  font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary-600); margin-bottom: 4px;
}
.page-head h1 { font-size: 25px; letter-spacing: -.03em; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------ Misc utils ------------------------------ */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 700; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; }
.wrap { flex-wrap: wrap; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; }
.grow { flex: 1; } .none { flex: none; }
.right { text-align: right; } .center-text { text-align: center; }
.hidden { display: none !important; }
.empty {
  text-align: center; padding: 40px 20px; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: #fcfdff;
}
.empty .icon {
  font-size: 26px; margin: 0 auto 10px; width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center; background: var(--primary-50); color: var(--primary-600);
}
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary-100); color: var(--primary-700);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2);
  box-shadow: var(--shadow-xs);
}

/* Spinner */
.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.spinner.dark { border-color: var(--line); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive shell */
/* ------------------------------ Theme toggle ---------------------------- */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); display: grid; place-items: center;
  cursor: pointer; font-size: 16px; line-height: 1; flex: none; box-shadow: var(--shadow-xs);
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.theme-toggle:hover { border-color: var(--line-strong); transform: translateY(-1px); color: var(--primary-600); }
.theme-toggle:focus-visible { outline: none; box-shadow: var(--ring); }

/* ==========================================================================
   Dark theme
   Every surface is driven by the same tokens; these overrides cover the few
   components that intentionally use a literal white.
   ========================================================================== */
[data-theme="dark"] {
  --primary: #14b8a6;
  --primary-500: #2dd4bf;
  --primary-600: #2dd4bf;
  --primary-700: #5eead4;
  --primary-50: rgba(20, 184, 166, .12);
  --primary-100: rgba(20, 184, 166, .2);

  --ink: #e8eef9;
  --ink-2: #c3cddd;
  --muted: #94a3b8;
  --muted-2: #6b7c93;
  --line: #1e2c44;
  --line-strong: #2b3b57;
  --bg: #070e1a;
  --card: #0e1929;

  --green: #4ade80;
  --green-bg: rgba(22, 163, 74, .16);
  --amber: #fbbf24;
  --amber-bg: rgba(245, 158, 11, .14);
  --blue: #60a5fa;
  --blue-bg: rgba(59, 130, 246, .16);
  --red: #f87171;
  --red-bg: rgba(239, 68, 68, .15);
  --violet: #a78bfa;
  --violet-bg: rgba(139, 92, 246, .16);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 16px 34px -22px rgba(0, 0, 0, .9);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 48px -26px rgba(0, 0, 0, .95);
  --shadow-lg: 0 30px 70px -28px rgba(0, 0, 0, .9);
  --ring: 0 0 0 4px rgba(45, 212, 191, .2);
  --nav-grad: linear-gradient(180deg, #070d18 0%, #0b1526 55%, #081120 100%);
}

[data-theme="dark"] body {
  background:
    radial-gradient(900px 460px at 6% -10%, rgba(20, 184, 166, .13), transparent 60%),
    radial-gradient(760px 420px at 100% 0%, rgba(13, 148, 136, .09), transparent 58%),
    var(--bg);
}

[data-theme="dark"] * { scrollbar-color: #334155 transparent; }
[data-theme="dark"] *::-webkit-scrollbar-thumb { background: #334155; background-clip: content-box; }
[data-theme="dark"] *::-webkit-scrollbar-thumb:hover { background: #475569; background-clip: content-box; }

[data-theme="dark"] .btn { background: var(--card); }
[data-theme="dark"] .btn:hover { background: #16243a; border-color: #3a4b68; }
[data-theme="dark"] .btn-ghost:hover { background: rgba(255, 255, 255, .07); }
[data-theme="dark"] .input,
[data-theme="dark"] select.input,
[data-theme="dark"] textarea.input { background: #0b1524; }
[data-theme="dark"] select.input option { background: #0e1929; color: var(--ink); }
[data-theme="dark"] .card-head { background: linear-gradient(180deg, #111e31, var(--card)); }
[data-theme="dark"] .badge.muted { background: rgba(148, 163, 184, .12); border-color: var(--line); }
[data-theme="dark"] .modal { background: var(--card); border-color: var(--line); }
[data-theme="dark"] table.data th { background: #0b1524; }
[data-theme="dark"] table.data tbody tr:hover { background: rgba(255, 255, 255, .035); }
[data-theme="dark"] .topbar { background: rgba(8, 15, 27, .82); }
[data-theme="dark"] .stat { background: var(--card); }
[data-theme="dark"] .empty { background: rgba(255, 255, 255, .02); }
[data-theme="dark"] .chip { background: #111d30; }
[data-theme="dark"] .avatar { color: #5eead4; }
[data-theme="dark"] .logo-white { filter: none; }
[data-theme="dark"] .spinner.dark { border-color: var(--line); border-top-color: var(--primary-500); }

@media (max-width: 860px) {
  .content { padding: 18px; }
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: sticky; top: 0; z-index: 30; flex-direction: row; overflow-x: auto;
    align-items: center; padding: 10px; gap: 2px; background: var(--nav-grad);
  }
  .sidebar::before { display: none; }
  .sidebar .brand { padding: 0 10px 0 4px; }
  .side-nav-label { display: none; }
  .nav-item { white-space: nowrap; width: auto; }
  .nav-item.active::before { display: none; }
  .side-foot { border-top: none; padding-top: 0; display: flex; align-items: center; gap: 4px; }
}

/* ------------------------- Brand logo on login / console ------------------ */
.auth-brand-logo {
  display: block; width: 100%; max-width: 330px; height: auto; margin: 0 auto 18px;
  background: #fff; border-radius: 16px; padding: 12px 16px; box-sizing: border-box;
}
.sa-brand-logo {
  display: block; width: 100%; max-width: 300px; height: auto;
  background: #fff; border-radius: 14px; padding: 10px 14px;
}
@media (max-width: 520px) {
  .auth-brand-logo { max-width: 260px; }
  .sa-brand-logo { max-width: 240px; }
}
