@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

/* ══════════════════════════════════════════════
   MultiShop — Design System
   ══════════════════════════════════════════════ */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Sora', var(--font-sans);
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace;

  /* Brand — default (super admin / neutral) */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-grad: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  --brand-ring: rgba(99, 102, 241, .18);

  /* Semantic */
  --ok-bg: #ecfdf5;  --ok-fg: #047857;  --ok-br: #a7f3d0;  --ok: #10b981;
  --warn-bg: #fffbeb; --warn-fg: #b45309; --warn-br: #fde68a; --warn: #f59e0b;
  --err-bg: #fef2f2; --err-fg: #b91c1c; --err-br: #fecaca; --err: #ef4444;
  --info-bg: #eff6ff; --info-fg: #1d4ed8; --info-br: #bfdbfe; --info: #3b82f6;

  /* Surfaces */
  --canvas: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --surface-3: #f1f3f9;
  --line: #e9ecf3;
  --line-strong: #d7dceb;

  /* Text */
  --ink: #0b1220;
  --ink-2: #475569;
  --ink-3: #8894a8;

  /* Sidebar */
  --nav-bg: #0a0f1c;
  --nav-bg-2: #111827;
  --nav-line: rgba(255,255,255,.07);
  --nav-ink: rgba(255,255,255,.66);
  --nav-ink-hi: #ffffff;

  /* Metrics */
  --sidebar-w: 16.5rem;
  --sidebar-w-collapsed: 4.25rem;
  --topbar-h: 3.75rem;
  --tabbar-h: 4rem;

  --r-xs: .375rem;
  --r-sm: .5rem;
  --r-md: .75rem;
  --r-lg: 1rem;
  --r-xl: 1.375rem;
  --r-full: 999px;

  --sh-1: 0 1px 2px rgba(11,18,32,.05);
  --sh-2: 0 2px 6px rgba(11,18,32,.06), 0 1px 2px rgba(11,18,32,.04);
  --sh-3: 0 8px 24px rgba(11,18,32,.08);
  --sh-4: 0 20px 50px rgba(11,18,32,.14);

  --ease: cubic-bezier(.32,.72,0,1);
  --t: 170ms;
}

/* ─── Dark mode ─── */
[data-theme="dark"] {
  --canvas: #0a0e17;
  --surface: #111725;
  --surface-2: #151c2c;
  --surface-3: #1b2334;
  --line: #212a3d;
  --line-strong: #2c374d;
  --ink: #eef2f9;
  --ink-2: #a3b0c4;
  --ink-3: #6b7a92;
  --nav-bg: #080c15;
  --nav-bg-2: #0d1320;
  --sh-1: 0 1px 2px rgba(0,0,0,.3);
  --sh-2: 0 2px 6px rgba(0,0,0,.35);
  --sh-3: 0 8px 24px rgba(0,0,0,.45);
  --sh-4: 0 20px 50px rgba(0,0,0,.6);
  --ok-bg: rgba(16,185,129,.12);  --ok-fg: #34d399;  --ok-br: rgba(16,185,129,.3);
  --warn-bg: rgba(245,158,11,.12); --warn-fg: #fbbf24; --warn-br: rgba(245,158,11,.3);
  --err-bg: rgba(239,68,68,.12); --err-fg: #f87171; --err-br: rgba(239,68,68,.3);
  --info-bg: rgba(59,130,246,.12); --info-fg: #60a5fa; --info-br: rgba(59,130,246,.3);
  --brand-50: rgba(99,102,241,.12);
  --brand-100: rgba(99,102,241,.2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  font-size: .9375rem;
  line-height: 1.6;
  background: var(--canvas);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.022em; line-height: 1.25; }

a { color: var(--brand-600); text-decoration: none; transition: color var(--t) var(--ease); }
a:hover { color: var(--brand-700); }
[data-theme="dark"] a { color: var(--brand-400); }

::selection { background: var(--brand-100); color: var(--brand-700); }

:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: var(--r-xs); }

/* ══════════════ Shell ══════════════ */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--nav-bg) 0%, var(--nav-bg-2) 100%);
  border-right: 1px solid var(--nav-line);
  display: none;
  flex-direction: column;
  z-index: 60;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.14) transparent;
  transition: width .28s var(--ease);
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }
.sidebar.is-open { display: flex; animation: slide-in .28s var(--ease); }
@keyframes slide-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }

.brand {
  display: flex;
  align-items: center;
  gap: .6875rem;
  padding: 1.125rem 1rem;
  border-bottom: 1px solid var(--nav-line);
}
.brand-mark {
  width: 2.5rem; height: 2.15rem;
  border-radius: var(--r-sm);
  background: transparent;
  display: grid; place-items: center;
  flex-shrink: 0;
  overflow: visible;
}
.brand-logo,
.auth-logo,
.receipt-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand-text { min-width: 0; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: .9375rem;
  color: var(--nav-ink-hi);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-sub {
  font-size: .625rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--nav-ink);
  margin-top: .0625rem;
}

.nav-group { padding: .875rem .625rem .25rem; }
.nav-label {
  font-size: .625rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.3);
  padding: 0 .625rem .5rem;
}
.nav a {
  display: flex; align-items: center; gap: .6875rem;
  padding: .625rem .6875rem;
  margin-bottom: .125rem;
  border-radius: var(--r-sm);
  color: var(--nav-ink);
  font-size: .84375rem; font-weight: 500;
  transition: all var(--t) var(--ease);
  position: relative;
}
.nav a svg { width: 1.0625rem; height: 1.0625rem; flex-shrink: 0; opacity: .7; }
.nav a:hover { background: rgba(255,255,255,.055); color: var(--nav-ink-hi); }
.nav a:hover svg { opacity: 1; }
.nav a.is-active {
  background: linear-gradient(90deg, var(--brand-ring), transparent);
  color: var(--nav-ink-hi);
  font-weight: 600;
}
.nav a.is-active::before {
  content: '';
  position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--brand-500);
}
.nav a.is-active svg { opacity: 1; color: var(--brand-400); }

.sidebar-foot { margin-top: auto; padding: .625rem; border-top: 1px solid var(--nav-line); }

/* ─── Main ─── */
.main {
  flex: 1;
  min-width: 0;
  padding-bottom: calc(var(--tabbar-h) + .5rem);
  transition: margin-left .28s var(--ease);
}

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem;
  padding: 0 1rem;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-l { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.topbar-title {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-sub { font-size: .6875rem; color: var(--ink-3); font-weight: 500; margin-top: -.125rem; }
.topbar-r { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

.icon-btn {
  display: grid; place-items: center;
  width: 2.125rem; height: 2.125rem;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.icon-btn:hover { background: var(--line); color: var(--ink); }
.icon-btn svg { width: 1.0625rem; height: 1.0625rem; }

.avatar {
  width: 2.125rem; height: 2.125rem;
  border-radius: var(--r-full);
  background: var(--brand-grad);
  color: #fff;
  display: grid; place-items: center;
  font-size: .6875rem; font-weight: 700;
  flex-shrink: 0;
}
.who { display: none; }
@media (min-width: 640px) {
  .who { display: block; line-height: 1.3; }
  .who-name { font-size: .8125rem; font-weight: 600; }
  .who-role { font-size: .6875rem; color: var(--ink-3); }
}

.wrap {
  max-width: 78rem;
  margin: 0 auto;
  padding: 1.125rem 1rem 2rem;
  animation: rise .34s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ─── Tab bar (mobile) ─── */
.tabbar {
  position: fixed; inset: auto 0 0 0;
  height: var(--tabbar-h);
  display: flex;
  padding: 0 .25rem env(safe-area-inset-bottom, 0);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
  z-index: 50;
}
.tabbar a {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .1875rem;
  color: var(--ink-3);
  font-size: .625rem; font-weight: 600;
  letter-spacing: .01em;
  transition: color var(--t) var(--ease);
}
.tabbar a svg { width: 1.3125rem; height: 1.3125rem; transition: transform var(--t) var(--ease); }
.tabbar a.is-active { color: var(--brand-600); }
[data-theme="dark"] .tabbar a.is-active { color: var(--brand-400); }
.tabbar a.is-active svg { transform: translateY(-1px) scale(1.06); }

.burger { display: grid; }
.sidebar-collapse-btn { display: none; }
.sidebar-collapse-btn .sidebar-icon-expand { display: none; }
html.sidebar-collapsed .sidebar-collapse-btn .sidebar-icon-collapse { display: none; }
html.sidebar-collapsed .sidebar-collapse-btn .sidebar-icon-expand { display: block; }

@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .main { margin-left: var(--sidebar-w); padding-bottom: 0; }
  .tabbar { display: none; }
  .burger { display: none; }
  .sidebar-collapse-btn { display: grid; }
  .wrap { padding: 1.5rem 1.75rem 3rem; }
  .topbar { padding: 0 1.75rem; }

  html.sidebar-collapsed {
    --sidebar-w: var(--sidebar-w-collapsed);
  }
  html.sidebar-collapsed .sidebar .brand {
    justify-content: center;
    padding-inline: .625rem;
  }
  html.sidebar-collapsed .sidebar .brand-text,
  html.sidebar-collapsed .sidebar .nav-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
  }
  html.sidebar-collapsed .sidebar .nav a {
    font-size: 0;
    justify-content: center;
    padding-inline: .6875rem;
    gap: 0;
  }
  html.sidebar-collapsed .sidebar .nav a svg {
    width: 1.25rem;
    height: 1.25rem;
  }
  html.sidebar-collapsed .sidebar .nav-group {
    padding-inline: .375rem;
  }
  html.sidebar-collapsed .sidebar .sidebar-foot {
    padding-inline: .375rem;
  }
}

.scrim {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(8,12,21,.6);
  backdrop-filter: blur(3px);
  display: none;
  animation: fade .2s var(--ease);
}
.scrim.is-open { display: block; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 1024px) { .scrim { display: none !important; } }

/* ══════════════ Page header ══════════════ */
.phead {
  display: flex; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.phead-title { font-size: 1.375rem; font-weight: 700; }
.phead-sub { color: var(--ink-2); font-size: .875rem; margin-top: .1875rem; }
.phead-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ─── Hero (dashboards) ─── */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: 1.625rem 1.5rem;
  margin-bottom: 1.25rem;
  background: var(--hero, var(--brand-grad));
  color: #fff;
  box-shadow: var(--sh-3);
  display: flex; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between;
  gap: 1.25rem;
}
.hero::after {
  content: '';
  position: absolute; top: -45%; right: -8%;
  width: 22rem; height: 22rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 68%);
  pointer-events: none;
}
.hero-in { position: relative; z-index: 1; min-width: 0; }
.hero-chip {
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .25rem .625rem;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  font-size: .6875rem; font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: .625rem;
}
.hero h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: .25rem; }
.hero p { font-size: .875rem; opacity: .82; max-width: 32rem; }
.hero-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .5rem; }
.hero .btn-primary { background: #fff; color: #1f2937; box-shadow: 0 4px 14px rgba(0,0,0,.16); }
.hero .btn-primary:hover { background: #f8fafc; color: #111827; }
.hero .btn-ghost { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.26); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255,255,255,.24); color: #fff; }

/* ══════════════ Metrics ══════════════ */
.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .75rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 720px) { .metrics { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; } }
.metrics-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 720px) { .metrics-3 { grid-template-columns: repeat(3, minmax(0,1fr)); } }

.metric {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1rem;
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.metric:hover { transform: translateY(-2px); box-shadow: var(--sh-3); border-color: var(--line-strong); }
.metric-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .625rem; }
.metric-label {
  font-size: .6875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3);
}
.metric-value {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 800;
  letter-spacing: -.03em;
  margin-top: .3125rem;
  line-height: 1.1;
}
.metric-value.sm { font-size: 1rem; }
.metric-ico {
  width: 2.125rem; height: 2.125rem;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: var(--m-bg, var(--brand-50));
  color: var(--m-fg, var(--brand-600));
  flex-shrink: 0;
}
.metric-ico svg { width: 1.0625rem; height: 1.0625rem; }
.metric::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: var(--m-fg, var(--brand-500)); opacity: .8;
}

.m-indigo  { --m-fg:#6366f1; --m-bg:#eef2ff; }
.m-emerald { --m-fg:#10b981; --m-bg:#ecfdf5; }
.m-amber   { --m-fg:#f59e0b; --m-bg:#fffbeb; }
.m-cyan    { --m-fg:#06b6d4; --m-bg:#ecfeff; }
.m-rose    { --m-fg:#f43f5e; --m-bg:#fff1f2; }
.m-violet  { --m-fg:#8b5cf6; --m-bg:#f5f3ff; }
[data-theme="dark"] .m-indigo  { --m-bg:rgba(99,102,241,.14); }
[data-theme="dark"] .m-emerald { --m-bg:rgba(16,185,129,.14); }
[data-theme="dark"] .m-amber   { --m-bg:rgba(245,158,11,.14); }
[data-theme="dark"] .m-cyan    { --m-bg:rgba(6,182,212,.14); }
[data-theme="dark"] .m-rose    { --m-bg:rgba(244,63,94,.14); }
[data-theme="dark"] .m-violet  { --m-bg:rgba(139,92,246,.14); }

/* ══════════════ Panel (card) ══════════════ */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  margin-bottom: 1.125rem;
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem;
  padding: .875rem 1.125rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.panel-title { font-family: var(--font-display); font-size: .875rem; font-weight: 700; }
.panel-body { padding: 1.125rem; }
.panel-body.flush { padding: 0; }
.panel-foot {
  padding: .875rem 1.125rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  display: flex; gap: .5rem; flex-wrap: wrap;
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.125rem; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-2-wide { display: grid; grid-template-columns: 1fr; gap: 1.125rem; }
@media (min-width: 980px) { .grid-2-wide { grid-template-columns: 1.6fr 1fr; } }

/* ══════════════ Forms ══════════════ */
.form-row { margin-bottom: 1.125rem; }
.form-row > label,
.form-label {
  display: block;
  font-size: .8125rem; font-weight: 600;
  color: var(--ink);
  margin-bottom: .375rem;
}
.form-hint { font-size: .75rem; color: var(--ink-3); margin-top: .3125rem; }
.form-err { font-size: .75rem; color: var(--err); font-weight: 500; margin-top: .3125rem; }

.form-input, .form-select, .form-textarea,
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="datetime-local"],
input[type="search"], input[type="tel"], select, textarea {
  width: 100%;
  padding: .625rem .8125rem;
  font-family: var(--font-sans);
  font-size: .875rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
  appearance: none;
}
select, .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%238894a8' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .625rem center;
  background-size: 1.0625rem;
  padding-right: 2.25rem;
}
::placeholder { color: var(--ink-3); }
.form-input:hover, .form-select:hover, .form-textarea:hover,
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
.form-input:focus, .form-select:focus, .form-textarea:focus,
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3.5px var(--brand-ring);
}
textarea, .form-textarea { resize: vertical; min-height: 4.5rem; line-height: 1.55; }

input[type="checkbox"], .form-checkbox {
  width: 1.0625rem; height: 1.0625rem;
  accent-color: var(--brand-600);
  cursor: pointer;
}
.check-row { display: flex; align-items: center; gap: .5625rem; }
.check-row label { margin: 0; font-weight: 500; font-size: .875rem; cursor: pointer; }

ul.form-checkbox-list, .form-checkbox-list { list-style: none; display: grid; gap: .375rem; }
.form-checkbox-list li { list-style: none; }
.form-checkbox-list label {
  display: flex; align-items: center; gap: .5625rem;
  padding: .5625rem .75rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  font-size: .875rem; font-weight: 500;
  cursor: pointer;
  transition: all var(--t) var(--ease);
  margin: 0;
}
.form-checkbox-list label:hover { border-color: var(--brand-400); background: var(--surface-2); }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-grid .full { grid-column: 1 / -1; }

.stock-panel {
  grid-column: 1 / -1;
  margin-top: .25rem;
  padding: .875rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.stock-panel-head { flex-wrap: wrap; margin-bottom: 0; }
.stock-panel-head .form-hint { flex-basis: 100%; margin: .25rem 0 0 1.625rem; }
.stock-fields {
  display: grid;
  gap: 0 1rem;
  margin-top: .875rem;
  padding-top: .875rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 700px) {
  .stock-fields { grid-template-columns: 1fr 1fr; }
}
.stock-fields[hidden] { display: none !important; }

/* ══════════════ Buttons ══════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4375rem;
  padding: .5625rem 1rem;
  font-family: var(--font-sans);
  font-size: .84375rem; font-weight: 600;
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t) var(--ease);
}
.btn svg { width: 1rem; height: 1rem; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; pointer-events: none; }

.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 2px 8px var(--brand-ring);
}
.btn-primary:hover { color: #fff; box-shadow: 0 6px 18px var(--brand-ring); filter: brightness(1.05); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line);
  box-shadow: var(--sh-1);
}
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); border-color: var(--line-strong); }

.btn-soft { background: var(--brand-50); color: var(--brand-600); }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-700); }

.btn-ok { background: linear-gradient(135deg,#10b981,#059669); color:#fff; box-shadow: 0 2px 8px rgba(16,185,129,.28); }
.btn-ok:hover { color:#fff; box-shadow: 0 6px 18px rgba(16,185,129,.32); }
.btn-danger { background: linear-gradient(135deg,#ef4444,#dc2626); color:#fff; box-shadow: 0 2px 8px rgba(239,68,68,.28); }
.btn-danger:hover { color:#fff; }

.btn-sm { padding: .375rem .75rem; font-size: .78125rem; }
.btn-sm svg { width: .875rem; height: .875rem; }
.btn-lg { padding: .75rem 1.375rem; font-size: .9375rem; }
.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ══════════════ Toolbar ══════════════ */
.toolbar {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: .625rem;
  margin-bottom: 1.125rem;
}
.toolbar form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; flex: 1; min-width: 13rem; }
.toolbar form .search-input { flex: 1 1 12rem; min-width: 0; }
.toolbar form select { flex: 0 1 auto; width: auto; }

/* Filter bar living inside a panel rather than above it */
.panel-filters {
  padding: .75rem 1.125rem;
  border-bottom: 1px solid var(--line);
}
.sale-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.sale-filters .search-input { flex: 1 1 12rem; min-width: 0; }
.sale-filters select { flex: 0 1 auto; width: auto; }
.filter-summary { margin: .625rem 0 0; font-size: .78125rem; color: var(--ink-3); }
.filter-summary strong { color: var(--ink); font-weight: 600; }
.toolbar .spacer { flex: 1; }
.search-input {
  background: var(--surface-3) !important;
  border-color: transparent !important;
}
.search-input:focus { background: var(--surface) !important; border-color: var(--brand-500) !important; }

/* Segmented filter */
.segments {
  display: inline-flex;
  padding: .1875rem;
  gap: .125rem;
  background: var(--surface-3);
  border-radius: var(--r-sm);
  overflow-x: auto;
  max-width: 100%;
}
.segments a {
  padding: .375rem .75rem;
  border-radius: var(--r-xs);
  font-size: .78125rem; font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: all var(--t) var(--ease);
}
.segments a:hover { color: var(--ink); }
.segments a.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-1);
}

/* ══════════════ Rows / Lists ══════════════ */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: .875rem;
  padding: .875rem 1.125rem;
  border-bottom: 1px solid var(--line);
  transition: background var(--t) var(--ease);
}
.rows .row:last-child { border-bottom: none; }
.row:hover { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: .875rem; font-weight: 600; letter-spacing: -.008em; }
.row-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: .375rem;
  font-size: .78125rem; color: var(--ink-3);
  margin-top: .1875rem;
}
.row-end { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.row-amount { font-family: var(--font-display); font-weight: 700; font-size: .9375rem; }

.thumb {
  width: 2.375rem; height: 2.375rem;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: .875rem; font-weight: 700;
  flex-shrink: 0;
}
.thumb-plate {
  font-family: var(--font-mono);
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .03em;
  background: var(--surface-3);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.thumb-num { background: var(--surface-3); color: var(--ink-2); font-family: var(--font-display); }

/* ══════════════ Table ══════════════ */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .84375rem; }
thead th {
  padding: .6875rem 1.125rem;
  text-align: left;
  font-size: .625rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td {
  padding: .8125rem 1.125rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr { transition: background var(--t) var(--ease); }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .mono { font-family: var(--font-mono); font-size: .78125rem; }

/* ══════════════ Chips / Badges ══════════════ */
.chip {
  display: inline-flex; align-items: center; gap: .3125rem;
  padding: .1875rem .5625rem;
  border-radius: var(--r-full);
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .015em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip::before {
  content: ''; width: .375rem; height: .375rem; border-radius: 50%;
  background: currentColor; opacity: .8;
}
.chip-plain::before { display: none; }
.chip-ok   { background: var(--ok-bg);   color: var(--ok-fg);   border-color: var(--ok-br); }
.chip-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-br); }
.chip-err  { background: var(--err-bg);  color: var(--err-fg);  border-color: var(--err-br); }
.chip-info { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-br); }
.chip-mute { background: var(--surface-3); color: var(--ink-2); border-color: var(--line); }
.chip-sm { padding: .0625rem .4375rem; font-size: .625rem; gap: .25rem; }
.chip-sm::before { width: .3125rem; height: .3125rem; }

/* ══════════════ Alerts ══════════════ */
.alerts { max-width: 78rem; margin: 0 auto; padding: 1rem 1rem 0; }
@media (min-width: 1024px) { .alerts { padding: 1.25rem 1.75rem 0; } }
.alert {
  display: flex; align-items: flex-start; gap: .625rem;
  padding: .75rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: .84375rem; font-weight: 500;
  margin-bottom: .5rem;
  animation: rise .3s var(--ease);
}
.alert svg { width: 1.0625rem; height: 1.0625rem; flex-shrink: 0; margin-top: .0625rem; }
.alert-success { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-br); }
.alert-error, .alert-danger { background: var(--err-bg); color: var(--err-fg); border-color: var(--err-br); }
.alert-warning { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-br); }
.alert-info, .alert-debug { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-br); }

/* ══════════════ Empty state ══════════════ */
.empty { text-align: center; padding: 2.75rem 1.25rem; }
.empty-ico {
  width: 3.25rem; height: 3.25rem;
  margin: 0 auto .875rem;
  border-radius: var(--r-lg);
  background: var(--surface-3);
  display: grid; place-items: center;
  color: var(--ink-3);
}
.empty-ico svg { width: 1.5rem; height: 1.5rem; }
.empty-title { font-family: var(--font-display); font-size: .9375rem; font-weight: 700; margin-bottom: .25rem; }
.empty p { font-size: .84375rem; color: var(--ink-3); max-width: 22rem; margin: 0 auto 1rem; }

/* ══════════════ Auth ══════════════ */
.t-auth { overflow-x: hidden; }
.t-auth .install { display: none !important; }

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
}
@media (min-width: 960px) { .auth { grid-template-columns: 1.08fr 1fr; } }

.auth-side {
  display: flex;
  position: relative;
  overflow: hidden;
  padding: 2rem 1.5rem 1.75rem;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.75rem;
  min-height: 22rem;
  background: #070b16;
  color: #fff;
}
@media (min-width: 960px) {
  .auth-side { padding: 3.25rem 3.5rem 2.75rem; min-height: 100vh; }
}

.auth-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.auth-aurora {
  position: absolute; inset: -40%;
  background:
    radial-gradient(42% 38% at 78% 18%, rgba(99,102,241,.55), transparent 62%),
    radial-gradient(36% 42% at 12% 82%, rgba(6,182,212,.32), transparent 60%),
    radial-gradient(28% 30% at 52% 48%, rgba(168,85,247,.28), transparent 68%);
  animation: auth-aurora 16s ease-in-out infinite alternate;
  filter: blur(8px);
}
.auth-orb {
  position: absolute; border-radius: 50%;
  filter: blur(2px);
  mix-blend-mode: screen;
}
.auth-orb-a {
  width: 18rem; height: 18rem; top: -4rem; right: -3rem;
  background: radial-gradient(circle, rgba(129,140,248,.55), transparent 70%);
  animation: auth-drift 12s ease-in-out infinite;
}
.auth-orb-b {
  width: 14rem; height: 14rem; bottom: -3rem; left: -2rem;
  background: radial-gradient(circle, rgba(34,211,238,.38), transparent 70%);
  animation: auth-drift 15s ease-in-out infinite reverse;
}
.auth-orb-c {
  width: 9rem; height: 9rem; top: 42%; left: 38%;
  background: radial-gradient(circle, rgba(244,114,182,.32), transparent 70%);
  animation: auth-drift 10s ease-in-out infinite 1.2s;
}
.auth-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 28%, transparent 78%);
  animation: auth-grid 22s linear infinite;
}

.auth-side-in, .auth-list { position: relative; z-index: 1; }
.auth-brand {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1.75rem;
  animation: auth-rise .7s var(--ease) both;
}
.auth-mark {
  width: 4.25rem; height: 3.5rem;
  border-radius: 0;
  background: transparent;
  display: grid; place-items: center;
  box-shadow: none;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 18px rgba(184, 147, 32, .35));
}
.auth-mark-sm {
  width: 2.85rem; height: 2.35rem;
  filter: drop-shadow(0 4px 10px rgba(184, 147, 32, .22));
}
.auth-brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 1.0625rem;
  letter-spacing: -.02em; line-height: 1.15;
}
.auth-brand-sub {
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.5);
}
.auth-card-mark .auth-brand-name { color: var(--ink); }
.auth-card-mark .auth-brand-sub { color: var(--ink-3); }

.auth-side h1 {
  font-size: clamp(1.75rem, 4vw, 2.65rem); font-weight: 800;
  color: #fff; line-height: 1.08;
  letter-spacing: -.04em;
  margin-bottom: .875rem;
  max-width: 14ch;
  animation: auth-rise .8s var(--ease) .08s both;
}
.auth-side p {
  font-size: .9375rem; color: rgba(255,255,255,.62); line-height: 1.65;
  max-width: 30rem;
  animation: auth-rise .8s var(--ease) .16s both;
}
.auth-pills {
  display: flex; flex-wrap: wrap; gap: .4375rem;
  margin-top: 1.35rem;
  animation: auth-rise .8s var(--ease) .24s both;
}
.auth-pills span {
  font-size: .6875rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
  padding: .3125rem .625rem;
  border-radius: var(--r-full);
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}

.auth-list { display: none; gap: .75rem; }
@media (min-width: 960px) { .auth-list { display: grid; } }
.auth-item {
  display: flex; align-items: center; gap: .8125rem;
  color: rgba(255,255,255,.78); font-size: .875rem; font-weight: 500;
  animation: auth-rise .7s var(--ease) both;
}
.auth-item:nth-child(1) { animation-delay: .32s; }
.auth-item:nth-child(2) { animation-delay: .4s; }
.auth-item:nth-child(3) { animation-delay: .48s; }
.auth-item-ico {
  width: 1.875rem; height: 1.875rem;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.auth-item-ico svg { width: .9375rem; height: .9375rem; color: #a5b4fc; }

.auth-main {
  position: relative;
  display: grid; place-items: center;
  padding: 1.75rem 1.25rem 2rem;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(99,102,241,.08), transparent 42%),
    var(--canvas);
}
.auth-theme {
  position: absolute; top: 1.125rem; right: 1.125rem;
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--r-full);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--sh-1);
  cursor: pointer;
  display: grid; place-items: center;
  z-index: 2;
  transition: all var(--t) var(--ease);
}
.auth-theme:hover { color: var(--ink); border-color: var(--line-strong); transform: rotate(-12deg); }
.auth-theme svg { width: 1.125rem; height: 1.125rem; }

.auth-card {
  width: 100%; max-width: 25.5rem;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  padding: 2.15rem 1.85rem 1.75rem;
  box-shadow: var(--sh-4), 0 0 0 1px rgba(255,255,255,.4) inset;
  backdrop-filter: blur(18px);
  animation: auth-card-in .75s var(--ease) .12s both;
}
[data-theme="dark"] .auth-card {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: var(--sh-4), 0 0 0 1px rgba(255,255,255,.04) inset;
}
.auth-card-mark {
  display: flex; align-items: center; gap: .7rem;
  margin-bottom: 1.6rem;
}
@media (min-width: 960px) { .auth-card-mark { display: none; } }
.auth-card h2 { font-size: 1.55rem; font-weight: 800; margin-bottom: .3rem; }
.auth-card-sub { color: var(--ink-2); font-size: .875rem; margin-bottom: 1.6rem; }
.auth-card.center .auth-mark { margin: 0 auto 1.25rem; }

.auth-form .form-input { padding: .75rem .875rem; border-radius: .7rem; }
.pw-field { position: relative; }
.pw-input { padding-right: 2.85rem !important; }
.pw-toggle {
  position: absolute; top: 50%; right: .4rem;
  transform: translateY(-50%);
  width: 2.1rem; height: 2.1rem;
  border: 0; background: transparent;
  color: var(--ink-3);
  border-radius: var(--r-sm);
  cursor: pointer;
  display: grid; place-items: center;
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.pw-toggle:hover { color: var(--ink); background: var(--surface-3); }
.pw-toggle svg { width: 1.125rem; height: 1.125rem; }
.pw-ico-hide { display: none; }
.pw-field.is-visible .pw-ico-show { display: none; }
.pw-field.is-visible .pw-ico-hide { display: block; }

.auth-submit {
  position: relative; overflow: hidden;
  margin-top: .35rem; border-radius: .75rem;
}
.auth-submit::after {
  content: '';
  position: absolute; inset: 0 auto 0 -40%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-20deg);
  animation: auth-shine 3.4s ease-in-out infinite;
}
.auth-note {
  margin-top: 1.4rem; padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  font-size: .75rem; color: var(--ink-3);
  text-align: center; line-height: 1.7;
}
.auth-note-kicker { margin-bottom: .7rem; }
.auth-note code {
  font-family: var(--font-mono); font-size: .6875rem;
  background: var(--surface-3); padding: .125rem .375rem;
  border-radius: var(--r-xs); color: var(--ink-2);
}
.auth-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .375rem; }
.auth-chip {
  font-family: var(--font-mono); font-size: .6875rem;
  padding: .25rem .5rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.auth-chip:hover { border-color: var(--brand-400); color: var(--brand-600); background: var(--brand-50); }
.auth-foot {
  margin-top: 1.25rem;
  font-size: .6875rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3);
  animation: auth-rise .7s var(--ease) .3s both;
}

@keyframes auth-aurora {
  from { transform: scale(1) rotate(0deg); }
  to { transform: scale(1.12) rotate(12deg); }
}
@keyframes auth-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(18px, -22px); }
}
@keyframes auth-grid {
  from { background-position: 0 0; }
  to { background-position: 44px 44px; }
}
@keyframes auth-pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(99,102,241,.42), inset 0 1px 0 rgba(255,255,255,.28); }
  50% { box-shadow: 0 14px 38px rgba(99,102,241,.7), 0 0 0 8px rgba(99,102,241,.12), inset 0 1px 0 rgba(255,255,255,.28); }
}
@keyframes auth-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(22px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes auth-shine {
  0%, 55% { left: -40%; }
  80%, 100% { left: 130%; }
}

/* ══════════════ Business picker ══════════════ */
.biz-grid { display: grid; grid-template-columns: 1fr; gap: .875rem; }
@media (min-width: 640px) { .biz-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .biz-grid { grid-template-columns: repeat(3, 1fr); } }
.biz {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: .875rem;
  padding: 1.125rem;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  color: inherit;
  transition: all .22s var(--ease);
}
.biz::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--hero, var(--brand-grad)); }
.biz:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--line-strong); color: inherit; }
.biz-ico {
  width: 2.75rem; height: 2.75rem;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  font-size: 1.375rem;
  background: var(--surface-3);
  flex-shrink: 0;
}
.biz-body { flex: 1; min-width: 0; }
.biz-body h3 { font-size: .9375rem; font-weight: 700; margin-bottom: .125rem; }
.biz-body p { font-size: .78125rem; color: var(--ink-3); }
.biz-go { color: var(--ink-3); transition: transform .2s var(--ease), color .2s var(--ease); }
.biz-go svg { width: 1.125rem; height: 1.125rem; }
.biz:hover .biz-go { transform: translateX(3px); color: var(--brand-500); }

/* ══════════════ Tables (lounge floor) ══════════════ */
.floor { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 640px) { .floor { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .floor { grid-template-columns: repeat(6, 1fr); } }
.tbl-tile {
  padding: 1rem .75rem;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  text-align: center;
  transition: all var(--t) var(--ease);
}
.tbl-tile:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.tbl-tile-free { background: var(--ok-bg); border-color: var(--ok-br); }
.tbl-tile-occupied { background: var(--info-bg); border-color: var(--info-br); }
.tbl-tile-reserved { background: var(--warn-bg); border-color: var(--warn-br); }
.tbl-tile-name { font-family: var(--font-display); font-size: 1.125rem; font-weight: 800; }
.tbl-tile-seats { font-size: .6875rem; color: var(--ink-3); margin: .125rem 0 .5rem; }

/* ══════════════ Timeline ══════════════ */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-step { display: flex; gap: .875rem; position: relative; padding-bottom: 1.125rem; }
.tl-step:last-child { padding-bottom: 0; }
.tl-step::before {
  content: ''; position: absolute;
  left: .6875rem; top: 1.5rem; bottom: 0;
  width: 2px; background: var(--line);
}
.tl-step:last-child::before { display: none; }
.tl-dot {
  width: 1.375rem; height: 1.375rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  display: grid; place-items: center;
  flex-shrink: 0; z-index: 1;
}
.tl-dot svg { width: .6875rem; height: .6875rem; }
.tl-step.done .tl-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.tl-step.done::before { background: var(--ok); }
.tl-step.current .tl-dot { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-600); }
.tl-body { padding-top: .0625rem; }
.tl-title { font-size: .84375rem; font-weight: 600; }
.tl-time { font-size: .75rem; color: var(--ink-3); }

/* ══════════════ Receipt ══════════════ */
.receipt-page { min-height: 100vh; display: grid; place-items: start center; padding: 2rem 1rem; background: var(--canvas); }
.receipt {
  width: 100%; max-width: 22rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  overflow: hidden;
}
.receipt-head { padding: 1.5rem 1.25rem 1.125rem; text-align: center; border-bottom: 1px dashed var(--line-strong); }
.receipt-logo-wrap { width: 3.5rem; height: 2.9rem; margin: 0 auto .75rem; }
.receipt-biz { font-family: var(--font-display); font-size: 1.125rem; font-weight: 800; }
.receipt-meta { font-size: .75rem; color: var(--ink-3); margin-top: .25rem; }
.receipt-ref { font-family: var(--font-mono); font-size: .8125rem; font-weight: 600; margin-top: .5rem; letter-spacing: .02em; }
.receipt-body { padding: 1.125rem 1.25rem; }
.receipt-line { display: flex; justify-content: space-between; gap: .75rem; padding: .4375rem 0; font-size: .84375rem; }
.receipt-line span:first-child { color: var(--ink-2); }
.receipt-sep { border: none; border-top: 1px dashed var(--line-strong); margin: .875rem 0; }
.receipt-total { display: flex; justify-content: space-between; font-family: var(--font-display); font-size: 1rem; font-weight: 800; padding: .375rem 0; }
.receipt-foot { padding: 1rem 1.25rem 1.5rem; text-align: center; font-size: .6875rem; color: var(--ink-3); border-top: 1px dashed var(--line-strong); }

/* ══════════════ Misc ══════════════ */
.pager { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 1rem; }
.pager-info { font-size: .78125rem; color: var(--ink-3); }

.kv { display: grid; gap: .75rem; }
.kv-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .84375rem; }
.kv-k { color: var(--ink-3); }
.kv-v { font-weight: 600; text-align: right; }

.stack { display: grid; gap: 1.125rem; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ══════════════ Install banner ══════════════ */
.install {
  display: none;
  align-items: center; justify-content: space-between;
  gap: .75rem;
  padding: .6875rem 1.125rem;
  background: var(--brand-grad);
  color: #fff;
  font-size: .8125rem; font-weight: 500;
}
.install.show { display: flex; }
.install .btn { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.28); color: #fff; }
.install .btn:hover { background: rgba(255,255,255,.26); color: #fff; }

/* ══════════════ Module themes ══════════════ */
.t-laundry {
  --hero: linear-gradient(135deg,#0891b2 0%,#0369a1 55%,#4f46e5 100%);
  --brand-500:#0891b2; --brand-600:#0e7490; --brand-700:#155e75; --brand-400:#22d3ee;
  --brand-50:#ecfeff; --brand-100:#cffafe; --brand-ring:rgba(8,145,178,.2);
  --brand-grad: linear-gradient(135deg,#0891b2,#0e7490);
}
.t-barber {
  --hero: linear-gradient(135deg,#d97706 0%,#ea580c 55%,#b91c1c 100%);
  --brand-500:#ea580c; --brand-600:#c2410c; --brand-700:#9a3412; --brand-400:#fb923c;
  --brand-50:#fff7ed; --brand-100:#ffedd5; --brand-ring:rgba(234,88,12,.2);
  --brand-grad: linear-gradient(135deg,#ea580c,#c2410c);
}
.t-water {
  --hero: linear-gradient(135deg,#06b6d4 0%,#0284c7 55%,#1d4ed8 100%);
  --brand-500:#0284c7; --brand-600:#0369a1; --brand-700:#075985; --brand-400:#38bdf8;
  --brand-50:#f0f9ff; --brand-100:#e0f2fe; --brand-ring:rgba(2,132,199,.2);
  --brand-grad: linear-gradient(135deg,#0ea5e9,#0369a1);
}
.t-washbay {
  --hero: linear-gradient(135deg,#059669 0%,#0d9488 55%,#0e7490 100%);
  --brand-500:#059669; --brand-600:#047857; --brand-700:#065f46; --brand-400:#34d399;
  --brand-50:#ecfdf5; --brand-100:#d1fae5; --brand-ring:rgba(5,150,105,.2);
  --brand-grad: linear-gradient(135deg,#10b981,#047857);
}
.t-lounge {
  --hero: linear-gradient(135deg,#be123c 0%,#9d174d 55%,#6d28d9 100%);
  --brand-500:#e11d48; --brand-600:#be123c; --brand-700:#9f1239; --brand-400:#fb7185;
  --brand-50:#fff1f2; --brand-100:#ffe4e6; --brand-ring:rgba(225,29,72,.2);
  --brand-grad: linear-gradient(135deg,#e11d48,#be123c);
}
.t-lube {
  --hero: linear-gradient(135deg,#ea580c 0%,#dc2626 55%,#7f1d1d 100%);
  --brand-500:#dc2626; --brand-600:#b91c1c; --brand-700:#991b1b; --brand-400:#f87171;
  --brand-50:#fef2f2; --brand-100:#fee2e2; --brand-ring:rgba(220,38,38,.2);
  --brand-grad: linear-gradient(135deg,#dc2626,#b91c1c);
}
.t-admin {
  --hero: linear-gradient(135deg,#0f172a 0%,#334155 50%,#4338ca 100%);
}
.t-admin .brand-mark { background: transparent; box-shadow: none; }

[data-theme="dark"] .t-laundry, [data-theme="dark"] .t-barber, [data-theme="dark"] .t-water,
[data-theme="dark"] .t-washbay, [data-theme="dark"] .t-lounge, [data-theme="dark"] .t-lube {
  --brand-50: rgba(255,255,255,.06);
  --brand-100: rgba(255,255,255,.1);
}

/* ══════════════ Print ══════════════ */
@media print {
  .sidebar, .tabbar, .topbar, .install, .no-print, .scrim { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  .wrap, .receipt-page { padding: 0; max-width: none; }
  .receipt { border: none; box-shadow: none; max-width: none; }
  body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ─── Lounge waiter order picker ─── */
.menu-panel-head {
  flex-wrap: wrap;
  gap: .75rem;
}
.menu-search-wrap {
  position: relative;
  flex: 1;
  min-width: 11rem;
  max-width: 18rem;
  margin-left: auto;
}
.menu-search-icon {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--ink-3);
  pointer-events: none;
}
.menu-search-input {
  width: 100%;
  padding-left: 2.25rem !important;
  padding-right: 2.25rem !important;
}
.menu-search-clear {
  position: absolute;
  right: .375rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: var(--r-full);
  background: transparent;
  color: var(--ink-3);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.menu-search-clear:hover {
  background: var(--surface-3);
  color: var(--ink);
}
.menu-search-meta {
  padding: .5rem 1.125rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.menu-category.is-filtered-out { display: none !important; }
.menu-pick.is-filtered-out { display: none !important; }
.menu-category.is-search-active .menu-category-label {
  color: var(--brand-600);
  background: var(--brand-50);
}
[data-theme="dark"] .menu-category.is-search-active .menu-category-label {
  background: rgba(99, 102, 241, .12);
  color: var(--brand-400);
}
.picker-scroll.is-searching .menu-pick:not(.is-filtered-out) {
  animation: menu-match-in .22s var(--ease);
}
.picker-scroll {
  max-height: min(30rem, 55vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.picker-scroll::-webkit-scrollbar { width: 8px; }
.picker-scroll::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-full);
}
.picker-scroll::-webkit-scrollbar-track { background: transparent; }
.menu-category-label {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: .875rem 1.125rem .375rem;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.menu-no-results .empty { padding: 2rem 1.125rem; }
.order-items-summary {
  margin-top: .25rem;
  font-size: .8125rem;
  color: var(--ink-2);
  line-height: 1.4;
}
.order-row[hidden] { display: none !important; }

.menu-pick {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .8125rem 1.125rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.menu-pick:hover { background: var(--surface-2); }
.menu-pick:has(.menu-pick-check:checked),
.menu-pick.is-selected { background: var(--brand-50); }
.menu-pick.is-selected {
  animation: menu-select-pop .28s var(--ease);
  box-shadow: inset 3px 0 0 var(--brand-500);
}
.menu-pick-check {
  width: 1.125rem; height: 1.125rem;
  accent-color: var(--brand-600);
  flex-shrink: 0;
}
.menu-pick-body { flex: 1; min-width: 0; display: flex; justify-content: space-between; gap: .75rem; align-items: center; }
.menu-pick-name { font-weight: 600; font-size: .875rem; }
.menu-pick-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; flex-shrink: 0; }
.menu-pick-price { font-weight: 700; font-size: .84375rem; color: var(--brand-600); white-space: nowrap; }
.menu-pick-low { border-left: 3px solid var(--warn); }
.menu-pick-qty { display: flex; align-items: center; flex-shrink: 0; }
.menu-qty-input {
  width: 3.5rem !important;
  padding: .375rem .5rem !important;
  text-align: center;
  font-size: .8125rem !important;
  transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
}
.menu-pick.is-selected .menu-qty-input {
  animation: menu-qty-in .24s var(--ease);
}

/* Take order page motion */
.take-order-enter {
  animation: take-order-rise .42s var(--ease) both;
}
.take-order-enter-d1 { animation-delay: .05s; }
.take-order-enter-d2 { animation-delay: .12s; }
@keyframes take-order-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes menu-match-in {
  from { opacity: .5; transform: translateX(-4px); }
  to { opacity: 1; transform: none; }
}
@keyframes menu-select-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.012); }
  100% { transform: scale(1); }
}
@keyframes menu-qty-in {
  from { opacity: .4; transform: scale(.92); }
  to { opacity: 1; transform: none; }
}
@keyframes total-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.09); }
  100% { transform: scale(1); }
}
.order-total-bar {
  position: sticky;
  top: calc(var(--topbar-h) + .5rem);
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9375rem 1.25rem;
  border-radius: var(--r-lg);
  background: var(--brand-grad);
  color: #fff;
  box-shadow: var(--sh-3);
}
.order-total-text { display: grid; gap: .125rem; min-width: 0; }
.order-total-label {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .75;
}
.order-total-count { font-size: .8125rem; font-weight: 500; opacity: .9; }
.order-total-bar .order-total-value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.375rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.order-total-bar.is-compact {
  padding: .4375rem .875rem;
  border-radius: var(--r-md);
}
.order-total-bar.is-compact .order-total-text {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem .5rem;
}
.order-total-bar.is-compact .order-total-label { font-size: .625rem; }
.order-total-bar.is-compact .order-total-count { font-size: .75rem; }
.order-total-bar.is-compact .order-total-value {
  font-size: 1.25rem;
}
.order-total-value.total-bump {
  animation: total-bump .36s var(--ease);
  display: inline-block;
  transform-origin: right center;
}
#payment-panel {
  display: none;
}
#payment-panel.is-visible {
  display: block;
  animation: take-order-panel-in .34s var(--ease);
}
@keyframes take-order-panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.menu-panel .menu-pick {
  animation: menu-item-in .34s var(--ease) both;
}
.menu-panel .menu-category:nth-child(2) .menu-pick { animation-delay: .02s; }
.menu-panel .menu-category:nth-child(3) .menu-pick { animation-delay: .04s; }
.menu-panel .menu-category:nth-child(4) .menu-pick { animation-delay: .06s; }
@keyframes menu-item-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.payment-timing { display: grid; gap: .625rem; }
.payment-timing-compact {
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.payment-timing-panel .panel-body {
  padding: .75rem 1rem;
}
.payment-timing-panel .panel-head {
  padding: .6875rem 1rem;
}
.payment-timing-compact .timing-option {
  padding: .5625rem .6875rem;
  gap: .125rem .5rem;
  align-content: start;
}
.payment-timing-compact .timing-label {
  font-size: .8125rem;
}
.payment-timing-compact .timing-hint {
  font-size: .6875rem;
  line-height: 1.25;
}
.take-order-grid > .stack:last-child {
  align-self: start;
}
.timing-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .25rem .75rem;
  padding: .875rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.timing-option:has(input:checked) {
  border-color: var(--brand-500);
  background: var(--brand-50);
}
.timing-option input { grid-row: 1 / 3; align-self: center; accent-color: var(--brand-600); }
.timing-label { font-weight: 700; font-size: .875rem; }
.timing-hint { grid-column: 2; font-size: .78125rem; color: var(--ink-3); }
[data-theme="dark"] .menu-pick:has(.menu-pick-check:checked),
[data-theme="dark"] .timing-option:has(input:checked) { background: rgba(255,255,255,.06); }

/* Clickable part of a row that also carries its own action buttons */
.row-link {
  display: flex; align-items: center; gap: .875rem;
  flex: 1; min-width: 0;
}

/* Multi-select rendered as tappable chips */
.pick-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.pick-chip {
  display: inline-flex; align-items: center; gap: .4375rem;
  padding: .4375rem .75rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-full);
  font-size: .8125rem; font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), color var(--t) var(--ease);
}
.pick-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.pick-chip input { width: auto; margin: 0; accent-color: var(--brand-600); }
.pick-chip:has(input:checked) {
  border-color: var(--brand-500);
  background: var(--brand-50);
  color: var(--ink);
}
[data-theme="dark"] .pick-chip:has(input:checked) { background: rgba(255,255,255,.06); }

.hidden { display: none !important; }

.hubtel-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.65);
}
.hubtel-modal {
  position: relative;
  width: 100%;
  max-width: 37.5rem;
  height: 78vh;
  max-height: 640px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}
.hubtel-modal-head {
  display: flex;
  align-items: center;
  gap: .625rem;
  flex-shrink: 0;
  padding: .75rem 3.5rem .75rem .875rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
}
.hubtel-modal-brand-row { display: flex; align-items: center; gap: .625rem; min-width: 0; }
.hubtel-logo {
  width: 2.25rem; height: 1.85rem; flex-shrink: 0;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}
.hubtel-modal-brand { margin: 0; font-size: .875rem; font-weight: 800; letter-spacing: -.01em; }
.hubtel-modal-sub { margin: 0; font-size: .6875rem; opacity: .85; }
.hubtel-modal-amount { margin: 0 0 0 auto; font-size: .875rem; font-weight: 800; white-space: nowrap; }
.hubtel-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
}
.hubtel-modal-body { position: relative; flex: 1; min-height: 0; }
.hubtel-loader {
  position: absolute;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--surface);
}
.hubtel-spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid var(--line);
  border-top-color: var(--brand-600);
  border-radius: 50%;
  animation: hubtel-spin .8s linear infinite;
}
@keyframes hubtel-spin { to { transform: rotate(360deg); } }
#hubtel-iframe { width: 100%; height: 100%; border: none; }
