/* =====================================================================
   MenuYar Design System — RTL, Persian, themeable
   ===================================================================== */
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn-FD-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn-FD-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn-FD-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn-FD-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn-FD-ExtraBold.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn-FD-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

/* ---------- Theme tokens ---------- */
:root, [data-theme="gold-night"] {
  --bg: #0c0906; --bg-2: #130e09; --bg-img: radial-gradient(1200px 600px at 85% -10%, rgba(245,179,36,.10), transparent 60%), radial-gradient(900px 500px at 0% 110%, rgba(167,139,250,.06), transparent 60%);
  --surface: rgba(28,21,15,.82); --surface-solid: #1b150f; --surface-2: #241b13; --surface-3: #2e2318;
  --border: rgba(255,200,110,.12); --border-strong: rgba(255,196,84,.32);
  --text: #f7f0e5; --text-2: #d9cdbd; --muted: #a39483; --faint: #6f6355;
  --accent: #f5b324; --accent-2: #ffd56b; --accent-ink: #1d1404; --accent-soft: rgba(245,179,36,.14); --glow: rgba(245,179,36,.40);
  --scrim: rgba(5,3,2,.66); --shadow: 0 10px 30px rgba(0,0,0,.45); --shadow-sm: 0 2px 10px rgba(0,0,0,.35);
  --c1: #f5b324; --c2: #a78bfa; --c3: #2dd4bf; --c4: #f472b6; --c5: #60a5fa; --c6: #fb923c;
  --ok: #34d399; --warn: #fbbf24; --bad: #f87171; --info: #60a5fa; --violet: #a78bfa; --teal: #2dd4bf; --pink: #f472b6;
  color-scheme: dark;
}
[data-theme="emerald"] { --bg:#050f0b; --bg-2:#08160f; --bg-img: radial-gradient(1100px 600px at 85% -10%, rgba(52,211,153,.12), transparent 60%);
  --surface: rgba(12,30,22,.82); --surface-solid:#0d1f17; --surface-2:#12291f; --surface-3:#183427; --border: rgba(110,231,183,.12); --border-strong: rgba(52,211,153,.35);
  --text:#ecfdf5; --text-2:#c6e9da; --muted:#86a99a; --faint:#557466; --accent:#34d399; --accent-2:#6ee7b7; --accent-ink:#022c1c; --accent-soft: rgba(52,211,153,.14); --glow: rgba(52,211,153,.4); --c1:#34d399; }
[data-theme="royal"] { --bg:#0a0812; --bg-2:#0f0c1b; --bg-img: radial-gradient(1100px 600px at 85% -10%, rgba(167,139,250,.16), transparent 60%);
  --surface: rgba(24,19,42,.82); --surface-solid:#18132a; --surface-2:#211a39; --surface-3:#2a2147; --border: rgba(196,181,253,.13); --border-strong: rgba(167,139,250,.38);
  --text:#f5f3ff; --text-2:#d8d2f5; --muted:#9a91bf; --faint:#665e88; --accent:#a78bfa; --accent-2:#c4b5fd; --accent-ink:#1a1033; --accent-soft: rgba(167,139,250,.16); --glow: rgba(167,139,250,.45); --c1:#a78bfa; --c2:#f5b324; }
[data-theme="ocean"] { --bg:#050d16; --bg-2:#081422; --bg-img: radial-gradient(1100px 600px at 85% -10%, rgba(56,189,248,.14), transparent 60%);
  --surface: rgba(12,26,42,.82); --surface-solid:#0c1a2a; --surface-2:#112439; --surface-3:#173049; --border: rgba(125,211,252,.12); --border-strong: rgba(56,189,248,.36);
  --text:#eef8ff; --text-2:#cbe4f5; --muted:#86a4bb; --faint:#56718a; --accent:#38bdf8; --accent-2:#7dd3fc; --accent-ink:#04263a; --accent-soft: rgba(56,189,248,.15); --glow: rgba(56,189,248,.42); --c1:#38bdf8; --c5:#a78bfa; }
[data-theme="crimson"] { --bg:#0f0608; --bg-2:#16090c; --bg-img: radial-gradient(1100px 600px at 85% -10%, rgba(244,63,94,.14), transparent 60%);
  --surface: rgba(34,14,18,.82); --surface-solid:#221013; --surface-2:#2d151a; --surface-3:#3a1b21; --border: rgba(253,164,175,.12); --border-strong: rgba(244,63,94,.38);
  --text:#fff1f2; --text-2:#f2cdd2; --muted:#b08a90; --faint:#7a5a60; --accent:#fb7185; --accent-2:#fda4af; --accent-ink:#3b0712; --accent-soft: rgba(251,113,133,.15); --glow: rgba(244,63,94,.42); --c1:#fb7185; --c4:#f5b324; }
[data-theme="rose-gold"] { --bg:#110c0c; --bg-2:#181111; --bg-img: radial-gradient(1100px 600px at 85% -10%, rgba(231,174,153,.14), transparent 60%);
  --surface: rgba(36,26,25,.82); --surface-solid:#241a19; --surface-2:#2f2220; --surface-3:#3b2b29; --border: rgba(244,194,176,.13); --border-strong: rgba(231,174,153,.38);
  --text:#fdf2ee; --text-2:#ecd3cb; --muted:#ad948c; --faint:#7a645e; --accent:#e9a993; --accent-2:#f6cbbb; --accent-ink:#3a1c12; --accent-soft: rgba(233,169,147,.15); --glow: rgba(233,169,147,.42); --c1:#e9a993; }
[data-theme="neon"] { --bg:#05040c; --bg-2:#090717; --bg-img: radial-gradient(900px 500px at 90% -10%, rgba(34,211,238,.16), transparent 60%), radial-gradient(900px 500px at 0% 100%, rgba(232,121,249,.14), transparent 60%);
  --surface: rgba(14,12,32,.84); --surface-solid:#0e0c20; --surface-2:#16132e; --surface-3:#1f1a3e; --border: rgba(34,211,238,.16); --border-strong: rgba(232,121,249,.45);
  --text:#f0fdff; --text-2:#c9e9f2; --muted:#8a9cc0; --faint:#556189; --accent:#22d3ee; --accent-2:#e879f9; --accent-ink:#031a20; --accent-soft: rgba(34,211,238,.15); --glow: rgba(34,211,238,.55); --c1:#22d3ee; --c2:#e879f9; }
[data-theme="mono"] { --bg:#0a0a0b; --bg-2:#0f0f11; --bg-img: none;
  --surface: rgba(24,24,27,.9); --surface-solid:#18181b; --surface-2:#202024; --surface-3:#2a2a2f; --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.24);
  --text:#fafafa; --text-2:#d4d4d8; --muted:#a1a1aa; --faint:#63636b; --accent:#f4f4f5; --accent-2:#ffffff; --accent-ink:#09090b; --accent-soft: rgba(255,255,255,.08); --glow: rgba(255,255,255,.18); --c1:#e4e4e7; --c2:#a1a1aa; --c3:#71717a; }
[data-theme="light"] { --bg:#f5f3ef; --bg-2:#ece8e1; --bg-img: radial-gradient(1100px 600px at 85% -10%, rgba(212,146,15,.10), transparent 60%);
  --surface: rgba(255,255,255,.92); --surface-solid:#ffffff; --surface-2:#f6f3ee; --surface-3:#ece7df; --border: rgba(60,40,10,.10); --border-strong: rgba(212,146,15,.45);
  --text:#1f1a14; --text-2:#3f362c; --muted:#76695b; --faint:#a3978a; --accent:#d4920f; --accent-2:#e9ac2f; --accent-ink:#ffffff; --accent-soft: rgba(212,146,15,.12); --glow: rgba(212,146,15,.25);
  --scrim: rgba(30,20,10,.38); --shadow: 0 10px 30px rgba(60,40,10,.12); --shadow-sm: 0 2px 8px rgba(60,40,10,.08);
  --ok:#059669; --warn:#d97706; --bad:#dc2626; --info:#2563eb; --violet:#7c3aed; --teal:#0d9488; --pink:#db2777; --c1:#d4920f; --c2:#7c3aed; --c3:#0d9488; --c4:#db2777; --c5:#2563eb; color-scheme: light; }
[data-theme="cafe"] { --bg:#f2ebe1; --bg-2:#e8dfd2; --bg-img: radial-gradient(1100px 600px at 85% -10%, rgba(139,90,43,.12), transparent 60%);
  --surface: rgba(255,251,245,.94); --surface-solid:#fffbf5; --surface-2:#f6efe4; --surface-3:#ebe1d3; --border: rgba(90,55,25,.12); --border-strong: rgba(139,90,43,.45);
  --text:#2b1d12; --text-2:#4a3627; --muted:#7f6a58; --faint:#ad9a88; --accent:#8b5a2b; --accent-2:#b07a43; --accent-ink:#fffaf2; --accent-soft: rgba(139,90,43,.12); --glow: rgba(139,90,43,.22);
  --scrim: rgba(40,25,10,.4); --shadow: 0 10px 30px rgba(70,45,20,.14); --shadow-sm: 0 2px 8px rgba(70,45,20,.08);
  --ok:#15803d; --warn:#b45309; --bad:#b91c1c; --info:#1d4ed8; --violet:#6d28d9; --teal:#0f766e; --pink:#be185d; --c1:#8b5a2b; --c2:#6d28d9; --c3:#0f766e; --c4:#be185d; --c5:#1d4ed8; color-scheme: light; }

:root { --radius: 16px; --radius-sm: 10px; --radius-lg: 22px; --side-w: 268px; --header-h: 68px; --ease: cubic-bezier(.2,.8,.2,1); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Vazirmatn', Tahoma, sans-serif; font-size: 14px; line-height: 1.7; color: var(--text); background: var(--bg); background-image: var(--bg-img); background-attachment: fixed; min-height: 100vh; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.4; font-weight: 800; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; font-weight: 700; } h4 { font-size: 13px; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-track { background: transparent; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .tiny { font-size: 11px; } .bold { font-weight: 700; } .xbold { font-weight: 800; }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); } .accent { color: var(--accent); }
.hidden { display: none !important; } .nowrap { white-space: nowrap; } .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px 18px; border-inline-start: 0; border-inline-end: 1px solid var(--border); background: linear-gradient(180deg, var(--bg-2), var(--bg)); display: flex; flex-direction: column; gap: 6px; z-index: 30; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand-logo { width: 42px; height: 42px; flex: none; }
.brand-name { font-size: 22px; font-weight: 900; letter-spacing: -.5px; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: -4px; }
.nav-group { margin-top: 10px; }
.nav-title { font-size: 11px; color: var(--faint); font-weight: 700; padding: 6px 12px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: var(--text-2); font-weight: 500; font-size: 13.5px; position: relative; transition: background .2s var(--ease), color .2s; }
.nav-link svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.nav-link:hover { background: var(--accent-soft); color: var(--text); }
.nav-link.active { background: linear-gradient(90deg, transparent, var(--accent-soft)); color: var(--accent); font-weight: 700; box-shadow: inset -3px 0 0 var(--accent); }
.nav-link .count { margin-inline-start: auto; background: var(--bad); color: #fff; font-size: 11px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; font-weight: 700; }
.side-foot { margin-top: auto; padding-top: 14px; }
.ws-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface); font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.header { position: sticky; top: 0; z-index: 25; height: var(--header-h); display: flex; align-items: center; gap: 14px; padding: 0 26px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.header-title { display: flex; flex-direction: column; min-width: 0; }
.header-title h1 { font-size: 18px; }
.crumbs { font-size: 11.5px; color: var(--muted); }
.header-spacer { flex: 1; }
.header-search { position: relative; width: min(340px, 30vw); }
.header-search input { padding-inline-start: 38px; background: var(--surface); }
.header-search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text-2); transition: border-color .2s, color .2s, transform .1s; flex: none; }
.icon-btn:hover { border-color: var(--border-strong); color: var(--accent); }
.icon-btn:active { transform: scale(.96); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 19px; height: 19px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--bg); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.avatar { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); flex: none; position: relative; }
.avatar.online::after { content: ''; position: absolute; bottom: -2px; inset-inline-start: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg); }
.user-meta { line-height: 1.3; } .user-meta b { font-size: 13px; display: block; } .user-meta span { font-size: 11px; color: var(--muted); }
.date-chip { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; line-height: 1.35; }
.date-chip svg { width: 18px; height: 18px; color: var(--accent); }
.occasion-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--occ-bg, var(--accent-soft)); color: var(--occ-fg, var(--accent)); border: 1px solid var(--occ-border, var(--border-strong)); white-space: nowrap; }

.content { padding: 24px 26px 40px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } .g-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .col { display: flex; flex-direction: column; gap: 10px; }
.span2 { grid-column: span 2; } .grow { flex: 1; min-width: 0; }

/* ---------- Card ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); min-width: 0; position: relative; }
.card.flat { box-shadow: none; } .card.pad0 { padding: 0; } .card.tight { padding: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; min-height: 32px; flex-wrap: wrap; }
.card-head > * { min-width: 0; max-width: 100%; } /* a long tab bar scrolls inside the card instead of widening the page */
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-head h2 svg, .card-head h3 svg { width: 19px; height: 19px; color: var(--accent); }
.card.glow { border-color: var(--border-strong); box-shadow: 0 0 0 1px var(--accent-soft), 0 10px 40px -10px var(--glow); }
.divider { height: 1px; background: var(--border); margin: 12px 0; }

/* Stat card */
.stat { --tone: var(--c1); overflow: hidden; padding: 18px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  border-color: color-mix(in srgb, var(--tone) 35%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--tone) 16%, var(--surface-solid)), var(--surface-solid) 70%); }
.stat-icon { width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone) 22%, transparent); color: var(--tone); border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent); box-shadow: 0 0 24px -6px var(--tone); }
.stat-icon svg { width: 28px; height: 28px; }
.stat-value { font-size: 26px; font-weight: 900; letter-spacing: -.5px; line-height: 1.2; }
.stat-value small { font-size: 12px; color: var(--muted); font-weight: 500; margin-inline-start: 4px; }
.stat-label { color: var(--text-2); font-size: 13px; }
.stat-delta { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; direction: ltr; }
.stat-delta.up { color: var(--ok); } .stat-delta.down { color: var(--bad); }
.stat-spark { position: absolute; inset-inline-end: 0; bottom: 0; width: 46%; height: 56px; opacity: .95; pointer-events: none; }
.tone-1 { --tone: var(--c1); } .tone-2 { --tone: var(--c2); } .tone-3 { --tone: var(--c3); } .tone-4 { --tone: var(--c4); } .tone-5 { --tone: var(--c5); } .tone-6 { --tone: var(--c6); }
.tone-ok { --tone: var(--ok); } .tone-bad { --tone: var(--bad); } .tone-warn { --tone: var(--warn); }
.mini-stat { padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.mini-stat b { display: block; font-size: 19px; font-weight: 800; } .mini-stat span { font-size: 12px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { --b: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--b); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; transition: transform .1s, background .2s, border-color .2s, box-shadow .2s, color .2s; user-select: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { border-color: var(--border-strong); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent; font-weight: 800; box-shadow: 0 6px 20px -8px var(--glow); }
.btn.primary:hover { box-shadow: 0 8px 26px -6px var(--glow); }
.btn.ghost { background: transparent; } .btn.soft { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.btn.danger { color: var(--bad); } .btn.danger:hover { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.btn.success { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12px; border-radius: 10px; } .btn.sm svg { width: 15px; height: 15px; }
.btn.lg { height: 50px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.btn.icon { width: 40px; padding: 0; } .btn.sm.icon { width: 32px; }
.btn.block { width: 100%; }
.btn.loading { pointer-events: none; opacity: .7; } .btn.loading::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: spin .7s linear infinite; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font-weight: 600; padding: 6px 6px; margin: -6px -6px; min-height: 32px; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.link-btn svg { width: 15px; height: 15px; }

/* ---------- Forms ---------- */
.input, .select, .textarea { width: 100%; height: 42px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s; font-size: 13.5px; }
.textarea { height: auto; min-height: 90px; padding: 10px 13px; resize: vertical; line-height: 1.8; }
.select { appearance: none; padding-inline-end: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 18px 18px, 13px 18px; background-size: 5px 5px; background-repeat: no-repeat; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input.num { direction: ltr; text-align: right; font-feature-settings: 'tnum'; }
.input.invalid, .select.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.field .err { font-size: 11.5px; color: var(--bad); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.input-group { position: relative; } .input-group .suffix { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; pointer-events: none; }
.input-group .input { padding-inline-end: 52px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 42px; height: 24px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .2s var(--ease), background .2s; }
.switch input:checked + .track { background: var(--accent); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(-18px); background: var(--accent-ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg button.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--border-strong); }
.seg button .n { background: var(--surface-3); color: var(--text-2); border-radius: 8px; padding: 0 6px; font-size: 11px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button svg { width: 16px; height: 16px; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Badges & chips ---------- */
.badge { --tone: var(--muted); display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 8px; font-size: 11.5px; font-weight: 700; white-space: nowrap; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent); }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { --tone: var(--ok); } .badge.bad { --tone: var(--bad); } .badge.warn { --tone: var(--warn); } .badge.info { --tone: var(--info); } .badge.violet { --tone: var(--violet); } .badge.teal { --tone: var(--teal); } .badge.pink { --tone: var(--pink); } .badge.accent { --tone: var(--accent); }
.badge.pulse::before { animation: pulse 1.4s ease-in-out infinite; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; cursor: pointer; color: var(--text-2); white-space: nowrap; }
.chip.active { background: var(--accent-soft); border-color: var(--border-strong); color: var(--accent); font-weight: 700; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--surface-3); font-size: 11px; color: var(--text-2); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th { text-align: start; font-weight: 700; color: var(--muted); font-size: 12px; padding: 11px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; }
.table th.sortable { cursor: pointer; user-select: none; } .table th.sortable:hover { color: var(--text); }
.table th:first-child { border-start-start-radius: 12px; } .table th:last-child { border-start-end-radius: 12px; }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--accent-soft); }
.table tbody tr.clickable { cursor: pointer; }
.table td.num, .table th.num { text-align: end; font-feature-settings: 'tnum'; white-space: nowrap; }
.table .thumb { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; font-size: 22px; overflow: hidden; flex: none; }
.table .thumb img { width: 100%; height: 100%; object-fit: cover; }
.table-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.table-toolbar .search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.table-toolbar .search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.table-toolbar .search .input { padding-inline-start: 36px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.pager .pages { display: flex; gap: 4px; }
.pager button { min-width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; font-size: 12.5px; }
.pager button.active { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 800; }
.pager button:disabled { opacity: .4; cursor: default; }

/* ---------- List rows ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item.clickable { cursor: pointer; border-radius: 10px; padding-inline: 8px; } .list-item.clickable:hover { background: var(--accent-soft); }
.list-item .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); font-size: 21px; flex: none; color: var(--accent); }
.list-item .ico svg { width: 20px; height: 20px; }
.rank { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.bar { height: 7px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 10px var(--glow); }
.bar.ok > i { background: var(--ok); box-shadow: none; } .bar.bad > i { background: var(--bad); box-shadow: none; } .bar.warn > i { background: var(--warn); box-shadow: none; }

/* ---------- Modal / Drawer ---------- */
.overlay { position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 80; display: grid; place-items: center; padding: 20px; animation: fade .18s ease; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow), 0 0 60px -20px var(--glow); animation: pop .22s var(--ease); display: flex; flex-direction: column; }
.modal.wide { width: min(860px, 100%); } .modal.xwide { width: min(1100px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface-solid); z-index: 2; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-start; padding: 14px 20px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface-solid); }
.drawer-overlay { place-items: stretch; justify-items: start; padding: 0; }
.drawer { width: min(520px, 100vw); height: 100%; background: var(--surface-solid); border-inline-end: 1px solid var(--border-strong); overflow-y: auto; animation: slide-in .25s var(--ease); display: flex; flex-direction: column; }
.drawer.wide { width: min(720px, 100vw); }

/* ---------- Toast ---------- */
.toasts { position: fixed; bottom: 22px; left: 22px; z-index: 120; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); animation: pop .25s var(--ease); font-size: 13px; }
.toast svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.toast-act { flex: none; align-self: center; border: 0; background: transparent; color: var(--accent); font: inherit; font-weight: 800; padding: 6px 10px; margin: -6px -6px -6px 0; border-radius: 10px; cursor: pointer; min-height: 36px; }
.toast-act:hover { background: var(--accent-soft); }
.toast.ok svg { color: var(--ok); } .toast.bad svg { color: var(--bad); } .toast.warn svg { color: var(--warn); } .toast.info svg { color: var(--info); }
.toast.out { animation: fade-out .25s forwards; }

/* ---------- Menus / popovers ---------- */
.popover { position: fixed; z-index: 100; min-width: 220px; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; animation: pop .15s var(--ease); max-height: 70vh; overflow: auto; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px; border: 0; background: none; cursor: pointer; text-align: start; font-size: 13px; color: var(--text-2); }
.menu-item:hover, .menu-item.focus { background: var(--accent-soft); color: var(--text); }
.menu-item svg { width: 17px; height: 17px; color: var(--muted); }
.menu-item.danger { color: var(--bad); } .menu-item.danger svg { color: var(--bad); }

/* ---------- States ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 36px 16px; color: var(--muted); gap: 10px; }
.empty .em-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty .em-ico svg { width: 30px; height: 30px; }
.empty b { color: var(--text); font-size: 15px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 12px; }
.loading-page { display: grid; gap: 18px; } .loading-page .skeleton { height: 120px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 13px; border: 1px solid; align-items: flex-start; }
.alert svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.alert.info { border-color: color-mix(in srgb, var(--info) 35%, transparent); background: color-mix(in srgb, var(--info) 9%, transparent); color: var(--text-2); } .alert.info svg { color: var(--info); }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); } .alert.warn svg { color: var(--warn); }
.alert.bad { border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: color-mix(in srgb, var(--bad) 9%, transparent); } .alert.bad svg { color: var(--bad); }
.alert.ok { border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 9%, transparent); } .alert.ok svg { color: var(--ok); }
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--surface-3); color: var(--text); font-size: 11.5px; padding: 4px 9px; border-radius: 8px; white-space: nowrap; z-index: 50; pointer-events: none; border: 1px solid var(--border); font-weight: 500; }

/* ---------- Charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 3 5; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 12px; padding: 7px 11px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: var(--shadow-sm); z-index: 5; line-height: 1.6; }
.chart-tip b { color: var(--accent); font-size: 13px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.donut-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.donut-wrap svg { width: 150px; height: 150px; flex: none; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav { display: none; }
.mobile-only { display: none !important; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 18px; }
.auth-hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--surface-2), var(--bg)); border-inline-end: 1px solid var(--border); display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; }
.auth-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 400px at 70% 30%, var(--glow), transparent 70%); opacity: .5; }
.auth-hero > * { position: relative; }
.auth-hero h2 { font-size: 34px; font-weight: 900; line-height: 1.5; }
.auth-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.auth-feat { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.auth-feat svg { width: 20px; height: 20px; color: var(--accent); flex: none; }

/* ---------- Kitchen display (station) ---------- */
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.ticket { border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; }
.ticket.high { border-color: color-mix(in srgb, var(--bad) 55%, transparent); box-shadow: 0 0 30px -12px var(--bad); }
.ticket.late .ticket-head { background: color-mix(in srgb, var(--bad) 16%, var(--surface-2)); }
.ticket-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); gap: 8px; }
.ticket-num { font-size: 18px; font-weight: 900; }
.ticket-table { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 900; font-size: 17px; }
.timer { font-weight: 800; font-feature-settings: 'tnum'; direction: ltr; display: inline-flex; align-items: center; gap: 4px; }
.timer.warn { color: var(--warn); } .timer.bad { color: var(--bad); animation: blink 1.2s steps(2) infinite; }
.ticket-items { padding: 6px 14px; }
.t-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.t-item:last-child { border-bottom: 0; }
.t-qty { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; font-weight: 900; font-size: 15px; }
.t-name { font-weight: 700; font-size: 14.5px; }
.t-note { font-size: 12px; color: var(--warn); display: flex; gap: 4px; align-items: center; }
.t-note svg { width: 13px; height: 13px; }
.t-item.ready .t-name { text-decoration: line-through; color: var(--muted); }
.ticket-foot { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.ticket-foot .btn { flex: 1; }
.ticket-note { margin: 0 14px 10px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 10%, transparent); color: var(--warn); font-size: 12px; }

/* ---------- Floor plan ---------- */
.floor { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 420px; border-radius: var(--radius-lg); background:
  linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 40px 40px, var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.zone-label { position: absolute; font-size: 11px; color: var(--faint); font-weight: 700; padding: 4px 10px; border: 1px dashed var(--border-strong); border-radius: 8px; }
.tbl { --st: var(--ok); position: absolute; width: 11%; aspect-ratio: 1; min-width: 74px; border-radius: 18px; background: color-mix(in srgb, var(--st) 14%, var(--surface-solid)); border: 2px solid color-mix(in srgb, var(--st) 70%, transparent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: transform .15s, box-shadow .2s; user-select: none; text-align: center; line-height: 1.3; padding: 4px; }
.tbl:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -10px var(--st); }
.tbl.round { border-radius: 50%; } .tbl.rect { width: 16%; aspect-ratio: 1.6; }
.tbl b { font-size: 20px; font-weight: 900; } .tbl span { font-size: 10.5px; color: var(--text-2); }
.tbl.occupied { --st: var(--accent); } .tbl.reserved { --st: var(--info); } .tbl.free { --st: var(--ok); } .tbl.merged { --st: var(--violet); }
.tbl.selected { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 30px -4px var(--st); }
.tbl .tbl-alert { position: absolute; top: -8px; inset-inline-end: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--bad); color: #fff; display: grid; place-items: center; animation: pulse 1.4s infinite; }
.tbl .tbl-alert svg { width: 14px; height: 14px; }
.floor.edit .tbl { cursor: grab; outline: 1px dashed var(--border-strong); } .floor.edit .tbl:active { cursor: grabbing; }
.chair-dots { display: flex; gap: 3px; margin-top: 3px; } .chair-dots i { width: 5px; height: 5px; border-radius: 50%; background: color-mix(in srgb, var(--st) 70%, transparent); }

/* ---------- Product cards ---------- */
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.p-card { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: transform .15s, border-color .2s; }
.p-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.p-card .p-img { aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 56px; background: radial-gradient(circle at 50% 60%, var(--accent-soft), var(--surface-2) 70%); position: relative; }
.p-card .p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-card .p-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.p-card .p-flags { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; gap: 4px; }
.p-card.off { opacity: .55; }
.price { font-weight: 800; font-feature-settings: 'tnum'; white-space: nowrap; } .price small { font-weight: 500; color: var(--muted); font-size: 11px; margin-inline-start: 3px; }

/* drag & drop */
.dnd-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 8px; transition: transform .15s, box-shadow .15s; }
.dnd-item.dragging { opacity: .5; } .dnd-item.over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.handle { cursor: grab; color: var(--faint); display: grid; place-items: center; } .handle svg { width: 20px; height: 20px; }

/* permission matrix */
.perm-table td, .perm-table th { text-align: center; } .perm-table td:first-child, .perm-table th:first-child { text-align: start; }

/* Datepicker */
.dp { width: 288px; padding: 12px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 800; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.dp-grid .wd { font-size: 11px; color: var(--muted); padding: 4px 0; }
.dp-grid button { height: 34px; border-radius: 9px; border: 0; background: none; cursor: pointer; font-size: 13px; }
.dp-grid button:hover { background: var(--accent-soft); } .dp-grid button.today { box-shadow: inset 0 0 0 1px var(--accent); } .dp-grid button.sel { background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.dp-grid button.fri { color: var(--bad); }

/* AR preview */
.ar-stage { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius-lg); overflow: hidden; background: radial-gradient(ellipse at 50% 75%, #6b4a2f 0%, #3d2a1b 45%, #1d140d 100%); border: 1px solid var(--border); }
.ar-stage .ar-table { position: absolute; left: 6%; right: 6%; bottom: 8%; height: 46%; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #a77d55, #6d4b2f 70%); transform: perspective(500px) rotateX(58deg); box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.ar-stage .ar-logo { position: absolute; left: 50%; bottom: 40%; transform: translateX(-50%); width: 46%; opacity: .9; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.ar-stage .ar-food { position: absolute; left: 50%; bottom: 22%; width: 56%; transform-origin: 50% 100%; filter: drop-shadow(0 18px 18px rgba(0,0,0,.55)); display: grid; place-items: center; font-size: 110px; transition: transform .2s; }
.ar-stage .ar-hud { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; color: #fff; font-size: 12px; }
.ar-stage .ar-reticle { position: absolute; left: 50%; bottom: 20%; width: 60%; aspect-ratio: 3; transform: translateX(-50%); border: 2px dashed rgba(255,255,255,.35); border-radius: 50%; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.asset { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.asset .a-prev { aspect-ratio: 1; display: grid; place-items: center; background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface-3) 0% 50%) 50% / 20px 20px; }
.asset .a-prev img { max-width: 86%; max-height: 86%; object-fit: contain; }
.asset .a-prev svg { width: 54px; height: 54px; color: var(--accent); }
.asset .a-body { padding: 10px 12px; font-size: 12px; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); padding: 26px; text-align: center; color: var(--muted); cursor: pointer; transition: background .2s; }
.dropzone:hover, .dropzone.over { background: var(--accent-soft); color: var(--text); }
.dropzone svg { width: 36px; height: 36px; color: var(--accent); margin: 0 auto 8px; }

/* Theme gallery */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.theme-card { border-radius: var(--radius); border: 2px solid var(--border); overflow: hidden; cursor: pointer; background: var(--surface); transition: transform .15s, border-color .2s; }
.theme-card:hover { transform: translateY(-2px); } .theme-card.active { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.theme-prev { height: 96px; padding: 10px; display: grid; grid-template-columns: 26% 1fr; gap: 6px; }
.theme-prev i { border-radius: 6px; display: block; }
.theme-card .tc-body { padding: 10px 12px; font-size: 12.5px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.occ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.occ-card { position: relative; overflow: hidden; border-radius: var(--radius); padding: 16px; min-height: 130px; cursor: pointer; border: 2px solid transparent; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; transition: transform .15s; }
.occ-card:hover { transform: translateY(-2px); } .occ-card.active { border-color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.occ-card .occ-emoji { position: absolute; top: 10px; inset-inline-end: 12px; font-size: 40px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); }
.occ-card b { font-size: 15px; } .occ-card span { font-size: 11.5px; opacity: .85; }

/* ---------- Occasion decorations ---------- */
#fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }
.occ-decor { position: fixed; pointer-events: none; z-index: 59; }
.lights { top: 0; left: 0; right: 0; height: 26px; display: flex; justify-content: space-around; overflow: hidden; }
.lights::before { content: ''; position: absolute; top: 4px; left: 0; right: 0; height: 12px; border-bottom: 2px solid rgba(30,60,30,.8); border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.lights i { width: 9px; height: 14px; border-radius: 50%; margin-top: 10px; background: var(--b); box-shadow: 0 2px 14px 2px var(--b); animation: twinkle 1.6s ease-in-out infinite; animation-delay: var(--d); }
.ribbon { top: 0; left: 0; right: 0; height: 30px; background: repeating-linear-gradient(-45deg, #0a0a0a 0 14px, #1a1a1a 14px 28px); color: #fff; overflow: hidden; display: flex; align-items: center; border-bottom: 2px solid #ef4444; z-index: 59; }
.ribbon .track { display: flex; gap: 60px; white-space: nowrap; font-weight: 900; font-size: 13px; animation: marquee 22s linear infinite; }
.ribbon .track span { color: #fff; } .ribbon .track em { color: #ef4444; font-style: normal; }
.web { top: 0; left: 0; width: 180px; height: 180px; opacity: .35; }
.grass { bottom: 0; left: 0; right: 0; height: 70px; }
.vignette { inset: 0; background: radial-gradient(ellipse at center, transparent 55%, var(--vig, rgba(0,0,0,.35)) 100%); z-index: 58; }
.occ-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius-lg); background: var(--occ-banner, var(--accent-soft)); border: 1px solid var(--occ-border, var(--border-strong)); color: var(--occ-fg, var(--text)); overflow: hidden; position: relative; }
.occ-banner .em { font-size: 34px; flex: none; animation: bob 3s ease-in-out infinite; }
.occ-banner b { font-size: 15px; display: block; } .occ-banner span { font-size: 12.5px; opacity: .85; }
body.has-ribbon .app, body.has-ribbon .auth { padding-top: 30px; } body.has-ribbon .header { top: 30px; } body.has-ribbon .sidebar { top: 30px; height: calc(100vh - 30px); }

[data-occasion="christmas"] { --occ-bg: rgba(220,38,38,.16); --occ-fg: #fca5a5; --occ-border: rgba(34,197,94,.45); --occ-banner: linear-gradient(90deg, rgba(220,38,38,.22), rgba(22,101,52,.22)); }
[data-occasion="halloween"] { --occ-bg: rgba(249,115,22,.16); --occ-fg: #fdba74; --occ-border: rgba(147,51,234,.5); --occ-banner: linear-gradient(90deg, rgba(249,115,22,.22), rgba(88,28,135,.3)); --vig: rgba(46,16,101,.5); }
[data-occasion="blackfriday"] { --occ-bg: rgba(239,68,68,.16); --occ-fg: #fecaca; --occ-border: rgba(239,68,68,.55); --occ-banner: linear-gradient(90deg, #111, rgba(127,29,29,.75)); }
[data-occasion="yalda"] { --occ-bg: rgba(190,18,60,.18); --occ-fg: #fda4af; --occ-border: rgba(190,18,60,.5); --occ-banner: linear-gradient(90deg, rgba(136,19,55,.35), rgba(30,27,75,.4)); --vig: rgba(76,5,25,.45); }
[data-occasion="birthday"] { --occ-bg: rgba(236,72,153,.16); --occ-fg: #f9a8d4; --occ-border: rgba(236,72,153,.5); --occ-banner: linear-gradient(90deg, rgba(236,72,153,.22), rgba(99,102,241,.22), rgba(245,179,36,.22)); }
[data-occasion="nowruz"] { --occ-bg: rgba(34,197,94,.16); --occ-fg: #86efac; --occ-border: rgba(244,114,182,.5); --occ-banner: linear-gradient(90deg, rgba(34,197,94,.22), rgba(244,114,182,.18)); }
[data-occasion="newyear"] { --occ-bg: rgba(245,179,36,.16); --occ-fg: #fde68a; --occ-border: rgba(96,165,250,.5); --occ-banner: linear-gradient(90deg, rgba(30,58,138,.4), rgba(245,179,36,.2)); }
[data-occasion="sizdah"] { --occ-bg: rgba(132,204,22,.16); --occ-fg: #bef264; --occ-border: rgba(132,204,22,.5); --occ-banner: linear-gradient(90deg, rgba(132,204,22,.22), rgba(56,189,248,.18)); }
[data-occasion="christmas"] .brand-logo, [data-occasion="newyear"] .brand-logo { filter: drop-shadow(0 0 10px var(--glow)); }

/* ---------- Animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; transform: translateY(8px); } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.15); } }
@keyframes blink { 50% { opacity: .45; } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes marquee { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-5px) rotate(4deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.page-enter > * { animation: rise .35s var(--ease) both; }
.page-enter > *:nth-child(2) { animation-delay: .04s; } .page-enter > *:nth-child(3) { animation-delay: .08s; } .page-enter > *:nth-child(4) { animation-delay: .12s; } .page-enter > *:nth-child(5) { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .header-search { display: none; } }
@media (max-width: 1100px) { .g-2-1, .g-1-2, .g-3-2, .g3 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } .auth { grid-template-columns: 1fr; } .auth-hero { display: none; } }
@media (max-width: 900px) {
  :root { --header-h: 62px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; top: 0; bottom: 0; right: 0; width: min(300px, 86vw); transform: translateX(105%); transition: transform .28s var(--ease); z-index: 90; border-inline-end: 0; border-inline-start: 1px solid var(--border-strong); box-shadow: var(--shadow); height: 100%; }
  .sidebar.open { transform: none; }
  .side-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 85; }
  .header { padding: 0 14px; gap: 10px; }
  .header .desk-only, .date-chip.desk-only, .user-meta { display: none; }
  .mobile-only { display: flex !important; }
  .content { padding: 16px 16px 110px; gap: 16px; }
  .g2, .g4 { grid-template-columns: minmax(0, 1fr); }
  .g4.keep-2, .g2.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 15px; border-radius: 18px; }
  .stat { padding: 14px; gap: 10px; grid-template-columns: 1fr; }
  .stat-icon { width: 44px; height: 44px; border-radius: 13px; } .stat-icon svg { width: 22px; height: 22px; }
  .stat-value { font-size: 20px; } .stat-label { font-size: 12px; }
  .stat-spark { width: 60%; height: 40px; }
  h1 { font-size: 19px; }
  .page-head { align-items: stretch; } .page-head .actions { width: 100%; } .page-head .actions .btn { flex: 1 1 auto; } /* auto: a long label wraps the button to a new row instead of squeezing every button into a word per line */
  /* responsive table → cards */
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { padding: 12px 14px; margin-bottom: 10px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
  .table.responsive td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: end; align-items: center; }
  .table.responsive td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: start; flex: none; }
  .table.responsive td.primary { font-size: 15px; font-weight: 800; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
  .table.responsive td.primary::before { display: none; }
  .table.responsive td.no-label::before { display: none; }
  .table.responsive td.num { text-align: end; }
  .table.responsive tbody tr:hover { background: var(--surface-2); }
  .table-toolbar .search { max-width: none; min-width: 100%; }
  .table-toolbar > .select { flex: 1 1 120px; min-width: 0 !important; } /* filters share rows instead of one half-empty row each (overrides the inline 150px) */
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; height: 78px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg-2) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border-strong); border-radius: 22px 22px 0 0; }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; color: var(--muted); font-weight: 600; position: relative; }
  .bottom-nav a svg { width: 24px; height: 24px; }
  .bottom-nav a.active { color: var(--accent); }
  .bottom-nav a.center { margin-top: -30px; }
  .bottom-nav a.center .fab { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, var(--accent-2), var(--accent)); color: var(--accent-ink); box-shadow: 0 0 0 6px var(--bg-2), 0 0 0 7px var(--border-strong), 0 10px 30px -4px var(--glow); }
  .bottom-nav a.center .fab span { font-size: 11.5px; font-weight: 800; }
  .bottom-nav a.center .fab { flex-direction: column; display: flex; align-items: center; justify-content: center; gap: 0; }
  .drawer, .drawer.wide { width: 100vw; }
  .overlay { padding: 10px; align-items: end; }
  .overlay.drawer-overlay { padding: 0; }
  .modal { max-height: calc(100vh - 20px); border-radius: 22px; }
  .toasts { left: 12px; right: 12px; bottom: 92px; max-width: none; }
  .floor { aspect-ratio: auto; min-height: 0; height: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; padding: 12px; background: var(--surface-2); }
  .floor .zone-label { display: none; }
  .floor .tbl, .floor .tbl.rect { position: static; width: auto; min-width: 0; aspect-ratio: 1; }
  .kds { grid-template-columns: minmax(0, 1fr); }
  .p-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .p-card .p-img { font-size: 44px; }
  .auth-panel { padding: 24px 18px; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 901px) { .hide-desktop { display: none !important; } }

.print-area { display: none; }
@media print { body.printing > *:not(.print-area) { display: none !important; } body.printing .print-area { display: block; color: #000; font-size: 13px; padding: 10px; }
  .print-area h2 { text-align: center; } .print-area table { width: 100%; border-collapse: collapse; margin: 10px 0; } .print-area td { padding: 5px 0; border-bottom: 1px dashed #bbb; } .print-area .r { text-align: left; } .print-area .t td { font-weight: 800; font-size: 15px; } }
@media print { .sidebar, .header, .bottom-nav, #fx-canvas, .occ-decor, .actions, .no-print { display: none !important; } .app { display: block; } body { background: #fff; color: #000; } .card { box-shadow: none; border-color: #ddd; } }

/* ---------- Tokens used by menu.css / templates.css ---------- */
:root { --accent-glow: var(--glow); --ease-spring: cubic-bezier(.34, 1.56, .64, 1); --head-font: inherit; --shadow-xs: 0 1px 3px rgba(0,0,0,.25); --shadow-md: var(--shadow); --shadow-lg: 0 18px 50px rgba(0,0,0,.5); --violet-soft: color-mix(in srgb, var(--violet) 15%, transparent); }

/* ===== v2: compact manager nav, stations, waiter, cleaning ===== */
.nav-more { display: none; }
.nav-more.open { display: block; animation: fadeIn .2s var(--ease); }
.nav-more-btn { display: flex; align-items: center; gap: 11px; width: 100%; margin-top: 14px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--border-strong, var(--border)); background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.nav-more-btn:hover { background: var(--accent-soft); color: var(--text); }
.nav-more-btn svg { width: 18px; height: 18px; }
.nav-more-btn .chev { margin-inline-start: auto; transition: transform .2s; }
.nav-more-btn[aria-expanded="true"] .chev { transform: rotate(-90deg); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.station-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .station-cols { grid-template-columns: minmax(0, 1fr); } }
.clean-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.clean-row .ticket-table { position: static; }
.chip.link { cursor: pointer; }
.chip.link:hover { border-color: var(--accent); color: var(--accent); }

/* compact: less air, shorter page intros */
.content { gap: 16px; padding-top: 20px; }
.page-head h1, .page-head h2 { font-size: 20px; }
.page-head p { font-size: 12.5px; max-width: 640px; }
.card { padding: 16px; }
.tbl.cleaning { --st: #22d3ee; }
.split-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.split-guest { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--surface-2); }
.split-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.split-ava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink, #111); font-weight: 800; font-size: 13px; flex: none; }
.split-amt { color: var(--accent); }
.split-items { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px dashed var(--border); }
.switch-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cred.off { opacity: .6; }
.cred-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.cred-row > span:first-child { min-width: 78px; }
.cred-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; color: var(--text); }

.pimg { width: 36px; height: 36px; flex: none; border-radius: 10px; overflow: hidden; display: inline-grid; place-items: center; background: var(--surface-3); color: var(--muted); font-weight: 800; font-size: 14px; }
.pimg.lg { width: 46px; height: 46px; border-radius: 12px; }
.pimg img, .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph { font-weight: 800; color: var(--muted); }

/* ===== menu design studio (appearance page) ===== */
.dz { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.dz-side { min-width: 0; }
.phone-wrap { position: sticky; top: calc(var(--header-h) + 14px); display: flex; flex-direction: column; gap: 10px; }
.phone { position: relative; width: 380px; height: min(760px, calc(100vh - var(--header-h) - 90px)); margin: 0 auto; border-radius: 44px; padding: 12px; background: #0d0d0f; box-shadow: 0 0 0 2px #2a2a2e, 0 30px 60px -20px rgba(0,0,0,.6); }
.phone-notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 92px; height: 24px; border-radius: 14px; background: #0d0d0f; z-index: 2; }
.phone-frame { width: 100%; height: 100%; border: 0; border-radius: 33px; background: #fff; display: block; }
/* narrow screens: the phone floats in a corner while you edit; tap it to shrink/grow */
@media (max-width: 1180px) {
  .dz { grid-template-columns: minmax(0, 1fr); }
  .phone-wrap { position: fixed; left: 14px; bottom: 14px; z-index: 30; width: 380px; transform: scale(.5); transform-origin: bottom left; transition: transform .25s; }
  .phone-wrap > .row { display: none; }
  .phone { height: 760px; }
  .phone-wrap.mini { transform: scale(.22); }
}
@media (max-width: 760px) { .phone-wrap { transform: scale(.4); bottom: 84px; } .phone-wrap.mini { transform: scale(.16); } }
.dz-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.dz-card { display: flex; flex-direction: column; text-align: start; border: 2px solid var(--border); border-radius: 18px; padding: 0; overflow: hidden; background: var(--surface-2); cursor: pointer; font: inherit; color: var(--text); transition: border-color .2s, transform .2s; }
.dz-card:hover { transform: translateY(-2px); }
.dz-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dz-cap { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.dz-cap b { font-size: 14px; } .dz-cap span { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.dz-cap small.dz-suit { font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.dz-suits { margin-bottom: 12px; }
.dz-mini { height: 150px; padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.dz-mh { display: flex; align-items: center; gap: 6px; }
.dz-mh i { width: 16px; height: 16px; border-radius: 50%; }
.dz-mh b { font: 800 14px var(--f); }
.dz-mb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; flex: 1; min-height: 0; }
.dz-mi { border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; font-size: 9px; padding-bottom: 4px; }
.dz-mi img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--ph); }
.dz-mi span { padding: 3px 4px 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-mi em { font-style: normal; padding: 0 4px; font-weight: 800; }
.L-list .dz-mb, .L-side .dz-mb, .L-text .dz-mb, .L-elegant .dz-mb, .L-editorial .dz-mb { grid-template-columns: 1fr; }
.L-list .dz-mi, .L-side .dz-mi, .L-text .dz-mi { flex-direction: row; align-items: center; gap: 6px; padding: 3px; }
.L-list .dz-mi img, .L-text .dz-mi img { width: 26px; height: 26px; flex: none; }
.L-side .dz-mi img { width: 44px; height: 30px; aspect-ratio: auto; }
.L-list .dz-mi em, .L-side .dz-mi em, .L-text .dz-mi em { margin-inline-start: auto; }
.L-text .dz-mi { border-bottom: 1px dotted currentColor !important; border-radius: 0; }
.L-elegant .dz-mi { align-items: center; text-align: center; } .L-elegant .dz-mi img { width: 40px; height: 40px; }
.L-editorial .dz-mi:first-child img { aspect-ratio: 16 / 7; } .L-editorial .dz-mi:not(:first-child) img { display: none; }
.L-rail .dz-mb { grid-template-columns: 1.3fr 1.3fr .6fr; } .L-rail .dz-mi img { aspect-ratio: 3 / 4; }
.L-bento .dz-mb { grid-template-columns: 1fr 1fr; } .L-bento .dz-mi:first-child { grid-column: span 2; } .L-bento .dz-mi:first-child img { aspect-ratio: 16 / 7; }
.L-masonry .dz-mi:nth-child(2) img { aspect-ratio: 3 / 4; }
.L-polaroid .dz-mi { background: #fffdf8 !important; color: #2a2420; padding: 4px 4px 2px; border-radius: 2px !important; transform: rotate(-3deg); box-shadow: 0 4px 8px -4px rgba(0,0,0,.45); } .L-polaroid .dz-mi:nth-child(even) { transform: rotate(3deg); } .L-polaroid .dz-mi img { border-radius: 0 !important; }
.L-story .dz-mb { grid-template-columns: 1.4fr 1.4fr .5fr; } .L-story .dz-mi img { aspect-ratio: 9 / 15; }
.L-kiosk .dz-mb { grid-template-columns: 1fr 1fr; } .L-kiosk .dz-mi:nth-child(3) { display: none; } .L-kiosk .dz-mi { text-align: center; } .L-kiosk .dz-mi em { background: var(--a); color: #fff; border-radius: 4px; padding: 0 4px; }
.dz-field { display: flex; flex-direction: column; gap: 8px; }
.dz-field > label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.dz-field .seg { flex-wrap: wrap; height: auto; }
.dz-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.dz-color { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-size: 12.5px; }
.dz-color input, .dz-swatch { width: 34px; height: 34px; border: 0; padding: 0; border-radius: 9px; background: none; cursor: pointer; flex: none; }
.dz-fonts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dz-font { display: flex; flex-direction: column; gap: 2px; align-items: center; padding: 10px 6px; border: 1px solid var(--border); border-radius: 12px; background: transparent; color: var(--text); font-size: 18px; cursor: pointer; }
.dz-font small { font: 500 10.5px 'Vazirmatn', sans-serif; color: var(--muted); text-align: center; }
.dz-font.on { border-color: var(--accent); background: var(--accent-soft); }
.dz-range { flex: 1; accent-color: var(--accent); }
.split-tot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .split-tot { grid-template-columns: 1fr 1fr; } }

.qs-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.qs-step { display: flex; gap: 10px; padding: 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.qs-step:hover { border-color: var(--accent); }
.qs-step b { display: block; font-size: 13.5px; } .qs-step span { font-size: 12px; color: var(--muted); line-height: 1.7; }
.qs-bar { height: 6px; border-radius: 6px; background: var(--surface-3); margin-top: 10px; overflow: hidden; } .qs-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s; }
.qs-step.done { opacity: .7; } .qs-step.done .qs-n { background: var(--ok); } .qs-n svg { width: 16px; height: 16px; }
.qs-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink, #111) !important; font-weight: 800; font-size: 13px !important; }

/* touch screens: buttons, links in lists and switches are at least 44px to hit */
@media (pointer: coarse) {
  .btn, .icon-btn, .seg button, .tabs button, .menu-item { min-height: 44px; }
  .icon-btn, .btn.icon { min-width: 44px; }
  .switch { min-height: 44px; }
  .link-btn { min-height: 44px; }
  .bottom-nav a { min-height: 52px; }
}
/* AR page: 3D preview inside the phone-shaped stage, model tiles open a turntable */
.ar-stage.is3d { background: none; display: grid; }
.ar-stage.is3d .v3d { aspect-ratio: auto; height: 100%; border-radius: inherit; --v3d-bg: linear-gradient(var(--surface-2), var(--bg)); --v3d-glow: color-mix(in srgb, var(--accent) 40%, #fff); }
.ar-stage .ar-food img.round { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
button.a-prev { width: 100%; border: 0; font: inherit; color: var(--accent); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
button.a-prev:hover { background: var(--accent-soft); }
/* password + eye (ui.js passwordField): LTR text starts on the left, the eye lives on the right with room reserved */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 48px; padding-left: 12px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pw-eye:hover { color: var(--text); background: var(--surface-2); }
.pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-wrap input::-ms-reveal { display: none; } /* Edge's own eye would double up with ours */
/* touch: no 300ms double-tap-zoom wait on controls, a soft tap flash, modals don't drag the page behind them */
a, button, input, select, textarea, label, [role="button"], summary { touch-action: manipulation; }
html { -webkit-tap-highlight-color: rgba(127,127,127,.15); }
.modal, .sheet, .sidebar, .dropdown, .popover { overscroll-behavior: contain; }
/* phones: 100vh includes the browser bar that hides on scroll; dvh is the screen you actually see */
@supports (height: 100dvh) {
  .sidebar { height: 100dvh; }
  .modal { max-height: calc(100dvh - 40px); }
  @media (max-width: 900px) { .modal { max-height: calc(100dvh - 20px); } }
}
.header-title { flex: 1 1 auto; } .header-title h1, .crumbs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* long page names: one line each, never a squeezed column */
.dz-presets { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 560px) { .dnd-item { flex-wrap: wrap; row-gap: 10px; } .dnd-item > .grow { flex: 1 1 calc(100% - 110px); min-width: 0; } .dnd-item > .grow .row { flex-wrap: wrap; } .dnd-item > .row:last-child { margin-inline-start: auto; } }
@media (max-width: 560px) { .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .seg::-webkit-scrollbar { display: none; } .page-head .actions .seg { width: 100%; } .page-head .actions .seg > button { flex: 1 0 auto; } .stat-value { font-size: clamp(15px, 4.6vw, 20px); overflow-wrap: anywhere; } }
.seg { min-width: 0; } /* as a flex child it would otherwise refuse to shrink below all its buttons */
@media (max-width: 900px) { .page-head .actions { flex-wrap: wrap; } .page-head .actions > .row:has(.seg), .page-head .actions .seg { flex: 1 1 100%; } .page-head .actions > .row:has(.seg) { flex-wrap: wrap; } } /* the period/view picker gets a row of its own; buttons wrap under it */ /* the period picker gets its own row; buttons wrap under it */
.page-head .actions > * { min-width: 0; max-width: 100%; } /* a filter row inside the header actions must not push past the screen */
@media (max-width: 900px) { .table.responsive td { white-space: normal; min-width: 0; } .table.responsive td.primary > .row { min-width: 0; flex-wrap: nowrap; } .table.responsive td.primary > .row > div:last-child { min-width: 0; overflow-wrap: anywhere; } }
:root.big body:not(.menu-body) { zoom: 1.12; } /* «متن درشت‌تر» in the panel: everything a size up, layout still fits the screen */
.mini-stat .row { flex-wrap: wrap; min-width: 0; } /* order cards: amount, badges and buttons wrap on narrow screens */
@media (max-width: 900px) { .page-head .actions .btn { max-width: 100%; white-space: normal; height: auto; min-height: 42px; text-align: center; } }
/* an occasion banner (e.g. Black Friday) sits above the page, never on it: the page moves down by its height and the
   sticky bars stick just under it — homepage, customer menu (the panel and owner pages are handled above) */
body.landing.has-ribbon, body.menu-body.has-ribbon { padding-top: 30px; }
body.has-ribbon .ld-nav, body.has-ribbon .mv-nav { top: 30px; }
