/* =============================================================
   QR MENU — Premium Design System v6
   Brand: Deep Emerald + Warm Amber
   Type:  FiraGO (KA/EN/RU) + JetBrains Mono
   Refs:  Stripe, Linear, Notion, Toast POS, Square
   ============================================================= */

/* ============ TOKENS (LIGHT) ============ */
:root {
  /* Neutrals — warm off-white → true black */
  --bg:              #fbfaf7;
  --bg-elevated:     #ffffff;
  --bg-soft:         #f3f1ec;
  --surface:         #ffffff;
  --surface-2:       #f7f5f0;
  --ink:             #0d0f0e;
  --ink-2:           #383c3a;
  --ink-3:           #6f7472;
  --ink-4:           #a3a7a4;
  --line:            #e6e2d9;
  --line-strong:     #cec9bc;
  --focusring:       rgb(15 122 92 / 25%);

  /* Brand — deep emerald + warm amber */
  --brand:           #0f7a5c;
  --brand-deep:      #0a5a44;
  --brand-hover:     #0e6a50;
  --brand-soft:      #dcefe6;
  --brand-softer:    #ebf5f0;
  --brand-fg:        #ffffff;

  --accent:          #d97706;
  --accent-deep:     #b45309;
  --accent-soft:     #fef3c7;
  --accent-softer:   #fefaee;

  /* Semantic */
  --success:         #0f7a5c;
  --success-soft:    #d1ede0;
  --warning:         #d97706;
  --warning-soft:    #fef3c7;
  --danger:          #c32828;
  --danger-soft:     #fadcdc;
  --info:            #2563eb;
  --info-soft:       #dbeafe;

  /* Type scale — Perfect Fourth (1.333) */
  --fs-xs:    12px;
  --fs-sm:    13px;
  --fs-base:  14px;
  --fs-md:    15px;
  --fs-lg:    17px;
  --fs-xl:    20px;
  --fs-2xl:   24px;
  --fs-3xl:   32px;
  --fs-4xl:   44px;
  --fs-5xl:   56px;
  --fs-6xl:   72px;

  /* Spacing (4px step) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 40px;
  --sp-9: 56px; --sp-10: 72px; --sp-11: 96px; --sp-12: 128px;

  /* Radius */
  --r-xs: 4px;  --r-sm: 6px;  --r-md: 10px; --r-lg: 14px;
  --r-xl: 20px; --r-2xl: 28px; --r-full: 999px;

  /* Shadow — warm undertone */
  --sh-0: 0 0 0 1px rgb(13 15 14 / 5%);
  --sh-1: 0 1px 2px rgb(13 15 14 / 5%), 0 1px 3px rgb(13 15 14 / 4%);
  --sh-2: 0 4px 6px rgb(13 15 14 / 5%), 0 2px 4px rgb(13 15 14 / 4%);
  --sh-3: 0 10px 20px rgb(13 15 14 / 6%), 0 3px 6px rgb(13 15 14 / 4%);
  --sh-4: 0 24px 50px -12px rgb(13 15 14 / 18%);
  --sh-brand: 0 8px 24px -6px rgb(15 122 92 / 35%);
  --sh-accent: 0 8px 24px -6px rgb(217 119 6 / 35%);

  /* Motion */
  --ease:     cubic-bezier(.2,.8,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --t-fast:   120ms;
  --t-med:    220ms;
  --t-slow:   380ms;

  /* Font — FiraGO covers Latin + Georgian + Cyrillic */
  --ff-sans:    'FiraGO', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --ff-display: 'FiraGO', 'Inter', -apple-system, sans-serif;
  --ff-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Layout */
  --content-w: 1200px;
  --nav-h: 68px;
  --page-top-h: 76px;
  --aside-w: 260px;
}

/* ============ TOKENS (DARK) ============ */
[data-theme="dark"] {
  --bg:              #0c0e0d;
  --bg-elevated:     #14171b;
  --bg-soft:         #191d1c;
  --surface:         #14171b;
  --surface-2:       #1b1f1e;
  --ink:             #f2efe6;
  --ink-2:           #c0c4c1;
  --ink-3:           #878b88;
  --ink-4:           #565a58;
  --line:            #2a2f2d;
  --line-strong:     #3a413e;
  --focusring:       rgb(30 200 150 / 35%);

  --brand:           #1ec896;
  --brand-deep:      #159b74;
  --brand-hover:     #26d19f;
  --brand-soft:      rgb(30 200 150 / 12%);
  --brand-softer:    rgb(30 200 150 / 6%);
  --brand-fg:        #0c0e0d;

  --accent:          #f59e0b;
  --accent-deep:     #d97706;
  --accent-soft:     rgb(245 158 11 / 14%);
  --accent-softer:   rgb(245 158 11 / 6%);

  --success:         #1ec896;
  --success-soft:    rgb(30 200 150 / 14%);
  --warning:         #f59e0b;
  --warning-soft:    rgb(245 158 11 / 14%);
  --danger:          #ef4444;
  --danger-soft:     rgb(239 68 68 / 14%);
  --info:            #3b82f6;
  --info-soft:       rgb(59 130 246 / 14%);

  --sh-0: 0 0 0 1px rgb(255 255 255 / 6%);
  --sh-1: 0 1px 2px rgb(0 0 0 / 40%), 0 1px 3px rgb(0 0 0 / 25%);
  --sh-2: 0 4px 6px rgb(0 0 0 / 30%), 0 2px 4px rgb(0 0 0 / 20%);
  --sh-3: 0 10px 20px rgb(0 0 0 / 35%), 0 3px 6px rgb(0 0 0 / 20%);
  --sh-4: 0 24px 50px -12px rgb(0 0 0 / 65%);
  --sh-brand: 0 8px 24px -6px rgb(30 200 150 / 40%);
  --sh-accent: 0 8px 24px -6px rgb(245 158 11 / 30%);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
body {
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01','cv11';
  transition: background-color var(--t-med), color var(--t-med);
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-xs); }
::selection { background: var(--brand-soft); color: var(--brand-deep); }
[data-theme="dark"] ::selection { color: var(--brand); }

/* ============ HEADINGS ============ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display); font-weight: 700;
  letter-spacing: -0.022em; line-height: 1.18; color: var(--ink);
}
h1 { font-size: var(--fs-5xl); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); font-weight: 600; }

/* ============ HELPERS ============ */
.display { font-family: var(--ff-display); letter-spacing: -0.028em; }
.mono { font-family: var(--ff-mono); font-feature-settings: 'tnum'; }
.muted, .text-muted { color: var(--ink-3); }
.text-brand { color: var(--brand); }
.text-accent { color: var(--accent); }
.center, .text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); } .gap-5 { gap: var(--sp-5); } .gap-6 { gap: var(--sp-6); }
.grid { display: grid; }
.grow, .flex-1 { flex: 1; }
.w-full { width: 100%; }
.mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); } .mt-8 { margin-top: var(--sp-8); }
.mb-4 { margin-bottom: var(--sp-4); } .mb-6 { margin-bottom: var(--sp-6); }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.divider { height: 1px; background: var(--line); margin: var(--sp-6) 0; }

/* ============ EYEBROW ============ */
.eyebrow {
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--brand); margin-bottom: var(--sp-4);
  display: inline-flex; align-items: center; gap: var(--sp-2);
}
.eyebrow::before {
  content: ''; width: 20px; height: 2px; background: currentColor; display: inline-block;
}
.eyebrow.accent { color: var(--accent); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 600; font-size: var(--fs-sm); line-height: 1;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  white-space: nowrap; user-select: none;
  border: 1px solid transparent;
}
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--brand); color: var(--brand-fg); box-shadow: var(--sh-1); }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); box-shadow: var(--sh-brand); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(0); box-shadow: var(--sh-1); }

.btn-accent { background: var(--accent); color: #fff; box-shadow: var(--sh-1); }
.btn-accent:hover:not(:disabled) { background: var(--accent-deep); box-shadow: var(--sh-accent); transform: translateY(-1px); }

.btn-secondary { background: var(--ink); color: var(--bg-elevated); }
.btn-secondary:hover:not(:disabled) { background: var(--ink-2); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-soft); border-color: var(--line-strong); }

.btn-soft { background: var(--bg-soft); color: var(--ink); }
.btn-soft:hover:not(:disabled) { background: var(--line); }

.btn-brand-soft { background: var(--brand-soft); color: var(--brand-deep); }
[data-theme="dark"] .btn-brand-soft { color: var(--brand); }
.btn-brand-soft:hover:not(:disabled) { background: var(--brand); color: var(--brand-fg); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #a51e1e; }

.btn-xs { padding: 6px 10px; font-size: var(--fs-xs); border-radius: var(--r-xs); }
.btn-sm { padding: 8px 12px; font-size: var(--fs-sm); }
.btn-lg { padding: 14px 22px; font-size: var(--fs-md); border-radius: var(--r-md); }
.btn-xl { padding: 16px 28px; font-size: var(--fs-lg); border-radius: var(--r-md); font-weight: 700; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--r-sm); }

.btn-group { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.btn-group .btn { border-radius: 0; border: 0; box-shadow: none; }
.btn-group .btn + .btn { border-left: 1px solid var(--line); }

/* ============ FORM ============ */
.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.field label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; color: var(--ink-2); text-transform: uppercase; }
.field .hint { font-size: var(--fs-xs); color: var(--ink-3); }
.field .err { font-size: var(--fs-xs); color: var(--danger); }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="number"], .field input[type="url"], .field input[type="search"],
.field input[type="tel"], .field input[type="file"], .field input[type="date"],
.field select, .field textarea,
input.input, select.input, textarea.input {
  width: 100%; padding: 11px 13px; font: inherit; font-size: var(--fs-sm);
  background: var(--bg-elevated); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field select:focus, .field textarea:focus,
input.input:focus, select.input:focus, textarea.input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focusring);
}
.field textarea { resize: vertical; min-height: 88px; line-height: 1.55; }
.field.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); }
@media (max-width: 640px) { .field.grid3 { grid-template-columns: 1fr; } }

.checkbox, .radio { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.checkbox input, .radio input { width: 16px; height: 16px; accent-color: var(--brand); }

/* Segmented control */
.seg {
  display: inline-flex; background: var(--bg-soft); padding: 4px;
  border-radius: var(--r-sm); border: 1px solid var(--line); gap: 2px;
}
.seg > button, .seg > label {
  padding: 7px 14px; border-radius: 4px; font-size: var(--fs-xs); font-weight: 600;
  color: var(--ink-3); cursor: pointer; transition: all var(--t-fast);
  background: transparent; border: 0;
}
.seg > button.active, .seg > label.active, .seg > button[aria-pressed="true"] {
  background: var(--bg-elevated); color: var(--ink); box-shadow: var(--sh-1);
}

/* ============ CARDS ============ */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-6);
}
.card-elevated { box-shadow: var(--sh-2); border-color: transparent; }
.card-bordered { background: transparent; }
.card-padded { padding: var(--sp-7); }
.card-h {
  display: flex; align-items: center; justify-content: space-between;
  margin: calc(var(--sp-6) * -1); margin-bottom: var(--sp-5); padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--line); font-size: var(--fs-lg); font-weight: 700;
}
.card-inset { background: var(--surface-2); border-radius: var(--r-md); padding: var(--sp-5); margin: var(--sp-4) 0; }
.card-interactive { cursor: pointer; transition: all var(--t-fast); }
.card-interactive:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--sh-2); }

/* ============ BADGES ============ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 700; line-height: 1.5; letter-spacing: 0.01em; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--bg-soft); color: var(--ink-2); }
.badge-brand { background: var(--brand-soft); color: var(--brand-deep); }
[data-theme="dark"] .badge-brand { color: var(--brand); }
.badge-accent { background: var(--accent-soft); color: var(--accent-deep); }
[data-theme="dark"] .badge-accent { color: var(--accent); }
.badge-solid { background: var(--ink); color: var(--bg-elevated); }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ============ TABLES ============ */
table.data {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; font-size: var(--fs-sm);
}
table.data th, table.data td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background-color var(--t-fast); }
table.data tbody tr:hover { background: var(--bg-soft); }
table.data .num { font-family: var(--ff-mono); font-weight: 600; }

/* ============ TABS ============ */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: var(--sp-6); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 10px 16px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--t-fast), border-color var(--t-fast); white-space: nowrap;
}
.tab:hover { color: var(--ink-2); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ============ ALERTS ============ */
.alert { padding: 14px 16px; border-radius: var(--r-md); font-size: var(--fs-sm); display: flex; gap: var(--sp-3); align-items: flex-start; line-height: 1.55; }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert code { font-family: var(--ff-mono); font-size: 12px; background: rgb(0 0 0 / 6%); padding: 1px 6px; border-radius: 4px; }

/* ============ TOOLTIP ============ */
.has-tooltip { position: relative; }
.has-tooltip[data-tip]::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(4px); background: var(--ink); color: var(--bg-elevated);
  padding: 6px 10px; border-radius: var(--r-xs); font-size: var(--fs-xs); font-weight: 500;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity var(--t-fast), transform var(--t-fast);
  z-index: 100;
}
.has-tooltip:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ TOAST ============ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px); pointer-events: none; }
.toast {
  pointer-events: auto; background: var(--ink); color: var(--bg-elevated);
  padding: 12px 18px; border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 500;
  box-shadow: var(--sh-3); display: flex; gap: 10px; align-items: center; min-width: 260px;
  opacity: 0; transform: translateY(-8px); transition: opacity var(--t-med), transform var(--t-med);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--brand); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
.toast.warning { background: var(--accent); color: #fff; }
.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0; background: rgb(13 15 14 / 60%); backdrop-filter: blur(6px);
  z-index: 150; display: none; align-items: center; justify-content: center; padding: 20px;
  animation: fade-in 180ms var(--ease);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--r-xl); padding: var(--sp-6) var(--sp-7);
  max-width: 480px; width: 100%; max-height: 90vh; overflow: auto;
  animation: pop-in 240ms var(--ease-out); box-shadow: var(--sh-4);
  border: 1px solid var(--line);
}
.modal h3 { font-size: var(--fs-xl); margin-bottom: var(--sp-3); }
.modal p { color: var(--ink-2); margin-bottom: var(--sp-5); line-height: 1.65; }
.modal-actions { display: flex; gap: var(--sp-3); justify-content: flex-end; margin-top: var(--sp-6); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.94); } }

/* ============ DRAWER ============ */
.drawer { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.drawer-overlay { position: absolute; inset: 0; background: rgb(13 15 14 / 55%); backdrop-filter: blur(3px); opacity: 0; transition: opacity var(--t-med); }
.drawer-inner {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 100%; max-width: 440px; background: var(--bg-elevated);
  transform: translateX(100%); transition: transform var(--t-med) var(--ease);
  padding: 20px; display: flex; flex-direction: column;
  box-shadow: -20px 0 40px -10px rgb(0 0 0 / 14%);
}
.drawer.open { pointer-events: auto; }
.drawer.open .drawer-overlay { opacity: 1; }
.drawer.open .drawer-inner { transform: translateX(0); }

/* ============ SKELETON ============ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-soft) 0%, var(--line) 50%, var(--bg-soft) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-sm); display: block;
}
.skeleton-text { height: 12px; margin-bottom: 6px; }
.skeleton-text.lg { height: 18px; }
.skeleton-text.xl { height: 24px; }
.skeleton-circle { border-radius: 50%; }
.skeleton-card { height: 120px; border-radius: var(--r-lg); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Spinner */
.spinner {
  width: 20px; height: 20px; border: 2px solid var(--line);
  border-top-color: var(--brand); border-radius: 50%;
  animation: spin 0.9s linear infinite; display: inline-block;
}
.spinner-lg { width: 40px; height: 40px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ EMPTY STATE ============ */
.empty { padding: 64px 32px; text-align: center; color: var(--ink-2); background: var(--surface); border-radius: var(--r-lg); border: 1px dashed var(--line); }
.empty .icon { font-size: 44px; margin-bottom: var(--sp-4); display: block; opacity: 0.6; }
.empty h3 { font-size: var(--fs-xl); margin-bottom: var(--sp-2); color: var(--ink); }
.empty p { max-width: 420px; margin: 0 auto var(--sp-5); font-size: var(--fs-sm); line-height: 1.6; }
.empty .btn { margin-top: var(--sp-3); }
.empty-state { padding: 48px 24px; text-align: center; color: var(--ink-3); font-size: var(--fs-sm); }

/* ============ ERROR STATE ============ */
.error-state {
  padding: 64px 32px; text-align: center; background: var(--surface);
  border-radius: var(--r-lg); border: 1px solid var(--danger-soft); max-width: 520px; margin: 0 auto;
}
.error-state .icon { font-size: 52px; color: var(--danger); margin-bottom: var(--sp-4); display: block; }
.error-state h3 { font-size: var(--fs-2xl); margin-bottom: var(--sp-2); }
.error-state p { color: var(--ink-2); margin-bottom: var(--sp-5); font-size: var(--fs-sm); line-height: 1.6; }

/* ============ THEME TOGGLE (top-right floater) ============ */
.theme-toggle {
  position: fixed; top: 16px; right: 16px; z-index: 90;
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink-2); font-size: 16px;
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--sh-1);
  transition: transform var(--t-fast), background var(--t-fast);
}
.theme-toggle:hover { transform: rotate(20deg); color: var(--ink); }
.theme-toggle .sun { display: block; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

/* Sometimes inline in nav */
.nav .theme-toggle-inline { position: static; box-shadow: none; }

/* ============ NAV (header — landing) ============ */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px; background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  min-height: var(--nav-h);
}
.nav-logo { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-lg); display: inline-flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
.nav-logo .logo-dot {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  display: inline-grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800;
  box-shadow: 0 2px 8px rgb(15 122 92 / 30%);
  position: relative; overflow: hidden;
}
.nav-logo .logo-dot::after { content: 'Q'; font-family: var(--ff-display); }
.nav-logo .logo-dot::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgb(255 255 255 / 20%) 50%, transparent 60%);
  animation: logo-shine 6s ease-in-out infinite;
}
@keyframes logo-shine { 0%, 100% { transform: translate(-30%, -30%); } 50% { transform: translate(30%, 30%); } }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 14px; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); transition: all var(--t-fast); position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--bg-soft); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

@media (max-width: 900px) {
  .nav { padding: 12px 16px; }
  .nav-links { display: none; }
  .nav-cta .btn-ghost:not(.mobile-menu-btn) { display: none; }
}

/* Mobile menu button */
.mobile-menu-btn { width: 40px; height: 40px; padding: 0; display: none; }
@media (max-width: 900px) { .mobile-menu-btn { display: inline-grid; place-items: center; } }

/* ============ TRUST BAR ============ */
.trust-bar {
  padding: 14px 32px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); display: flex; align-items: center; gap: 24px;
  flex-wrap: wrap; font-size: var(--fs-xs);
}
.trust-bar .label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); }
.trust-bar .item { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
@media (max-width: 720px) { .trust-bar { padding: 12px 16px; gap: 12px; } .trust-bar .item { font-size: 11px; } }

/* ============ HERO ============ */
.hero { padding: 88px 32px 96px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -20%; right: -10%; width: 60%; height: 80%;
  background: radial-gradient(circle at 30% 40%, var(--brand-soft) 0%, transparent 60%);
  opacity: 0.6; pointer-events: none;
}
.hero-inner { position: relative; max-width: var(--content-w); margin: 0 auto; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 68px); font-weight: 800; line-height: 1.02; letter-spacing: -0.036em; }
.hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 60%, var(--accent) 130%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: var(--fs-lg); color: var(--ink-2); max-width: 540px; margin: 24px 0 32px; line-height: 1.6; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.hero-stats .num { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-3xl); color: var(--ink); letter-spacing: -0.024em; }
.hero-stats .lbl { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* ============ PHONE MOCKUP ============ */
.phone-frame {
  width: 320px;
  height: 640px;
  background: #0d0f0e;
  border-radius: 46px;
  padding: 12px;
  box-shadow: 0 40px 80px -30px rgb(13 15 14 / 45%), 0 0 0 2px rgb(255 255 255 / 4%), inset 0 0 0 2px rgb(255 255 255 / 6%);
  position: relative;
  margin: 0 auto;
  flex-shrink: 0;
}
.phone-frame::before {
  content: ''; position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px; background: #000; border-radius: 20px; z-index: 3;
}
.phone-frame::after {
  content: ''; position: absolute; left: -2px; top: 110px; width: 3px; height: 30px;
  background: #2a2f2d; border-radius: 2px 0 0 2px;
  box-shadow: 0 60px 0 #2a2f2d, 0 105px 0 #2a2f2d;
}
.phone-screen {
  width: 100%; height: 100%; background: var(--bg);
  border-radius: 34px; overflow: hidden;
  display: flex; flex-direction: column;
}

/* Hero mockup: floaters + phone */
.hero-visual { position: relative; min-height: 660px; display: flex; align-items: center; justify-content: center; }
.hero-mockup-container { position: relative; transition: transform var(--t-slow) var(--ease); width: 320px; }
.hero-mockup-container:hover { transform: translateY(-4px); }

.hero-float {
  position: absolute; background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 12px 16px; box-shadow: var(--sh-3); z-index: 4;
  display: flex; align-items: center; gap: 10px;
  animation: float-slow 6s ease-in-out infinite;
}
.hero-float .icon-box {
  width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center;
  font-size: 18px;
}
.hero-float .n { font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-md); line-height: 1; }
.hero-float .l { font-size: 10px; color: var(--ink-3); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
@keyframes float-slow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.hero-float.tl { top: 20px; left: -40px; animation-delay: 0s; }
.hero-float.tl .icon-box { background: var(--brand-soft); color: var(--brand); }
.hero-float.tr { top: 100px; right: -50px; animation-delay: 1s; }
.hero-float.tr .icon-box { background: var(--accent-soft); color: var(--accent-deep); }
.hero-float.bl { bottom: 60px; left: -60px; animation-delay: 2s; }
.hero-float.bl .icon-box { background: var(--info-soft); color: var(--info); }

.hero-qr {
  position: absolute; bottom: -20px; right: -30px; z-index: 5;
  width: 130px; height: 130px; padding: 12px; background: #fff;
  border-radius: var(--r-md); box-shadow: var(--sh-3); transform: rotate(6deg);
  animation: float-slow 5s ease-in-out infinite;
}
.hero-qr svg { width: 100%; height: 100%; }
.hero-qr::after {
  content: 'დაასკანერე'; position: absolute; bottom: -28px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-2); white-space: nowrap;
}

/* Phone mockup — menu content */
.phone-menu-head { background: linear-gradient(135deg, #0d0f0e 0%, #1f2320 100%); color: #fff; padding: 22px 20px 18px; }
.phone-menu-head .tag { font-size: 9px; text-transform: uppercase; letter-spacing: 0.18em; opacity: 0.6; font-weight: 700; }
.phone-menu-head .title { font-family: var(--ff-display); font-size: 22px; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }
.phone-menu-head .sub { font-size: 12px; opacity: 0.7; margin-top: 4px; }
.phone-menu-head .meta { display: flex; gap: 10px; margin-top: 10px; font-size: 10px; opacity: 0.8; }
.phone-menu-head .meta span::before { content: '·'; margin-right: 10px; opacity: 0.4; }
.phone-menu-head .meta span:first-child::before { content: none; }
.phone-lang { display: inline-flex; gap: 4px; margin-top: 12px; }
.phone-lang span { padding: 3px 8px; border-radius: var(--r-full); font-size: 9px; font-weight: 700; background: rgb(255 255 255 / 12%); }
.phone-lang span.on { background: var(--accent); color: #0d0f0e; }

.phone-pills { display: flex; gap: 5px; padding: 12px 14px 0; overflow-x: auto; scrollbar-width: none; background: var(--bg); }
.phone-pills::-webkit-scrollbar { display: none; }
.phone-pill { padding: 5px 11px; border-radius: 999px; background: transparent; border: 1px solid var(--line); font-size: 10px; color: var(--ink-2); white-space: nowrap; font-weight: 600; }
.phone-pill.on { background: var(--ink); color: var(--bg-elevated); border-color: var(--ink); }

.phone-list { padding: 4px 14px 20px; background: var(--bg); flex: 1; overflow: hidden; }
.phone-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.phone-row:last-child { border-bottom: 0; }
.phone-row .th { width: 44px; height: 44px; border-radius: 10px; background: var(--bg-soft); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.phone-row .info .nm { font-family: var(--ff-display); font-weight: 700; font-size: 12px; letter-spacing: -0.01em; }
.phone-row .info .ds { font-size: 10px; color: var(--ink-3); margin-top: 1px; }
.phone-row .pr { font-family: var(--ff-display); font-weight: 800; font-size: 13px; color: var(--brand); }

/* ============ FLOW DIAGRAM ============ */
.flow-wrap { padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; align-items: start; position: relative; }
.flow-step { text-align: center; padding: 8px; position: relative; }
.flow-step .icon-badge {
  width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 14px;
  display: grid; place-items: center; font-size: 24px; font-weight: 700;
  background: var(--bg-soft); color: var(--ink); position: relative;
  transition: all var(--t-med);
}
.flow-step:hover .icon-badge { background: var(--brand-soft); color: var(--brand-deep); transform: scale(1.05); }
[data-theme="dark"] .flow-step:hover .icon-badge { color: var(--brand); }
.flow-step .icon-badge::before {
  content: attr(data-step); position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800; display: grid; place-items: center;
  font-family: var(--ff-display);
}
.flow-step .label { font-weight: 700; font-size: var(--fs-sm); margin-bottom: 4px; }
.flow-step .desc { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.5; }
.flow-arrow-svg {
  position: absolute; top: 30px; left: calc(100% - 8px); width: calc(100% - 24px); height: 4px;
  color: var(--line-strong); pointer-events: none;
}
.flow-step:last-child .flow-arrow-svg { display: none; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr 1fr; gap: 24px; }
  .flow-arrow-svg { display: none; }
}
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } .flow-step { display: flex; text-align: left; gap: 16px; align-items: center; } .flow-step .icon-badge { margin: 0; flex-shrink: 0; } }

/* ============ SECTIONS ============ */
section.section { padding: 96px 32px; }
section.section.soft { background: var(--surface-2); }
section.section.dark { background: var(--ink); color: var(--bg-elevated); }
section.section.dark h1, section.section.dark h2, section.section.dark h3 { color: var(--bg-elevated); }
.section-inner { max-width: var(--content-w); margin: 0 auto; }
.section-head { max-width: 720px; margin: 0 auto var(--sp-9); text-align: center; }
.section-head p { color: var(--ink-2); margin-top: 14px; font-size: var(--fs-lg); line-height: 1.6; }
section.section.dark .section-head p { color: rgb(255 255 255 / 65%); }
@media (max-width: 720px) { section.section { padding: 64px 16px; } }

/* ============ FEATURE GRID ============ */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; transition: all var(--t-med) var(--ease); position: relative; overflow: hidden;
}
.feat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  opacity: 0; transition: opacity var(--t-med);
}
.feat:hover { transform: translateY(-4px); border-color: transparent; box-shadow: var(--sh-3); }
.feat:hover::before { opacity: 1; }
.feat .icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-deep);
  display: grid; place-items: center; margin-bottom: 18px; font-weight: 800; font-size: 22px;
}
[data-theme="dark"] .feat .icon { color: var(--brand); }
.feat.accent .icon { background: var(--accent-soft); color: var(--accent-deep); }
[data-theme="dark"] .feat.accent .icon { color: var(--accent); }
.feat h3 { font-size: var(--fs-lg); margin-bottom: 8px; letter-spacing: -0.01em; }
.feat p { color: var(--ink-2); line-height: 1.6; font-size: var(--fs-sm); }
@media (max-width: 1024px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feat-grid { grid-template-columns: 1fr; gap: 14px; } }

/* ============ HOW IT WORKS ============ */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { padding: 28px 0 0; border-top: 3px solid var(--brand); position: relative; }
.step-num {
  font-family: var(--ff-display); font-size: 64px; font-weight: 800;
  color: var(--brand); line-height: 1; margin-bottom: 14px; letter-spacing: -0.04em;
  display: flex; align-items: baseline; gap: 8px;
}
.step-num::after { content: '.'; font-size: 32px; color: var(--accent); }
.step h3 { font-size: var(--fs-xl); margin-bottom: 8px; letter-spacing: -0.01em; }
.step p { color: var(--ink-2); line-height: 1.6; font-size: var(--fs-sm); }
section.section.dark .step { border-top-color: var(--accent); }
section.section.dark .step-num { color: var(--accent); }
section.section.dark .step p { color: rgb(255 255 255 / 70%); }
@media (max-width: 900px) { .steps-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 560px) { .steps-grid { grid-template-columns: 1fr; } }

/* ============ TESTIMONIAL ============ */
.testimonial {
  max-width: 840px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-xl); padding: 40px;
  display: grid; grid-template-columns: 80px 1fr; gap: 24px; align-items: center;
}
.testimonial .avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff; font-family: var(--ff-display); font-weight: 800; font-size: 32px;
  display: grid; place-items: center;
}
.testimonial blockquote { font-family: var(--ff-display); font-size: var(--fs-xl); font-weight: 500; line-height: 1.5; color: var(--ink); margin-bottom: 14px; letter-spacing: -0.01em; }
.testimonial .author { font-size: var(--fs-sm); color: var(--ink-3); }
.testimonial .author strong { color: var(--ink); font-weight: 700; }
@media (max-width: 720px) { .testimonial { grid-template-columns: 1fr; text-align: center; padding: 28px; } .testimonial .avatar { margin: 0 auto; } }

/* ============ PRICING ============ */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.price-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 32px 26px;
  display: flex; flex-direction: column;
  transition: all var(--t-med); position: relative;
}
.price-card .tag {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--r-full);
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  border: 1px solid var(--line); color: var(--ink-2); align-self: flex-start; margin-bottom: 14px;
}
.price-card .name { font-family: var(--ff-display); font-size: var(--fs-2xl); font-weight: 800; margin-bottom: 4px; letter-spacing: -0.02em; }
.price-card .desc { font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: 24px; min-height: 42px; line-height: 1.55; }
.price-card .price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.price-card .amt { font-family: var(--ff-display); font-size: 52px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.price-card .cur { font-size: var(--fs-lg); font-weight: 700; color: var(--ink-2); }
.price-card .per { font-size: var(--fs-sm); color: var(--ink-3); }
.price-card .features { list-style: none; padding: 0; margin: 24px 0; flex: 1; }
.price-card .features li { padding: 8px 0; font-size: var(--fs-sm); display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; color: var(--ink-2); }
.price-card .features li::before { content: '✓'; color: var(--brand); font-weight: 800; flex-shrink: 0; }
.price-card .features li.no { color: var(--ink-4); }
.price-card .features li.no::before { content: '−'; color: var(--ink-4); opacity: 0.6; }
.price-card.featured {
  background: var(--ink); color: var(--bg-elevated); border-color: var(--ink);
  transform: translateY(-8px); box-shadow: var(--sh-3);
}
.price-card.featured .name { color: var(--bg-elevated); }
.price-card.featured .tag { background: var(--accent); color: #fff; border-color: transparent; }
.price-card.featured .features li { color: rgb(255 255 255 / 82%); }
.price-card.featured .features li::before { color: var(--accent); }
.price-card.featured .features li.no { color: rgb(255 255 255 / 40%); }
.price-card.featured .price .cur, .price-card.featured .per, .price-card.featured .desc { color: rgb(255 255 255 / 60%); }
.price-card.featured .amt { color: var(--bg-elevated); }
.price-card .btn-current { background: var(--bg-soft); color: var(--ink-3); cursor: default; border: 1px solid var(--line); }
@media (max-width: 1024px) { .pricing-grid { grid-template-columns: 1fr 1fr; } .price-card.featured { transform: none; } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ============ FAQ ============ */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0; overflow: hidden; margin-bottom: 10px; transition: border-color var(--t-fast); }
.faq[open] { border-color: var(--brand); }
.faq summary { padding: 20px 24px; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: var(--fs-md); color: var(--ink); transition: background var(--t-fast); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; width: 12px; height: 12px; position: relative; flex-shrink: 0;
  background:
    linear-gradient(currentColor, currentColor) center/12px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center/2px 12px no-repeat;
  color: var(--ink-3); transition: transform var(--t-fast);
}
.faq[open] summary::after { transform: rotate(45deg); color: var(--brand); }
.faq summary:hover { background: var(--bg-soft); }
.faq-body { padding: 0 24px 24px; color: var(--ink-2); line-height: 1.65; font-size: var(--fs-sm); }

/* ============ CTA FINAL ============ */
.cta-final { background: var(--ink); color: var(--bg-elevated); padding: 80px 32px; text-align: center; border-radius: var(--r-2xl); max-width: var(--content-w); margin: 0 auto; position: relative; overflow: hidden; }
.cta-final::before { content: ''; position: absolute; top: -50%; right: -20%; width: 60%; height: 200%; background: radial-gradient(circle, var(--brand) 0%, transparent 60%); opacity: 0.25; pointer-events: none; }
.cta-final::after { content: ''; position: absolute; bottom: -50%; left: -20%; width: 60%; height: 200%; background: radial-gradient(circle, var(--accent) 0%, transparent 60%); opacity: 0.15; pointer-events: none; }
.cta-final > * { position: relative; }
.cta-final h2 { color: var(--bg-elevated); font-size: clamp(32px, 4.4vw, 52px); margin-bottom: 14px; letter-spacing: -0.03em; }
.cta-final h2 em { font-style: normal; color: var(--accent); }
.cta-final p { color: rgb(255 255 255 / 75%); max-width: 560px; margin: 0 auto 32px; font-size: var(--fs-lg); }
@media (max-width: 560px) { .cta-final { padding: 60px 20px; border-radius: 0; } }

/* ============ FOOTER ============ */
.site-footer { background: var(--ink); color: rgb(255 255 255 / 65%); padding: 64px 32px 28px; }
.footer-grid { max-width: var(--content-w); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-xl); color: #fff; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; letter-spacing: -0.02em; }
.footer-col h4 { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: rgb(255 255 255 / 50%); margin-bottom: 14px; }
.footer-col a { display: block; color: rgb(255 255 255 / 70%); padding: 5px 0; font-size: var(--fs-sm); transition: color var(--t-fast); }
.footer-col a:hover { color: #fff; }
.footer-bottom { max-width: var(--content-w); margin: 40px auto 0; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / 12%); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: var(--fs-xs); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } .site-footer { padding: 48px 16px 20px; } }

/* ============ ADMIN SHELL ============ */
.admin-shell { display: grid; grid-template-columns: var(--aside-w) 1fr; min-height: 100vh; }
.admin-shell.collapsed { grid-template-columns: 76px 1fr; }
.aside {
  background: var(--bg-elevated); border-right: 1px solid var(--line);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.aside .brand { padding: 4px 8px 14px; display: flex; align-items: center; gap: 10px; }
.aside .brand-link { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-lg); color: var(--ink); display: flex; gap: 10px; align-items: center; letter-spacing: -0.02em; }
.aside .brand-link .logo-dot {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800;
  box-shadow: 0 2px 8px rgb(15 122 92 / 30%);
}
.aside .brand-link .logo-dot::after { content: 'Q'; }
.aside-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); padding: 14px 10px 4px; }
.aside-nav { display: flex; flex-direction: column; gap: 1px; }
.aside-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px;
  border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 500;
  color: var(--ink-2); transition: all var(--t-fast);
}
.aside-link:hover { background: var(--bg-soft); color: var(--ink); }
.aside-link.active { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
[data-theme="dark"] .aside-link.active { color: var(--brand); }
.aside-link .ico { width: 20px; height: 20px; display: inline-grid; place-items: center; flex-shrink: 0; font-size: 16px; }
.aside-link .badge { margin-left: auto; padding: 1px 7px; font-size: 10px; }
.aside-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-3); }
.aside-user { padding: 12px 8px; display: flex; align-items: center; gap: 10px; }
.aside-user .avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; font-weight: 700; font-size: var(--fs-sm); display: grid; place-items: center; }
.aside-user .meta { min-width: 0; }
.aside-user .meta .n { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.aside-user .meta .e { font-size: var(--fs-xs); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.aside-logo { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-lg); padding: 4px 10px 18px; display: inline-flex; gap: 10px; align-items: center; letter-spacing: -0.02em; color: var(--ink); }
.aside-logo .logo-dot { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; }
.aside-logo .logo-dot::after { content: 'Q'; }

.main { background: var(--bg); padding: 0; min-width: 0; padding-bottom: 40px; }
.main-inner { padding: 28px 32px; max-width: 1400px; }
@media (max-width: 720px) { .main-inner { padding: 20px 16px 100px; } }

/* Page top bar */
.page-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 32px; background: var(--bg-elevated); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30; min-height: var(--page-top-h);
}
.page-top .crumbs { font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.page-top h1 { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.024em; }
.page-top .actions { display: flex; gap: 10px; align-items: center; }

/* Legacy admin-top compat */
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 32px; background: var(--bg-elevated); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.admin-h { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.024em; }
.admin-sub { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 2px; }
.admin-actions { display: flex; gap: 10px; }

@media (max-width: 720px) {
  .page-top, .admin-top { padding: 14px 16px; }
  .page-top h1, .admin-h { font-size: var(--fs-xl); }
}

/* ============ STAT CARDS ============ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; transition: all var(--t-fast); position: relative; overflow: hidden;
}
.stat:hover { border-color: var(--line-strong); }
.stat .lbl { font-size: var(--fs-xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.stat .val { font-family: var(--ff-display); font-size: var(--fs-3xl); font-weight: 800; color: var(--ink); letter-spacing: -0.024em; line-height: 1; }
.stat .sub { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 10px; display: flex; align-items: center; gap: 4px; }
.stat .sub .delta-up { color: var(--success); font-weight: 700; }
.stat .sub .delta-down { color: var(--danger); font-weight: 700; }
.stat .spark { position: absolute; right: 12px; top: 12px; width: 64px; height: 24px; opacity: 0.7; }
.stat.brand { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%); border-color: transparent; color: #fff; }
.stat.brand .lbl { color: rgb(255 255 255 / 75%); }
.stat.brand .val { color: #fff; }
.stat.brand .sub { color: rgb(255 255 255 / 75%); }
.stat.brand .sub .delta-up { color: var(--accent); }
@media (max-width: 1024px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .stat { padding: 16px; } .stat .val { font-size: var(--fs-2xl); } }

/* Split panels */
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }

/* ============ CHART (CSS bars) ============ */
.daily-bars { display: flex; align-items: flex-end; gap: 4px; height: 200px; padding: 12px 4px 0; }
.daily-bars .bar { flex: 1; background: var(--brand-soft); border-radius: 3px 3px 0 0; transition: all var(--t-fast); min-height: 2px; cursor: pointer; position: relative; }
.daily-bars .bar:hover { background: var(--brand); }
.daily-bars .bar.today { background: var(--brand); }
[data-theme="dark"] .daily-bars .bar { background: rgb(30 200 150 / 25%); }
[data-theme="dark"] .daily-bars .bar:hover, [data-theme="dark"] .daily-bars .bar.today { background: var(--brand); }

/* Line chart */
.line-chart { width: 100%; height: 220px; }
.line-chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.line-chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.line-chart .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.line-chart .fill { fill: var(--brand); opacity: 0.12; }
.line-chart .point { fill: var(--brand); stroke: var(--bg-elevated); stroke-width: 2; }
.line-chart .label { fill: var(--ink-3); font-size: 10px; font-family: var(--ff-mono); }
.line-chart .line.accent { stroke: var(--accent); }
.line-chart .fill.accent { fill: var(--accent); }

/* Donut */
.donut { position: relative; width: 180px; height: 180px; margin: 0 auto; }
.donut svg { transform: rotate(-90deg); }
.donut .track { fill: none; stroke: var(--bg-soft); stroke-width: 20; }
.donut .prog { fill: none; stroke: var(--brand); stroke-width: 20; stroke-linecap: round; transition: stroke-dashoffset var(--t-slow); }
.donut .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut .center .n { font-family: var(--ff-display); font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.02em; }
.donut .center .l { font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-top: 4px; }

/* ============ PRODUCTS TABLE ============ */
.product-row {
  display: grid; grid-template-columns: 56px 1fr 120px 100px 90px 100px;
  align-items: center; gap: 16px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); margin-bottom: 8px; transition: all var(--t-fast);
}
.product-row:hover { border-color: var(--line-strong); transform: translateX(2px); }
.product-row .thumb { width: 56px; height: 56px; border-radius: var(--r-sm); background: var(--bg-soft); display: grid; place-items: center; font-size: 22px; overflow: hidden; }
.product-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-row .name { font-weight: 600; }
.product-row .name small { display: block; font-weight: 400; color: var(--ink-3); font-size: var(--fs-xs); margin-top: 2px; }
.product-row .price { font-family: var(--ff-display); font-weight: 800; color: var(--ink); }
.product-row .actions { display: flex; gap: 4px; justify-content: flex-end; }
.product-row .actions button { width: 30px; height: 30px; border-radius: 6px; border: 1px solid transparent; color: var(--ink-3); background: transparent; transition: all var(--t-fast); }
.product-row .actions button:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--line); }
@media (max-width: 880px) { .product-row { grid-template-columns: 48px 1fr auto; } .product-row .hide-sm { display: none; } }

/* ============ CATEGORY NAV (sticky chips) ============ */
.cat-strip { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 18px; display: flex; gap: 6px; overflow-x: auto; z-index: 6; scrollbar-width: none; }
.cat-strip::-webkit-scrollbar { display: none; }
.cat-chip { padding: 8px 14px; border-radius: 999px; background: transparent; border: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); white-space: nowrap; cursor: pointer; transition: all var(--t-fast); }
.cat-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.cat-chip.active { background: var(--ink); color: var(--bg-elevated); border-color: var(--ink); }

/* ============ PUBLIC MENU LAYOUT ============ */
.mob-shell, .phonewrap { background: var(--bg); min-height: 100vh; padding: 0; max-width: 100%; margin: 0; }

.menu-hero-styled { position: relative; }
.menu-hero-styled .cover {
  width: 100%; height: 220px; display: block;
  background: linear-gradient(135deg, #0d0f0e 0%, #1f2320 50%, #0a5a44 100%);
  object-fit: cover;
}
.menu-hero-styled .overlay {
  background: linear-gradient(180deg, transparent 25%, rgb(13 15 14 / 88%) 100%);
  position: absolute; inset: 0; padding: 28px 22px;
  display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
}
.menu-hero-styled .overlay .rest { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.18em; opacity: 0.7; font-weight: 700; }
.menu-hero-styled .overlay h1 { color: #fff; font-family: var(--ff-display); font-size: var(--fs-3xl); font-weight: 800; line-height: 1.02; margin-top: 6px; letter-spacing: -0.02em; }
.menu-hero-styled .overlay .tagline { font-size: var(--fs-sm); opacity: 0.85; margin-top: 6px; }
.menu-hero-styled .overlay .addr { font-size: var(--fs-xs); opacity: 0.75; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.menu-hero-styled .overlay .addr span::before { content: '·'; margin-right: 8px; opacity: 0.5; }
.menu-hero-styled .overlay .addr span:first-child::before { content: none; }

.menu-meta { background: var(--ink); color: rgb(255 255 255 / 90%); padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-xs); flex-wrap: wrap; gap: 8px; }
.menu-meta .pulse { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.menu-meta .pulse::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 0 rgb(46 204 113 / 60%); animation: pulse-dot 2s ease infinite; }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 rgb(46 204 113 / 60%); } 50% { box-shadow: 0 0 0 6px rgb(46 204 113 / 0%); } }
.lang-switcher { display: flex; gap: 4px; }
.lang-switcher .badge { padding: 3px 10px; font-size: 10px; letter-spacing: 0.06em; background: rgb(255 255 255 / 12%); color: rgb(255 255 255 / 85%); }
.lang-switcher .badge.badge-brand { background: var(--accent); color: #0d0f0e; }

.menu-search { background: var(--bg-elevated); padding: 14px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 49px; z-index: 5; }
.menu-search input { width: 100%; padding: 12px 16px; font-size: var(--fs-sm); border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft); }
.menu-search input:focus { outline: none; background: var(--bg-elevated); border-color: var(--brand); box-shadow: 0 0 0 4px var(--focusring); }

.menu-section { padding: 22px; }
.menu-section .section-title { font-family: var(--ff-display); font-size: var(--fs-2xl); font-weight: 800; color: var(--ink); border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 18px; display: flex; gap: 8px; align-items: center; letter-spacing: -0.02em; }
.menu-section-note { font-size: var(--fs-xs); color: var(--ink-3); background: var(--surface-2); padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 16px; border-left: 3px solid var(--accent); }
.menu-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.menu-item:last-child { border-bottom: 0; }
.menu-item-thumb { width: 96px; height: 96px; border-radius: var(--r-md); background: var(--bg-soft); display: grid; place-items: center; font-size: 36px; flex-shrink: 0; overflow: hidden; }
.menu-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.menu-item-info h4 { font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-lg); line-height: 1.2; letter-spacing: -0.01em; }
.menu-item-info .weight { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; }
.menu-item-info p { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.55; margin-top: 6px; }
.menu-item-info .tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tag { font-size: 10px; padding: 3px 8px; background: var(--bg-soft); color: var(--ink-2); border-radius: 4px; font-weight: 700; letter-spacing: 0.04em; }
.tag.hot { background: var(--accent-soft); color: var(--accent-deep); }
[data-theme="dark"] .tag.hot { color: var(--accent); }
.menu-item-price { font-family: var(--ff-display); font-weight: 800; color: var(--ink); font-size: var(--fs-lg); text-align: right; white-space: nowrap; padding-top: 4px; }
.menu-item-price small { display: block; font-size: 10px; font-weight: 400; color: var(--ink-3); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.04em; }

.add-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; background: var(--ink); color: var(--bg-elevated); margin-left: 8px; font-weight: 800; transition: all var(--t-fast); }
.add-btn:hover { background: var(--brand); transform: scale(1.1); }

.menu-footer { background: var(--bg-soft); color: var(--ink-3); padding: 32px 22px; text-align: center; font-size: var(--fs-xs); }
.menu-footer strong { display: block; font-family: var(--ff-display); font-size: var(--fs-md); color: var(--ink); margin-bottom: 2px; }

/* ============ CART / DRAWER ============ */
.cart-fab { position: fixed; right: 18px; bottom: 22px; display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 999px; background: var(--ink); color: var(--bg-elevated); border: 0; cursor: pointer; box-shadow: var(--sh-3); font-weight: 700; z-index: 50; font-size: var(--fs-sm); transition: transform var(--t-fast); }
.cart-fab:hover { transform: translateY(-2px); }
.cart-fab .ico { font-size: 18px; }
.cart-fab .cnt { background: var(--accent); color: #0d0f0e; padding: 2px 9px; border-radius: 999px; font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-xs); }
.cart-fab.pulse { animation: fabpulse 380ms var(--ease); }
@keyframes fabpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

.cart-drawer { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.cart-overlay { position: absolute; inset: 0; background: rgb(13 15 14 / 55%); backdrop-filter: blur(3px); opacity: 0; transition: opacity var(--t-med); }
.cart-inner { position: absolute; right: 0; top: 0; bottom: 0; width: 100%; max-width: 440px; background: var(--bg-elevated); transform: translateX(100%); transition: transform var(--t-med) var(--ease); padding: 20px; display: flex; flex-direction: column; box-shadow: -20px 0 40px -10px rgb(0 0 0 / 14%); }
.cart-drawer.open { pointer-events: auto; }
.cart-drawer.open .cart-overlay { opacity: 1; }
.cart-drawer.open .cart-inner { transform: translateX(0); }
.cart-h { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.cart-h-text h3 { font-family: var(--ff-display); font-size: var(--fs-xl); letter-spacing: -0.02em; }
.cart-h-text p { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; }
.cart-close { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--bg-soft); border: 0; color: var(--ink); font-size: 18px; }
.cart-list { flex: 1; overflow: auto; }
.cart-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cart-row .nm { font-weight: 600; font-size: var(--fs-sm); }
.cart-row .ctrls { display: flex; align-items: center; gap: 8px; }
.cart-row .ctrls button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-elevated); color: var(--ink); font-size: 14px; display: grid; place-items: center; transition: all var(--t-fast); }
.cart-row .ctrls button:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.cart-row .qty { min-width: 22px; text-align: center; font-family: var(--ff-display); font-weight: 700; }
.cart-row .subtotal { font-family: var(--ff-display); font-weight: 800; color: var(--ink); }

.cart-totalbar { position: sticky; bottom: 0; background: var(--bg-elevated); padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.cart-total-label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 600; }
.cart-total-val { font-family: var(--ff-display); font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.024em; }
.cart-submit { padding: 14px 22px; background: var(--brand); color: #fff; border: 0; border-radius: var(--r-md); font-weight: 700; font-size: var(--fs-md); cursor: pointer; transition: all var(--t-fast); }
.cart-submit:not(:disabled):hover { background: var(--brand-hover); box-shadow: var(--sh-brand); }
.cart-submit:disabled { background: var(--ink-4); cursor: not-allowed; opacity: 0.7; }

/* ============ TABLES GRID ============ */
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; text-align: center; transition: all var(--t-med); }
.table-card:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); transform: translateY(-2px); }
.table-card .num { font-family: var(--ff-display); font-size: var(--fs-3xl); font-weight: 800; color: var(--ink); letter-spacing: -0.024em; }
.table-card .label { font-size: var(--fs-xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 6px; }
.table-card .qr-img { width: 130px; height: 130px; margin: 14px auto; border-radius: var(--r-md); background: #fff; padding: 6px; border: 1px solid var(--line); }
.table-card .qr-url { font-family: var(--ff-mono); font-size: 10px; color: var(--ink-3); background: var(--bg-soft); padding: 8px; border-radius: var(--r-xs); margin: 8px 0; word-break: break-all; line-height: 1.4; }
.table-card .actions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

/* ============ ORDERS BOARD ============ */
.ord-column-bar { display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.ord-column-bar::-webkit-scrollbar { display: none; }
.col-chip { display: inline-flex; gap: 8px; align-items: baseline; padding: 8px 14px; border-radius: var(--r-md); background: var(--bg-soft); border: 1px solid var(--line); font-size: var(--fs-sm); cursor: pointer; transition: all var(--t-fast); white-space: nowrap; }
.col-chip strong { font-family: var(--ff-display); font-size: var(--fs-lg); font-weight: 800; }
.col-chip.hot { background: var(--ink); color: var(--bg-elevated); border-color: var(--ink); }

.ord-board { display: grid; grid-template-columns: repeat(5, minmax(260px, 1fr)); gap: 14px; overflow-x: auto; align-items: start; padding-bottom: 8px; }
.ord-col { background: var(--surface-2); border-radius: var(--r-lg); padding: 12px; min-width: 260px; }
.ord-col-h { padding: 10px 12px; border-radius: var(--r-sm); margin: -12px -12px 10px; display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }

.ord-card { background: var(--surface); border-radius: var(--r-md); padding: 14px; border: 1px solid var(--line); margin-bottom: 10px; transition: all var(--t-fast); position: relative; }
.ord-card.is-new { animation: ord-new 800ms var(--ease); }
@keyframes ord-new { 0% { background: var(--brand-soft); transform: scale(1.02); } 100% { background: var(--surface); transform: scale(1); } }
.ord-card:hover { border-color: var(--line-strong); }
.ord-top, .ord-card .top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.ord-no, .ord-card .no { font-family: var(--ff-display); font-size: var(--fs-lg); font-weight: 800; }
.ord-time, .ord-card .time { font-size: 10px; color: var(--ink-3); font-family: var(--ff-mono); }
.ord-meta, .ord-card .meta { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); margin-bottom: 8px; font-size: var(--fs-xs); }
.ord-table, .ord-card .meta .table { color: var(--ink); font-weight: 700; }
.ord-total, .ord-card .meta .total { font-family: var(--ff-display); font-weight: 800; }
.ord-items, .ord-card .items { list-style: none; margin: 0; padding: 0; font-size: var(--fs-xs); }
.ord-items li, .ord-card .items li { display: grid; grid-template-columns: 24px 1fr auto; gap: 6px; padding: 4px 0; color: var(--ink-2); }
.ord-items .qty, .ord-card .items .qty { font-family: var(--ff-display); font-weight: 800; color: var(--brand); }
.ord-notes, .ord-card .notes { font-size: 10px; background: var(--warning-soft); color: var(--warning); padding: 6px 8px; border-radius: 6px; margin-top: 8px; font-style: italic; }
.ord-status-bar, .ord-card .status-bar { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.ord-status-btn, .ord-card .status-btn { padding: 5px 10px; font-size: 10px; background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; font-weight: 700; cursor: pointer; transition: all var(--t-fast); }
.ord-status-btn:hover, .ord-card .status-btn:hover { background: var(--ink); color: var(--bg-elevated); border-color: var(--ink); transform: translateY(-1px); }
@media (max-width: 1100px) { .ord-board { grid-template-columns: repeat(3, 280px); } }
@media (max-width: 720px) { .ord-board { grid-template-columns: 280px; } }

/* ============ KDS (kitchen) ============ */
.kds-body { background: #0a0d0c; color: #fff; min-height: 100vh; }
.kds-header { position: sticky; top: 0; background: #050807; border-bottom: 1px solid #1a1f1d; display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; z-index: 30; }
.kds-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.kds-brand { font-family: var(--ff-display); font-size: var(--fs-xl); font-weight: 800; display: inline-flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
.kds-brand .logo-dot { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800; }
.kds-brand .logo-dot::after { content: 'Q'; }
.kds-biz { color: var(--accent); font-weight: 700; }
.kds-clock { font-family: var(--ff-mono); font-size: var(--fs-2xl); font-weight: 700; color: #fff; }
.kds-right { display: flex; gap: 8px; }
.kds-btn { padding: 10px 16px; border-radius: var(--r-sm); background: #1a1f1d; color: #fff; border: 1px solid #2a3230; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; text-decoration: none; transition: all var(--t-fast); }
.kds-btn:hover { background: #2a3230; border-color: #3a413e; }

.kds-board { padding: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.kds-empty { grid-column: 1/-1; text-align: center; font-size: var(--fs-xl); color: #6f7472; padding: 100px 20px; }
.kds-card { background: #14181b; border-radius: var(--r-lg); padding: 22px; border-top: 6px solid #1ec896; display: flex; flex-direction: column; min-height: 260px; box-shadow: 0 4px 8px rgb(0 0 0 / 30%); }
.kds-card.urgency-warn { border-top-color: #f59e0b; }
.kds-card.urgency-urgent { border-top-color: #ef4444; animation: urgent 1.4s ease infinite; }
.kds-card.status-ready { border-top-color: #3b82f6; opacity: 0.92; }
@keyframes urgent { 0%, 100% { box-shadow: 0 0 0 0 rgb(239 68 68 / 40%), 0 4px 8px rgb(0 0 0 / 30%); } 50% { box-shadow: 0 0 0 14px rgb(239 68 68 / 0%), 0 4px 8px rgb(0 0 0 / 30%); } }

.kds-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kds-no { font-family: var(--ff-display); font-size: var(--fs-3xl); font-weight: 800; color: var(--accent); line-height: 1; letter-spacing: -0.024em; }
.kds-table { font-size: var(--fs-lg); margin-top: 4px; color: rgb(255 255 255 / 80%); }
.kds-table strong { color: #fff; font-size: var(--fs-2xl); font-weight: 800; }
.kds-elapsed { font-family: var(--ff-mono); font-weight: 700; color: #fff; font-size: var(--fs-xl); }
.kds-items { flex: 1; background: #1a1f1d; border-radius: var(--r-md); padding: 14px; margin: 12px 0; }
.kds-item { display: grid; grid-template-columns: 60px 1fr; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed #2a3230; }
.kds-item:last-child { border-bottom: 0; }
.kds-qty { font-family: var(--ff-display); font-size: var(--fs-2xl); font-weight: 800; color: var(--accent); }
.kds-name { font-size: var(--fs-lg); font-weight: 700; }
.kds-notes { background: rgb(245 158 11 / 15%); color: var(--accent); padding: 10px 14px; border-radius: var(--r-md); font-size: var(--fs-sm); margin-bottom: 10px; }
.kds-actions { display: flex; gap: 8px; }
.kds-go { flex: 1; padding: 16px; background: #10b981; color: #fff; border: 0; border-radius: var(--r-md); font-family: var(--ff-display); font-size: var(--fs-lg); font-weight: 800; cursor: pointer; transition: all var(--t-fast); }
.kds-go:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgb(16 185 129 / 40%); }
.kds-cancel { background: transparent; border: 1px solid #2a3230; color: #6f7472; padding: 10px 14px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-xs); font-weight: 600; }

/* ============ SUBSCRIPTION HERO ============ */
.sub-hero {
  background: linear-gradient(135deg, #0d0f0e 0%, #1f2320 100%);
  color: #fff; border-radius: var(--r-xl); padding: 36px;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center;
  position: relative; overflow: hidden;
}
.sub-hero::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 60%; height: 200%;
  background: radial-gradient(circle, var(--brand) 0%, transparent 60%);
  opacity: 0.25; pointer-events: none;
}
.sub-hero > * { position: relative; }
.sub-hero .lbl { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.18em; opacity: 0.65; font-weight: 700; }
.sub-hero .plan-name { font-family: var(--ff-display); font-size: 64px; font-weight: 800; line-height: 1; margin: 8px 0; letter-spacing: -0.03em; color: #fff; }
.sub-hero .plan-price { font-size: var(--fs-2xl); font-weight: 700; color: var(--accent); }
.sub-hero .plan-status, .sub-hero .status-line { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; background: rgb(255 255 255 / 12%); border-radius: 999px; font-size: 13px; }
.sub-hero .status-dot, .sub-hero .status-line .dot { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; }
.sub-hero .status-dot.trial, .sub-hero .status-line .dot.trial { background: var(--accent); }
.sub-hero .status-dot.warn, .sub-hero .status-line .dot.warn { background: var(--warning); }
.sub-hero .status-dot.bad, .sub-hero .status-line .dot.bad { background: var(--danger); }
.sub-hero .renewal-row, .sub-hero .renewal-strip { display: flex; gap: 28px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed rgb(255 255 255 / 16%); flex-wrap: wrap; font-size: var(--fs-sm); }
.sub-hero .renewal-row .field .lbl, .sub-hero .renewal-strip .label { font-size: 10px; opacity: 0.55; text-transform: uppercase; letter-spacing: 0.14em; }
.sub-hero .renewal-row .field .val { font-size: var(--fs-sm); margin-top: 4px; color: var(--accent); font-weight: 700; }
.renewal-strip .label { color: rgb(255 255 255 / 60%); }

.sub-usage { background: rgb(255 255 255 / 6%); border: 1px solid rgb(255 255 255 / 10%); border-radius: var(--r-lg); padding: 22px; color: #fff; }
.sub-usage h3 { color: #fff; font-size: var(--fs-lg); margin-bottom: 14px; font-family: var(--ff-display); letter-spacing: -0.01em; }
.usage-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed rgb(255 255 255 / 12%); font-size: var(--fs-sm); }
.usage-row:last-child, .usage-row:last-of-type { border-bottom: 0; }
.usage-row .nm { opacity: 0.75; font-size: var(--fs-xs); }
.usage-row .bar, .usage-row .meter { flex: 1; background: rgb(255 255 255 / 10%); border-radius: 3px; height: 6px; margin: 0 14px; overflow: hidden; }
.usage-row .bar > div, .usage-row .meter > div { height: 100%; background: var(--brand); border-radius: 3px; transition: width var(--t-med); }
.usage-row .bar > div.warn, .usage-row .meter > div.warn { background: var(--warning); }
.usage-row .bar > div.bad, .usage-row .meter > div.bad { background: var(--danger); }
.usage-row .num, .usage-row strong { font-family: var(--ff-mono); font-weight: 700; }
@media (max-width: 880px) { .sub-hero { grid-template-columns: 1fr; padding: 24px; } .sub-hero .plan-name { font-size: 44px; } }

/* ============ AUTH (login/signup/etc) ============ */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); }
.auth-art {
  background: linear-gradient(135deg, #0d0f0e 0%, #1f2320 100%);
  position: relative; overflow: hidden; padding: 60px;
  display: flex; flex-direction: column; justify-content: space-between; color: #fff;
}
.auth-art::before {
  content: ''; position: absolute; top: -20%; right: -20%; width: 80%; height: 80%;
  background: radial-gradient(circle, var(--brand) 0%, transparent 60%);
  opacity: 0.3;
}
.auth-art::after {
  content: ''; position: absolute; bottom: -30%; left: -20%; width: 70%; height: 70%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  opacity: 0.15;
}
.auth-art > * { position: relative; }
.auth-art .brand { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-xl); display: inline-flex; gap: 10px; align-items: center; letter-spacing: -0.02em; }
.auth-art .brand .logo-dot { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); display: grid; place-items: center; font-size: 13px; font-weight: 800; box-shadow: 0 2px 8px rgb(15 122 92 / 40%); }
.auth-art .brand .logo-dot::after { content: 'Q'; }
.auth-art .h { font-family: var(--ff-display); font-size: 44px; font-weight: 800; line-height: 1.05; margin-bottom: 16px; letter-spacing: -0.03em; }
.auth-art .h em { font-style: normal; color: var(--accent); }
.auth-art .p { color: rgb(255 255 255 / 75%); line-height: 1.65; max-width: 360px; font-size: var(--fs-md); }
.auth-art .benefits { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 10px; }
.auth-art .benefits li { font-size: var(--fs-sm); display: flex; gap: 10px; align-items: center; color: rgb(255 255 255 / 85%); }
.auth-art .benefits li::before { content: '✓'; color: var(--accent); font-weight: 800; }
.auth-art .f { font-size: var(--fs-xs); color: rgb(255 255 255 / 45%); }

.auth-form-wrap { padding: 60px; display: flex; align-items: center; justify-content: center; }
.auth-form { width: 100%; max-width: 400px; }
.auth-form h1 { font-family: var(--ff-display); font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.024em; margin-bottom: 6px; }
.auth-form .sub { color: var(--ink-2); font-size: var(--fs-sm); margin-bottom: 28px; }
.auth-form .btn { width: 100%; padding: 13px; font-size: var(--fs-md); }
.auth-form .alt { margin-top: 20px; text-align: center; font-size: var(--fs-sm); color: var(--ink-2); }
.auth-form .alt a { color: var(--brand); font-weight: 600; }
[data-theme="dark"] .auth-form .alt a { color: var(--brand); }
@media (max-width: 920px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { padding: 36px; min-height: 240px; }
  .auth-art .h { font-size: 30px; }
  .auth-form-wrap { padding: 32px 20px; }
}

/* ============ ONBOARDING ============ */
.ob-progress { display: flex; gap: 8px; margin-bottom: 32px; }
.ob-progress div { flex: 1; height: 4px; background: var(--line); border-radius: 2px; transition: background var(--t-med); }
.ob-progress div.done { background: var(--brand); }
.ob-step { display: none; }
.ob-step.active { display: block; animation: fade-in 240ms var(--ease); }
.ob-tip { background: var(--brand-soft); color: var(--brand-deep); border-radius: var(--r-sm); padding: 12px 14px; font-size: var(--fs-sm); margin-bottom: 16px; line-height: 1.55; }
[data-theme="dark"] .ob-tip { color: var(--brand); }
.ob-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ob-pick label { cursor: pointer; padding: 18px 14px; border: 2px solid var(--line); border-radius: var(--r-md); text-align: center; transition: all var(--t-fast); background: var(--surface); }
.ob-pick label:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.ob-pick label.selected, .ob-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
[data-theme="dark"] .ob-pick label.selected, [data-theme="dark"] .ob-pick label:has(input:checked) { background: var(--brand-soft); }
.ob-pick input { display: none; }
.ob-pick .ee { font-size: 32px; margin-bottom: 4px; }
.ob-pick .nm { font-size: var(--fs-sm); font-weight: 700; }

/* ============ MENU THEMES ============ */
.theme-modern { --qrm-bg: #fafafa; --qrm-card: #ffffff; --qrm-text: #0a0a0a; --qrm-muted: #717177; --qrm-accent: #0f7a5c; --qrm-line: #e5e5e3; --qrm-radius: 12px; --qrm-font: 'FiraGO', 'Inter', sans-serif; }
.theme-elegant { --qrm-bg: #faf6ee; --qrm-card: #ffffff; --qrm-text: #1a1a1f; --qrm-muted: #6b6258; --qrm-accent: #a47e3b; --qrm-line: #e8dcc1; --qrm-radius: 8px; --qrm-font: 'FiraGO', 'Playfair Display', serif; }
.theme-luxury { --qrm-bg: #0a0a0f; --qrm-card: #16161c; --qrm-text: #fafaf9; --qrm-muted: #a3a3aa; --qrm-accent: #c9a961; --qrm-line: #2a2a30; --qrm-radius: 4px; --qrm-font: 'FiraGO', 'Inter', sans-serif; }
.theme-minimal { --qrm-bg: #ffffff; --qrm-card: #ffffff; --qrm-text: #0a0a0a; --qrm-muted: #828287; --qrm-accent: #0a0a0a; --qrm-line: #eaeaeb; --qrm-radius: 0; --qrm-font: 'FiraGO', 'Inter', sans-serif; }
.theme-dark { --qrm-bg: #18181f; --qrm-card: #20202a; --qrm-text: #f5f5f4; --qrm-muted: #a3a3aa; --qrm-accent: #f59e0b; --qrm-line: #2f2f3a; --qrm-radius: 14px; --qrm-font: 'FiraGO', 'Inter', sans-serif; }
.theme-cafe { --qrm-bg: #f5ede3; --qrm-card: #ffffff; --qrm-text: #3a2618; --qrm-muted: #8a7e6b; --qrm-accent: #b85c2c; --qrm-line: #e8dcc1; --qrm-radius: 18px; --qrm-font: 'FiraGO', 'Inter', sans-serif; }
.menu-themed { background: var(--qrm-bg); color: var(--qrm-text); border-radius: var(--qrm-radius); font-family: var(--qrm-font); }
.menu-themed .menu-item { border-bottom-color: var(--qrm-line); }
.menu-themed .menu-section .section-title { color: var(--qrm-accent); border-bottom-color: var(--qrm-accent); }
.menu-themed .menu-item-info h4 { color: var(--qrm-text); }
.menu-themed .menu-item-price { color: var(--qrm-accent); }
.menu-themed .menu-item-thumb { background: color-mix(in oklab, var(--qrm-bg) 70%, var(--qrm-text) 8%); }

/* ============ RANKING ============ */
.ranking { display: flex; flex-direction: column; gap: 14px; }
.ranking-row { display: grid; grid-template-columns: 32px 56px 1fr 90px; gap: 12px; align-items: center; }
.ranking-row .rank { font-family: var(--ff-display); color: var(--ink-3); font-weight: 800; font-size: var(--fs-lg); text-align: center; }
.ranking-row .rank.top-1 { color: var(--accent); }
.ranking-row .rank.top-2 { color: var(--ink-2); }
.ranking-row .rank.top-3 { color: var(--brand); }
.ranking-row .thumb { width: 56px; height: 56px; border-radius: var(--r-sm); background: var(--bg-soft); display: grid; place-items: center; overflow: hidden; font-size: 22px; }
.ranking-row .info .nm { font-weight: 600; font-size: var(--fs-sm); }
.ranking-row .info .bar { height: 4px; background: var(--bg-soft); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.ranking-row .info .bar > div { height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 2px; transition: width var(--t-slow); }
.ranking-row .num { text-align: right; font-family: var(--ff-mono); font-weight: 700; font-size: var(--fs-sm); }

/* ============ MOBILE BOTTOM NAV (admin) ============ */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: var(--bg-elevated); border-top: 1px solid var(--line);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom, 8px));
  justify-content: space-around; align-items: stretch;
  box-shadow: 0 -4px 12px rgb(0 0 0 / 6%);
}
.mobile-bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px; color: var(--ink-3); font-size: 10px; font-weight: 600;
  min-height: 48px; justify-content: center; transition: color var(--t-fast);
}
.mobile-bottom-nav a .ico { font-size: 22px; line-height: 1; }
.mobile-bottom-nav a.active { color: var(--brand); }
.mobile-bottom-nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .mobile-bottom-nav { display: flex; } }

/* ============ AVATAR SIZES ============ */
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: var(--fs-xs); font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* ============ SPECIAL — Onboarding compat aliases ============ */
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-3); }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr; } }

/* ============ RESPONSIVE FINAL ============ */
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .aside {
    position: fixed; left: 0; top: 0; height: 100vh; z-index: 60; width: 260px;
    transform: translateX(-100%); transition: transform var(--t-med);
    box-shadow: var(--sh-3);
  }
  .aside.open { transform: translateX(0); }
  .ord-board { grid-template-columns: 280px; }
}
@media (max-width: 560px) {
  .cta-final { padding: 56px 20px; border-radius: 0; }
}

/* ============ PROTOTYPE-TOUR OVERLAY ============ */
.tour-overlay {
  position: fixed; inset: 0; background: rgb(13 15 14 / 65%); backdrop-filter: blur(4px);
  z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px;
}
.tour-overlay.open { display: flex; animation: fade-in 260ms var(--ease); }
.tour-card { background: var(--bg-elevated); border-radius: var(--r-xl); padding: 32px; max-width: 480px; width: 100%; box-shadow: var(--sh-4); position: relative; }
.tour-step-num { position: absolute; top: -16px; left: 32px; padding: 6px 14px; background: var(--brand); color: #fff; border-radius: var(--r-full); font-family: var(--ff-mono); font-weight: 700; font-size: var(--fs-xs); }
.tour-card h3 { font-size: var(--fs-2xl); margin-bottom: 10px; font-family: var(--ff-display); letter-spacing: -0.02em; }
.tour-card p { color: var(--ink-2); line-height: 1.65; margin-bottom: 22px; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.tour-progress { display: flex; gap: 4px; }
.tour-progress span { width: 22px; height: 3px; border-radius: 2px; background: var(--line); }
.tour-progress span.done { background: var(--brand); }
.tour-progress span.current { background: var(--accent); }

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .skeleton, .pulse, .urgent, .cta-final::before, .cta-final::after { animation: none !important; }
}

/* ============ PRINT ============ */
@media print {
  .nav, .site-footer, .btn, .cart-fab, .mobile-bottom-nav, .theme-toggle { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .table-card { break-inside: avoid; page-break-inside: avoid; }
}
