/* Dordooneh back-office · design system (pastry tokens since phase 5; the shop's character is in pastry.css). Loaded AFTER admin.css: it owns tokens (colour, type, space, radius, motion),
   the base components and the per-user appearance switches (data-theme / data-accent / data-density / data-font / data-motion on <html>).
   Rules of the house: one accent; neutral surfaces; semantic colours only for status; hairlines instead of shadows; no gradients, no glow; motion ≤ 220ms. */

/* ---------- tokens: light «کرم» (default) — cream ground, cocoa ink, strawberry accent, caramel and pistachio for warmth and status ---------- */
:root, [data-theme="light"] {
  --bg: #fbf5ee; --panel: #fffdfa; --panel-2: #faf4ec; --panel-3: #f2e7da; --line: rgba(74, 45, 34, 0.09); --line-2: rgba(74, 45, 34, 0.17);
  --ink: #2b1b16; --ink-2: #57403a; --mute: #7b645b;
  --ok: #3e7a33; --warn: #985710; --bad: #b4232a; --info: #2d6a8f;
  --ok-bg: rgba(122, 160, 82, 0.17); --warn-bg: rgba(212, 150, 82, 0.19); --bad-bg: rgba(196, 40, 48, 0.10); --info-bg: rgba(64, 128, 170, 0.12);
  --accent: #b83a62; --accent-ink: #962c4f; --accent-soft: rgba(184, 58, 98, 0.10); --on-accent: #ffffff; --fill: #b83a62; --accent-grad: linear-gradient(135deg, #c8476f, #a13156);
  --shadow: 0 18px 44px -24px rgba(74, 45, 34, 0.38); --shadow-1: 0 1px 2px rgba(74, 45, 34, 0.04);
  --chart-1: #b83a62; --chart-2: #c68a4e; --chart-3: #8fa66a; --chart-4: #8c7a72; --chart-5: #7d5a8c; --chart-grid: rgba(74, 45, 34, 0.07); --aur-1: #f3cfd6; --aur-2: #f1dcc4; --aur-3: #e4ecd6; --ground: #f8efe6;
  --scrim: rgba(43, 27, 22, 0.38); color-scheme: light;
  --blush: #f8e1dc; --caramel: #c68a4e; --caramel-ink: #8a5420; --pistachio: #9db27a; --side-bg: #2b1b16; --side-ink: #f3e6da; --side-mute: #bfa89a; --stamp-paper: #fffdfa;
}
/* ---------- tokens: dark «شکلاتی» — a chocolate room, cream ink, strawberry-milk accent ---------- */
:root[data-theme="dark"], [data-theme="dark"] {
  --bg: #160f0c; --panel: #211813; --panel-2: #271d18; --panel-3: #30241e; --line: rgba(255, 232, 214, 0.08); --line-2: rgba(255, 232, 214, 0.15);
  --ink: #f7ece3; --ink-2: #ddcabd; --mute: #ad968a;
  --ok: #a6cc84; --warn: #e9af6c; --bad: #ff8a7a; --info: #8cc2e4;
  --ok-bg: rgba(166, 204, 132, 0.14); --warn-bg: rgba(233, 175, 108, 0.15); --bad-bg: rgba(255, 138, 122, 0.14); --info-bg: rgba(140, 194, 228, 0.14);
  --accent: #f08da6; --accent-ink: #f6b0c1; --accent-soft: rgba(240, 141, 166, 0.15); --on-accent: #ffffff; --fill: #b83a62; --accent-grad: linear-gradient(135deg, #c8476f, #a13156);
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7); --shadow-1: none;
  --chart-1: #f08da6; --chart-2: #e2a86c; --chart-3: #a9c487; --chart-4: #a8968d; --chart-5: #b99ac6; --chart-grid: rgba(255, 232, 214, 0.07); --aur-1: #5a2633; --aur-2: #4a3220; --aur-3: #2a2a1c; --ground: #120c0a;
  --scrim: rgba(0, 0, 0, 0.55); color-scheme: dark;
  --blush: #3a2025; --caramel: #e2a86c; --caramel-ink: #e9b57c; --pistachio: #a9c487; --side-bg: #0f0a08; --side-ink: #f3e6da; --side-mute: #a8917f; --stamp-paper: #f3e6da;
}

/* ── flavours (the accent the user picks in «ظاهر من»): strawberry is the default (no attribute); light | dark values ── */
[data-accent="pistachio"] { --accent: #4f7a2e; --accent-ink: #3d6022; --accent-soft: rgba(79, 122, 46, 0.12); --fill: #4f7a2e; --accent-grad: linear-gradient(135deg, #5b8a36, #446a27); --chart-1: #5b8a36; }
[data-theme="dark"][data-accent="pistachio"] { --fill: #4f7a2e; --accent-grad: linear-gradient(135deg, #5b8a36, #446a27); --accent: #b5d394; --accent-ink: #cde3b5; --accent-soft: rgba(181, 211, 148, 0.15); --chart-1: #b5d394; }
[data-accent="caramel"] { --accent: #9a5a1e; --accent-ink: #7a4614; --accent-soft: rgba(154, 90, 30, 0.12); --fill: #9a5a1e; --accent-grad: linear-gradient(135deg, #a8672a, #8a4f18); --chart-1: #a8672a; }
[data-theme="dark"][data-accent="caramel"] { --fill: #9a5a1e; --accent-grad: linear-gradient(135deg, #a8672a, #8a4f18); --accent: #e7b47a; --accent-ink: #f0c998; --accent-soft: rgba(231, 180, 122, 0.15); --chart-1: #e7b47a; }
[data-accent="blueberry"] { --accent: #3e5f9e; --accent-ink: #2f4b82; --accent-soft: rgba(62, 95, 158, 0.12); --fill: #3e5f9e; --accent-grad: linear-gradient(135deg, #4a6cac, #34528a); --chart-1: #4a6cac; }
[data-theme="dark"][data-accent="blueberry"] { --fill: #3e5f9e; --accent-grad: linear-gradient(135deg, #4a6cac, #34528a); --accent: #9db8ea; --accent-ink: #bcd0f2; --accent-soft: rgba(157, 184, 234, 0.15); --chart-1: #9db8ea; }
[data-accent="cocoa"] { --accent: #6b4232; --accent-ink: #533225; --accent-soft: rgba(107, 66, 50, 0.12); --fill: #6b4232; --accent-grad: linear-gradient(135deg, #7a4d3b, #5c3829); --chart-1: #7a4d3b; }
[data-theme="dark"][data-accent="cocoa"] { --fill: #7a4d3b; --accent-grad: linear-gradient(135deg, #8a5a46, #6b4232); --accent: #d9b9a3; --accent-ink: #e8d0bf; --accent-soft: rgba(217, 185, 163, 0.15); --chart-1: #d9b9a3; }

/* ── colour themes (v37): ONE muted hue each, chosen in «ظاهر من». The default is «موو». Fill = solid behind white text; accent = the lighter line/text colour in dark. ── */
[data-accent="graphite"] { --accent: #1f63c4; --accent-ink: #123a85; --accent-soft: rgba(31, 99, 196, 0.12); --fill: #2a6fd0; --accent-grad: linear-gradient(135deg, #3279de, #2860b8); --chart-1: #2a6fd0; --chart-2: #6c9ae0; --chart-3: #b4cdf0; --aur-1: #c9d6ee; --aur-2: #dcdde3; --aur-3: #eeeef2; --ground: #e9eaee; }
[data-theme="dark"][data-accent="graphite"] { --accent: #7db4ff; --accent-ink: #a8cdff; --accent-soft: rgba(125, 180, 255, 0.16); --fill: #2a6fd0; --accent-grad: linear-gradient(135deg, #3279de, #2860b8); --chart-1: #5aa5ff; --chart-2: #4a7fc0; --chart-3: #3a5a88; --aur-1: #4a5a78; --aur-2: #3a3d46; --aur-3: #2b2d33; --ground: #1c1d21; }
[data-accent="emerald"] { --accent: #17715a; --accent-ink: #0f503f; --accent-soft: rgba(23, 113, 90, 0.12); --fill: #1a7c63; --accent-grad: linear-gradient(135deg, #20876c, #166a55); --chart-1: #1f8a6f; --chart-2: #5fb59d; --chart-3: #b0dccf; --aur-1: #bfe5d8; --aur-2: #d3ecdf; --aur-3: #e6f3ee; --ground: #ecf3f0; }
[data-theme="dark"][data-accent="emerald"] { --accent: #6fd3b4; --accent-ink: #9be3cc; --accent-soft: rgba(111, 211, 180, 0.16); --fill: #1a7c63; --accent-grad: linear-gradient(135deg, #20876c, #166a55); --chart-1: #5cc9a8; --chart-2: #3f967f; --chart-3: #2b6556; --aur-1: #1f6a58; --aur-2: #16453b; --aur-3: #0f2a28; --ground: #070f0e; }
[data-accent="bronze"] { --accent: #84601f; --accent-ink: #573d0b; --accent-soft: rgba(132, 96, 31, 0.13); --fill: #8f6a2b; --accent-grad: linear-gradient(135deg, #9c7432, #7e5c22); --chart-1: #8f6a2b; --chart-2: #bf9a5e; --chart-3: #e0cba5; --aur-1: #ecd3a8; --aur-2: #efdcc0; --aur-3: #f6ead9; --ground: #f4efe6; }
[data-theme="dark"][data-accent="bronze"] { --accent: #dcb878; --accent-ink: #ecce9a; --accent-soft: rgba(220, 184, 120, 0.16); --fill: #8f6a2b; --accent-grad: linear-gradient(135deg, #9c7432, #7e5c22); --chart-1: #d3b06b; --chart-2: #9d8350; --chart-3: #6b5a3c; --aur-1: #6e4c1e; --aur-2: #4a3520; --aur-3: #2b2219; --ground: #100d09; }
[data-accent="ocean"] { --accent: #1a6690; --accent-ink: #145378; --accent-soft: rgba(26, 102, 144, 0.12); --fill: #26729c; --accent-grad: linear-gradient(135deg, #2c7ea8, #205f85); --chart-1: #26729c; --chart-2: #68a6c8; --chart-3: #b3d3e4; --aur-1: #bdddf0; --aur-2: #cfe5f2; --aur-3: #e4eff7; --ground: #ebf1f5; }
[data-theme="dark"][data-accent="ocean"] { --accent: #86c6ea; --accent-ink: #aedcf5; --accent-soft: rgba(134, 198, 234, 0.16); --fill: #26729c; --accent-grad: linear-gradient(135deg, #2c7ea8, #205f85); --chart-1: #6cb7de; --chart-2: #4a87aa; --chart-3: #345c75; --aur-1: #1d5470; --aur-2: #173a52; --aur-3: #102232; --ground: #080e14; }
/* accents the user can choose in «ظاهر من» (light | dark values); the default is «شفق» (aurora) = the root tokens */
/* the old names (gold*) every older rule uses now point at the accent */
:root { --gold: var(--accent); --gold-hi: var(--accent-ink); --gold-lo: var(--accent-soft); --on-gold: var(--on-accent); --r: 16px; --r-sm: 10px; --ctl: 40px; --row: 12px; --side: 244px;
  --f: 'Kalameh', 'Vazirmatn', Tahoma, system-ui, sans-serif; --ease: cubic-bezier(0.23, 1, 0.32, 1); --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); --t: 180ms; }
[data-density="compact"] { --ctl: 34px; --row: 8px; --r: 14px; }
[data-font="sm"] body { zoom: 0.94; } [data-font="lg"] body { zoom: 1.08; }
[data-motion="reduced"] *, [data-motion="reduced"] *::before, [data-motion="reduced"] *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }

/* ---------- base ---------- */
body { font-family: var(--f); font-size: 14px; line-height: 1.75; letter-spacing: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: 0; } h2 { font-size: 22px; line-height: 1.4; } h3 { font-size: 15px; }
.num, .k3-v b, .kpi b, .tbl td.n { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 2px solid transparent; background-clip: content-box; }
input, select, textarea { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-sm); min-height: var(--ctl); transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
@media (hover: hover) and (pointer: fine) { input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--ink) 30%, transparent); } }
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(--mute); opacity: 1; }
label { color: var(--ink-2); font-weight: 500; }
.mute { color: var(--mute); } .gold { color: var(--accent-ink); }

/* ---------- buttons, chips, segmented controls ---------- */
.btn { height: var(--ctl); border-radius: var(--r-sm); background: var(--panel-3); color: var(--ink); box-shadow: none; font-weight: 600; transition: background var(--t) var(--ease), transform 120ms var(--ease), color var(--t); }
.btn:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: color-mix(in srgb, var(--ink) 9%, var(--panel-3)); } }
.btn.gold { background: var(--accent); color: var(--on-accent); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .btn.gold:hover { filter: none; background: color-mix(in srgb, var(--accent) 88%, #000); } }
.btn.ok { background: var(--ok-bg); color: var(--ok); box-shadow: none; } .btn.bad { background: var(--bad-bg); color: var(--bad); box-shadow: none; }
.btn.ghost { background: transparent; }
@media (hover: hover) and (pointer: fine) { .btn.ghost:hover { background: var(--panel-3); } }
.btn.sm { height: calc(var(--ctl) - 8px); border-radius: 8px; } .btn.lg { height: 52px; border-radius: 14px; }
.icon-btn { border-radius: var(--r-sm); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--panel-3); } }
.chip { background: var(--panel-3); color: var(--ink-2); font-weight: 500; }
.chip.gold { background: var(--accent-soft); color: var(--accent-ink); }
.chips button.chip { transition: background var(--t), color var(--t); }
@media (hover: hover) and (pointer: fine) { .chips button.chip:hover { background: color-mix(in srgb, var(--ink) 9%, var(--panel-3)); } }
.chips button.chip.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
/* iOS-style segmented control: grey track, white thumb */
.tabs, .chips.seg, .seg { background: var(--panel-3); border: 0; border-radius: 12px; padding: 3px; gap: 2px; box-shadow: none; }
.tab, .chips.seg .chip, .seg .chip { height: calc(var(--ctl) - 6px); border-radius: 9px; color: var(--ink-2); font-weight: 600; background: transparent; box-shadow: none; transition: background var(--t) var(--ease), color var(--t); }
@media (hover: hover) and (pointer: fine) { .tab:hover, .chips.seg .chip:hover { color: var(--ink); background: transparent; } }
.tab.on, .chips.seg .chip.on, .seg .chip.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px var(--line-2); }
[data-theme="dark"] .tab.on, [data-theme="dark"] .chips.seg .chip.on { background: var(--panel-2); box-shadow: 0 0 0 0.5px var(--line-2); }
.tab em { background: var(--panel-3); color: var(--ink-2); } .tab.on em { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- surfaces ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 18px; }
.card > h3, .card-h { font-size: 14.5px; font-weight: 700; margin-bottom: 14px; }
.kpi.accent { background: var(--panel); }
.tbl-wrap { border-radius: var(--r); border-color: var(--line); background: var(--panel); box-shadow: var(--shadow-1); }
.tbl th { background: var(--panel-2); color: var(--mute); font-weight: 600; font-size: 12px; padding: var(--row) 16px; border-bottom: 1px solid var(--line); }
.tbl td { padding: var(--row) 16px; border-bottom: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { .tbl tbody tr:hover { background: var(--panel-2); } }
.empty { color: var(--mute); }
.bar { background: var(--panel-3); } .bar > i, .meter i { background: var(--accent); }
.meter { background: var(--panel-3); } .meter.warn i { background: var(--warn); } .meter.bad i { background: var(--bad); } .meter.gold i { background: var(--accent); }

/* ---------- shell ---------- */
.side { background: var(--panel); border-inline-end: 1px solid var(--line); padding: 18px 14px; }
.brand { border-bottom: 0; padding: 2px 8px 6px; } .brand .mark { background: var(--accent); color: var(--on-accent); border-radius: 11px; }
.shiftbox { background: var(--panel-3); border-radius: 12px; }
.nav h6, .ngh { color: var(--mute); font-weight: 600; }
.nav a { height: 38px; border-radius: 10px; color: var(--ink-2); font-weight: 500; transition: background var(--t) var(--ease), color var(--t); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { background: var(--panel-3); color: var(--ink); } }
.nav a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.nav a .badge { background: var(--bad); }
.top { height: 56px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.page { padding: 24px; gap: 20px; max-width: 1680px; width: 100%; margin-inline: auto; }
.userchip { background: transparent; } .userchip .av { background: var(--accent); color: var(--on-accent); }
@media (hover: hover) and (pointer: fine) { .userchip:hover { background: var(--panel-3); } }
.psearch { background: var(--panel-3); border: 0; } .psearch kbd { background: var(--panel); color: var(--mute); }
.popover { background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); }
@media (hover: hover) and (pointer: fine) { .popover button:hover { background: var(--panel-3); } }

/* ---------- overlays ---------- */
#modal-root .scrim { background: var(--scrim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.modal header, .modal footer { background: var(--panel); }
.drawer { background: var(--panel); box-shadow: var(--shadow); }
.drawer .alert { background: var(--panel-2); }
#toasts .toast, .toast { background: var(--ink); color: var(--bg); border: 0; border-radius: 12px; box-shadow: var(--shadow); }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page > *, .cw { animation: fade 140ms var(--ease) both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { animation: rise 200ms var(--ease) both; }

/* ---------- phones: sheets instead of centred modals, roomier touch targets ---------- */
@media (max-width: 640px) {
  .page { padding: 16px 14px 92px; }
  #modal-root .scrim { align-items: end; padding: 0; }
  .modal, .modal.wide, .modal.narrow { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; animation: sheet 280ms var(--ease-drawer) both; }
  .btn, .icon-btn, .tab, input, select { min-height: 44px; } .btn.sm { min-height: 40px; }
}
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- «ظاهر من» ---------- */
.ap { gap: 16px; } .ap-row { display: grid; gap: 8px; } .ap-row > b { font-size: 13px; }
.swatches { display: flex; gap: 10px; } .sw { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); transition: transform var(--t) var(--ease); }
@media (hover: hover) and (pointer: fine) { .sw:hover { transform: scale(1.08); } }
.sw.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--c); }

/* ---------- toasts: small, calm, never covering the work ---------- */
#toasts { bottom: 20px; left: 20px; right: auto; max-width: min(380px, calc(100vw - 32px)); }
.toast { font-size: 13px; line-height: 1.6; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: 12px; animation: rise 200ms var(--ease) both; }
.toast.bad { background: var(--bad); color: #fff; } .toast.ok { background: var(--ok); color: #fff; }
@media (max-width: 640px) { #toasts { left: 14px; right: 14px; bottom: 84px; max-width: none; } }
/* remove the soft glow blobs older cards drew */
.k3::after, .k3::before { display: none; }

/* ---------- dashboard v5 ---------- */
.cp-head { align-items: flex-end; } .cp-head h2 { font-size: 26px; line-height: 1.3; margin-top: 2px; } .cp-head small { font-size: 12.5px; }
.cp-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-tabs { width: 100%; max-width: 100%; overflow-x: auto; } .cp-body { display: grid; gap: 18px; align-content: start; }
.stamp { color: var(--mute); font-size: 12px; } .stamp svg { width: 13px; height: 13px; } .stamp.old { color: var(--warn); }
.hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hk { position: relative; text-align: right; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px 16px; display: grid; gap: 6px; align-content: start; box-shadow: var(--shadow-1); transition: transform var(--t) var(--ease), border-color var(--t), box-shadow var(--t); overflow: hidden; min-height: 148px; }
.hk:active { transform: none; }
@media (hover: hover) and (pointer: fine) { .hk:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 10px 28px -14px rgba(0, 0, 0, 0.25); } }
.hk small { color: var(--mute); font-size: 12.5px; font-weight: 500; }
.hk-v { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; } .hk-v b { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; } .hk-v span { color: var(--mute); font-size: 12.5px; }
.hk-s { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.hk .spark { position: absolute; inset-inline-start: 16px; bottom: 14px; width: 92px; height: 30px; opacity: 0.9; } .spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hk-go { position: absolute; inset-inline-start: 14px; top: 16px; color: var(--mute); opacity: 0; transition: opacity var(--t), transform var(--t); } .hk-go svg { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .hk:hover .hk-go { opacity: 1; transform: translateX(-3px); } }
.cp-fore { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 16px 20px; } .cp-fore > div:first-child b { font-size: 20px; display: block; } .cp-fore .grow { flex: 1; min-width: 220px; display: grid; gap: 6px; }
.cp-2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: stretch; } .cp-2e { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.cp-card { min-width: 0; } .card-h > span:first-child { font-weight: 700; }
.attn { display: grid; gap: 4px; } .attn-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px; text-align: right; transition: background var(--t); }
@media (hover: hover) and (pointer: fine) { .attn-row:hover { background: var(--panel-3); } }
.attn-row .ai { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-3); color: var(--ink-2); flex: none; } .attn-row.bad .ai { background: var(--bad-bg); color: var(--bad); } .attn-row.warn .ai { background: var(--warn-bg); color: var(--warn); }
.attn-row .at { flex: 1; font-size: 13.5px; line-height: 1.6; } .attn-row > i { color: var(--mute); display: grid; } .attn-row > i svg { width: 16px; height: 16px; }
.okmark { width: 38px; height: 38px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; margin: 0 auto 8px; font-weight: 700; }
.lg:not(.btn) { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-top: 8px; font-size: 12px; color: var(--ink-2); } .lg:not(.btn) i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 6px; }
.sm { font-size: 12px; } .dview { min-height: 160px; } .dtabs { margin-bottom: 14px; }
.cp-ops { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.op2 { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1); } .op2 > span { background: var(--panel-3); color: var(--ink-2); } .op2.hot { border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-bg); } .op2.hot > span { background: transparent; color: var(--bad); }
@media (hover: hover) and (pointer: fine) { .op2:hover { border-color: var(--line-2); } }
.cp-ratios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rt, .cv { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: none; } .cv.gold { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); }
.cv.ok { border-color: color-mix(in srgb, var(--ok) 30%, transparent); } .cv.warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); } .cv.bad { border-color: color-mix(in srgb, var(--bad) 35%, transparent); } .cv.info { border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.brow .bt { background: var(--panel-3); } .brow .bt i { background: var(--accent); }
@media (max-width: 1280px) { .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cp-ops { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cp-2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .cp-2e { grid-template-columns: 1fr; } .cp-ratios { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr 1fr; gap: 10px; } .hk { padding: 14px 14px 12px; min-height: 128px; } .hk-v b { font-size: 24px; } .hk .spark { width: 64px; } .cp-ops { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cp-head h2 { font-size: 22px; } .cp-ratios { grid-template-columns: 1fr; } }
.cp-tabs { width: fit-content; max-width: 100%; } .attn-row.bad, .attn-row.warn { color: var(--ink); }
.hk { display: flex; flex-direction: column; align-items: stretch; } .hk .spark { position: static; width: 100%; height: 30px; margin-top: auto; padding-top: 8px; opacity: 0.95; }
.hk-s { min-height: 26px; }
.hero { align-items: stretch; } .hk { height: 100%; }

/* ---------- phone / small tablet: bottom tab bar ---------- */
.tabbar { display: none; }
@media (max-width: 900px) {
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; z-index: 40; inset-inline: 0; bottom: 0; padding: 6px 8px max(8px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 52px; border-radius: 12px; color: var(--mute); font-size: 12px; text-decoration: none; transition: color var(--t), background var(--t); }
  .tabbar a.on { color: var(--accent-ink); background: var(--accent-soft); font-weight: 700; } .tabbar svg { width: 22px; height: 22px; }
  .page { padding-bottom: 96px; } .menu-btn { display: grid; }
}
/* ---------- POS on phones: product grid first, the cart is a bottom sheet ---------- */
.cartbar, .cart-handle, .cart-scrim { display: none; }
@media (max-width: 900px) {
  .pos { display: block; height: auto; min-height: 0; }
  .pos .products { max-height: none; overflow: visible; }
  .cart { position: fixed; inset-inline: 0; bottom: 0; z-index: 46; max-height: 88vh; border-radius: 22px 22px 0 0; transform: translateY(104%); transition: transform 280ms var(--ease); box-shadow: var(--shadow); }
  .pos.cart-open .cart { transform: none; } .pos.cart-open .cart-scrim { display: block; position: fixed; inset: 0; z-index: 45; background: var(--scrim); }
  .cart-handle { display: grid; place-items: center; width: 100%; height: 22px; margin: -6px 0 2px; } .cart-handle i { width: 38px; height: 4px; border-radius: 4px; background: var(--line-2); }
  .cartbar { display: flex; align-items: center; gap: 12px; position: fixed; inset-inline: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 41; height: 52px; padding: 0 16px; border-radius: 16px; background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow); font-weight: 700; }
  .cartbar .cb-n { min-width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--on-accent) 22%, transparent); font-size: 13px; } .cartbar .cb-t { flex: 1; text-align: right; } .pos.cart-open .cartbar { display: none; }
}
/* ---------- tables become cards on phones (cells are labelled by the header text automatically, see main.js) ---------- */
@media (max-width: 640px) {
  .page .tbl-wrap { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .page table.tbl:not(.keep), .page table.tbl:not(.keep) tbody { display: block; } .page table.tbl:not(.keep) thead { display: none; }
  .page table.tbl:not(.keep) tr { display: grid; gap: 6px; padding: 14px; margin-bottom: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); }
  .page table.tbl:not(.keep) td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0; border: 0; text-align: right; white-space: normal; }
  .page table.tbl:not(.keep) td::before { content: attr(data-label); color: var(--mute); font-size: 12px; flex: none; }
  .page table.tbl:not(.keep) td:first-child { font-size: 15px; } .page table.tbl:not(.keep) td:first-child::before, .page table.tbl:not(.keep) td[data-label=""]::before { display: none; }
}
.cp-cust4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cp-lost { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cp-2e { align-items: stretch; } .cp-2e > .card { height: 100%; }
.cv b { font-size: 24px; line-height: 1.3; color: var(--ink); } .cv.gold b, .cv.ok b, .cv.warn b, .cv.bad b, .cv.info b { color: var(--ink); }
@media (max-width: 640px) { .cp-lost { grid-template-columns: 1fr; } }
/* ---------- login ---------- */
.login { background: var(--bg); }
.login .box { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 32px 28px; box-shadow: var(--shadow); animation: rise 320ms var(--ease) both; }
.login .logo { background: var(--accent); color: var(--on-accent); border-radius: 18px; box-shadow: none; } .login h1 { font-size: 24px; }
.pad button { background: var(--panel-3); border: 0; border-radius: 14px; box-shadow: none; font-weight: 600; transition: background var(--t), transform 120ms; } .pad button:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .pad button:hover { background: color-mix(in srgb, var(--ink) 9%, var(--panel-3)); } }
.pad button.gold, .pad button[type=submit] { background: var(--accent); color: var(--on-accent); }
.pin i { border-color: var(--line-2); } .pin i.f { background: var(--accent); border-color: var(--accent); }
.login input:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
/* ---------- fixes from the design crawl: tokens older rules still read, contrast, touch targets ---------- */
:root { --gold-grad: var(--accent); --card-bg: none; --ring: var(--accent-soft); }
:root, [data-theme="light"] { --ok: #17702f; --warn: #8c5000; --bad: #b3201b; }
.av, .av.big { background: var(--accent-soft); color: var(--accent-ink); } .userchip .av { background: var(--accent); color: var(--on-accent); }
.chip.lvl { background: var(--panel-3); color: var(--ink-2); } .chip.lvl svg { color: var(--lc, var(--accent)); }
.catbar button.on, .seat.on { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); outline: 0; }
.prod .num, .prod .pr { color: var(--ink); }
.cart-handle { height: 28px; }
@media (max-width: 1024px) {
  .btn.sm { min-height: 40px; } .icon-btn { min-width: 44px; min-height: 44px; } .chips button.chip, a.chip { min-height: 36px; }
  .top .icon-btn, .top .psearch, .top .userchip, .top .btn { flex: none; }
}
@media (max-width: 640px) {
  .top { gap: 4px; padding: 0 10px; } .top #net, .top #theme, .top .psearch kbd, .top .psearch span, .top .userchip .t { display: none; }
  .top .psearch { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 12px; } .top .btn.gold { height: 44px; padding: 0 12px; }
  .crumb { min-width: 0; overflow: hidden; } .crumb b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.tot.big .num { background: none; -webkit-text-fill-color: currentColor; color: var(--accent-ink); }
.cartbar .cb-n { background: var(--on-accent); color: var(--accent-ink); }
.chip b, .seat .mute, .seat small, .tmap .mute, .tmap small { font-size: 12px; }
.cart-handle { height: 34px; }
@media (max-width: 1024px) { .qty button, .stepper button, .ln .icon-btn { min-width: 38px; min-height: 38px; } }
/* ---------- accountant desk + Jalali calendar ---------- */
.acbar { padding: 14px 16px; } .acrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .acrow .grow { flex: 1; }
.rangebtn { min-width: 220px; justify-content: flex-start; font-variant-numeric: tabular-nums; } .rangebtn svg { color: var(--accent-ink); }
.acgrid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.aclist { padding: 10px; position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; } .aclist h6 { margin: 12px 10px 6px; font-size: 12px; color: var(--mute); font-weight: 600; } .aclist h6:first-child { margin-top: 4px; }
.acitem { display: block; width: 100%; text-align: right; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-size: 13.5px; transition: background var(--t), color var(--t); } .acitem.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .acitem:hover { background: var(--panel-3); color: var(--ink); } }
.acview { min-width: 0; } .acview td, .acview th { white-space: nowrap; } .acbtns { display: flex; gap: 8px; flex-wrap: wrap; } .acview .tbl-wrap { max-height: 62vh; overflow: auto; } .acview tfoot td { position: sticky; bottom: 0; background: var(--panel-2); border-top: 1px solid var(--line-2); }
.jbody { display: grid; gap: 12px; } .jhead { display: flex; align-items: center; justify-content: space-between; } .jhead b { font-size: 15px; }
.jgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; } .jwd span { text-align: center; font-size: 12px; color: var(--mute); padding: 4px 0; }
.jd { height: 40px; border-radius: 10px; font-size: 14px; color: var(--ink); transition: background var(--t); } .jd.today { box-shadow: inset 0 0 0 1px var(--accent); }
@media (hover: hover) and (pointer: fine) { .jd:hover { background: var(--panel-3); } }
.jd.in { background: var(--accent-soft); border-radius: 0; color: var(--accent-ink); } .jd.a { border-radius: 0 10px 10px 0; background: var(--accent); color: var(--on-accent); } .jd.b { border-radius: 10px 0 0 10px; background: var(--accent); color: var(--on-accent); } .jd.a.b { border-radius: 10px; }
.jpre .chip { height: 32px; } .jsel { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--panel-3); } .jsel b { font-size: 15px; }
@media (max-width: 900px) { .acgrid { grid-template-columns: 1fr; } .aclist { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 4px; } .aclist h6 { width: 100%; } .acitem { width: auto; } .rangebtn { min-width: 0; flex: 1; } }
/* minimum legible sizes (design QA: nothing under 12px) */
small, .badge, em.badge, .nav .badge, .chip, kbd { font-size: max(12px, 0.857em); } .nav a .badge { min-width: 20px; font-size: 12px; line-height: 1; }

[data-theme="dark"] .badge, [data-theme="dark"] em.badge, [data-theme="dark"] .nav a .badge { color: #2a0806; }

/* ---------- v30 · grouped settings (iOS-style): a rail of sections + one panel at a time, rows = title/hint on one side, control on the other ---------- */
.sets { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 28px; align-items: start; max-width: 1040px; }
.sets-nav { display: grid; gap: 4px; position: sticky; top: 12px; }
.sn { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-align: start; color: var(--ink-2); transition: background var(--t) var(--ease); }
.sn.on { background: var(--accent-soft); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .sn:hover { background: var(--panel-3); } }
.sn svg { width: 20px; height: 20px; flex: none; } .sn span { display: grid; gap: 0; min-width: 0; } .sn b { font-size: 14px; font-weight: 600; line-height: 1.5; } .sn small { font-size: 12px; color: var(--mute); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sets-body { display: grid; gap: 22px; min-width: 0; }
.spanel { display: grid; gap: 18px; animation: rise 220ms var(--ease) both; } .spanel[hidden] { display: none; } .spanel h2 { margin: 0 0 2px; font-size: 24px; }
.sgrp { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.shead { padding: 12px 18px 6px; font-size: 12px; font-weight: 600; color: var(--mute); }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 18px; min-height: 56px; } .srow + .srow, .shead + .srow { border-top: 1px solid var(--line); } .shead + .srow { border-top: 0; }
.st { display: grid; gap: 1px; min-width: 0; } .st b { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.6; } .st small { font-size: 12.5px; color: var(--mute); line-height: 1.6; }
.sc { display: flex; align-items: center; gap: 10px; flex: none; } .sc input:not([type="checkbox"]):not([type="color"]) { width: 200px; text-align: start; } .sc .num-in { width: 96px; text-align: center; }
.srow.wide { flex-wrap: wrap; } .srow.wide .sc { flex: 1 1 260px; } .srow.wide .sc input { width: 100%; }
.sc input[type="color"] { width: 56px; height: 36px; padding: 3px; border-radius: 10px; cursor: pointer; }
.sdesc { margin: 0; color: var(--mute); font-size: 13px; line-height: 1.8; padding-inline: 4px; }
.sets-save { position: sticky; bottom: 12px; display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: color-mix(in srgb, var(--panel) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 16px; }
.tg { position: relative; display: inline-block; width: 46px; height: 28px; flex: none; cursor: pointer; } .tg input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; min-height: 0; cursor: pointer; z-index: 1; }
.tg i { position: absolute; inset: 0; border-radius: 28px; background: var(--line-2); transition: background var(--t) var(--ease); } .tg i::after { content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform var(--t) var(--ease); }
.tg input:checked + i { background: var(--accent); } .tg input:checked + i::after { transform: translateX(-18px); } [dir="ltr"] .tg input:checked + i::after { transform: translateX(18px); } .tg input:disabled + i { opacity: 0.5; } .tg input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 860px) {
  .sets { grid-template-columns: 1fr; gap: 16px; } .sets-nav { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: none; margin-inline: -14px; padding-inline: 14px; } .sets-nav::-webkit-scrollbar { display: none; }
  .sn { flex: none; padding: 8px 14px; background: var(--panel-3); border-radius: 999px; } .sn small { display: none; } .sn svg { width: 18px; height: 18px; }
  .spanel h2 { font-size: 20px; } .srow { padding: 12px 14px; flex-wrap: wrap; } .sc input:not([type="checkbox"]):not([type="color"]) { width: 100%; } .sc:has(input:not([type="checkbox"]):not([type="color"])) { flex: 1 1 100%; } .sc .num-in { width: 100%; text-align: start; }
}

.sc input:not([type="checkbox"]):not([type="color"]) { min-height: 38px; }
@media (max-width: 900px) { .sets-save { bottom: 84px; } }
/* the manager's «دید نقش» switch is a tool, not a headline: quiet text-style select */
#vasel { background: transparent !important; border: 0 !important; box-shadow: none !important; color: var(--mute); font-size: 12.5px; font-weight: 500; padding-inline: 8px 22px !important; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { #vasel:hover { color: var(--ink); background: var(--panel-3) !important; } }
@media (max-width: 700px) { #vasel { display: none; } }

/* ---------- v30 · dialogs: one calm anatomy (title · scrolling body · sticky action row), roomier rhythm on an 8-pt grid ---------- */
.modal { background: var(--panel); } .modal header { padding: 16px 20px; border-bottom: 0; } .modal header h3 { font-size: 17px; font-weight: 700; }
.modal header .icon-btn { width: 32px; height: 32px; min-height: 32px; border-radius: 50%; background: var(--panel-3); color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .modal header .icon-btn:hover { background: var(--line-2); } }
.modal .body { padding: 4px 20px 20px; gap: 16px; } .modal footer { border-top: 1px solid var(--line); padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); gap: 10px; }
.modal footer .btn { min-width: 96px; } .modal footer .btn.gold, .modal footer .btn.lg { min-width: 160px; }
.modal.narrow { width: min(420px, 100%); }
/* payment dialog: ONE column — the amount, the tip, how they pay, what is left; the action row never scrolls away */
.modal.pay { width: min(520px, 100%); }
.pay { display: grid; gap: 20px; }
.pay-hero { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 20px 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 18px; }
.pay-hero small { color: var(--mute); font-size: 13px; } .pay-hero b { font-size: 38px; line-height: 1.3; font-weight: 800; letter-spacing: 0; } .pay-hero b span { font-size: 14px; font-weight: 500; color: var(--mute); margin-inline-start: 6px; } .pay-hero .sub { color: var(--mute); font-size: 12.5px; }
.pay-sec { display: grid; gap: 8px; } .pay-sec h5 { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--mute); }
.pay-sub { margin-top: 6px; font-size: 12px; color: var(--mute); }
.seg-row { display: flex; flex-wrap: wrap; gap: 8px; } .seg-row .chip { min-height: 36px; padding-inline: 14px; }
.pay-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pt { display: grid; justify-items: center; gap: 6px; padding: 14px 8px; background: var(--panel-3); border-radius: 14px; font-weight: 600; font-size: 13px; color: var(--ink); transition: background var(--t) var(--ease), transform 120ms var(--ease); } .pt:active { transform: scale(0.97); } .pt svg { width: 22px; height: 22px; color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .pt:hover { background: color-mix(in srgb, var(--ink) 9%, var(--panel-3)); } }
.pay-rows { display: grid; gap: 8px; } .pr { display: grid; gap: 8px; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; } .pr-h { display: flex; justify-content: space-between; align-items: center; } .pr-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pay-rest { position: sticky; bottom: -4px; margin: 0 -4px; padding: 14px 16px; background: var(--panel); border-radius: 14px; border: 1px solid var(--line); } .pay-rest span:first-child { font-size: 15px; font-weight: 600; } .pay-rest .num { font-size: 24px; font-weight: 800; }
.done { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 8px 0 4px; } .done b { font-size: 24px; } .done-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; animation: pop 360ms var(--ease) both; } .done-ic svg { width: 30px; height: 30px; stroke-width: 2.4; }
@keyframes pop { from { transform: scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  .modal header { padding: 14px 16px 10px; } .modal .body { padding: 2px 16px 16px; } .modal footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); } .modal footer { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; } .modal footer .btn { min-width: 0; width: 100%; } .modal footer .btn.gold, .modal footer .btn.lg { grid-column: span 2; }
  .modal::before { content: ''; display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 0; }
  .pay-hero b { font-size: 34px; } .pay-tiles { grid-template-columns: repeat(3, 1fr); }
  /* notifications never sit on top of the sheet's buttons: they drop from the top */
  #toasts { top: 10px; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); width: calc(100vw - 24px); max-width: 420px; z-index: 400; }
}
.pay-tiles { grid-template-columns: repeat(6, 1fr); } .pt { grid-column: span 2; } .pt:nth-child(n+4) { grid-column: span 3; }
.pay-hero { padding: 16px; } .pay { gap: 18px; }
.modal.pay footer { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; } .modal.pay footer .pay-rest { grid-column: 1 / -1; position: static; margin: 0 0 2px; padding: 0 2px; border: 0; background: none; display: flex; justify-content: space-between; align-items: baseline; }
.modal.pay footer .btn, .modal.pay footer .btn.gold { min-width: 0; grid-column: auto; }
.modal.pay footer { grid-auto-flow: row; grid-auto-columns: auto; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; } .plan { display: grid; gap: 2px; padding: 16px 12px; text-align: center; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; transition: border-color var(--t) var(--ease), background var(--t) var(--ease); } .plan b { font-size: 15px; } .plan small { color: var(--mute); font-size: 12.5px; } .plan.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
@media (hover: hover) and (pointer: fine) { .plan:hover:not(:disabled) { border-color: var(--accent); } }
@media (max-width: 640px) { .plans { grid-template-columns: repeat(2, 1fr); } }
[data-theme="dark"] .top #bell .badge { color: #2a0806; }
.chips.seg .chip b, .chip b { font-size: 12px; }

/* ---------- v31 · dashboard clarity: help buttons, pace track, expandable attention rows, channel rows, drill lists, focus highlight ---------- */
.hbtn { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-start: 6px; vertical-align: middle; border-radius: 50%; color: var(--mute); cursor: pointer; transition: color var(--t), background var(--t); } .hbtn svg { width: 15px; height: 15px; } .hbtn:focus-visible { color: var(--accent-ink); background: var(--accent-soft); }
@media (hover: hover) and (pointer: fine) { .hbtn:hover { color: var(--accent-ink); background: var(--accent-soft); } }
.card-h > span { display: inline-flex; align-items: center; }
.help { display: grid; gap: 14px; } .help-meta { display: flex; gap: 8px; flex-wrap: wrap; } .help-sec { display: grid; gap: 4px; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; } .help-sec h5 { margin: 0; font-size: 12.5px; color: var(--mute); font-weight: 600; } .help-sec p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--ink); }
.drill-lead { margin: 0 0 10px; font-size: 13.5px; line-height: 1.8; } .drill-help { display: flex; align-items: center; gap: 4px; margin-top: 10px; } .drill td.go { width: 28px; color: var(--mute); } .drill td.go svg { width: 16px; height: 16px; }
tr.click, .brow.click { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { tr.click:hover td { background: var(--panel-3); } .brow.click:hover { background: var(--panel-3); border-radius: 10px; } }
.cv { text-align: start; position: relative; width: 100%; cursor: pointer; transition: transform 120ms var(--ease), border-color var(--t); } .cv:disabled { cursor: default; opacity: 0.7; } .cv:active:not(:disabled) { transform: scale(0.99); } .cv .hk-go { inset-inline-start: 12px; top: 14px; }
@media (hover: hover) and (pointer: fine) { .cv:not(:disabled):hover { border-color: var(--accent); } .cv:hover .hk-go { opacity: 1; } }
/* pace track */
.pace { display: grid; gap: 14px; padding-top: 4px; }
.pace-track { position: relative; height: 14px; border-radius: 99px; background: var(--panel-3); margin: 14px 2px 2px; }
.pace-fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 99px; background: var(--accent); min-width: 14px; transition: width 700ms var(--ease); } .pace-fill.ok { background: var(--ok); } .pace-fill.warn { background: var(--warn); } .pace-fill.bad { background: var(--bad); }
.pace-mark, .pace-end { position: absolute; top: -8px; bottom: -8px; width: 3px; border-radius: 2px; transform: translateX(50%); } [dir="rtl"] .pace-mark, [dir="rtl"] .pace-end { transform: translateX(50%); } .pace-mark { background: var(--ink); } .pace-end { background: var(--mute); opacity: 0.7; width: 2px; }
.pace-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } .ps { display: grid; gap: 2px; padding-inline-start: 12px; border-inline-start: 3px solid var(--line-2); } .ps small { color: var(--mute); font-size: 12.5px; } .ps b { font-size: 20px; line-height: 1.4; } .ps b em { font-style: normal; font-size: 12px; color: var(--mute); font-weight: 500; margin-inline-start: 5px; }
.ps.now { border-color: var(--accent); } .ps.mark { border-color: var(--ink); } .ps.end { border-color: var(--mute); }
.pace-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
@media (max-width: 640px) { .pace-stats { grid-template-columns: 1fr; gap: 10px; } .ps b { font-size: 18px; } }
/* attention: expandable rows */
.attn-item { border-radius: 14px; } .attn-item.open { background: var(--panel-2); } .attn-row { width: 100%; } .attn-row .chev svg { transition: transform var(--t) var(--ease); } .attn-item.open .attn-row .chev svg { transform: rotate(90deg); }
.attn-more { display: grid; gap: 8px; padding: 2px 12px 12px 12px; margin-inline-start: 44px; animation: rise 180ms var(--ease) both; } .attn-more[hidden] { display: none; } .attn-more .btn { justify-self: start; }
/* channels */
.chan { display: grid; gap: 4px; } .chan-row { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(80px, 1fr) auto auto; grid-template-areas: "n bar v chip" "s s s s"; gap: 4px 14px; align-items: center; padding: 10px 10px; border-radius: 12px; text-align: start; transition: background var(--t); }
@media (hover: hover) and (pointer: fine) { .chan-row:hover { background: var(--panel-3); } }
.chan-row .cn { grid-area: n; font-weight: 600; font-size: 13.5px; } .chan-row .cbar { grid-area: bar; height: 8px; border-radius: 99px; background: var(--panel-3); overflow: hidden; } .chan-row .cbar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); } .chan-row b { grid-area: v; font-size: 14px; white-space: nowrap; } .chan-row small { grid-area: s; } .chan-row .chip { grid-area: chip; }
@media (max-width: 640px) { .chan-row { grid-template-columns: 1fr auto; grid-template-areas: "n chip" "bar bar" "v v" "s s"; } }
.cp-dn1 { display: grid; gap: 10px; }
/* the row you were sent to */
.focus-hit, .focus-hit td { animation: focusPulse 1.6s var(--ease) 3; } .focus-hit { box-shadow: inset 4px 0 0 var(--warn); background: var(--warn-bg); }
@keyframes focusPulse { 0%, 100% { background: var(--warn-bg); } 50% { background: color-mix(in srgb, var(--warn) 26%, transparent); } }
.chan-row { padding: 8px 10px; gap: 2px 14px; } .chan-row small { line-height: 1.5; }
.attn-item.bad, .attn-item.warn, .attn-item.ok { color: var(--ink); } .attn-item .at { color: var(--ink); }
.attn-item.bad .ai { background: var(--bad-bg); color: var(--bad); } .attn-item.warn .ai { background: var(--warn-bg); color: var(--warn); } .attn-item .attn-row { border-radius: 12px; }
@media (hover: hover) and (pointer: fine) { .attn-item .attn-row:hover { background: var(--panel-3); } }

/* ---------- v31 · clock + calendar ---------- */
.clockwrap { position: relative; } .clockchip { display: grid; grid-template-columns: auto auto; align-items: center; gap: 0 10px; padding: 4px 12px; height: 40px; border-radius: 12px; background: transparent; text-align: start; transition: background var(--t); } .clockchip[aria-expanded="true"] { background: var(--panel-3); }
@media (hover: hover) and (pointer: fine) { .clockchip:hover { background: var(--panel-3); } }
.ck-t { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; } .ck-d { font-size: 12px; color: var(--mute); line-height: 1.3; position: relative; max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ck-short { display: none; }
.ck-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-inline-start: 6px; vertical-align: middle; }
.clock-pop { width: 340px; padding: 14px; inset-inline-start: 0; top: calc(100% + 8px); display: grid; gap: 12px; } .clock-pop[hidden] { display: none; }
.ck-head { display: flex; align-items: center; justify-content: space-between; } .ck-head b { font-size: 15px; } .ck-head .icon-btn { width: 32px; height: 32px; min-height: 32px; } .ck-head .icon-btn[data-nav="1"] svg { transform: rotate(180deg); }
.ck-wd, .ck-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; } .ck-wd span { font-size: 12px; color: var(--mute); padding: 4px 0; } .ck-wd .hol, .cd.hol { color: var(--bad); }
.cd { height: 38px; border-radius: 10px; font-size: 14px; position: relative; font-variant-numeric: tabular-nums; transition: background var(--t); } .cd.today { background: var(--accent); color: var(--on-accent); font-weight: 700; } .cd.sel:not(.today) { box-shadow: inset 0 0 0 2px var(--accent); }
@media (hover: hover) and (pointer: fine) { .cd:hover { background: var(--panel-3); } }
.cd.occ::after { content: ''; position: absolute; bottom: 4px; inset-inline-start: 50%; width: 5px; height: 5px; margin-inline-start: -2.5px; border-radius: 50%; background: var(--accent); } .cd.today.occ::after { background: var(--on-accent); }
.ck-day { display: grid; gap: 6px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; } .ck-day b { font-size: 14px; } .ck-occ { display: block; font-size: 13.5px; } .ck-occ.holiday > span { color: var(--bad); font-weight: 600; } .ck-occ small { line-height: 1.6; }
.ck-up { display: grid; gap: 4px; } .ck-up h5 { margin: 0; font-size: 12.5px; color: var(--mute); font-weight: 600; } .ck-u { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; font-size: 13.5px; } .ck-u span { display: block; } .ck-u small.tip, .ck-occ small.tip { display: block; line-height: 1.6; } .ck-u em { font-style: normal; font-size: 12px; color: var(--accent-ink); white-space: nowrap; }
.ck-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .ck-foot small { flex: 1 1 100%; }
@media (max-width: 1100px) { .ck-full { display: none; } .ck-short { display: inline; } .ck-d { max-width: 90px; } }
@media (max-width: 700px) { .clockchip { padding: 2px 6px; grid-template-columns: 1fr; gap: 0; height: 40px; } .ck-t { font-size: 15px; } .ck-d { font-size: 11px; } .clock-pop { position: fixed; inset-inline: 12px; top: 64px; width: auto; max-height: calc(100vh - 140px); overflow: auto; } }

/* ---------- v32 · kitchen display: modifications you can read from across the pass ---------- */
.tk .it { grid-template-columns: 40px 1fr; gap: 10px; padding: 8px 0; } .tk .it + .it { border-top: 1px dashed var(--line-2); } .tk .it .q { font-size: 24px; font-weight: 800; line-height: 1.2; }
.it-b { display: grid; gap: 6px; min-width: 0; } .it-n { font-size: 17px; font-weight: 800; line-height: 1.5; }
.mods2 { display: grid; gap: 5px; } .md { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 10px; border-inline-start: 6px solid; font-size: 16px; line-height: 1.5; }
.md i { display: grid; place-items: center; flex: none; } .md i svg { width: 18px; height: 18px; stroke-width: 2.4; } .md b { font-weight: 800; }
.md.no { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); } .md.no b { text-decoration: line-through; text-decoration-thickness: 2px; }
.md.plus { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); } .md.note { background: var(--warn-bg); border-color: var(--warn); color: var(--ink); }
.chg { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 5px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 800; font-size: 14px; animation: chgPulse 1.4s var(--ease) 4; } .chg span { display: inline-flex; align-items: center; gap: 6px; } .chg svg { width: 16px; height: 16px; } .chg small { font-weight: 500; opacity: 0.85; font-size: 12.5px; }
@keyframes chgPulse { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 4px var(--warn-bg); } }
.tk .it.is-changed { background: color-mix(in srgb, var(--warn) 7%, transparent); border-radius: 12px; padding-inline: 8px; }
.req { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--warn); background: var(--warn-bg); } .req > b { display: flex; align-items: center; gap: 6px; font-size: 14px; } .req > b svg { width: 18px; height: 18px; color: var(--warn); } .req-t { font-size: 16px; font-weight: 700; line-height: 1.6; } .req-a { display: flex; gap: 8px; flex-wrap: wrap; }
.tk.req-open { border-color: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }

/* ---------- v32 · the till: calm, fast, nothing clipped ----------
   Rules applied (emil-design-eng / apple-design / impeccable): a surface used 100+ times a day has NO entrance animation; press feedback is instant (scale on :active, 100ms, transform only);
   no colored side stripes; every price sits on its own line and is never clipped; secondary actions live in one toolbar + one menu. */
.page > .pos, .pos * { animation: none !important; }
.prod { display: flex; flex-direction: column; align-items: stretch; padding: 0; gap: 0; border-radius: 16px; overflow: hidden; text-align: start; position: relative; content-visibility: auto; contain-intrinsic-size: 190px 230px; transition: transform 100ms ease-out, border-color 120ms ease-out; }
.prod:active:not(:disabled) { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .prod:hover:not(:disabled) { border-color: var(--accent); } }
.prod .ph { display: grid; place-items: center; aspect-ratio: 7 / 5; background: var(--panel-2); border-radius: 0; flex: none; } .prod .ph img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.prod .pt { display: grid; gap: 2px; padding: 10px 12px 12px; align-content: start; }
.prod .pn { font-size: 13.5px; line-height: 1.5; font-weight: 700; padding: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; }
.prod .pr { display: flex; align-items: baseline; gap: 5px; padding: 0; } .prod .pr em { font-style: normal; font-size: 15px; font-weight: 800; color: var(--ink); } .prod .pr small { font-size: 12px; color: var(--mute); }
.prod .tag { position: absolute; top: 8px; inset-inline-start: 8px; inset-inline-end: auto; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panel); color: var(--bad); box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.prod .tag.dealtag { color: var(--ok); } .prod.out { opacity: 0.55; }
.products { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
/* cart header: one calm block */
.cart header { gap: 8px; } .ch-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .ch-title { font-size: 18px; } .ch-chips { display: flex; gap: 6px; flex-wrap: wrap; } .ch-chips svg { width: 14px; height: 14px; }
.gcrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .gcrow .chips { display: flex; gap: 6px; flex-wrap: wrap; } .linkbtn { margin-inline-start: auto; font-size: 12.5px; color: var(--accent-ink); font-weight: 600; padding: 4px 6px; border-radius: 8px; }
@media (hover: hover) and (pointer: fine) { .linkbtn:hover { background: var(--accent-soft); } }
.cart header input.alarm { border-color: var(--bad); }
.deal-hint { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); padding: 8px 10px; border-radius: 10px; background: var(--panel-2); } .deal-hint svg { width: 16px; height: 16px; color: var(--accent-ink); flex: none; }
/* lines */
.rnd-r { display: flex; gap: 6px; align-items: center; } .ln .nt { color: var(--ink-2); font-style: italic; } .ln-a { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; } .ln-b { display: flex; gap: 4px; }
.ln.changed { background: var(--warn-bg); } .pendchip { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--warn); } .pendchip.ok { color: var(--ok); } .pendchip svg { width: 15px; height: 15px; }
/* footer: totals, two big actions, one toolbar */
.cart footer { gap: 10px; } .tots { display: grid; gap: 2px; } .tot.big .num { font-size: 22px; font-weight: 800; } .tot.big .num small { font-size: 12px; font-weight: 500; color: var(--mute); margin-inline-start: 5px; }
.cart-main { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .cart-main .btn { height: 48px; font-size: 15px; }
.cart-tools { display: flex; gap: 6px; } .cart-tools > .tool, .cart-tools .pop-wrap { flex: 1 1 0; min-width: 0; } .cart-tools .pop-wrap { position: relative; display: block; }
.tool { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: transparent; color: var(--ink-2); font-size: 12px; font-weight: 600; transition: background 100ms ease-out, transform 100ms ease-out; } .tool svg { width: 20px; height: 20px; } .tool:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .tool:hover { background: var(--panel-3); color: var(--ink); } }
.popover.up { inset-block: auto calc(100% + 6px); inset-inline-end: 0; inset-inline-start: auto; width: 230px; padding: 6px; display: grid; gap: 2px; z-index: 60; transform-origin: bottom; } .popover.up[hidden] { display: none; }
.popover.up button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-align: start; font-size: 13.5px; width: 100%; } .popover.up button svg { width: 18px; height: 18px; color: var(--mute); flex: none; } .popover.up .danger { color: var(--bad); } .popover.up .danger svg { color: var(--bad); }
@media (hover: hover) and (pointer: fine) { .popover.up button:hover { background: var(--panel-3); } }
/* floor strip */
.floor { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; } .floor-sum { width: 100%; display: flex; align-items: center; gap: 18px; padding: 8px 14px; min-height: 44px; flex-wrap: wrap; text-align: start; border-radius: 14px; }
@media (hover: hover) and (pointer: fine) { .floor-sum:hover { background: var(--panel-2); } }
.fs { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); } .fs b { color: var(--ink); font-weight: 700; } .fs.warn b, .fs.warn { color: var(--warn); font-weight: 700; } .fs-chev { margin-inline-start: auto; color: var(--mute); display: grid; } .fs-chev svg { width: 16px; height: 16px; transition: transform 160ms ease-out; } .floor.open .fs-chev svg { transform: rotate(90deg); }
.fdot { width: 9px; height: 9px; border-radius: 50%; background: var(--mute); display: inline-block; } .fdot.ok { background: var(--ok); } .fdot.warn { background: var(--warn); } .fdot.bad { background: var(--bad); }
.floor-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 4px 14px 14px; border-top: 1px solid var(--line); } .fcol { display: grid; gap: 8px; align-content: start; padding-top: 10px; } .fcol h5 { margin: 0; font-size: 12.5px; color: var(--mute); font-weight: 600; }
.fk-row { display: flex; gap: 8px; } .fk { display: grid; justify-items: center; padding: 6px 12px; border-radius: 10px; background: var(--panel-2); font-size: 12px; color: var(--mute); min-width: 64px; } .fk b { font-size: 20px; color: var(--ink); line-height: 1.3; } .fk.r b { color: var(--ok); } .fk.n b { color: var(--warn); }
.wrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; } .wrow .wt { display: flex; gap: 4px; flex-wrap: wrap; } .wdot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); flex: none; } .wdot.on { background: var(--ok); }
.chip[data-table] { cursor: pointer; } .frow { font-size: 13px; line-height: 1.6; padding: 4px 0; border-bottom: 1px solid var(--line); } .frow:last-child { border: 0; }
@media (max-width: 1100px) { .floor-body { grid-template-columns: 1fr; } }
/* dialogs */
.note-box { padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.8; background: var(--panel-2); } .note-box.ok { background: var(--ok-bg); color: var(--ok); } .note-box.warn { background: var(--warn-bg); color: var(--warn); } .note-box.bad { background: var(--bad-bg); color: var(--bad); }
.diff { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); } .diff > div { display: grid; gap: 2px; min-width: 0; } .diff b { font-size: 13.5px; line-height: 1.6; } .diff .arrow { color: var(--mute); transform: rotate(180deg); display: grid; } .diff .dp { grid-column: 1 / -1; justify-self: start; font-weight: 700; }
.wlist { display: grid; gap: 6px; } .wopt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); text-align: start; } .wopt small { margin-inline-start: auto; } .wopt.on { border-color: var(--accent); background: var(--accent-soft); }
@media (hover: hover) and (pointer: fine) { .wopt:hover { border-color: var(--accent); } }
/* house rule: no colored side stripes — tint + icon instead */
.md { border-inline-start: 0; } .md.no { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bad) 40%, transparent); } .md.plus { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 40%, transparent); } .md.note { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--warn) 45%, transparent); }
.ps { border-inline-start: 0; padding-inline-start: 0; } .ps small::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); margin-inline-end: 6px; } .ps.now small::before { background: var(--accent); } .ps.mark small::before { background: var(--ink); } .ps.end small::before { background: var(--mute); }
.focus-hit { box-shadow: none; outline: 2px solid var(--warn); outline-offset: -2px; background: var(--warn-bg); }
@media (max-width: 900px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .prod .pn { font-size: 13px; } .cart-main .btn { height: 52px; } .popover.up { inset-inline: auto 0; } }
.products { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.prod .ph { aspect-ratio: 4 / 3; background: var(--panel-2); } .prod .pt { background: var(--panel); padding: 8px 10px 10px; } .prod .pn { font-size: 13px; min-height: 2.9em; }
.prod .pr, .prod .pr em { background: none; box-shadow: none; border: 0; border-radius: 0; padding: 0; height: auto; } .prod .pr em { font-size: 14.5px; }

/* ---------- v32 · kitchen display v2 ----------
   Rush-proof: summary bar readable from across the room, oldest/late first, a glow for what just arrived, density that adapts, and no entrance animation on a surface that refreshes all night. */
.kds { display: grid; gap: 12px; grid-template-columns: none; align-items: stretch; }
.kds * { animation: none; } .kds .chg, .kds .tk.is-new { animation: chgPulse 1.4s var(--ease) 4; }
.kbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.ksum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .kp { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 14px; border-radius: 12px; background: var(--panel-2); font-size: 13px; color: var(--mute); } .kp b { font-size: 22px; line-height: 1.2; color: var(--ink); font-weight: 800; }
.kp.n b { color: var(--warn); } .kp.r b { color: var(--ok); } .kp.late { background: var(--bad-bg); color: var(--bad); } .kp.late b { color: var(--bad); } .kavg { font-size: 13px; color: var(--mute); } .kavg b { color: var(--ink); }
.ktools { display: flex; align-items: center; gap: 8px; } .ksearch { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px; border-radius: 12px; background: var(--panel-3); } .ksearch svg { width: 17px; height: 17px; color: var(--mute); } .ksearch input { border: 0; background: transparent; box-shadow: none; min-height: 0; height: 38px; width: 150px; padding: 0; }
.ktool { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--panel-3); color: var(--ink-2); font-size: 13px; font-weight: 600; transition: background 100ms ease-out, transform 100ms ease-out; } .ktool svg { width: 18px; height: 18px; } .ktool:active { transform: scale(0.97); } .ktool[aria-pressed="false"] { color: var(--mute); }
@media (hover: hover) and (pointer: fine) { .ktool:hover { background: color-mix(in srgb, var(--ink) 9%, var(--panel-3)); } }
.kst { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; } .kst::-webkit-scrollbar { display: none; } .kst .chip { flex: none; height: 38px; } .kst .chip b { margin-inline-start: 8px; color: var(--mute); font-weight: 600; } .kst .chip.on b { color: inherit; }
.kreqbar { display: grid; gap: 8px; } .kr { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--warn-bg); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--warn) 55%, transparent); } .kr-i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--panel); color: var(--warn); } .kr-i svg { width: 20px; height: 20px; }
.kr-t { flex: 1 1 220px; display: grid; } .kr-t b { font-size: 15px; } .kr-t small { font-size: 14px; color: var(--ink-2); line-height: 1.7; } .kr-a { display: flex; gap: 8px; flex-wrap: wrap; }
.kboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.kcol2 { background: var(--panel-2); border: 1px solid var(--line); border-radius: 18px; padding: 0 12px 12px; min-width: 0; } .kcol2 h3 { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; margin: 0 -12px 10px; padding: 14px 16px 10px; background: var(--panel-2); border-radius: 18px 18px 0 0; font-size: 16px; }
.kcount { min-width: 32px; height: 28px; padding: 0 10px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 14px; background: var(--panel); color: var(--ink); } .kcol2.n .kcount { background: var(--warn-bg); color: var(--warn); } .kcol2.r .kcount { background: var(--ok-bg); color: var(--ok); } .kcol2.c .kcount { background: var(--accent-soft); color: var(--accent-ink); }
.kl { display: grid; gap: 12px; max-height: calc(100vh - 290px); overflow-y: auto; padding: 2px; scrollbar-width: thin; } .kempty { display: grid; place-items: center; gap: 8px; padding: 36px 12px; color: var(--mute); font-size: 14px; } .kempty svg { width: 28px; height: 28px; color: var(--ok); }
/* ticket */
.tk { border-radius: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: none; overflow: hidden; content-visibility: auto; contain-intrinsic-size: 260px 300px; }
.tk header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--panel); border-bottom: 1px solid var(--line); } .tk-w { display: flex; align-items: baseline; gap: 10px; } .tk-where { font-size: 24px; font-weight: 800; line-height: 1.2; } .tk-r { font-size: 13px; color: var(--mute); font-weight: 600; }
.age { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 16px; padding: 4px 12px; border-radius: 999px; background: var(--panel-3); color: var(--ink); } .age.warn { background: var(--warn-bg); color: var(--warn); } .age.late { background: var(--bad); color: #fff; }
.tk.late { box-shadow: inset 0 0 0 2px var(--bad); } .tk.warn { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--warn) 60%, transparent); }
.tk.is-new { box-shadow: 0 0 0 3px var(--accent-soft), inset 0 0 0 2px var(--accent); }
.tk .body { padding: 12px 14px; display: grid; gap: 10px; } .tk-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--mute); } .dotsep { width: 3px; height: 3px; border-radius: 50%; background: var(--mute); }
.tk-o { gap: 6px; } .tk-o .chip { height: 28px; font-size: 12.5px; } .tk-o .chip svg { width: 14px; height: 14px; }
.tk .allergy { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bad); color: #fff; font-size: 15px; line-height: 1.6; } .tk .allergy svg { width: 22px; height: 22px; flex: none; } .tk .allergy b { font-weight: 800; }
.tk-lines { display: grid; }
.tk-note { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--warn) 45%, transparent); } .tk-note svg { width: 18px; height: 18px; color: var(--warn); flex: none; margin-top: 3px; } .tk-note div { display: grid; } .tk-note small { color: var(--mute); font-size: 12px; } .tk-note b { font-size: 16px; line-height: 1.6; }
.tk footer { display: flex; gap: 8px; padding: 10px 14px 14px; } .tk footer .btn.block { flex: 1; height: 52px; font-size: 16px; font-weight: 800; } .tk footer .btn:not(.block) { width: 52px; height: 52px; padding: 0; }
/* a rush: tighter cards, same information */
.kds.dense .kl { gap: 8px; } .kds.dense .tk header { padding: 8px 12px; } .kds.dense .tk-where { font-size: 20px; } .kds.dense .tk .body { padding: 8px 12px; gap: 6px; } .kds.dense .it-n { font-size: 15px; } .kds.dense .tk .it .q { font-size: 20px; } .kds.dense .md { padding: 5px 10px; font-size: 14.5px; } .kds.dense .tk footer { padding: 8px 12px 12px; } .kds.dense .tk footer .btn { height: 44px; } .kds.dense .tk-meta, .kds.dense .tk-o { display: none; }
@media (max-width: 1100px) { .kboard { grid-template-columns: 1fr; } .kl { max-height: none; } .kbar { position: sticky; top: 0; z-index: 5; } .ksearch input { width: 110px; } }
@media (max-width: 640px) { .ktool span { display: none; } .tk-where { font-size: 22px; } }
.linkbtn { min-height: 40px; padding: 6px 12px; } .ck-short, .ck-d { font-size: 12px; }
@media (max-width: 700px) { .ck-d { font-size: 12px; } }
/* worst-case text (long names, notes without spaces) must wrap inside the card, never push it wider */
.tk, .tk .body, .tk header, .tk-note, .md, .it-b, .kr-t, .chip { overflow-wrap: anywhere; min-width: 0; } .tk-o .chip { max-width: 100%; white-space: normal; height: auto; min-height: 28px; line-height: 1.5; padding-block: 3px; } .tk-w { min-width: 0; }

/* ---------- v33 · comparison dialog + employee panel ---------- */
.cmp-top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px; } .cmp-rng { display: grid; gap: 2px; } .cmp-rng small { color: var(--mute); font-size: 12.5px; } .cmp-rng b { font-size: 16px; } .cmp-rng.other b { color: var(--ink-2); } .cmp-vs { color: var(--mute); font-size: 13px; }
.cmp-modes { flex-wrap: wrap; } .cmp-sum { display: flex; gap: 8px; flex-wrap: wrap; } .cmp-tbl td, .cmp-tbl th { white-space: nowrap; } .cmp-tbl td:first-child { white-space: normal; } .cmp-chart h5, .sp-charts h5, .sp-act h5 { margin: 0 0 6px; font-size: 12.5px; color: var(--mute); font-weight: 600; }
.sp-head { display: flex; align-items: center; gap: 14px; } .sp-head b { font-size: 18px; display: block; } .sp-av { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 22px; font-weight: 800; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; } .sp-t { display: grid; gap: 4px; padding: 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; align-content: start; } .sp-t small { color: var(--mute); font-size: 12.5px; } .sp-t b { font-size: 24px; line-height: 1.3; font-weight: 800; } .sp-t b em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--mute); margin-inline-start: 6px; } .sp-t > span { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.sp-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .sp-act { display: grid; gap: 6px; }
@media (max-width: 700px) { .cmp-top { grid-template-columns: 1fr; text-align: start; } .cmp-vs { display: none; } .sp-charts { grid-template-columns: 1fr; } .sp-t b { font-size: 21px; } }
@media (max-width: 700px) { .cmp-tbl td, .cmp-tbl th { white-space: normal; } .cmp-top { padding: 12px; } }
#cmp, .modal .body { min-width: 0; } .chips.seg.cmp-modes { max-width: 100%; width: auto; flex-wrap: wrap; } .chips.seg.cmp-modes .chip { flex: 1 1 auto; }
.pal-h { padding: 10px 14px 4px; font-size: 12px; font-weight: 600; color: var(--mute); } .pal-i small { display: block; color: var(--mute); font-size: 12.5px; font-weight: 400; } .pal-i.on { background: var(--accent-soft); color: var(--ink); }
svg.i .ifill { fill: currentColor; fill-opacity: 0.13; stroke: none; }

/* ── motion & touch rules (emil-design-eng review): hover only where a hover exists; press always wins over hover; strong ease-out; reduced motion is a real alternative, not a blanket 0.01 ms ── */
@media (hover: hover) and (pointer: fine) { .hk:active { transform: none; } }
.tool:active, .pt:active, .ktool:active, .attn-row:active, .acitem:active { transform: scale(0.97); }
.tool, .pt, .ktool, .attn-row, .acitem { transition-property: background, color, border-color, transform; transition-duration: var(--t), var(--t), var(--t), 120ms; transition-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) { .kds .chg, .kds .tk.is-new, .focus-hit, .focus-hit td { animation: none !important; } .focus-hit { box-shadow: inset 4px 0 0 var(--warn); } .modal, .toast, .attn-more { animation: none !important; } }
.okmark svg { width: 20px; height: 20px; }
.stars { display: inline-flex; gap: 1px; vertical-align: middle; } .stars .i { width: 14px; height: 14px; } .stars .on { color: var(--warn); } .stars .off { color: var(--line-2); }

/* ── the till on a tablet (≤1280): the sidebar folds to an icon rail so the catalogue gets 3 columns instead of 2 (a till is judged by how much menu you see) ── */
@media (min-width: 901px) and (max-width: 1280px) {
  .shell[data-screen="pos"] { --side: 76px; }
  .shell[data-screen="pos"] .side { padding: 14px 8px; overflow-x: hidden; }
  .shell[data-screen="pos"] .side .brand { justify-content: center; } .shell[data-screen="pos"] .side .brand > div:last-child,
  .shell[data-screen="pos"] .shiftbox > div:last-child, .shell[data-screen="pos"] .ngh, .shell[data-screen="pos"] .nav a > span, .shell[data-screen="pos"] .side-foot { display: none; }
  .shell[data-screen="pos"] .shiftbox { justify-content: center; padding: 10px 0; }
  .shell[data-screen="pos"] .ng.shut .ngl { display: grid; }
  .shell[data-screen="pos"] .nav a { justify-content: center; padding: 0; height: 44px; position: relative; }
  .shell[data-screen="pos"] .nav a .badge { position: absolute; top: 2px; inset-inline-end: 8px; }
}
/* the till fills exactly the space under the top bar (64) and inside the page padding (24+24): the page itself never scrolls */
@media (min-width: 901px) { .pos { height: calc(100vh - 64px - 48px); height: calc(100dvh - 64px - 48px); } }

/* ── charts (dataviz skill): one accent for the main series, a validated categorical set for identity (checked with validate_palette.js, light + dark) ── */
:root, [data-theme="light"] { --cat-2: #0a8fb8; --cat-3: #d6387f; --cat-4: #c47400; --cat-5: #1c9b66; }
:root[data-theme="dark"], [data-theme="dark"] { --cat-2: #1c9fc9; --cat-3: #e24d8e; --cat-4: #d07d18; --cat-5: #2aab7b; }
.echart { width: 100%; }
.ct-h { color: var(--mute); font-size: 12px; margin-bottom: 6px; }
.ct-r { display: flex; align-items: center; gap: 8px; line-height: 1.9; font-size: 12.5px; color: var(--ink); } .ct-r i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ct-r b { margin-inline-start: auto; padding-inline-start: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.legend i, .legend-dots i { border-radius: 50%; } .legend i { background: var(--chart-1); } .legend i.p { background: var(--chart-2); }

/* ── official invoice (v35): a paper that always stays light, so what is printed is what is seen ── */
.modal.inv { width: min(960px, 100%); }
.paper { --pi: #1a1a1a; --pm: #6b6b6b; --pl: #e3e0da; background: #fff; color: var(--pi); border: 1px solid var(--pl); border-radius: 14px; padding: 28px 30px; margin-top: 14px; position: relative; overflow: hidden; font-size: 13px; line-height: 1.8; }
.paper .mute, .paper small { color: var(--pm); }
.pp-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 2px solid var(--pi); } .pp-seller h2 { margin: 0; font-size: 22px; } .pp-sub { color: var(--pm); font-size: 12.5px; }
.pp-ids { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; align-items: center; } .pp-ids i { width: 1px; height: 12px; background: var(--pl); }
.pp-meta { min-width: 250px; } .pp-title { font-weight: 700; font-size: 15px; margin-bottom: 8px; } .pp-grid { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; font-size: 12.5px; } .pp-grid span { color: var(--pm); }
.pp-stamp { display: inline-block; width: max-content; margin: 12px 0 0; transform: rotate(-3deg); border: 2px solid currentColor; border-radius: 10px; padding: 1px 16px; font-weight: 700; font-size: 15px; background: transparent; opacity: 0.85; } .pp-stamp.ok { color: #1e7f3b; } .pp-stamp.bad { color: #c4221d; } .pp-stamp.warn { color: #a15c00; }
.pp-buyer { display: flex; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--pl); } .pp-buyer b { color: var(--pm); font-weight: 600; }
.pp-tbl { width: 100%; border-collapse: collapse; margin-top: 10px; } .pp-tbl th { background: #f4f2ee; font-weight: 600; font-size: 12px; text-align: right; padding: 7px 10px; border: 1px solid var(--pl); } .pp-tbl td { padding: 7px 10px; border: 1px solid var(--pl); vertical-align: top; } .pp-tbl td.num, .pp-tbl th:not(:nth-child(2)) { text-align: center; } .pp-mod { color: var(--pm); font-size: 11.5px; }
.pp-sum { display: grid; grid-template-columns: 1fr minmax(260px, 340px); gap: 22px; margin-top: 14px; align-items: start; } @media (max-width: 700px) { .pp-sum { grid-template-columns: 1fr; } .paper { padding: 18px 16px; } }
.pp-pay > b { display: block; margin-bottom: 4px; color: var(--pm); font-weight: 600; } .pp-pay > div, .pp-tot > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px dashed var(--pl); } .pp-tot .grand { border: 0; border-top: 2px solid var(--pi); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 15px; } .pp-pay .warn { color: #a15c00; font-weight: 600; }
.pp-words { margin-top: 12px; padding: 9px 12px; background: #f4f2ee; border-radius: 8px; font-size: 12.5px; } .pp-foot { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--pl); color: var(--pm); font-size: 12px; text-align: center; display: grid; gap: 4px; } .pp-lock { display: inline-flex; gap: 6px; align-items: center; justify-content: center; } .pp-lock .i { width: 14px; height: 14px; } .pp-warn { color: #a15c00; }
.story { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; } @media (max-width: 800px) { .story { grid-template-columns: 1fr; } } .story-side { display: grid; gap: 14px; } .story h4 { margin: 0 0 10px; font-size: 14px; }
.tl { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 0; } .tl li { display: grid; grid-template-columns: 112px 1fr auto; gap: 12px; align-items: baseline; padding: 9px 0 9px 0; border-bottom: 1px solid var(--line); position: relative; } .tl li:last-child { border: 0; } .tl time { color: var(--mute); font-size: 12px; } .tl li.ok b { color: var(--ok); } .tl li.bad span { color: var(--bad); }
@media print { .paper { border: 0; } }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 2px 2px 4px; } .crumbs i { color: var(--mute); font-style: normal; } .crumb-b { height: 34px; padding: 0 14px; border-radius: 999px; background: var(--panel-3); color: var(--ink-2); font-weight: 600; } .crumb-b.on { background: var(--accent-soft); color: var(--accent-ink); }
.tl-list { display: grid; gap: 2px; max-height: 292px; overflow-y: auto; padding-inline-end: 4px; scrollbar-width: thin; }
.tlr { display: grid; grid-template-columns: minmax(52px, 0.9fr) 38px minmax(40px, 1.6fr) minmax(52px, auto); gap: 10px; align-items: center; height: 40px; padding: 0 10px; border-radius: 10px; text-align: start; background: transparent; }
.tlr .tl-m { height: 6px; border-radius: 3px; background: var(--chart-grid); overflow: hidden; } .tlr .tl-m i { display: block; height: 100%; border-radius: 3px; background: var(--chart-1); } .tlr .tl-c { color: var(--mute); text-align: end; } .tlr b { text-align: end; font-weight: 600; } .tlr.zero { opacity: 0.45; } .tlr.on { background: var(--accent-soft); } .tlr .lk .i { width: 13px; height: 13px; color: var(--mute); vertical-align: -2px; }
@media (hover: hover) and (pointer: fine) { .tlr:not(:disabled):hover { background: var(--panel-3); } .crumb-b:hover { background: var(--line); } }
.ordsum { display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; padding: 6px 4px 10px; font-size: 13px; } .ordsum b { font-weight: 700; margin-inline-start: 4px; }
.how { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; } .how summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; } .how summary .i { width: 18px; height: 18px; color: var(--accent-ink); } .how ol { margin: 8px 0 2px; padding-inline-start: 20px; color: var(--ink-2); font-size: 13px; line-height: 1.9; }

/* ── viz.js: funnel · team wall (lanyard badges) · tick gauge ── */
.fn { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 2px; align-items: start; padding: 6px 0; } .fn-seg { display: grid; gap: 2px; justify-items: center; text-align: center; outline: none; transition: opacity 180ms var(--ease); }
.fn-seg svg { width: 100%; height: 150px; display: block; transform: scaleX(-1); overflow: visible; } .fn-seg svg path { fill: var(--chart-1); transform-origin: center; animation: fnIn 620ms var(--ease) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes fnIn { from { opacity: 0; transform: scaleY(0.4); } }
.fn-v { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; } .fn-v b { font-size: 24px; font-weight: 700; } .fn-pct { font-size: 12px; background: var(--panel-3); border-radius: 999px; padding: 1px 9px; color: var(--ink-2); font-weight: 600; } .fn-l { font-size: 13px; font-weight: 600; } .fn-n { font-size: 12px; color: var(--mute); }
@media (hover: hover) and (pointer: fine) { .fn:has(.fn-seg:hover) .fn-seg:not(:hover) { opacity: 0.45; } } .fn-seg:focus-visible svg { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
@media (max-width: 640px) { .fn { grid-template-columns: repeat(2, 1fr); gap: 14px 6px; } .fn-seg svg { height: 90px; } .fn-v b { font-size: 20px; } }

.tw { position: relative; display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; padding: 30px 8px 6px; } .tw-rail { position: absolute; inset-inline: 0; top: 10px; height: 6px; border-radius: 3px; background: linear-gradient(var(--line-2), var(--line)); }
.tw-slot { position: relative; width: 148px; padding-top: 34px; transform-origin: 50% 0; transform: rotate(var(--tilt)); animation: twDrop 700ms var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes twDrop { from { opacity: 0; transform: translateY(-14px) rotate(0deg); } }
.tw-strap { position: absolute; top: -8px; left: 50%; width: 12px; height: 44px; margin-left: -6px; border-radius: 2px; background: var(--tone); opacity: 0.85; } .tw-clip { position: absolute; top: 28px; left: 50%; width: 26px; height: 12px; margin-left: -13px; border-radius: 3px 3px 6px 6px; background: var(--line-2); z-index: 2; }
.tw-card { position: relative; display: block; width: 100%; height: 240px; min-height: 240px; padding: 0; background: none; perspective: 900px; cursor: pointer; text-align: center; } .tw-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 520ms var(--ease-drawer); } .tw-card[aria-pressed="true"] .tw-in { transform: rotateY(180deg); }
.tw-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 44px 12px 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 8px 22px -14px rgba(0, 0, 0, 0.35); backface-visibility: hidden; overflow: hidden; } .tw-back { transform: rotateY(180deg); padding-top: 38px; align-items: stretch; }
.tw-band { position: absolute; inset: 0 0 auto 0; height: 30px; background: var(--tone); opacity: 0.9; } .tw-av { width: 50px; height: 50px; border-radius: 50%; margin-top: -2px; display: grid; place-items: center; font-size: 20px; font-weight: 700; background: var(--panel); color: var(--ink); box-shadow: 0 0 0 3px var(--panel), 0 0 0 4px var(--line-2); position: relative; }
.tw-face b { font-size: 14px; } .tw-face small { color: var(--mute); font-size: 12px; } .tw-front b { margin-top: 6px; } .tw-bar { width: 100%; height: 5px; border-radius: 3px; background: var(--chart-grid); margin-top: auto; overflow: hidden; } .tw-bar i { display: block; height: 100%; background: var(--tone); border-radius: 3px; } .tw-front em { font-style: normal; font-size: 13px; font-weight: 600; }
.tw-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); padding: 1px 2px; } .tw-open { margin-top: auto; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); border-radius: 10px; padding: 6px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .tw-slot:hover { animation: twSwing 900ms var(--ease) 1; } } @keyframes twSwing { 30% { transform: rotate(calc(var(--tilt) * -2.4)); } 62% { transform: rotate(calc(var(--tilt) * 1.2)); } }
.tw-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 18px; } @media (prefers-reduced-motion: reduce) { .tw-slot, .fn-seg svg path { animation: none; } .tw-in { transition: none; } }

.dials { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; } .dial { position: relative; text-align: center; padding: 6px 4px 2px; } .dial svg { width: 100%; max-width: 230px; height: auto; display: block; margin: 0 auto; }
.dial line { stroke: var(--line-2); stroke-width: 2.6; stroke-linecap: round; } .dial line.good { stroke: color-mix(in srgb, var(--ok) 32%, var(--line-2)); } .dial line.on { stroke: var(--chart-1); animation: dialIn 420ms var(--ease) both; animation-delay: var(--d); } .dial.ok line.on { stroke: var(--ok); } .dial.warn line.on { stroke: var(--warn); } .dial.bad line.on { stroke: var(--bad); }
@keyframes dialIn { from { opacity: 0; } } .dial-c { margin-top: -50px; display: grid; gap: 0; } .dial-c b { font-size: 28px; font-weight: 700; line-height: 1.2; } .dial-c b small { font-size: 14px; color: var(--mute); margin-inline-start: 2px; } .dial-c span { font-size: 13px; color: var(--ink-2); font-weight: 600; } .dial-h { font-size: 12px; color: var(--mute); margin-top: 2px; } @media (prefers-reduced-motion: reduce) { .dial line.on { animation: none; } }

/* ══════════════════════ glass style (v36): aurora ground, frosted panels, gradient accents. data-style="glass" (default) | "plain" ══════════════════════ */
html[data-style="glass"][data-theme="dark"] {
  --bg: var(--ground); --panel: rgba(255, 255, 255, 0.066); --panel-2: rgba(255, 255, 255, 0.04); --panel-3: rgba(255, 255, 255, 0.105);
  --line: rgba(255, 255, 255, 0.10); --line-2: rgba(255, 255, 255, 0.19); --ink: #f7f5f8; --ink-2: #d4d0d8; --mute: #a9a5b2;
  --shadow: 0 24px 64px -26px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.09); --shadow-1: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --solid: color-mix(in srgb, var(--ground) 82%, #ffffff 4%); --scrim: rgba(4, 3, 8, 0.55); --glass-blur: 22px;
  --ok: #66e394; --warn: #ffbf5c; --bad: #ffa097; --info: #8fc8ff; --mute: #b0acb9;
  --ok-bg: rgba(20, 100, 55, 0.42); --warn-bg: rgba(120, 76, 0, 0.42); --bad-bg: rgba(130, 24, 34, 0.45); --info-bg: rgba(24, 66, 132, 0.45);
}
html[data-style="glass"][data-theme="light"] {
  --bg: var(--ground); --panel: rgba(255, 255, 255, 0.60); --panel-2: rgba(255, 255, 255, 0.42); --panel-3: rgba(40, 30, 50, 0.06);
  --line: rgba(40, 30, 50, 0.10); --line-2: rgba(40, 30, 50, 0.20); --ink: #1c1a22; --ink-2: #46444f; --mute: #5d5b68;
  --shadow: 0 22px 56px -28px rgba(40, 30, 60, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.85); --shadow-1: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --solid: color-mix(in srgb, var(--ground) 70%, #ffffff); --scrim: rgba(30, 24, 40, 0.30); --glass-blur: 22px;
  --ok: #17692f; --warn: #8a4c00; --bad: #ae1b17; --info: #0a55ad; --mute: #4c4e65;
}
html[data-style="glass"] body { background-attachment: fixed; background-repeat: no-repeat; }
html[data-style="glass"][data-theme="dark"] body { background-color: var(--ground); background-image: radial-gradient(58% 50% at 8% 2%, color-mix(in srgb, var(--aur-1) 62%, transparent), transparent 72%), radial-gradient(48% 44% at 94% 6%, color-mix(in srgb, var(--aur-2) 70%, transparent), transparent 72%), radial-gradient(60% 52% at 78% 108%, color-mix(in srgb, var(--aur-1) 40%, transparent), transparent 72%); }
html[data-style="glass"][data-theme="light"] body { background-color: var(--ground); background-image: radial-gradient(58% 50% at 8% 2%, color-mix(in srgb, var(--aur-1) 80%, transparent), transparent 72%), radial-gradient(48% 44% at 94% 6%, color-mix(in srgb, var(--aur-2) 75%, transparent), transparent 72%), radial-gradient(60% 52% at 78% 108%, color-mix(in srgb, var(--aur-3) 90%, transparent), transparent 72%); }
html[data-style="glass"] .shell, html[data-style="glass"] .main { background: transparent; }
/* frosted surfaces: one rule, every big container */
html[data-style="glass"] :is(.card, .hk, .kpi, .tbl-wrap, .side, .top, .floor, .cart, .popover, .clock-pop, .tabbar, .toolbar, .kds .tk, .seat, .op2, .cp-card, .login .box, .jcal, .seg, .tabs, .attn-more, .ordsum, .how) { -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.5); backdrop-filter: blur(var(--glass-blur)) saturate(1.5); }
html[data-style="glass"] :is(.card, .hk, .kpi, .tbl-wrap, .floor, .cart, .kds .tk, .op2, .cp-card, .login .box) { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); }
html[data-style="glass"] :is(.side, .top, .tabbar) { background: color-mix(in srgb, var(--panel) 100%, transparent); border-color: var(--line); }
html[data-style="glass"] .top { background: color-mix(in srgb, var(--panel) 80%, transparent); }
html[data-style="glass"] :is(.modal) { background: color-mix(in srgb, var(--solid) 80%, transparent); -webkit-backdrop-filter: blur(32px) saturate(1.6); backdrop-filter: blur(32px) saturate(1.6); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
html[data-style="glass"] :is(.popover, .clock-pop) { background: color-mix(in srgb, var(--solid) 96%, transparent); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
html[data-style="glass"] .scrim { background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html[data-style="glass"] .tbl thead th { background: transparent; } html[data-style="glass"] .tbl tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--panel-3) 40%, transparent); }
html[data-style="glass"] :is(input, select, textarea) { background: var(--panel-2); border-color: var(--line-2); } html[data-style="glass"] :is(.seg, .tabs) { background: var(--panel-3); }
html[data-style="glass"] .tab.on, html[data-style="glass"] .chips.seg .chip.on { background: color-mix(in srgb, var(--solid) 70%, transparent); box-shadow: 0 0 0 1px var(--line-2), 0 6px 16px -8px rgba(0, 0, 0, 0.45); }
/* the accent is a gradient wherever it is a FILL */
html[data-style="glass"] :is(.btn.gold, .pad button.gold, .pad button[type=submit], .cartbar, .brand .mark, .userchip .av, .login .logo, .sp-av, .cd.today, .jd.a, .jd.b, .pace-fill, .pin i.f, .badge) { background-image: var(--accent-grad); background-color: var(--fill); color: #fff; border-color: transparent; }
html[data-style="glass"] :is(.btn.gold) { box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
html[data-style="glass"] :is(.bar > i, .meter i, .meter.gold i, .chan-row .cbar i, .tlr .tl-m i, .tw-bar i) { background: var(--accent-grad); }
html[data-style="glass"] .nav a.on { background: linear-gradient(90deg, transparent, var(--accent-soft)); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); }
html[data-style="glass"] .nav a.on svg { color: var(--accent-ink); }
/* hero tiles: tilt toward the pointer (glass.js writes --mx/--my and the transform) with a soft light that follows it */
.hk { transition: transform 220ms var(--ease), border-color var(--t) var(--ease); will-change: transform; } .hk::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 200ms; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.16), transparent 62%); }
@media (hover: hover) and (pointer: fine) { html[data-style="glass"] .hk:hover::before { opacity: 1; } html[data-style="glass"] .hk:hover { transform: none; } }
html[data-style="glass"] .hk > * { position: relative; }
/* glass calendar (idea: GlassCalendar): frosted popover, the chosen day is the gradient disc, today a dot */
html[data-style="glass"] .clock-pop { border-radius: 22px; } html[data-style="glass"] .cd { border-radius: 50%; } html[data-style="glass"] .cd.today { box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--accent) 80%, transparent); font-weight: 700; } html[data-style="glass"] .cd.occ::after { background: #ff7ab0; }
html[data-style="glass"] .jd { border-radius: 50%; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { html[data-style="glass"] { --panel: color-mix(in srgb, var(--solid) 92%, transparent); } }
@media (prefers-reduced-transparency: reduce) { html[data-style="glass"] { --panel: var(--solid); --glass-blur: 0px; } }

html[data-style="glass"] .login { background: transparent; } html[data-style="glass"] .login .box { background: color-mix(in srgb, var(--solid) 55%, transparent); }
html[data-style="glass"] :is(.modal > header, .modal > footer) { background: transparent; border-color: var(--line); }
html[data-style="glass"] .cartbar .cb-n { background: rgba(255, 255, 255, 0.95); color: var(--fill); }

/* ── tonal donut (viz.js donutInto): one hue stepped toward grey ── */
:root { --ramp-0: var(--chart-1); --ramp-1: color-mix(in srgb, var(--chart-1) 50%, var(--bg)); --ramp-2: color-mix(in srgb, var(--chart-1) 52%, var(--ink)); --ramp-3: color-mix(in srgb, var(--chart-1) 26%, var(--bg)); --ramp-4: color-mix(in srgb, var(--ink) 42%, var(--bg)); }
.dn-host { container-type: inline-size; } .dn { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 28px; align-items: center; padding: 6px 4px 2px; } @container (max-width: 430px) { .dn { grid-template-columns: 1fr; justify-items: center; gap: 16px; } .dn-l { width: 100%; } }
.dn-ring { position: relative; width: 176px; height: 176px; } .dn-ring svg { width: 100%; height: 100%; display: block; overflow: visible; }
.dn-t { fill: none; stroke: var(--chart-grid); stroke-width: 10; } .dn-a { fill: none; stroke: var(--c); stroke-width: 10; stroke-linecap: round; animation: dnIn 900ms var(--ease) both; transition: opacity 180ms var(--ease), stroke-width 180ms var(--ease); }
@keyframes dnIn { from { stroke-dasharray: 0 var(--C); opacity: 0.2; } }
.dn[data-hot] .dn-a { opacity: 0.28; } .dn[data-hot="0"] .dn-a[data-i="0"], .dn[data-hot="1"] .dn-a[data-i="1"], .dn[data-hot="2"] .dn-a[data-i="2"], .dn[data-hot="3"] .dn-a[data-i="3"], .dn[data-hot="4"] .dn-a[data-i="4"] { opacity: 1; stroke-width: 13; }
.dn-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 0; } .dn-c b { font-size: 26px; font-weight: 700; line-height: 1.25; } .dn-c small { color: var(--mute); font-size: 12px; }
.dn-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; } .dn-l li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 46px; gap: 12px; align-items: center; height: 44px; padding: 0 12px; border-radius: 14px; outline: none; transition: background var(--t) var(--ease); }
.dn-l li i { width: 10px; height: 10px; border-radius: 50%; } .dn-l li span { font-weight: 600; } .dn-l li em { font-style: normal; color: var(--mute); font-size: 12.5px; } .dn-l li b { text-align: end; font-weight: 700; }
.dn[data-hot="0"] li[data-i="0"], .dn[data-hot="1"] li[data-i="1"], .dn[data-hot="2"] li[data-i="2"], .dn[data-hot="3"] li[data-i="3"], .dn[data-hot="4"] li[data-i="4"] { background: var(--panel-3); }
@media (prefers-reduced-motion: reduce) { .dn-a { animation: none; } }

/* ══════════════ v37 · top bar + floating layout (references: Helios dashboard, grey glass home) ══════════════ */
.top { display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.tt { display: grid; gap: 0; min-width: 0; line-height: 1.35; flex: none; max-width: 22vw; } .tt small { color: var(--mute); font-size: 12px; } .tt b { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .psearch { flex: 0 1 400px; min-width: 0; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line); color: var(--mute); gap: 10px; justify-content: flex-start; } .top .psearch span { flex: 1; text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; } .top .psearch kbd { flex: none; }
.top .vr { width: 1px; height: 26px; background: var(--line-2); flex: none; }
.top .icon-btn.rnd { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; background: var(--panel-3); border: 1px solid var(--line); color: var(--ink-2); }
.top .newbtn { height: 44px; padding: 0 20px 0 22px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; background: var(--fill, var(--accent)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28); } .top .newbtn:active { transform: scale(0.97); } .top .newbtn .i { width: 18px; height: 18px; }
.top .userchip { height: 48px; padding: 4px 6px 4px 14px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line); gap: 10px; } .top .userchip .av { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-grad, var(--accent)); color: #fff; font-weight: 700; }
.top .userchip .t { display: grid; line-height: 1.3; text-align: start; } .top .userchip .t b { font-size: 13px; } .top .userchip .t small { font-size: 11.5px; }
.netdot { position: absolute; inset-inline-end: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2.5px var(--solid, var(--panel)); } .netdot.off { background: var(--bad); }
.top .clockchip { background: transparent; border: 0; height: 44px; } .top #bell .badge { top: 2px; inset-inline-start: 2px; }
@media (max-width: 1180px) { .top .psearch { flex-basis: 220px; } .top .userchip .t, .tt small { display: none; } }
@media (max-width: 900px) { .tt { max-width: 40vw; } .top .newbtn .qlbl { display: none; } .top .newbtn { padding: 0; width: 44px; justify-content: center; } .top .vr { display: none; } .top .psearch { flex: none; width: 44px; padding: 0; justify-content: center; } .top .psearch span, .top .psearch kbd { display: none; } .top .userchip { padding: 3px; } }
@media (max-width: 640px) { .top .icon-btn.rnd#theme { display: none; } .top .clockchip { padding: 0 4px; } }

@media (min-width: 901px) {
  html[data-style="glass"] .shell { padding: 14px; gap: 14px; }
  html[data-style="glass"] .side { top: 14px; height: calc(100vh - 28px); border-radius: 28px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 18px 12px; }
  html[data-style="glass"] .main { gap: 14px; }
  html[data-style="glass"] .top { top: 14px; height: 68px; border-radius: 26px; border: 1px solid var(--line); box-shadow: var(--shadow); }
  html[data-style="glass"] .page { padding: 0; }
}
html[data-style="glass"] { --r: 24px; }
html[data-style="glass"] :is(.page, .grid, .hero, .cp-2e, .g-main, .g-main2, .cp-ops, .cp-kpis) { gap: 14px; }
html[data-style="glass"] .card { padding: 20px 22px; }
/* pills, like the references: separate quiet pills, the chosen one lit */
html[data-style="glass"] :is(.tabs) { background: transparent; border: 0; padding: 0; gap: 8px; flex-wrap: wrap; box-shadow: none; }
html[data-style="glass"] .tab { height: 42px; padding: 0 20px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); }
html[data-style="glass"] .tab.on { background: color-mix(in srgb, var(--accent) 20%, transparent); border-color: color-mix(in srgb, var(--accent) 46%, transparent); color: var(--ink); box-shadow: none; }
html[data-style="glass"] .chips.seg { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px; } html[data-style="glass"] .chips.seg .chip { border-radius: 999px; } html[data-style="glass"] .chips.seg .chip.on { background: color-mix(in srgb, var(--accent) 24%, transparent); box-shadow: none; color: var(--ink); }
html[data-style="glass"] .nav a { height: 44px; border-radius: 16px; } html[data-style="glass"] .shiftbox { border-radius: 20px; background: var(--panel-2); border: 1px solid var(--line); }
html[data-style="glass"] .side-foot .chip { border-radius: 999px; }
html[data-style="glass"] .btn { border-radius: 999px; } html[data-style="glass"] .btn.sm { border-radius: 999px; }
html[data-style="glass"] .hk { border-radius: 24px; }
html[data-style="glass"] :is(.hk-v b, .kpi b) { letter-spacing: -0.01em; }

.top .userchip { flex: none; min-width: 148px; white-space: nowrap; } .top .userchip .t { min-width: 0; }
.top .clockchip .ck-full { display: none; } .top .clockchip .ck-short { display: inline; } .top .clockchip { flex: none; }
.top #vasel { flex: none; }
.top .clockchip .ck-d { max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; }
@media (max-width: 1180px) { .top .psearch { flex: none; width: 44px; padding: 0; justify-content: center; } .top .psearch span, .top .psearch kbd { display: none; } .top .userchip { min-width: 0; padding: 3px; } .top #theme, .top .vr, .top #vasel { display: none; } .tt { max-width: 30vw; } }
@media (max-width: 1060px) { .top .clockchip .ck-d { display: none; } }
@media (min-width: 901px) { html[data-style="glass"] .pos { height: calc(100vh - 110px); height: calc(100dvh - 110px); } html[data-style="glass"] .kl { max-height: calc(100vh - 330px); } }
#viewas:empty { display: none; }
@media (max-width: 640px) { .top { gap: 6px; padding: 0 8px; } .top .icon-btn, .top .icon-btn.rnd, .top .psearch, .top .newbtn { width: 40px; min-width: 40px; height: 40px; min-height: 40px; } .top .userchip { height: 40px; width: 40px; padding: 0; } .top .userchip .av { width: 40px; height: 40px; } .tt { max-width: 32vw; } .tt b { font-size: 15px; } }
/* the till and the kitchen are looked at ALL day and must repaint instantly: no live blur inside them (the panels stay tinted) */
html[data-style="glass"] .shell:is([data-screen="pos"], [data-screen="kds"]) .page :is(.cart, .floor, .seat, .kds .tk, .card, .toolbar, .prod, .seg, .tabs) { -webkit-backdrop-filter: none; backdrop-filter: none; background: color-mix(in srgb, var(--solid) 62%, transparent); }
html[data-style="glass"] .tab em { color: var(--ink-2); }

/* ══════════════ v38 · top bar alignment — one 44px control height, every glyph optically centred, badges never in flow ══════════════ */
.top { --c: 44px; gap: 10px; padding: 0 14px; }
.top .icon-btn.rnd, .top .newbtn, .top .psearch, .top .clockchip { height: var(--c); min-height: var(--c); }
.top .icon-btn.rnd { position: relative; display: grid; place-items: center; width: var(--c); min-width: var(--c); padding: 0; line-height: 0; }
.top .icon-btn.rnd svg.i { width: 20px; height: 20px; display: block; margin: 0; }
.top .icon-btn .badge, .top #bell .badge { position: absolute; top: -3px; inset-inline-end: -3px; inset-inline-start: auto; width: auto; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; font-size: 12px; font-style: normal; font-weight: 700; line-height: 1; display: grid; place-items: center; box-shadow: 0 0 0 2.5px var(--solid, var(--panel)); }
.top .icon-btn .badge[hidden] { display: none; }
.top .newbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; line-height: 1; } .top .newbtn svg.i { width: 18px; height: 18px; }
.top .userchip { height: var(--c); padding: 3px 4px 3px 14px; gap: 10px; } .top .userchip .av { width: 36px; height: 36px; line-height: 1; } .top .userchip .t { gap: 0; align-content: center; }
.top .userchip .av .netdot { width: 10px; height: 10px; inset-inline-end: -2px; bottom: -2px; box-shadow: 0 0 0 2px var(--solid, var(--panel)); }
.top .clockchip { display: grid; align-content: center; padding: 0 12px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line); }
.top .vr { height: 24px; }
.pi-va { display: grid; gap: 6px; padding: 10px 12px; margin: 2px 0 6px; border-radius: 12px; background: var(--panel-3); font-size: 12px; color: var(--mute); } .pi-va select { min-height: 36px; width: 100%; font-size: 13px; }

/* ══════════════ v38 · sidebar accordion — all groups closed, one open at a time, the panel is only as tall as its content ══════════════ */
.nav { gap: 8px; flex: 0 1 auto; min-height: 0; overflow-y: auto; margin-top: 14px; }
.ng { border-radius: 20px; background: transparent; transition: background 200ms var(--ease); }
.ng:not(.shut) { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.ngh { height: 48px; padding: 0 14px; gap: 10px; font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--ink-2); border-radius: 18px; width: 100%; }
.ngh .ngt { flex: 1; text-align: start; }
.ngh .ngc { font-style: normal; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; background: var(--panel-3); color: var(--mute); line-height: 1; }
.ng.here .ngh { color: var(--ink); } .ng.here .ngh .ngc { background: var(--accent-soft); color: var(--accent-ink); }
.ngh svg { width: 16px; height: 16px; transition: transform 220ms var(--ease); color: var(--mute); } .ng.shut .ngh svg { transform: rotate(90deg); }
.ngl { display: grid; grid-template-rows: 1fr; max-height: none; opacity: 1; overflow: visible; transition: grid-template-rows 260ms var(--ease), opacity 200ms var(--ease); }
.ng.shut .ngl { grid-template-rows: 0fr; max-height: none; opacity: 0; pointer-events: none; }
.ngi { overflow: hidden; min-height: 0; display: grid; gap: 2px; padding: 0 6px; } .ng:not(.shut) .ngi { padding-bottom: 6px; }
.ng.shut .ngi a { visibility: hidden; transition: visibility 0s 260ms; }
.shell[data-screen="pos"] .ng.shut .ngl { grid-template-rows: 1fr; opacity: 1; pointer-events: auto; } .shell[data-screen="pos"] .ng.shut .ngi a { visibility: visible; }
.side-foot { margin-top: 12px; }
@media (min-width: 901px) {
  html[data-style="glass"] .side { height: auto; max-height: calc(100vh - 28px); align-self: flex-start; display: flex; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .ngl, .ng, .ngh svg { transition: none; } }

/* ══════════════ v38 · no-jump: the body of a tabbed screen is swapped in place — dim while loading, then a short fade/slide (opacity + transform only) ══════════════ */
.cp-body { transition: opacity 140ms var(--ease); }
.cp-body.busy { opacity: 0.55; pointer-events: none; }
.cp-body.in { animation: bodyIn 240ms var(--ease) both; }
@keyframes bodyIn { from { opacity: 0.2; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cp-body.in { animation: none; } }

/* ══════════════ v38 · alive cards — the lean + light of glass.js on every card family (hero tiles, dashboard cards, ops tiles, buckets, reservation cards) ══════════════ */
html[data-style="glass"] :is(.cp-card, .op2, .cv, .res-card, [data-tilt]) { position: relative; transition: transform 240ms var(--ease), border-color var(--t) var(--ease), box-shadow 240ms var(--ease); }
html[data-style="glass"] :is(.cp-card, .op2, .cv, .res-card, [data-tilt])::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 220ms; background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, #fff 14%, transparent), transparent 64%); z-index: 0; }
@media (hover: hover) and (pointer: fine) {
  html[data-style="glass"] :is(.cp-card, .op2, .cv, .res-card, [data-tilt]):hover { border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); box-shadow: 0 22px 50px -26px color-mix(in srgb, var(--accent) 55%, transparent), var(--shadow-1, none); }
  html[data-style="glass"] :is(.cp-card, .op2, .cv, .res-card, [data-tilt]):hover::before { opacity: 1; }
  html[data-style="glass"] :is(.hk, .cp-card, .op2, .cv, .res-card, [data-tilt]).tilting { will-change: transform; }
}
html[data-style="glass"] :is(.cp-card, .op2, .cv, .res-card) > * { position: relative; z-index: 1; }
/* hero tile — back face (formula), reached with the ⓘ button */
.hk.flipped { cursor: pointer; } .hk-bk { display: grid; gap: 8px; align-content: start; text-align: start; height: 100%; } .hk-bk small { color: var(--mute); font-size: 12px; } .hk-bk b { font-size: 16px; font-weight: 700; }
.hk-bk p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hk-bk-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; flex-wrap: wrap; } .hk-more { font-size: 12.5px; color: var(--accent-ink); font-weight: 600; cursor: pointer; padding: 6px 0; }
/* the base button rule spreads children with space-between: a lone glyph then sits at the edge → centre it, everywhere */
.icon-btn, .top .icon-btn.rnd, .userchip .av { justify-content: center; align-content: center; justify-items: center; align-items: center; }
.ngh { gap: 10px; }
.nav { margin-top: 6px; } .side-foot { margin-top: 6px; }

/* ══════════════ v38 · «روند امروز» chart ══════════════ */
.pc { position: relative; margin: 4px 0 14px; direction: ltr; } .pc svg { width: 100%; height: auto; display: block; overflow: visible; }
.pc-g { stroke: var(--line); stroke-width: 1; } .pc-t { fill: var(--mute); font-size: 11.5px; text-anchor: middle; font-family: inherit; }
.pc-u { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 6; opacity: 0.65; stroke-linecap: round; }
.pc-l { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--accent) 55%, transparent)); stroke-dasharray: 1; stroke-dashoffset: 1; animation: pcDraw 900ms var(--ease) 80ms forwards; }
.pc-a { opacity: 0; animation: pcFade 700ms var(--ease) 300ms forwards; }
.pc-now-l { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 4; opacity: 0.55; }
.pc-dot { fill: var(--accent); stroke: var(--solid, var(--panel)); stroke-width: 2.5; } .pc-halo { fill: var(--accent); opacity: 0.22; transform-box: fill-box; transform-origin: center; animation: pcPulse 2.4s ease-in-out infinite; }
.pc-end { fill: var(--solid, var(--panel)); stroke: var(--ink-2); stroke-width: 1.6; } .pc-et { fill: var(--ink-2); font-size: 12px; font-family: inherit; } .pc-scrub[hidden] { display: none; }
.pc-pill rect { fill: var(--accent); } .pc-pill text { fill: var(--on-accent, #fff); font-size: 12px; font-weight: 700; font-family: inherit; }
.pc-scrub line { stroke: var(--ink-2); stroke-width: 1; opacity: 0.4; } .pc-scrub circle { fill: var(--solid, var(--panel)); stroke: var(--ink-2); stroke-width: 1.6; } .pc-hit { cursor: crosshair; }
.pc-tip { position: absolute; top: -6px; display: grid; gap: 2px; padding: 8px 12px; border-radius: 12px; background: var(--solid, var(--panel)); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 12px; direction: rtl; pointer-events: none; white-space: nowrap; } .pc-tip b { font-size: 12.5px; } .pc-tip .me { color: var(--accent-ink); font-weight: 600; } .pc-tip[hidden] { display: none; }
@keyframes pcDraw { to { stroke-dashoffset: 0; } } @keyframes pcFade { to { opacity: 1; } } @keyframes pcPulse { 50% { transform: scale(1.5); opacity: 0.06; } }
@media (prefers-reduced-motion: reduce) { .pc-l { animation: none; stroke-dashoffset: 0; } .pc-a { animation: none; opacity: 1; } .pc-halo { animation: none; } }
[data-motion="reduced"] .pc-l { animation: none; stroke-dashoffset: 0; } [data-motion="reduced"] .pc-a { animation: none; opacity: 1; }
.pace2 { display: grid; gap: 4px; } .pace2-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }

/* ══════════════ v38 · attention — compact dashboard summary (.at2) and the full «مرکز توجه» page (.ac) ══════════════ */
.at2 { display: grid; } .at2-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; width: 100%; text-align: start; border-radius: 16px; border-bottom: 1px solid var(--line); background: transparent; transition: background var(--t) var(--ease), padding var(--t) var(--ease); } .at2-row:last-child { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .at2-row:hover { background: var(--panel-3); padding-inline: 12px; } }
.at2-ic, .ac-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--panel-3); color: var(--ink-2); border: 1px solid var(--line); } .at2-ic svg.i, .ac-ic svg.i { width: 20px; height: 20px; }
.at2-row.bad .at2-ic, .ac-row.bad .ac-ic { background: var(--bad-bg); color: var(--bad); border-color: transparent; } .at2-row.warn .at2-ic, .ac-row.warn .ac-ic { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.at2-tx, .ac-tx { flex: 1; min-width: 0; display: grid; gap: 2px; } .at2-tx b, .ac-tx b { font-size: 14px; font-weight: 600; line-height: 1.5; } .at2-tx small, .ac-tx small { color: var(--mute); font-size: 12.5px; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at2-n { font-style: normal; min-width: 28px; height: 26px; padding: 0 9px; border-radius: 13px; display: grid; place-items: center; background: var(--panel-3); font-size: 13px; font-weight: 700; line-height: 1; } .at2-row.bad .at2-n { background: var(--bad-bg); color: var(--bad); } .at2-row.warn .at2-n { background: var(--warn-bg); color: var(--warn); }
.at2 .chev, .ac-row .chev { color: var(--mute); display: grid; } .at2 .chev svg.i, .ac-row .chev svg.i { width: 16px; height: 16px; }
.ac { display: grid; gap: 14px; } .ac-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .ac-head h2 { margin: 2px 0 0; display: flex; align-items: center; gap: 8px; }
.ac-tabs .tab { display: inline-flex; align-items: center; gap: 8px; } .ac-tabs .tab svg.i { width: 18px; height: 18px; } .ac-tabs .tab em { font-style: normal; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-size: 12px; line-height: 1; background: var(--panel-3); color: var(--mute); } .ac-tabs .tab em.bad { background: var(--bad-bg); color: var(--bad); } .ac-tabs .tab em.warn { background: var(--warn-bg); color: var(--warn); } .ac-tabs .tab.on em { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--ink); }
.ac-card { padding: 22px 24px; display: grid; gap: 14px; } .ac-lead { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.ac-list { display: grid; } .ac-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); } .ac-row:last-child { border-bottom: 0; }
.ac-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 4px; text-align: start; border-radius: 16px; background: transparent; transition: background var(--t) var(--ease), padding var(--t) var(--ease); }
@media (hover: hover) and (pointer: fine) { .ac-main:hover { background: var(--panel-3); padding-inline: 12px; } }
.ac-at { white-space: nowrap; } .ac-uses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; } .ac-uses i { font-style: normal; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--panel-3); color: var(--ink-2); }
@media (max-width: 640px) { .ac-card { padding: 16px; } .ac-tabs { overflow-x: auto; flex-wrap: nowrap; } .ac-tabs .tab { flex: none; } }

.ac-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .ac-tabs::-webkit-scrollbar { display: none; } .ac-tabs .tab { flex: none; padding: 0 16px; gap: 7px; height: 42px; }
.at2-row, .ac-row { color: var(--ink); } .at2-tx b, .ac-tx b { color: var(--ink); }

/* ══════════════ v38 · thin ring gauges — one hue, the target is a soft band, only the pill is a status colour ══════════════ */
.rings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); } .rings .rg { padding: 8px 12px; border-inline-start: 1px solid var(--line); } .rings .rg:first-child { border-inline-start: 0; }
@media (max-width: 900px) { .rings { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; } .rings .rg:nth-child(odd) { border-inline-start: 0; } }
.rg { display: grid; justify-items: center; gap: 6px; text-align: center; } .rg-ring { position: relative; width: 132px; height: 132px; } .rg-ring svg { width: 100%; height: 100%; display: block; }
.rg path { fill: none; stroke-linecap: round; } .rg-track { stroke: var(--line-2); stroke-width: 6; opacity: 0.55; } .rg-band { stroke: var(--accent); stroke-width: 11; opacity: 0.2; stroke-linecap: butt; }
.rg-val { stroke: var(--accent); stroke-width: 6; animation: rgIn 900ms var(--ease) both; filter: drop-shadow(0 3px 8px color-mix(in srgb, var(--accent) 45%, transparent)); }
@keyframes rgIn { from { stroke-dasharray: 0 100; } }
.rg-c { position: absolute; inset: 0; display: grid; place-items: center; } .rg-c b { font-size: 26px; font-weight: 700; line-height: 1; display: inline-flex; align-items: baseline; gap: 2px; } .rg-c b small { font-size: 13px; font-weight: 500; color: var(--mute); }
.rg-l { font-size: 14px; font-weight: 600; } .rg-h { color: var(--mute); font-size: 12.5px; line-height: 1.6; }
.rg-pill { font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 999px; background: var(--panel-3); color: var(--ink-2); line-height: 1.6; } .rg-pill.ok { background: var(--ok-bg); color: var(--ok); } .rg-pill.warn { background: var(--warn-bg); color: var(--warn); } .rg-pill.bad { background: var(--bad-bg); color: var(--bad); }
@media (prefers-reduced-motion: reduce) { .rg-val { animation: none; } }
/* numbers stay ink-coloured; only status pills / dots carry status colour */
.rg.ok, .rg.warn, .rg.bad { color: var(--ink); } .rg .rg-l, .rg .rg-c b { color: var(--ink); }
.rt small .hbtn, .card-h .hbtn, small .hbtn { display: inline-grid; } .rt b { color: var(--ink); } .rt.ok b, .rt.warn b, .rt.bad b { color: var(--ink); }
.cp-ratios.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rg-note { margin: 10px 0 0; text-align: center; }
/* staff table — roomy: two-line numeric cells (value over its quiet caption), one explanation under the table instead of crowding every row */
.tbl.roomy th, .tbl.roomy td { padding: 14px 16px; } .tbl.roomy td.num { text-align: start; } .tbl.roomy td.num b { display: block; font-weight: 600; line-height: 1.5; } .tbl.roomy td.num small { display: block; font-size: 12px; line-height: 1.5; margin-top: 1px; }
.tbl-note { margin: 14px 4px 0; font-size: 12.5px; line-height: 1.9; }
.ngh .ngc { color: var(--ink-2); }

/* ══════════════ v38 · calendar popover — a week strip first, one day in focus, a short «بعدی‌ها» list (calm, not a wall of text) ══════════════ */
.clock-pop { width: 360px; padding: 18px; gap: 14px; }
.ck-mode { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--panel-3); width: fit-content; margin-inline: auto; } .ck-mode button { height: 30px; padding: 0 18px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: transparent; transition: background var(--t) var(--ease), color var(--t); } .ck-mode button.on { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--ink); }
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; } .wd { display: grid; justify-items: center; gap: 3px; padding: 9px 0 8px; border-radius: 18px; background: var(--panel-3); border: 1px solid transparent; transition: background var(--t) var(--ease), border-color var(--t), transform 120ms var(--ease); } .wd:active { transform: scale(0.96); }
.wd small { color: var(--mute); font-size: 12px; line-height: 1.2; } .wd b { font-size: 16px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; } .wd.hol small, .wd.hol b { color: var(--bad); }
.wd.today { border-color: color-mix(in srgb, var(--accent) 55%, transparent); } .wd.sel { background: var(--accent-grad, var(--accent)); border-color: transparent; } .wd.sel small, .wd.sel b { color: #fff; }
.wd .dt { width: 5px; height: 5px; border-radius: 50%; background: transparent; } .wd .dt.hol { background: var(--bad); } .wd .dt.rel { background: var(--accent); } .wd.sel .dt { background: #fff; } .wd .dt.bk { box-shadow: 0 0 0 1.5px var(--accent); background: transparent; }
.ck-day { padding: 14px 16px; border-radius: 18px; gap: 8px; } .ck-dh { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; } .ck-dh b { font-size: 15px; margin-inline-end: auto; }
.ck-occ { display: grid; gap: 2px; } .ck-occ > span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; } .ck-occ .chip { font-size: 11.5px; padding: 1px 9px; font-style: normal; } .ck-occ .tip { line-height: 1.8; }
.ck-up { gap: 2px; } .ck-up h5 { margin: 0 4px 4px; } .ck-u { width: 100%; align-items: center; padding: 10px 6px; border-radius: 14px; text-align: start; background: transparent; border-bottom: 1px solid var(--line); } .ck-u:last-child { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .ck-u:hover { background: var(--panel-3); } }
.ck-u span { display: grid; gap: 1px; min-width: 0; } .ck-u b { font-size: 13.5px; font-weight: 600; line-height: 1.5; } .ck-u small { font-size: 12px; } .ck-u em { font-style: normal; font-size: 12.5px; color: var(--accent-ink); white-space: nowrap; font-weight: 600; }
.cd span { position: relative; z-index: 1; } .cd.bk em { position: absolute; top: 1px; inset-inline-end: 1px; min-width: 15px; height: 15px; border-radius: 8px; font-size: 10.5px; font-style: normal; line-height: 15px; background: var(--accent); color: #fff; z-index: 2; }
@media (max-width: 700px) { .clock-pop { padding: 14px; } }
/* popovers must be OPAQUE (the page text behind a calendar made it unreadable): --solid is only ~82 % opaque, so they get their own fully opaque surface */
html[data-theme="dark"] { --pop: color-mix(in srgb, var(--ground) 88%, #fff 12%); } html[data-theme="light"] { --pop: color-mix(in srgb, var(--ground) 8%, #fff); } :root { --pop: color-mix(in srgb, var(--ground) 88%, #fff 12%); }
html[data-style="glass"] :is(.popover, .clock-pop, .pc-tip) { background: var(--pop); -webkit-backdrop-filter: none; backdrop-filter: none; }
.pc-tip { background: var(--pop); }
.wd { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.clock-pop { max-height: calc(100vh - 110px); }
.ck-days .cd { width: 40px; height: 40px; justify-self: center; display: grid; place-items: center; padding: 0; }
.ck-days .cd.occ::after { content: ''; position: absolute; bottom: 3px; inset-inline-start: calc(50% - 2.5px); margin: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); } .ck-days .cd.hol.occ::after { background: var(--bad); } .ck-days .cd.today.occ::after, .ck-days .cd.sel.occ::after { background: #fff; }
.ck-days .cd.sel { background: color-mix(in srgb, var(--accent) 26%, transparent); } .ck-days .cd.today { background: var(--accent-grad, var(--accent)); color: #fff; }
.ck-days .cd.bk em { display: block; position: absolute; top: -2px; inset-inline-end: -2px; width: auto; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; font-size: 10.5px; line-height: 16px; font-weight: 700; background: var(--accent); color: #fff; box-shadow: 0 0 0 2px var(--pop); }

/* ══════════════ v38 · reservations ══════════════ */
.rv { display: grid; gap: 14px; } .rv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .rv-head h2 { margin: 2px 0 0; }
.rv-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 14px; align-items: start; }
.rv-cal { padding: 20px; display: grid; gap: 14px; } .rv-leg { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--mute); } .rv-leg span { display: inline-flex; align-items: center; gap: 6px; } .rv-leg .btn { margin-inline-start: auto; }
.lg:not(.btn) { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }.lg.bk:not(.btn) { background: var(--accent); } .lg.hol { background: var(--bad); } .lg.rel { box-shadow: 0 0 0 1.5px var(--accent); }
.rv-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .rv-sum > div { display: grid; gap: 2px; padding: 12px; border-radius: 16px; background: var(--panel-3); text-align: center; } .rv-sum b { font-size: 18px; font-weight: 700; } .rv-sum small { color: var(--mute); font-size: 12px; }
.rv-day { display: grid; gap: 12px; } .rv-dh { display: flex; align-items: center; justify-content: space-between; gap: 12px; } .rv-list { display: grid; gap: 12px; }
.res-card { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 20px; cursor: pointer; border-inline-start: 3px solid var(--line-2); }
.res-card.st-new { border-inline-start-color: var(--warn); } .res-card.st-confirmed { border-inline-start-color: var(--ok); } .res-card.st-seated { border-inline-start-color: var(--accent); } .res-card.st-cancelled, .res-card.st-no_show { opacity: 0.62; }
.rc-t { display: grid; gap: 2px; justify-items: center; padding-inline-end: 18px; border-inline-end: 1px solid var(--line); } .rc-t b { font-size: 22px; font-weight: 700; line-height: 1.2; } .rc-t small { color: var(--mute); font-size: 12px; }
.rc-m { display: grid; gap: 8px; min-width: 0; } .rc-n { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .rc-n b { font-size: 16px; }
.rc-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--ink-2); font-size: 13px; } .rc-meta span { display: inline-flex; align-items: center; gap: 6px; } .rc-meta svg.i { width: 16px; height: 16px; color: var(--mute); } .rc-meta em { font-style: normal; color: var(--warn); }
.rc-tags { gap: 8px; } .rc-tags .chip { display: inline-flex; align-items: center; gap: 6px; } .rc-tags .chip svg.i { width: 14px; height: 14px; }
.rc-a { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 220px; }
.rvf { gap: 18px; } .rvf-sec { display: grid; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); } .rvf-sec:last-child { border-bottom: 0; padding-bottom: 0; } .rvf-sec h4 { margin: 0; font-size: 14px; color: var(--ink-2); }
.rv-tb { display: grid; gap: 8px; } .rv-tb .chip[disabled] { opacity: 0.4; cursor: not-allowed; } .rv-mini { padding: 14px; border-radius: 18px; background: var(--panel-2); border: 1px solid var(--line); display: grid; gap: 10px; }
.rv-ck { display: flex; gap: 16px; flex-wrap: wrap; } .rv-ck .ck { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 1100px) { .rv-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .res-card { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 14px; } .rc-a { grid-column: 1 / -1; max-width: none; justify-content: flex-start; } .rc-t { padding-inline-end: 12px; } .rc-t b { font-size: 18px; } .rv-cal { padding: 14px; } }
.rv-mini[hidden] { display: none; } .rv-ck .ck { white-space: nowrap; } .rv-ck .ck input { min-height: 0; width: 18px; height: 18px; padding: 0; flex: none; accent-color: var(--accent); }
.rvf input[type="text"], .rvf input:not([type]), .rvf input[inputmode] { text-align: start; }
/* page switch: old screen stays (dimmed) until the next one is ready, then the new one fades in — never a blank page */
.page { transition: opacity 140ms var(--ease); } .page.page-wait { opacity: 0.55; pointer-events: none; } .page.page-in { animation: bodyIn 240ms var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .page.page-in { animation: none; } }

/* ══════════════ v38 · stock documents + warehouses ══════════════ */
.sd-tool { flex-wrap: wrap; } .sd-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 12px; color: var(--ink-2); } .sd-head span { display: inline-flex; align-items: center; gap: 6px; } .sd-head svg.i { width: 16px; height: 16px; color: var(--mute); } .sd-foot { margin-top: 12px; }
.row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.sd-ed { gap: 16px; } .sd-lines { display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: var(--panel-2); border: 1px solid var(--line); } .sd-lh { display: flex; align-items: center; justify-content: space-between; }
#lines { display: grid; gap: 8px; } .sd-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center; gap: 8px; } .sd-row .icon-btn { width: 36px; min-width: 36px; flex: none; } .sd-row > :last-child { grid-column: auto; max-width: 40px; }
.sd-u, .sd-sys { white-space: nowrap; font-size: 12.5px; } .sd-d { font-weight: 700; min-width: 48px; text-align: center; } .sd-empty { padding: 12px; text-align: center; } .sd-sum { text-align: end; font-size: 12.5px; }
.wh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; } .wh-card { display: grid; gap: 14px; padding: 20px; } .wh-card.off { opacity: 0.55; }
.wh-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .wh-h > div { display: grid; flex: 1; min-width: 0; } .wh-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--panel-3); color: var(--ink-2); border: 1px solid var(--line); } .wh-ic svg.i { width: 20px; height: 20px; }
.wh-s { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .wh-s > div { display: grid; gap: 2px; padding: 12px; border-radius: 16px; background: var(--panel-3); text-align: center; } .wh-s b { font-size: 18px; } .wh-s small { color: var(--mute); font-size: 12px; }
@media (max-width: 760px) { .sd-row { grid-auto-flow: row; grid-template-columns: 1fr 1fr; } .sd-row .icon-btn { max-width: none; } }
.iv-act { white-space: nowrap; display: flex; align-items: center; gap: 6px; } .iv-act .pop-wrap { position: relative; } .iv-act .popover { inset-inline-end: 0; top: calc(100% + 6px); min-width: 150px; z-index: 30; }
.tbl td:first-child b { white-space: nowrap; } .tbl td:first-child { min-width: 130px; }

@media (max-width: 700px) { .clock-pop { width: auto; max-width: calc(100vw - 24px); } }
@media (max-width: 700px) { .clock-pop, html[data-style="glass"] .clock-pop { position: fixed; inset-inline: 12px; top: 72px; width: auto; max-width: none; } }

/* type scale (rule H1): 12 · 13 · 16 · 20 · 24 · 26 on the dashboard — merge the stray 14/15/17/21 */
.cp-card .empty { font-size: 13px; } .cp-card .card-h > span:first-child { font-size: 16px; } .op2 b small, .hk b small { font-size: 13px; } .rt b { font-size: 20px; }
/* calendar count badges and nav buttons */
.ck-days .cd.bk em, .cd.bk em { font-size: 12px; min-width: 18px; height: 18px; line-height: 18px; color: #fff; }
@media (pointer: coarse), (max-width: 1024px) { .ck-head .icon-btn { min-width: 44px; min-height: 44px; width: 44px; height: 44px; } }
.tbl td > .chip + .chip, .tbl td > .chip + span.chip { margin-inline-start: 4px; }
.tbl.roomy td small.mute { color: var(--ink-2); opacity: 0.85; }
.ck-days .cd.bk em, .cd.bk em { background: var(--fill, var(--accent)); }


/* ══════════════ v39 · phase A — quick visual fixes ══════════════ */
/* sidebar: full height again, the quick-search pinned at the bottom (the slab is balanced, not half empty) */
@media (min-width: 901px) {
  html[data-style="glass"] .side { height: calc(100vh - 28px); max-height: none; align-self: stretch; display: flex; flex-direction: column; }
}
.side .nav { flex: 1 1 auto; min-height: 0; } .side .side-foot { margin-top: auto; padding-top: 10px; }
/* no mouse light (the lean stays) */
.hk::before, html[data-style="glass"] :is(.cp-card, .op2, .cv, .res-card, [data-tilt])::before { display: none !important; }
/* group header: no counters; a quiet dot only when something inside needs attention */
.ngh .ngc { display: none; } .ngd { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: none; flex: none; box-shadow: 0 0 0 3px var(--accent-soft); } .ng.ng-hot .ngd { display: block; }
/* alerts drawer: an opaque floating sheet on the START side (never over the sidebar text), above everything */
.drawer { top: 14px; bottom: 14px; inset-inline-start: 14px; width: min(440px, calc(100vw - 28px)); border-radius: 28px; border: 1px solid var(--line-2); background: var(--pop); box-shadow: var(--shadow); z-index: 160; overflow: hidden; backdrop-filter: none; -webkit-backdrop-filter: none; }
html[data-style="glass"] .drawer { background: var(--pop); backdrop-filter: none; }
/* kitchen timer pill: readable in every state (the old rule painted salmon text on a salmon pill) */
.tk .age, .age { color: var(--ink); } .tk .age.warn, .age.warn { background: var(--warn-bg); color: var(--warn); }
.tk .age.late, .age.late { background: var(--bad); color: #1a0705; } [data-theme="light"] .tk .age.late, [data-theme="light"] .age.late { color: #fff; }
.side .nav { align-content: start; grid-auto-rows: max-content; }

/* ══════════════ v39 · share bars (the payment-mix / expense-mix chart) ══════════════ */
.sb { display: grid; gap: 18px; padding: 4px 2px 2px; } .sb-top { display: flex; align-items: baseline; gap: 8px; } .sb-top b { font-size: 26px; font-weight: 700; line-height: 1.2; } .sb-top small { color: var(--mute); font-size: 13px; }
.sb-bar { display: flex; gap: 3px; height: 16px; border-radius: 999px; overflow: hidden; direction: rtl; }
.sb-bar i { flex: 0 0 var(--w); min-width: 6px; background: var(--c); border-radius: 6px; transform-origin: right center; transform: scaleX(0); animation: sbGrow 760ms var(--ease) var(--d, 0ms) forwards; transition: opacity 160ms var(--ease), filter 160ms; }
.sb-bar i:first-child { border-start-start-radius: 999px; border-end-start-radius: 999px; } .sb-bar i:last-child { border-start-end-radius: 999px; border-end-end-radius: 999px; }
.sb-l { list-style: none; margin: 0; padding: 0; display: grid; } .sb-l li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 52px; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(6px); animation: sbRow 420ms var(--ease) var(--d, 0ms) forwards; border-radius: 12px; transition: background var(--t) var(--ease); }
.sb-l li:last-child { border-bottom: 0; } .sb-dot { width: 10px; height: 10px; border-radius: 50%; } .sb-n { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; min-width: 0; } .sb-n svg.i { width: 17px; height: 17px; color: var(--mute); flex: none; }
.sb-l em { font-style: normal; color: var(--ink-2); font-size: 13px; } .sb-l b { text-align: end; font-size: 14px; }
.sb[data-hot] .sb-bar i:not([data-i="0"]) { opacity: 0.35; } .sb[data-hot="1"] .sb-bar i { opacity: 0.35; } .sb[data-hot="2"] .sb-bar i { opacity: 0.35; } .sb[data-hot="3"] .sb-bar i { opacity: 0.35; } .sb[data-hot="4"] .sb-bar i { opacity: 0.35; } .sb[data-hot="0"] .sb-bar i { opacity: 0.35; }
.sb[data-hot="0"] .sb-bar i[data-i="0"], .sb[data-hot="1"] .sb-bar i[data-i="1"], .sb[data-hot="2"] .sb-bar i[data-i="2"], .sb[data-hot="3"] .sb-bar i[data-i="3"], .sb[data-hot="4"] .sb-bar i[data-i="4"] { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .sb-l li:hover { background: var(--panel-3); } }
@keyframes sbGrow { to { transform: scaleX(1); } } @keyframes sbRow { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sb-bar i, .sb-l li { animation: none; opacity: 1; transform: none; } }
[data-motion="reduced"] .sb-bar i, [data-motion="reduced"] .sb-l li { animation: none; opacity: 1; transform: none; }

/* ══════════════ v39 · action bar (what needs ME now) ══════════════ */
.abar { position: sticky; top: 96px; z-index: 45; margin-bottom: 14px; }
.abar[hidden] { display: none; }
.abar-in { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 24px; background: var(--pop); border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line)); box-shadow: var(--shadow); }
.abar-t { display: inline-flex; align-items: center; gap: 8px; flex: none; font-size: 13px; color: var(--ink-2); } .abar-t svg.i { width: 18px; height: 18px; color: var(--accent-ink); } .abar-t b { font-weight: 700; color: var(--ink); } .abar-t em { font-style: normal; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-grad, var(--accent)); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.abar-l { display: flex; gap: 10px; flex: 1; min-width: 0; overflow: hidden; } .abar-l.all { flex-wrap: wrap; overflow: visible; }
.ab { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-radius: 18px; background: var(--panel-3); border: 1px solid transparent; flex: 0 1 auto; min-width: 0; }
.ab.warn { background: color-mix(in srgb, var(--warn) 14%, var(--panel-3)); } .ab.bad { background: var(--bad-bg); } .ab.ok { background: var(--ok-bg); }
.ab-ic { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--panel); color: var(--ink-2); flex: none; } .ab-ic svg.i { width: 18px; height: 18px; }
.ab-tx { display: grid; gap: 1px; min-width: 0; } .ab-tx b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ab-tx small { color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-a { display: flex; gap: 6px; flex: none; } .abar-m { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--panel-3); font-size: 13px; font-weight: 600; color: var(--ink-2); }
@media (max-width: 900px) { .abar { top: 78px; } .abar-in { flex-wrap: wrap; border-radius: 20px; } .abar-l { flex: 1 1 100%; flex-direction: column; } .ab { width: 100%; } .ab-tx { flex: 1; } }

/* alerts drawer v39: floats on the END side (next to the bell, away from the sidebar), opaque, grouped */
.drawer { inset-inline-start: auto; inset-inline-end: 14px; top: 14px; bottom: 14px; display: flex; flex-direction: column; }
.drawer header { padding: 18px 20px 12px; border-bottom: 0; } .drawer header h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; } .drawer header h3 em { font-style: normal; min-width: 26px; height: 24px; padding: 0 8px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-grad, var(--accent)); color: #fff; font-size: 13px; line-height: 1; }
.drawer .dr-body { padding: 4px 14px 14px; display: grid; gap: 8px; align-content: start; } .al-h { margin: 12px 8px 2px; font-size: 12.5px; font-weight: 600; color: var(--mute); }
.al { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 4px 12px; padding: 14px; border-radius: 20px; background: var(--panel-3); } .al.urgent { background: color-mix(in srgb, var(--warn) 13%, var(--panel-3)); }
.al-ic { grid-row: span 2; width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: var(--panel); color: var(--ink-2); } .al-ic svg.i { width: 19px; height: 19px; }
.al-tx { display: grid; gap: 2px; min-width: 0; } .al-tx b { font-size: 13.5px; font-weight: 600; line-height: 1.7; } .al-tx small { color: var(--mute); font-size: 12px; }
.al-a { grid-column: 2; display: flex; gap: 8px; margin-top: 6px; }
.drawer footer { padding: 12px 14px 16px; }
.send-hint { padding: 8px 12px; margin-bottom: 8px; border-radius: 14px; background: var(--accent-soft); color: var(--ink-2); font-size: 13px; line-height: 1.7; } .rnd-r .btn.gold { white-space: nowrap; }

/* v39 kitchen v3 + stock reports */
.kwait { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; width: 100%; border-radius: 14px; background: var(--panel-3); color: var(--ink-2); font-size: 14px; font-weight: 600; } .kwait svg.i { width: 18px; height: 18px; }
.kprep { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.kprep-t { display: inline-flex; align-items: center; gap: 6px; color: var(--mute); font-size: 13px; font-weight: 600; margin-inline-end: 4px; } .kprep-t svg.i { width: 16px; height: 16px; }
.kprep-i { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 17px; background: var(--panel-3); font-size: 14px; } .kprep-i b { font-size: 16px; color: var(--accent); }
.kprep-i i { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--warn) 22%, transparent); font-size: 12px; } .kprep-m { color: var(--mute); font-size: 13px; }
.kh-r { display: inline-flex; align-items: center; gap: 10px; }
.sr-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; } .sr-q { margin-bottom: 10px; display: flex; }
.sr-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 240px; overflow: auto; padding: 2px; margin-bottom: 12px; }
.sr-it { display: grid; gap: 2px; text-align: start; justify-content: stretch; padding: 10px 12px; border-radius: 14px; background: var(--panel-3); border: 1px solid transparent; } .sr-it small { color: var(--mute); font-size: 12px; } .sr-it.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel-3)); }
.sr-f { display: grid; gap: 6px; margin-bottom: 10px; font-size: 13px; color: var(--mute); }
.sr-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; margin-bottom: 8px; } .sr-head > div { display: grid; gap: 4px; } .sr-auto { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; }
.sr-rows { display: grid; gap: 8px; } .sr-n2 { font-style: normal; margin-inline-start: 6px; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--accent-grad, var(--accent)); color: #fff; font-size: 12px; }
.sr-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 20px; background: var(--panel-3); }
.sr-ic { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--panel); color: var(--ink-2); } .sr-ic.bad { color: var(--bad); } .sr-ic.warn { color: var(--warn); } .sr-ic svg.i { width: 20px; height: 20px; }
.sr-tx { display: grid; gap: 3px; min-width: 0; } .sr-tx small { color: var(--mute); font-size: 12.5px; line-height: 1.6; }
.sr-a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; } .sr-n { width: 88px; height: 36px; text-align: center; }
@media (max-width: 700px) { .sr-row { grid-template-columns: 40px minmax(0, 1fr); } .sr-a { grid-column: 1 / -1; justify-content: flex-start; } .sr-list { grid-template-columns: 1fr; } }

/* v39 role homes */
/* .hm-wrap: v43 grid at the end of this file */

.hm-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; } .hm-h > div { display: grid; gap: 3px; } .hm-h b { font-size: 16px; font-weight: 600; } .hm-h small { font-size: 12.5px; }
.hm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.hm-s { display: grid; gap: 4px; align-content: center; justify-content: stretch; text-align: start; padding: 14px 16px; border-radius: 18px; background: var(--panel-3); min-height: 84px; }
.hm-s b { font-size: 28px; font-weight: 600; line-height: 1.2; } .hm-s small { color: var(--mute); font-size: 12.5px; line-height: 1.6; }
.hm-s.warn { background: color-mix(in srgb, var(--warn) 14%, var(--panel-3)); } .hm-s.bad { background: color-mix(in srgb, var(--bad) 14%, var(--panel-3)); } .hm-s.ok { background: color-mix(in srgb, var(--ok) 13%, var(--panel-3)); }
button.hm-s:active { transform: scale(0.98); }
.hm-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hm-rows { display: grid; gap: 8px; } .hm-r { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--panel-3); } .hm-r.late { background: color-mix(in srgb, var(--warn) 14%, var(--panel-3)); }
.hm-x { display: grid; gap: 2px; flex: 1; min-width: 0; } .hm-x small { color: var(--mute); font-size: 12.5px; } .hm-t { min-width: 52px; font-weight: 600; color: var(--accent); }
.hm-chips { display: flex; flex-wrap: wrap; gap: 8px; } .hm-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--panel-3); font-size: 14px; } .hm-chip b { color: var(--accent); font-size: 16px; }
.hm-chip i { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--warn) 22%, transparent); font-size: 12px; } .hm-chip.off { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--panel-3)); }
.hm-e { display: flex; align-items: center; gap: 10px; color: var(--mute); font-size: 14px; padding: 8px 2px; } .hm-e svg.i { width: 18px; height: 18px; color: var(--ok); }
.hm-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; } .hm-tb { display: grid; gap: 2px; justify-content: center; text-align: center; padding: 12px 6px; border-radius: 16px; background: var(--panel-3); } .hm-tb b { font-size: 22px; } .hm-tb small { font-size: 12px; color: var(--mute); }
.hm-tb.ok { background: color-mix(in srgb, var(--ok) 15%, var(--panel-3)); } .hm-tb.warn { background: color-mix(in srgb, var(--warn) 15%, var(--panel-3)); }

/* v39 chat sheet */
.drawer.chat { display: flex; flex-direction: column; width: min(420px, calc(100vw - 28px)); }
.ch-top { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; } .ch-top h3 { flex: 1; margin: 0; font-size: 18px; } .ch-top .icon-btn svg.i { width: 20px; height: 20px; }
.ch-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 14px 14px; display: grid; gap: 8px; align-content: start; }
.ch-room { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; justify-content: stretch; text-align: start; padding: 10px 12px; border-radius: 18px; background: var(--panel-3); }
.ch-av { width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center; background: var(--panel); color: var(--ink-2); } .ch-av svg.i { width: 20px; height: 20px; }
.ch-rx { display: grid; gap: 2px; min-width: 0; } .ch-rx b { font-size: 14px; font-weight: 600; } .ch-rx small { color: var(--mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-n { font-style: normal; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-grad, var(--accent)); color: #fff; font-size: 12px; } .ch-w { font-size: 11.5px; color: var(--mute); }
.ch-room.unread .ch-rx b { color: var(--accent); }
.ch-m { display: grid; gap: 4px; justify-items: start; max-width: 88%; } .ch-m small { color: var(--mute); font-size: 12px; padding-inline: 6px; } .ch-m.me { justify-self: end; justify-items: end; }
.ch-b { padding: 10px 14px; border-radius: 18px; background: var(--panel-3); font-size: 14px; line-height: 1.8; display: grid; gap: 6px; justify-items: start; } .ch-m.me .ch-b { background: color-mix(in srgb, var(--accent) 22%, var(--panel-3)); }
.ch-ref { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--panel); font-size: 12.5px; } .ch-ref svg.i { width: 14px; height: 14px; }
.ch-note { padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--warn) 12%, var(--panel-3)); font-size: 12.5px; color: var(--ink-2); line-height: 1.8; }
.ch-comp { padding: 10px 14px 14px; display: grid; gap: 10px; border-top: 1px solid var(--line); } .ch-ph { display: flex; flex-wrap: wrap; gap: 6px; } .ch-ph .chip { height: 30px; font-size: 12.5px; }
.ch-row { display: flex; gap: 8px; align-items: center; } .ch-row #chin { flex: 1; min-width: 0; height: 44px; } .ch-tb { width: 64px; height: 44px; text-align: center; } .ch-row .btn { width: 44px; height: 44px; padding: 0; justify-content: center; } .ch-row .btn svg.i { width: 20px; height: 20px; }
.shake { animation: shk 0.3s var(--ease); } @keyframes shk { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }



/* v39 calendar hero: today is always on top, even while another day is selected */
.ck-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--panel-3)), var(--panel-3)); margin-bottom: 10px; }
.ck-hl { display: grid; gap: 2px; min-width: 0; } .ck-hl small { color: var(--mute); font-size: 12px; } .ck-hl b { font-size: 17px; font-weight: 600; line-height: 1.5; } .ck-hl .ltr { direction: ltr; text-align: start; font-size: 12px; }
.ck-ho { font-style: normal; margin-top: 4px; font-size: 12.5px; color: var(--accent); }
.ck-hr { display: grid; gap: 2px; justify-items: end; } .ck-hnow { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; } .ck-hr small { color: var(--mute); font-size: 12px; }
.ck-back { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 40px; margin-bottom: 10px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-weight: 600; font-size: 13.5px; } .ck-back svg.i { width: 16px; height: 16px; transform: scaleX(-1); } .ck-back small { color: var(--mute); font-weight: 400; font-size: 12px; }
.wd, .ck-days .cd { transition: background-color 160ms var(--ease), transform 160ms var(--ease); } .wd:active, .ck-days .cd:active { transform: scale(0.96); }
.wd { border-radius: 16px; background: color-mix(in srgb, var(--panel-3) 70%, transparent); }
.ck-sticky { margin-bottom: 4px; } .ck-sticky .ck-hero { margin-bottom: 8px; } .ck-sticky .ck-back { margin-bottom: 6px; }
.clock-pop { display: flex; flex-direction: column; overflow: hidden; max-height: calc(100vh - 100px); } .ck-scroll { display: grid; gap: 14px; overflow-y: auto; min-height: 0; padding-bottom: 2px; }
/* top-bar popovers (calendar, user, new) must float above the action bar and the page */
.top { z-index: 60; } .abar { z-index: 40; }
.ck-sticky { background: var(--pop); }
/* full-viewport screens give room to the action bar when it shows */
@media (min-width: 901px) { html[data-style="glass"] .pos { height: calc(100dvh - 110px - var(--abar-h, 0px)); } html[data-style="glass"] .kl { max-height: calc(100vh - 330px - var(--abar-h, 0px)); } }
@media (min-width: 901px) { html[data-style="glass"] .kl { max-height: calc(100vh - 330px - var(--abar-h, 0px) - var(--kprep, 0px)); } }
@media (max-width: 700px) { .ktool[data-rep] span { display: none; } .kprep { padding: 8px 10px; } .kprep-i { height: 30px; font-size: 13px; } }
/* phones: the chat button joined the top bar — the theme switch lives in «ظاهر من», so it steps aside */
@media (max-width: 700px) { .top #theme { display: none; } }
@media (max-width: 480px) { .top { gap: 4px; padding-inline: 8px; } .top .icon-btn.rnd, .top .menu-btn { width: 40px; height: 40px; } .top .userchip { padding: 0; } .top .newbtn { padding: 0 10px; } }
@media (max-width: 480px) { .top .tt { display: none; } .top .grow { flex: 1; } }
.kds { grid-template-columns: minmax(0, 1fr); } .kds > * { min-width: 0; }
.ktools { flex-wrap: wrap; min-width: 0; } @media (max-width: 700px) { .ksearch { flex: 1 1 100%; min-width: 0; } .ksearch input { min-width: 0; width: 100%; } }
.gcrow .chips { gap: 6px; }
@media (max-width: 480px) { .top { gap: 6px; padding-inline: 6px; } .top .icon-btn.rnd, .top .menu-btn { width: 38px; height: 38px; } .top .clockchip { padding: 0 8px; } }
.hm-s.ok small, .hm-s.warn small, .hm-s.bad small, .hm-r.late .hm-x small { color: var(--ink-2); }

/* v40 dish editor: the guest preview sits beside the tab content on wide screens, below it on phones */
.dish-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 14px; }
@media (min-width: 1000px) { .dish-split { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } .gp { position: sticky; top: 0; } }
.gp { display: grid; gap: 8px; padding: 16px; border-radius: 20px; background: var(--panel-3); align-content: start; }
.gp-t { color: var(--mute); font-size: 12px; } .gp-n { font-size: 17px; font-weight: 600; } .gp-d { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.8; }
.gp-f { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12.5px; color: var(--mute); } .gp-f b { margin-inline-start: auto; color: var(--ink); font-size: 15px; }
.gp-tags { display: flex; gap: 6px; flex-wrap: wrap; } .gp-tags i { font-style: normal; font-size: 12px; padding: 3px 10px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.gp-out { padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); font-size: 12.5px; }
.gp-chips { display: flex; gap: 8px; flex-wrap: wrap; } .gp-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 12px; border-radius: 16px; background: var(--panel); font-size: 13px; } .gp-chip.plus b { color: var(--accent); font-size: 12px; font-weight: 600; }
.bo-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto 34px; gap: 10px; align-items: end; padding: 8px 0; border-top: 1px solid var(--line); } .bo-row:first-of-type { border-top: 0; } .bo-row.off { opacity: 0.55; } .bo-k { display: grid; gap: 4px; font-size: 12px; color: var(--mute); }
@media (max-width: 700px) { .bo-row { grid-template-columns: 1fr 1fr; } }
/* sticky dialog header/footer must be opaque or the content shows through them (long dish dialog on phones) */
#modal-root .modal > header, #modal-root .modal > footer { background: var(--pop); }

/* v41 dashboard: product trend picker (searchable, opaque) and the scrollable products list; native option lists keep readable colours in every theme */
select option, select optgroup { background-color: var(--pop); color: var(--ink); }
.tbl-wrap.scroll { max-height: 380px; overflow: auto; }
.tr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tr-wrap { flex: none; } .tr-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 200px; height: 44px; padding: 0 16px; border-radius: 22px; background: var(--panel-3); border: 1px solid var(--line); color: var(--ink); font-weight: 600; } .tr-btn svg.i { width: 16px; height: 16px; color: var(--mute); }
.tr-pop { top: calc(100% + 8px); inset-inline-start: 0; width: min(360px, 86vw); padding: 10px; display: grid; gap: 8px; z-index: 30; } .tr-pop[hidden] { display: none; }
.tr-q { display: flex; } .tr-list { max-height: 320px; overflow: auto; display: grid; gap: 2px; align-content: start; }
.tr-g { padding: 10px 10px 4px; font-size: 12px; color: var(--mute); font-weight: 600; }
.tr-it { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-align: start; } .tr-it small { color: var(--mute); font-size: 12px; } .tr-it.on { background: color-mix(in srgb, var(--accent) 18%, transparent); }
@media (hover: hover) and (pointer: fine) { .tr-it:hover { background: var(--panel-3); } }
.tr-chips { flex: 1; min-width: 0; }
/* a card whose popover is open must paint above its neighbours (glass cards are stacking contexts) */
.card:has(.tr-pop:not([hidden])), .cp-card:has(.tr-pop:not([hidden])) { position: relative; z-index: 40; }
.tr-q { height: 44px; padding: 0 14px; border-radius: 14px; background: var(--panel-3); border: 1px solid var(--line); align-items: center; gap: 8px; } .tr-q input { border: 0; background: transparent; box-shadow: none; outline: none; flex: 1; min-width: 0; height: 40px; padding: 0; }
.tr-bar { position: relative; z-index: 20; }
.tr-pop { background: var(--pop); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); border: 1px solid var(--line-2); }
.cp-card .tr-bar, .card .tr-bar { position: relative; z-index: 20; }
html[data-style="glass"] .tr-pop, html[data-style="plain"] .tr-pop { background: var(--pop); -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-style] .cp-card > .tr-bar, html[data-style] .card > .tr-bar { position: relative; z-index: 20; }
.tr-q input { background: transparent !important; border: 0 !important; box-shadow: none !important; }

/* Persian is cursive: ANY letter-spacing breaks the joins and clips the last glyph («میلیون» lost its final nun). Never track Arabic-script text. */
body *, body *::before, body *::after { letter-spacing: 0 !important; }

/* ROOT CAUSE of the clipped «میلیون»: Persian letters join across an inline element boundary, so the final nun of «میلیون» joined onto the unit «تومان» that follows it
   (<b>۱۶ میلیون<span>تومان</span></b>) and turned into a medial form. A zero-width non-joiner at the start of every unit span stops the join. */
:is(b, strong, .num, .hk-v, .kpi b, .big, .cp-fore b) > :is(span, small, em, i):not(.chip)::before { content: '\200C'; }
/* the filter row is not a panel: its backdrop-filter showed up as a hard-edged pink rectangle behind the buttons */
html[data-style="glass"] .toolbar, html[data-style="glass"] .shell .page .toolbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: transparent; box-shadow: none; border: 0; }

/* v41 card hover: eased lean (glass.js drives --rx/--ry), a soft rim light that fades in on the edge, a calm accent glow underneath — transform/opacity only, no layout work */
html[data-style="glass"] :is(.hk, .cp-card, .op2, .cv, .res-card, [data-tilt]) { transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease); }
html[data-style="glass"] :is(.hk, .cp-card, .op2, .cv, .res-card, [data-tilt]).tilting { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease); }
html[data-style="glass"] :is(.hk, .cp-card, .op2, .cv, .res-card, [data-tilt]) { position: relative; }
html[data-style="glass"] :is(.hk, .cp-card, .op2, .cv, .res-card, [data-tilt])::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity 420ms var(--ease);
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 75%, #fff 10%) 0%, transparent 38%, transparent 62%, color-mix(in srgb, var(--accent) 45%, transparent) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
@media (hover: hover) and (pointer: fine) {
  html[data-style="glass"] :is(.hk, .cp-card, .op2, .cv, .res-card, [data-tilt]):hover { border-color: color-mix(in srgb, var(--accent) 26%, var(--line)); }
  html[data-style="glass"] :is(.hk, .cp-card, .op2, .cv, .res-card, [data-tilt]):hover::after { opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) { html[data-style="glass"] :is(.hk, .cp-card, .op2, .cv, .res-card, [data-tilt]) { transform: none !important; } }
html[data-motion="reduced"][data-style="glass"] :is(.hk, .cp-card, .op2, .cv, .res-card, [data-tilt]) { transform: none !important; }
.qpop { min-width: 250px; } .qhead { display: block; padding: 8px 12px 6px; color: var(--mute); font-size: 12px; font-weight: 600; }
.qpop button { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; height: 44px; padding: 0 12px; border-radius: 12px; font-size: 14px; } .qpop button svg.i { width: 18px; height: 18px; color: var(--accent); flex: none; }

/* ===== v41 finance desk (سود و زیان / هزینه‌ها / چک‌ها / بستن روز): one rhythm — 14px gaps, 22px card padding, equal-height rows ===== */
.fd { display: grid; gap: 14px; align-content: start; }
.fd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 16px; border-radius: 22px; }
.fd-bar .grow { flex: 1; } .fd-bar .btn { height: 40px; } .fd-day { font-size: 17px; font-weight: 600; min-width: 150px; text-align: center; }
.fd-pre { display: flex; flex-wrap: wrap; gap: 6px; } .fd-cmp { gap: 8px; } .fd-cmp svg.i { width: 15px; height: 15px; }
.fd-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.fd-kpis .kpi, .fd-k { padding: 20px 22px; min-height: 124px; align-content: space-between; border-radius: 24px; }
.fd-k.ok b { color: var(--ok); } .fd-k.bad b { color: var(--bad); } .fd-k.accent b { color: var(--accent); }
.fd-kpis .kpi b { font-size: clamp(22px, 2vw, 28px); line-height: 1.3; } .fd-kpis .kpi .sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.fd-row2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 14px; align-items: stretch; } .fd-row2.rev { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); } .fd-row2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fd-c { padding: 22px; display: grid; gap: 16px; align-content: start; min-width: 0; } .fd-c .card-h { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .fd-c .card-h > span { font-size: 16px; font-weight: 600; } .fd-c .card-h small { font-size: 12.5px; }
@media (max-width: 1180px) { .fd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fd-row2, .fd-row2.rev, .fd-row2.even { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .fd-kpis { grid-template-columns: minmax(0, 1fr); } .fd-c { padding: 18px; } }
.fd-note { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; font-size: 13.5px; background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--ink); } .fd-note svg.i { width: 18px; height: 18px; color: var(--warn); flex: none; }
/* the bridge */
.br { display: grid; gap: 14px; }
.br-r { display: grid; grid-template-columns: 96px minmax(0, 1fr) 128px 40px; gap: 12px; align-items: center; min-height: 40px; }
.br-l { font-size: 13.5px; color: var(--ink-2); } .br-r b { white-space: nowrap; font-size: 14px; text-align: end; font-weight: 600; } .br-r small { color: var(--mute); font-size: 12px; text-align: end; }
.br-t { position: relative; height: 18px; border-radius: 9px; background: var(--panel-3); overflow: hidden; }
.br-t i { position: absolute; top: 0; bottom: 0; inset-inline-start: var(--l); width: var(--w); border-radius: 9px; background: var(--accent-grad, var(--accent)); transform-origin: right center; animation: brIn 640ms var(--ease) both; animation-delay: var(--d, 0ms); }
.br-r.out i { background: color-mix(in srgb, var(--bad) 72%, var(--panel-3)); } .br-r.net i { background: var(--ok); } .br-r.loss i { background: var(--bad); } .br-r.net b { color: var(--ok); } .br-r.loss b { color: var(--bad); } .br-r.out b { color: var(--ink); }
@keyframes brIn { from { transform: scaleX(0); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .br-t i { animation: none; } }
@media (max-width: 560px) { .br-r { grid-template-columns: 84px minmax(0, 1fr) 64px; } .br-r small { display: none; } }
/* statement + ratios */
.fd-st { display: grid; } .fd-sr { display: grid; grid-template-columns: minmax(0, 1fr) 132px 52px; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; } .fd-st:has(.o) .fd-sr { grid-template-columns: minmax(0, 1fr) 132px 52px 132px; } .fd-sr b, .fd-sr .o { white-space: nowrap; } @media (max-width: 720px) { .fd-st:has(.o) .fd-sr { grid-template-columns: minmax(0, 1fr) 112px 44px; } .fd-sr .o { display: none; } }
.fd-sr .p, .fd-sr .o { color: var(--mute); font-size: 12.5px; text-align: end; } .fd-sr b { text-align: end; font-weight: 600; } .fd-sr b.neg { color: var(--bad); }
.fd-sr.lead { font-weight: 600; } .fd-sr.sum { border-bottom: 0; border-top: 1px solid var(--line-2); padding-top: 14px; margin-top: 4px; font-weight: 700; } .fd-sr.sum b { font-size: 16px; }
.fd-rt { display: grid; } .fd-rr { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; } .fd-rr:last-child { border-bottom: 0; } .fd-rr > div { display: grid; gap: 2px; } .fd-rr small { font-size: 12px; }
.fd-rr.sum { border-top: 1px solid var(--line-2); margin-top: 4px; font-weight: 700; } .fd-foot { line-height: 1.8; }
.fd-cats { display: grid; gap: 4px; } .fd-cat { display: grid; grid-template-columns: minmax(0, 1fr) 70px auto; gap: 12px; align-items: center; justify-content: stretch; text-align: start; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; } .fd-cat .fd-m { min-width: 0; } .fd-cat b { font-weight: 600; text-align: end; } .fd-cat.on { background: color-mix(in srgb, var(--accent) 16%, transparent); }
@media (hover: hover) and (pointer: fine) { .fd-cat:hover { background: var(--panel-3); } }
.fd-q { display: flex; min-width: 220px; height: 40px; } .fd-c .tbl-wrap { margin: 0 -4px; }

.fd-sh { color: var(--mute); font-size: 12px; font-weight: 600; padding-top: 0; border-bottom: 1px solid var(--line-2); } .fd-sh span { text-align: end; } .fd-sh span:first-child { text-align: start; } .fd-foot { display: block; margin-top: 6px; }
.fd-stack { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); } .fd-stack .fd-cats { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 14px; } .nw { white-space: nowrap; } .fd-c .tbl td { vertical-align: middle; }
.fd-stack .fd-cats { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } .fd-cat { grid-template-columns: minmax(0, 1fr) 64px auto; } .fd-q input { background: transparent !important; border: 0 !important; box-shadow: none !important; outline: none; }

.fd-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 700px) {
  .fd-bar { padding: 14px; } .fd-bar > .rangebtn { width: 100%; justify-content: center; } .fd-pre { flex-wrap: wrap; } .fd-bar .grow { display: none; }
  .fd-acts { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .fd-acts .btn { width: 100%; justify-content: center; }
  .fd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .fd-kpis .kpi, .fd-k { padding: 16px; min-height: 108px; border-radius: 20px; } .fd-kpis .kpi b { font-size: 20px; }
  .br-r { grid-template-columns: 74px minmax(0, 1fr) 124px; gap: 10px; } .br-r b { font-size: 12.5px; }
  .fd-sr { grid-template-columns: minmax(0, 1fr) 124px 34px; gap: 10px; } .fd-st:has(.o) .fd-sr { grid-template-columns: minmax(0, 1fr) 124px 34px; } .fd-sr b { font-size: 12.5px; }
  .fd-c { padding: 18px; } .fd-day { min-width: 0; font-size: 15px; }
}
.fd-cmp { min-height: 40px; padding-inline: 14px; }
.br-say { margin: 0 0 4px; font-size: 14px; line-height: 2; color: var(--ink-2); } .br-say b { color: var(--ink); font-weight: 700; } .br-say b.ok { color: var(--ok); } .br-say b.bad { color: var(--bad); }
.br-t i { inset-inline-start: 0 !important; transform-origin: right center; } html[dir="rtl"] .br-t i { right: 0; left: auto; }

/* ══════════════ v42 · search palette (fixed, opaque, readable) · search-field focus · card light that never bleeds onto neighbours ══════════════ */
/* the palette lives in <body>, NOT in #modal-root, so it needs its own fixed frame (it used to fall to the bottom of the page and was see-through) */
.pal-scrim { position: fixed; inset: 0; z-index: 400; display: grid; place-items: start center; padding: 10vh 12px 12px; background: rgba(6, 5, 10, 0.58); overflow: hidden; }
.pal { width: min(680px, 100%); max-height: min(74vh, 660px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--pop); -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 34px 90px -24px rgba(0, 0, 0, 0.65); overflow: hidden; }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 60px; border-bottom: 1px solid var(--line); background: var(--pop); color: var(--mute); }
.pal-in svg.i { width: 20px; height: 20px; flex: none; }
.pal-in input { flex: 1; min-width: 0; height: 100%; min-height: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0 !important; font-size: 16px; color: var(--ink); padding: 0; }
.pal-in kbd { font-size: 12px; padding: 3px 8px; border-radius: 8px; background: var(--panel-3); color: var(--mute); border: 1px solid var(--line); }
.pal-list { display: block; max-height: none; overflow-y: auto; padding: 0 8px 10px; background: var(--pop); overscroll-behavior: contain; }
.pal-h { position: sticky; top: 0; z-index: 2; background: var(--pop); padding: 12px 12px 6px; font-size: 12px; font-weight: 600; color: var(--mute); }
.pal-i { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 10px; border-radius: 14px; text-align: start; color: var(--ink-2); background: transparent; border: 0; }
.pal-ic { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 11px; background: var(--panel-3); color: var(--accent); } .pal-ic svg.i { width: 18px; height: 18px; }
.pal-i b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.5; } .pal-i small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--mute); line-height: 1.5; }
.pal-i.on { background: var(--accent-soft); } .pal-i.on .pal-ic { background: var(--fill, var(--accent)); color: #fff; }
.pal-foot { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px 18px; border-top: 1px solid var(--line); background: var(--pop); font-size: 12px; color: var(--mute); }
@media (max-width: 700px) { .pal-scrim { padding-top: 12px; } .pal { max-height: calc(100dvh - 24px); border-radius: 20px; } }

/* search fields: the ring belongs to the PILL (not to a box inside it) */
.ksearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ksearch input, html[data-style="glass"] .ksearch input { outline: 0 !important; background: transparent !important; box-shadow: none !important; border: 0 !important; }

/* card light: the lit card lifts above its neighbours and brightens ITS OWN fill; the shadow is short so it can never wash over a neighbour's text */
@media (hover: hover) and (pointer: fine) {
  html[data-style="glass"] :is(.hk, .cp-card, .op2, .cv, .res-card, [data-tilt]):is(:hover, .tilting) { z-index: 3; box-shadow: 0 14px 28px -22px color-mix(in srgb, var(--accent) 42%, transparent), var(--shadow), inset 0 0 0 999px color-mix(in srgb, var(--accent) 5%, transparent); }
}
.shiftbox .dot.warn { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 22%, transparent); } .shiftbox.go { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .shiftbox.go:hover { background: var(--panel-3); } }
.pal-i.on { box-shadow: none; }
.pal-scrim { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: rgba(6, 5, 10, 0.62); }

/* ══════════════ v42 · messenger (chat) — list + thread, bubbles, replies, images, cards, composer ══════════════ */
.mg [hidden] { display: none !important; }
.drawer.chat.mg { padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); width: min(440px, calc(100vw - 28px)); overflow: hidden; background: var(--pop); border-radius: 28px; }
.mg[data-view="list"] .mg-main { display: none; } .mg[data-view="thread"] .mg-list { display: none; }
@media (min-width: 1100px) { .drawer.chat.mg { width: min(900px, calc(100vw - 28px)); grid-template-columns: 330px minmax(0, 1fr); } .mg[data-view] .mg-main, .mg[data-view] .mg-list { display: flex; } .mg-back, .mg-xm { display: none !important; } }
@media (max-width: 700px) { .drawer.chat.mg { inset: 0; width: 100vw; border-radius: 0; top: 0; bottom: 0; } .mg-none { display: none; } }
.mg-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-inline-end: 1px solid var(--line); }
.mg-lh { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 8px; } .mg-lh h3 { margin: 0; font-size: 17px; font-weight: 700; }
.mg-ls { margin: 0 14px 8px; } .mg-rooms { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 12px; overscroll-behavior: contain; }
.mg-sec { margin: 14px 10px 4px; font-size: 12px; font-weight: 600; color: var(--mute); }
.mg-room { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 9px 10px; border-radius: 18px; text-align: start; color: var(--ink-2); }
.mg-room.on { background: var(--accent-soft); } @media (hover: hover) and (pointer: fine) { .mg-room:not(.on):hover { background: var(--panel-3); } }
.mg-av { position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 16px; font-weight: 700; } .mg-av.grp { border-radius: 15px; background: var(--panel-3); color: var(--ink-2); } .mg-av svg.i { width: 20px; height: 20px; }
.mg-on { position: absolute; bottom: 0; inset-inline-end: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2px solid var(--pop); }
.mg-rx { flex: 1; min-width: 0; display: grid; gap: 2px; } .mg-rx b { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mg-rx b svg.i { width: 13px; height: 13px; color: var(--mute); flex: none; }
.mg-rx small { font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mg-room.unread .mg-rx small { color: var(--ink-2); }
.mg-rm { display: grid; gap: 4px; justify-items: end; flex: none; } .mg-rm time { font-size: 12px; color: var(--mute); } .mg-w { font-size: 12px; color: var(--mute); }
.mg-n { font-style: normal; min-width: 22px; height: 22px; padding: 0 7px; display: grid; place-items: center; border-radius: 11px; background: var(--fill, var(--accent)); color: #fff; font-size: 12px; font-weight: 700; } .mg-n.mu { background: var(--mute); }
.mg-main { flex-direction: column; min-width: 0; min-height: 0; position: relative; } .mg-main { display: flex; }
.mg-none { margin: auto; display: grid; gap: 6px; justify-items: center; color: var(--mute); text-align: center; } .mg-none svg.i { width: 46px; height: 46px; opacity: 0.6; } .mg-none b { color: var(--ink-2); font-size: 15px; } .mg-none small { font-size: 12.5px; }
.mg-th { display: flex; flex-direction: column; flex: 1; min-height: 0; } .mg-th[hidden] { display: none; }
.mg-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); } .mg-h .icon-btn.on { color: var(--warn); }
.mg-ht { flex: 1; min-width: 0; display: grid; } .mg-ht b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mg-ht small { font-size: 12.5px; color: var(--mute); }
.mg-back svg { transform: scaleX(-1); }
.mg-sbar { padding: 8px 14px; border-bottom: 1px solid var(--line); }
.mg-pinbar { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px; text-align: start; background: var(--panel-2); border-bottom: 1px solid var(--line); } .mg-pinbar svg.i { width: 18px; height: 18px; color: var(--accent); flex: none; } .mg-pinbar span { display: grid; min-width: 0; } .mg-pinbar b { font-size: 12.5px; color: var(--accent); } .mg-pinbar small { font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 14px 14px; display: flex; flex-direction: column; overscroll-behavior: contain; outline: 0; }
.mg-day { align-self: center; position: sticky; top: 4px; z-index: 2; margin: 12px 0 4px; padding: 3px 14px; border-radius: 999px; background: var(--panel-3); color: var(--ink-2); font-size: 12px; }
.mg-new { align-self: stretch; display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; color: var(--accent); font-size: 12.5px; font-weight: 600; } .mg-new::before, .mg-new::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--accent) 45%, transparent); }
.mg-m { display: flex; position: relative; margin-top: 10px; } .mg-m.cont { margin-top: 2px; } .mg-m.mine { justify-content: flex-start; } .mg-m.theirs { justify-content: flex-end; }
.mg-bub { position: relative; max-width: min(78%, 420px); min-width: 0; display: grid; gap: 4px; padding: 8px 12px 6px; border-radius: 18px; background: var(--panel-3); color: var(--ink); }
.mg-m.mine .mg-bub { background: color-mix(in srgb, var(--accent) 24%, var(--pop)); border-bottom-right-radius: 6px; } .mg-m.theirs .mg-bub { border-bottom-left-radius: 6px; }
.mg-who { font-size: 12.5px; font-weight: 600; color: var(--accent); } .mg-m.cont .mg-who { display: none; }
.mg-tx { margin: 0; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.mg-meta { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mute); } .mg-meta svg.i { width: 13px; height: 13px; }
.mg-more { position: absolute; top: 4px; inset-inline-end: 6px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: inherit; color: var(--mute); opacity: 0; transition: opacity 120ms; } .mg-more svg.i { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) { .mg-bub:hover .mg-more { opacity: 1; } }
.mg-q { display: grid; gap: 1px; width: 100%; text-align: start; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, transparent); } .mg-q b { font-size: 12.5px; color: var(--accent); } .mg-q span { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-img { display: block; padding: 0; border-radius: 12px; overflow: hidden; max-width: 260px; cursor: zoom-in; } .mg-img img { display: block; max-width: 100%; max-height: 300px; object-fit: cover; } .mg-img .mg-sk { width: 200px; height: 130px; }
.mg-card { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 9px 12px; border-radius: 12px; background: var(--pop); border: 1px solid var(--line); } .mg-card b { display: block; font-size: 13.5px; font-weight: 600; } .mg-card small { display: block; font-size: 12.5px; color: var(--mute); } .mg-card > :first-child { flex: 1; min-width: 0; } .mg-card svg.i { width: 16px; height: 16px; color: var(--mute); transform: scaleX(-1); flex: none; }
.mg-card:is(div) { opacity: 0.85; }
.mg-bub.del { display: flex; align-items: center; gap: 8px; background: transparent !important; border: 1px dashed var(--line-2); color: var(--mute); font-size: 13px; } .mg-bub.del svg.i { width: 15px; height: 15px; }
.mg-m.pending .mg-bub { opacity: 0.72; } .mg-m.failed .mg-bub { outline: 1px solid var(--bad); } .mg-fail { display: inline-flex; align-items: center; gap: 5px; color: var(--bad); font-size: 12px; } .mg-fail svg.i { width: 13px; height: 13px; }
@keyframes mgflash { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } } .mg-m.flash .mg-bub { animation: mgflash 1.5s var(--ease); }
.mg-comp { position: relative; display: grid; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); background: var(--pop); }
.mg-row { display: flex; align-items: flex-end; gap: 6px; } .mg-row .icon-btn { width: 44px; height: 44px; flex: none; } #mgin { flex: 1; min-width: 0; min-height: 44px; max-height: 120px; padding: 11px 16px; border-radius: 22px; line-height: 1.6; resize: none; overflow-y: auto; }
.mg-send { width: 44px; height: 44px; padding: 0 !important; border-radius: 50% !important; display: grid; place-items: center; flex: none; } .mg-send svg { transform: scaleX(-1); }
.mg-ctx { display: grid; gap: 6px; } .mg-chip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--panel-3); } .mg-chip > svg.i { width: 18px; height: 18px; color: var(--accent); flex: none; } .mg-chip span { flex: 1; min-width: 0; display: grid; } .mg-chip b { font-size: 12.5px; color: var(--accent); } .mg-chip small { font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mg-chip img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; } .mg-chip button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--mute); }
.mg-jump { position: absolute; bottom: calc(100% + 10px); inset-inline-end: 16px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--pop); border: 1px solid var(--line-2); box-shadow: var(--shadow); z-index: 4; } .mg-jump em { position: absolute; top: -7px; inset-inline-start: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--fill, var(--accent)); color: #fff; font-style: normal; font-size: 12px; font-weight: 700; display: none; place-items: center; } .mg-jump.has em { display: grid; }
.mg-pop { position: absolute; z-index: 6; min-width: 180px; max-width: 280px; display: grid; padding: 6px; border-radius: 16px; background: var(--pop); border: 1px solid var(--line-2); box-shadow: var(--shadow); } .mg-pop button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; text-align: start; font-size: 13.5px; color: var(--ink); } .mg-pop button.bad { color: var(--bad); } .mg-pop button svg.i { width: 17px; height: 17px; color: var(--mute); flex: none; } .mg-pop .mg-av { width: 30px; height: 30px; font-size: 13px; }
@media (hover: hover) and (pointer: fine) { .mg-pop button:hover { background: var(--panel-3); } }
.mg-res { display: grid; gap: 6px; } .mg-res button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel-3); text-align: start; } .mg-res b { font-size: 13px; } .mg-res span { grid-column: 1; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; } .mg-res time { grid-row: 1; grid-column: 2; font-size: 12px; color: var(--mute); }
.mg-empty { margin: auto; padding: 26px; color: var(--mute); text-align: center; font-size: 13.5px; }
.mg-loading { display: grid; gap: 10px; padding: 16px; } .mg-sk { display: block; width: 60%; height: 38px; border-radius: 16px; background: linear-gradient(90deg, var(--panel-3), var(--panel-2), var(--panel-3)); background-size: 200% 100%; animation: mgsk 1.2s linear infinite; } .mg-loading .mg-sk:nth-child(2) { width: 42%; margin-inline-start: auto; } @keyframes mgsk { to { background-position: -200% 0; } } @media (prefers-reduced-motion: reduce) { .mg-sk { animation: none; } }
.mg-toasts { position: fixed; top: 92px; left: 50%; transform: translateX(-50%); z-index: 350; display: grid; gap: 8px; justify-items: center; }
.mg-toast { display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 340px; padding: 10px 14px; border-radius: 18px; text-align: start; background: var(--pop); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: mgIn 220ms var(--ease) both; } .mg-tx2, .mg-toast .mg-tx { display: grid; min-width: 0; margin: 0; } .mg-toast b { font-size: 13.5px; } .mg-toast small { font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes mgIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.mg-lb { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; background: rgba(0, 0, 0, 0.86); } .mg-lb img { max-width: 92vw; max-height: 88vh; border-radius: 12px; } .mg-lb .icon-btn { position: absolute; top: 18px; inset-inline-end: 18px; }
#mgin:focus-visible, html[data-style="glass"] #mgin:focus-visible { outline: 0 !important; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mg .mg-ls, .mg .mg-sbar .ksearch { flex: none !important; width: auto; } .mg .mg-ls { margin: 0 14px 8px; } .mg .mg-sbar .ksearch { width: 100%; }
#modal-root .scrim { z-index: 220; }
.mg-note { align-self: stretch; margin: 4px 0 8px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--warn) 12%, var(--panel-3)); font-size: 12.5px; line-height: 1.8; }

/* ══════════════ v42 · the storeroom: category sections, par bars, the item file ══════════════ */
.iv-kpis { margin-bottom: 14px; }
.iv-bar-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; margin: 0 0 12px; border-radius: 22px; }
.iv-bar-tools .ksearch { flex: 1 1 280px; max-width: 400px; } .iv-bar-tools .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip b { margin-inline-start: 6px; font-weight: 600; opacity: 0.7; }
.iv-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.iv-sec { padding: 0; margin-bottom: 14px; overflow: hidden; }
.iv-sh { display: flex; align-items: center; gap: 10px; padding: 16px 20px 8px; } .iv-sh b { font-size: 15px; font-weight: 600; } .iv-sh small { margin-inline-start: auto; font-size: 12.5px; } .iv-sh .chip svg.i { width: 14px; height: 14px; }
.iv-t { margin: 0; } .iv-t td, .iv-t th { padding-block: 12px; } .iv-t tr.off { opacity: 0.55; }
.iv-n { display: grid; gap: 2px; text-align: start; padding: 0; } .iv-n b { font-size: 14px; font-weight: 600; color: var(--ink); } .iv-n small { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; } .iv-n small svg.i { width: 13px; height: 13px; }
@media (hover: hover) and (pointer: fine) { .iv-n:hover b { color: var(--accent); } }
.iv-q b { font-size: 15px; font-weight: 600; }
.iv-bar { position: relative; display: block; width: 128px; height: 6px; margin-top: 7px; border-radius: 3px; background: var(--panel-3); overflow: hidden; } .iv-bar i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 3px; background: var(--ok); transition: width 420ms var(--ease); } .iv-bar.warn i { background: var(--warn); } .iv-bar.bad i { background: var(--bad); } .iv-bar b { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink-2); opacity: 0.5; }
.iv-act { white-space: nowrap; } .iv-act .pop-wrap { position: relative; display: inline-block; }
.iv-form { display: grid; gap: 20px; } .iv-form section { display: grid; gap: 12px; } .iv-form h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--mute); }
.iv-hint { align-self: end; font-size: 12.5px; line-height: 1.9; } .iv-ck { align-self: end; display: flex; align-items: center; gap: 8px; height: 44px; }
.iv-cats-card { margin-top: 14px; display: grid; gap: 12px; } .iv-cats-card .card-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .iv-cats-card .card-h .btn { margin-inline-start: auto; }
@media (max-width: 700px) { .iv-bar { width: 96px; } .iv-sh { padding: 14px 16px 6px; } }

/* v42 · role homes: ONE type scale (card title 15/600, number 26/700, line 13.5), tiles and rows that are links */

.hm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; column-span: all; margin-bottom: 14px; break-inside: avoid; } @media (max-width: 900px) { .hm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hm-tile { display: grid; gap: 4px; text-align: start; padding: 18px 20px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); } .hm-kpis .hm-tile { min-height: 96px; align-content: center; }
.hm-tile.warn b { color: var(--warn); } .hm-tile.bad b { color: var(--bad); } .hm-tile.ok b { color: var(--ok); }
.hm-link { width: 100%; text-align: start; cursor: pointer; } .hm-link > svg.i { width: 16px; height: 16px; color: var(--mute); margin-inline-start: auto; transform: scaleX(-1); flex: none; }
@media (hover: hover) and (pointer: fine) { .hm-link:hover, .hm-tile:hover { background: var(--panel-3); } }
.hm-link.bad .hm-x b { color: var(--bad); }
.po-g { padding: 0; margin-bottom: 14px; overflow: hidden; } .po-gh { display: flex; align-items: center; gap: 12px; padding: 16px 20px 8px; } .po-gh b { font-size: 15px; font-weight: 600; } .po-gh .btn { margin-inline-start: auto; } .po-g tr.urgent td:first-child { font-weight: 600; }
.po-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; align-items: center; margin-bottom: 8px; } .po-row.rc { grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1.2fr); } .po-rh { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; font-size: 12.5px; color: var(--mute); }
@media (max-width: 700px) { .po-row.rc, .po-rh { grid-template-columns: 1fr 1fr; } .po-rh { display: none; } }
.iv-bar-tools select { width: auto; flex: 0 0 auto; min-width: 170px; }
.db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; } .db-card { display: grid; gap: 6px; text-align: start; padding: 18px 20px; align-content: start; } .db-card b { font-size: 15px; font-weight: 600; } .db-card.off { opacity: 0.6; } .db-m { display: flex; flex-wrap: wrap; gap: 6px; }
.db-head { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; } .db-h { margin: 14px 0 8px; font-size: 13px; font-weight: 600; color: var(--mute); } .db-two { gap: 18px; align-items: start; } .db-note { margin-top: 14px; }
/* v42 order path: a slim strip instead of four big shapes */
.fs { display: grid; gap: 10px; } .fs-say { margin: 0 0 4px; font-size: 14px; line-height: 2; color: var(--ink-2); } .fs-say b { color: var(--ink); } .fs-say b.ok { color: var(--ok); } .fs-say b.bad { color: var(--bad); }
.fs-r { display: grid; grid-template-columns: 130px minmax(0, 1fr) 44px 64px; align-items: center; gap: 12px; } .fs-l { font-size: 13px; color: var(--ink-2); } .fs-t { position: relative; height: 8px; border-radius: 4px; background: var(--panel-3); overflow: hidden; } .fs-t i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 4px; background: var(--accent-grad, var(--accent)); } .fs-r b { text-align: end; font-size: 14px; } .fs-d { text-align: end; }
@media (max-width: 560px) { .fs-r { grid-template-columns: 96px minmax(0, 1fr) 36px 52px; gap: 8px; } }

/* v43 · «برترین‌های تیم» — people only, one measure at a time */
.tm-tabs { margin-bottom: 6px; flex-wrap: wrap; } .tm-why { margin: 0 0 12px; }
.tm-list { display: grid; gap: 6px; }
.tm-row { display: grid; grid-template-columns: 28px minmax(120px, 1.2fr) minmax(80px, 2fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; background: transparent; border: 0; color: inherit; text-align: start; font: inherit; cursor: pointer; transition: background 160ms ease; }
@media (hover: hover) and (pointer: fine) { .tm-row:hover { background: var(--panel-3, rgba(127,127,127,.08)); } }
.tm-row:active { transform: scale(.99); }
.tm-rank { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft, rgba(127,127,127,.12)); color: var(--accent); font-weight: 700; font-size: 13px; }
.tm-who { display: grid; gap: 2px; min-width: 0; } .tm-who b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tm-who small { font-size: 12px; }
.tm-bar { height: 6px; border-radius: 99px; background: var(--line, rgba(127,127,127,.15)); overflow: hidden; } .tm-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.tm-v { font-weight: 700; font-size: 15px; white-space: nowrap; } .tm-v small { font-weight: 400; font-size: 12px; color: var(--ink-2); }
@media (max-width: 600px) { .tm-row { grid-template-columns: 28px 1fr auto; } .tm-bar { display: none; } }


/* v43 · role homes on ONE 12-column grid: cards in a row share the same height, every card has the same anatomy, one tile style */
.hm-wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.hm { grid-column: span 6; display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; margin: 0; min-width: 0; }
.hm.s12, .hm.wide, .hm-kpis { grid-column: 1 / -1; } .hm.s4 { grid-column: span 4; } .hm.s4 .hm-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .hm.s4 .hm-s { min-height: 84px; padding: 14px; } .hm.s4 .hm-s b { font-size: 22px; } .hm.s8 { grid-column: span 8; }
.hm > .hm-rows, .hm > .hm-chips, .hm > .hm-tables, .hm > .hm-e { flex: 1; align-content: start; }
.hm > .hm-foot { margin-top: auto; }
.hm-h { min-height: 32px; align-items: center; } .hm-h b { font-size: 15px; font-weight: 600; line-height: 1.5; } .hm-h small { font-size: 12.5px; color: var(--mute); }
.hm-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.hm-s, .hm-tile { display: grid; gap: 4px; align-content: center; text-align: start; padding: 16px 18px; border-radius: 18px; min-height: 92px; background: var(--panel-3); border: 0; }
.hm-s b, .hm-s b.txt, .hm-tile b { font-size: 26px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-s b.txt { font-size: 20px; white-space: normal; }
.hm-s small, .hm-tile small { font-size: 12.5px; line-height: 1.6; color: var(--mute); }
.hm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; }
.hm-kpis .hm-tile { background: var(--panel); border: 1px solid var(--line); min-height: 104px; padding: 18px 20px; border-radius: 22px; }
.hm-tile.warn b { color: var(--warn); } .hm-tile.bad b { color: var(--bad); } .hm-tile.ok b { color: var(--ok); }
@media (max-width: 1180px) { .hm.s4 { grid-column: span 6; } .hm.s8 { grid-column: 1 / -1; } }
@media (max-width: 820px) { .hm, .hm.s4, .hm.s8 { grid-column: 1 / -1; } .hm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hm-wrap { gap: 12px; } .hm { padding: 18px; } }

/* v43 · the till cart: wider, readable lines, a guest round waiting for the cashier is its own amber block (never faded) */
.pos { grid-template-columns: minmax(0, 1fr) clamp(420px, 34vw, 560px); }
@media (max-width: 1180px) { .pos { grid-template-columns: minmax(0, 1fr) 400px; } }
.cart .lines { gap: 8px; padding: 10px 12px; align-content: start; }
.cart .ln { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 4px 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel-3); border: 0; opacity: 1; }
.cart .ln.sent { opacity: 1; background: transparent; border: 1px solid var(--line); }
.cart .ln:not(.sent):not(.aw) { grid-template-columns: minmax(0, 1fr) auto; }
.cart .ln b { font-size: 15px; font-weight: 600; line-height: 1.5; }
.ln-q { min-width: 30px; font-weight: 700; font-size: 15px; color: var(--accent); line-height: 1.5; }
.ln-n { display: grid; gap: 4px; min-width: 0; } .ln-n .mods, .cart .ln .mods { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.cart .mods span { font-size: 12.5px; padding: 2px 8px; border-radius: 8px; line-height: 1.6; }
.cart .mods .no { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.cart .mods .plus { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.cart .mods .nt { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--ink-2); font-style: normal; }
.ln-pr { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.cart .rnd { margin: 10px 2px 0; font-size: 12.5px; }
.cart .rnd.shut { margin-bottom: 0; }
.rnd-t { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 2px; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.rnd-t svg.i { width: 14px; height: 14px; transform: rotate(90deg); transition: transform 160ms ease; color: var(--mute); } .rnd.shut .rnd-t svg.i { transform: rotate(0deg) scaleX(-1); }
.rnd.new .rnd-t { color: var(--accent); cursor: default; }
.rnd-aw { display: grid; gap: 8px; padding: 12px; border-radius: 18px; background: color-mix(in srgb, var(--warn) 11%, var(--panel)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.rnd-aw header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aw-t { display: inline-flex; align-items: center; gap: 8px; } .aw-t svg.i { width: 18px; height: 18px; color: var(--warn); } .aw-t b { font-size: 15px; }
.rnd-aw .ln.aw { background: var(--panel); border: 0; }
.aw-al, .apv-al, .ab-al { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 13%, transparent); color: var(--bad); font-size: 13.5px; }
.aw-al svg.i, .apv-al svg.i { width: 16px; height: 16px; flex: none; }
.aw-note, .apv-note { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: 12px; background: var(--panel); font-size: 13.5px; line-height: 1.7; } .aw-note svg.i, .apv-note svg.i { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--mute); }
.rnd-aw footer { display: flex; justify-content: flex-end; gap: 8px; } .rnd-aw footer .btn.gold { flex: 1; }
.send-hint.warn { display: flex; gap: 8px; align-items: center; background: color-mix(in srgb, var(--warn) 14%, transparent); } .send-hint.warn svg.i { width: 16px; height: 16px; flex: none; color: var(--warn); }
.cart-main .btn[disabled] { opacity: .5; }
/* «بازبینی بزرگ» */
.modal.bz-modal { width: min(1100px, 96vw); }
.bz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.bz-list { display: grid; gap: 14px; max-height: 70vh; overflow-y: auto; padding-inline-end: 4px; }
.bz-r { display: grid; gap: 8px; } .bz-r header { display: flex; align-items: center; gap: 10px; } .bz-r .ln { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); }
.bz-r .ln b { font-size: 16px; } .bz-r .ln .icon-btn { display: none; }
.bz-side { position: sticky; top: 0; display: grid; gap: 8px; padding: 16px; border-radius: 18px; background: var(--panel-3); } .bz-side .tot { display: flex; justify-content: space-between; } .bz-side .tot.big { font-size: 18px; font-weight: 700; }
@media (max-width: 760px) { .bz-grid { grid-template-columns: 1fr; } }

/* v43 · the approval card (action bar, bell, queue, board, dialog) */
.apv { display: grid; gap: 10px; }
.apv-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; } .apv-h > b { font-size: 17px; } .apv-g { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13.5px; } .apv-g svg.i { width: 15px; height: 15px; }
.apv-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.apv-l li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 14px; background: var(--panel-3); }
.apv-q { font-weight: 700; color: var(--accent); font-size: 15px; } .apv-n { display: grid; gap: 4px; min-width: 0; } .apv-n b { font-size: 15px; font-weight: 600; }
.apv-m { display: flex; flex-wrap: wrap; gap: 4px 6px; } .apv-m span { font-size: 12.5px; padding: 2px 8px; border-radius: 8px; }
.apv-m .no { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); } .apv-m .plus { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); } .apv-m .nt { background: color-mix(in srgb, var(--warn) 12%, transparent); }
.apv-p { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.apv-f { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 4px 0; } .apv-f b { font-size: 18px; } .apv-f small { font-size: 12px; font-weight: 400; color: var(--mute); }
.apv-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 10px; } .apv-acts .btn.gold { flex: 1 1 220px; }
.modal.apv-modal { width: min(620px, 96vw); }
/* the action bar's approval card shows the dishes */
.ab.apr { align-items: flex-start; } .ab.apr .ab-tx { cursor: pointer; }
.ab-peek { display: grid; gap: 3px; margin-top: 6px; } .ab-li { font-size: 13px; line-height: 1.6; color: var(--ink); } .ab-li i { font-style: normal; font-size: 12px; } .ab-li i.no { color: var(--bad); } .ab-li i.plus { color: var(--ok); } .ab-li i.nt { color: var(--ink-2); }
.ab-al { padding: 4px 10px; font-size: 12.5px; width: fit-content; }
/* v43 · cart footer is compact so the dishes get the room: one total line (details on tap), note only with new items, the list never shrinks below 220px */
.cart { overflow-y: auto; } .cart .lines { min-height: 220px; flex: 1 0 220px; }
.cart footer { gap: 8px; padding: 10px 12px 12px; } .cart .onote { margin-top: 2px; }
.cart .tots { display: grid; gap: 4px; } .cart .tots .tot { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.cart .tots button.tot.big { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; align-items: baseline; width: 100%; padding: 6px 2px; cursor: pointer; font-size: 18px; font-weight: 700; color: var(--ink); }
.cart .tots button.tot.big small { font-size: 12px; font-weight: 400; } .cart .tots button.tot.big:focus-visible { outline: 2px solid var(--accent); border-radius: 8px; }
.cart .send-hint { margin: 0; padding: 6px 10px; font-size: 12.5px; }
.cart-tools .tool { min-height: 44px; }
.ab-peek .ab-li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
/* v43 · on the till / kitchen screen the action bar is one slim line (the work itself is already on the page) */
#abar.slim .abar-in { padding-block: 6px; } #abar.slim .ab { padding: 6px 10px; min-height: 0; } #abar.slim .ab-tx small { display: none; } #abar.slim .ab-ic { width: 30px; height: 30px; }
#abar.slim .ab-tx b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart .ln .pendchip, .bz-r .ln .pendchip { grid-column: 1 / -1; }

/* v43 · «کمبودها و ناموجودها» */
.sa-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.sa-k { all: unset; box-sizing: border-box; display: grid; gap: 4px; padding: 16px 18px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; min-height: 96px; align-content: center; }
.sa-k b { font-size: 26px; font-weight: 700; } .sa-k small { font-size: 12.5px; color: var(--mute); } .sa-k.bad b { color: var(--bad); } .sa-k.warn b { color: var(--warn); }
.sa-k:focus-visible { outline: 2px solid var(--accent); }
.sa-tabs { margin-bottom: 14px; } .sa-tabs em { font-style: normal; margin-inline-start: 4px; opacity: .7; }
.sa-card { padding: 18px 20px; } .sa-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; } .sa-bar .ksearch { flex: 1 1 240px; }
.sa-rule { display: flex; gap: 6px; align-items: flex-start; line-height: 1.8; margin: 0 0 12px; } .sa-rule svg.i { width: 15px; height: 15px; flex: none; margin-top: 4px; }
.sa-t td small { display: block; font-size: 12px; } .sa-t tr.on td { background: var(--accent-soft); }
.sa-meter { display: block; position: relative; height: 5px; border-radius: 99px; background: var(--line); margin-top: 6px; min-width: 70px; } .sa-meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); } .sa-meter em { position: absolute; top: -3px; width: 2px; height: 11px; background: var(--warn); }
.sa-dishes { display: flex; flex-wrap: wrap; gap: 4px; max-width: 260px; } .sa-dishes .chip { height: 24px; font-size: 12px; }
.sa-dlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sa-d { display: grid; gap: 6px; padding: 14px 16px; border-radius: 18px; background: var(--panel-3); } .sa-dh { display: flex; justify-content: space-between; gap: 8px; align-items: center; } .sa-dh b { font-size: 15px; }
.sa-why { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); } .sa-why svg.i { width: 15px; height: 15px; color: var(--bad); }
.sa-df { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; margin-top: 2px; }
.sa-h { margin: 18px 0 8px; font-size: 14px; }
@media (max-width: 1100px) { .sa-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sa-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* v43 · kitchen → storekeeper report dialog + review rows */
.modal.sr-modal { width: min(760px, 96vw); }
.sr-kinds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.sr-kind { all: unset; box-sizing: border-box; display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--panel-3); cursor: pointer; border: 1px solid transparent; }
.sr-kind b { font-size: 14px; } .sr-kind small { font-size: 11.5px; color: var(--mute); line-height: 1.5; } .sr-kind.on { border-color: var(--accent); background: var(--accent-soft); }
.sr-kind:focus-visible { outline: 2px solid var(--accent); }
.sr-pick { display: grid; gap: 8px; } .sr-cats { flex-wrap: wrap; } .sr-cats .chip { height: 30px; }
.sr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; padding: 2px; }
.sr-it { all: unset; box-sizing: border-box; display: grid; gap: 2px; padding: 9px 12px; border-radius: 12px; background: var(--panel-3); cursor: pointer; border: 1px solid transparent; }
.sr-it b { font-size: 13.5px; font-weight: 600; } .sr-it small { font-size: 12px; color: var(--mute); } .sr-it.on { border-color: var(--accent); background: var(--accent-soft); }
.sr-chosen { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); margin-top: 10px; font-size: 13.5px; } .sr-chosen svg.i { width: 16px; height: 16px; color: var(--accent); }
.sr-f { display: grid; gap: 6px; margin-top: 10px; font-size: 13px; }
.sr-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 4px; } .sr-nums .bad { color: var(--bad); } .sr-nums .ok { color: var(--ok); }
.sr-a { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; } .sr-a .sr-n { width: 90px; }
@media (max-width: 760px) { .sr-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* v43 · supplier directory */
.sp-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; } .sp-bar .ksearch { flex: 1 1 260px; } .sp-bar .chips { flex-wrap: wrap; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.sp-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; } .sp-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .sp-h b { font-size: 15px; }
.sp-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); } .sp-meta span { display: inline-flex; gap: 5px; align-items: center; } .sp-meta svg.i { width: 14px; height: 14px; }
.sp-terms { font-size: 12px; color: var(--mute); line-height: 1.7; } .sp-card .chips { margin-top: auto; flex-wrap: wrap; }
.sp-edit { padding: 14px 16px; margin-bottom: 12px; } .sp-edit .row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.sp-re { padding: 16px 18px; margin-bottom: 12px; } .sp-re td small { display: block; font-size: 11.5px; } .sp-re tr.urgent td:first-child b { color: var(--bad); }
.sa-t td { vertical-align: middle; } .sa-t td.num { white-space: nowrap; } .sa-t td small.u { display: inline; } .sa-t td.sa-sug small.mute { display: block; }
.sa-t input[type=checkbox] { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--accent); }
.sa-t th:nth-child(n+4) { white-space: nowrap; } .sa-t td:first-child { width: 32px; }
.sp-pl td { white-space: nowrap; } .sp-pl td:first-child { white-space: normal; } .sp-act { display: flex; gap: 4px; justify-content: flex-end; }
.cp4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .sa-k.on { border-color: var(--accent); } .cap-t td small.mute { display: block; font-size: 12px; } .cap-left { font-size: 18px; } .cap-left.bad { color: var(--bad); } .cap-left.warn { color: var(--warn); } .cap-ed { display: inline-flex; gap: 6px; align-items: center; } .cap-ed input { width: 96px; } @media (max-width: 760px) { .cp4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prod .left { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; padding: 2px 8px; border-radius: 99px; background: var(--warn); color: #fff; font-size: 11.5px; font-weight: 600; }

/* v43 · shifts: weekly roster, attendance, per-shift report */
.sh-tabs { margin-bottom: 14px; flex-wrap: wrap; }
.rs-card { padding: 18px 20px; } .rs-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; } .rs-bar [data-wk="-7"] svg.i { transform: scaleX(-1); }
.rs-wrap { overflow-x: auto; } .rs-t { min-width: 980px; } .rs-t th small { display: block; font-weight: 400; color: var(--mute); font-size: 11.5px; } .rs-t th.today, .rs-t td.today { background: var(--accent-soft); }
.rs-n b { display: block; } .rs-n small { font-size: 12px; }
.rs-c { min-width: 112px; } .rs-c select { width: 100%; height: 34px; min-height: 0; padding: 0 8px; font-size: 13px; } .rs-c small { display: block; font-size: 11.5px; margin-top: 3px; } .rs-c small.bad { color: var(--bad); } .rs-c small.ok { color: var(--ok); }
.rs-c.off b, .rs-c.off select { color: var(--mute); } .rs-c.t1 select, .rs-c.t1 b { color: var(--accent); } .rs-c.t2 select, .rs-c.t2 b { color: var(--ink); }
.rs-leg { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--panel-3); margin-inline-end: 6px; font-size: 12px; } .rs-leg.t1 { color: var(--accent); } .rs-leg.off { color: var(--mute); }
.rs-cov span { display: block; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.my-sh > span { display: grid; gap: 2px; } .my-sh b { font-size: 15px; } .my-sh .bad { color: var(--bad); }
.rs-card .dt td { white-space: nowrap; } .rs-card .dt td small.mute { display: block; }

/* ---------- v43 P8 — smart club (clb-*) ---------- */
.clb { display: grid; gap: 16px; }
.clb-kpis { margin: 0; }
.clb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.clb-sc { display: grid; gap: 12px; align-content: start; padding: 18px; border-radius: 20px; background: var(--panel-2, var(--panel)); border: 1px solid var(--line); }
.clb-sc.zero { opacity: 0.62; }
.clb-sc.pick { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.clb-top { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.clb-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.clb-ic.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.clb-ic svg.i { width: 20px; height: 20px; }
.clb-t { display: grid; gap: 4px; min-width: 0; } .clb-t b { font-size: 15px; font-weight: 600; } .clb-t small { color: var(--mute); font-size: 12.5px; line-height: 1.7; }
.clb-top em { font-style: normal; font-size: 26px; font-weight: 700; line-height: 1; display: grid; justify-items: end; gap: 2px; } .clb-top em small { font-size: 12px; font-weight: 400; color: var(--mute); }
.clb-act { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.8; padding: 10px 12px; border-radius: 12px; background: var(--panel-3, var(--panel)); }
.clb-act svg.i { width: 16px; height: 16px; flex: none; margin-top: 4px; color: var(--accent); }
.clb-who { display: flex; flex-wrap: wrap; gap: 6px; } .clb-who .chip { cursor: pointer; }
.clb-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.clb-occ { display: grid; gap: 10px; }
.clb-o { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); }
.clb-o > div { display: grid; gap: 2px; } .clb-o > div small { color: var(--mute); font-size: 12.5px; }
.clb-d { display: grid; justify-items: center; padding: 6px 0; border-radius: 12px; background: var(--accent-soft); } .clb-d b { font-size: 20px; line-height: 1.1; } .clb-d small { font-size: 12px; color: var(--mute); }
.clb-res td { vertical-align: middle; }
.clb-b { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; }
.clb-aud { display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: 16px; background: var(--panel-2, var(--panel)); border: 1px solid var(--line); }
.clb-aud > b { font-size: 34px; line-height: 1; } .clb-aud > span { font-weight: 600; }
.clb-vars { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .clb-vars small { margin-inline-start: auto; font-size: 12px; }
.clb-prev { padding: 12px 14px; border-radius: 14px; background: var(--panel-3, var(--panel)); border: 1px dashed var(--line); } .clb-prev p { margin: 6px 0 0; line-height: 1.9; font-size: 14px; white-space: pre-wrap; }
.clb-next { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); }
.clb-next svg.i { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 3px; } .clb-next > div { display: grid; gap: 2px; } .clb-next small { font-size: 12.5px; line-height: 1.7; }
@media (max-width: 760px) { .clb-b { grid-template-columns: 1fr; } .clb-grid { grid-template-columns: 1fr; } .clb-o { grid-template-columns: 56px minmax(0, 1fr); } .clb-o .btn { grid-column: 1 / -1; } }

/* ---------- v43 P9 — the accountant's table system (.ldg) + the book screens (bk-*) ---------- */
.ldg { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.ldg th { position: sticky; top: 0; z-index: 1; background: var(--panel-2, var(--panel)); color: var(--mute); font-weight: 500; font-size: 12.5px; text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line-2, var(--line)); white-space: nowrap; }
.ldg td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ldg tbody tr:last-child td { border-bottom: 0; }
.ldg .c-money { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; white-space: nowrap; width: 140px; }
.ldg th.c-money { text-align: left; }
.ldg .c-pct { text-align: left; direction: ltr; width: 72px; color: var(--mute); font-variant-numeric: tabular-nums; }
.ldg .c-date { width: 96px; white-space: nowrap; font-variant-numeric: tabular-nums; } .ldg .c-no { width: 64px; } .ldg .c-code { width: 70px; color: var(--mute); }
.ldg .c-src { width: 150px; } .ldg .c-st { width: 110px; } .ldg .c-act { width: 1%; white-space: nowrap; } .ldg .c-text { min-width: 200px; line-height: 1.7; }
.ldg th.c-grp { text-align: center; border-bottom: 0; padding-bottom: 2px; }
.ldg tfoot td { font-weight: 600; background: var(--panel-3, var(--panel)); border-top: 1px solid var(--line-2, var(--line)); border-bottom: 0; position: sticky; bottom: 0; }
.ldg tr.click { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ldg tr.click:hover td { background: var(--panel-3, var(--panel)); } }
.ldg tr.bk-sub td, .ldg tr.bk-open td { font-weight: 600; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.card .tbl-wrap:has(> .ldg) { max-height: 68vh; overflow: auto; border-radius: 14px; }
.bk { display: grid; gap: 16px; }
.bk-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bk-bar .grow { flex: 1 1 220px; min-width: 0; }
.bk-bar select { max-width: 100%; }
.bk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .bk-wide { grid-column: 1 / -1; }
.bk-pend { display: grid; gap: 4px; } .bk-pr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); } .bk-pr:last-child { border-bottom: 0; } .bk-pr small { grid-column: 1; } .bk-pr .num { grid-row: 1 / 3; grid-column: 2; align-self: center; font-weight: 600; }
.bk-ok { display: flex; gap: 12px; align-items: flex-start; padding: 6px 2px; } .bk-ok > svg.i { width: 22px; height: 22px; color: var(--ok); flex: none; margin-top: 2px; } .bk-ok div { display: grid; gap: 4px; } .bk-ok small { line-height: 1.8; }
.bk-tasks { display: grid; gap: 6px; }
.bk-task { display: grid; grid-template-columns: 36px minmax(0, 1fr) 16px; gap: 12px; align-items: center; width: 100%; text-align: start; padding: 10px 12px; border-radius: 14px; background: transparent; border: 1px solid var(--line); cursor: pointer; }
.bk-task > span:nth-child(2) { display: grid; gap: 3px; } .bk-task small { color: var(--mute); font-size: 12.5px; line-height: 1.7; } .bk-task > svg.i { width: 16px; height: 16px; color: var(--mute); transform: scaleX(-1); }
.bk-ti { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); } .bk-ti svg.i { width: 18px; height: 18px; }
.bk-task.warn .bk-ti { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
@media (hover: hover) and (pointer: fine) { .bk-task:hover { background: var(--panel-3, var(--panel)); } }
.bk-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bk-sum > div { display: grid; gap: 4px; padding: 14px 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); } .bk-sum small { color: var(--mute); font-size: 12.5px; } .bk-sum b { font-size: 20px; font-weight: 700; } .bk-sum .hl { border-color: var(--accent); }
.bk-vh { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; } .bk-vh > div { display: grid; gap: 2px; } .bk-vd { margin: 4px 0 12px; line-height: 1.8; }
.bk-ed input, .bk-ed select { width: 100%; min-width: 0; } .bk-ed td { padding: 6px; } .bk-ed td:first-child { min-width: 220px; }
.bk-edf { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.bk-bs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.bk-note { margin: -6px 0 0; font-size: 12.5px; }
.bk-banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.bk-bank { display: grid; gap: 6px; text-align: start; padding: 16px 18px; cursor: pointer; } .bk-bank .chip { justify-self: start; } .bk-bal { font-size: 22px; font-weight: 700; } .bk-bank small { font-size: 12px; }
.bk-rc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.bk-done summary { cursor: pointer; padding: 4px 2px; color: var(--mute); }
.bk-setup { display: grid; gap: 16px; }
.bk-per { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.bk-pm { display: grid; gap: 6px; align-content: start; padding: 12px; border-radius: 14px; border: 1px solid var(--line); } .bk-pm.lk { background: var(--panel-3, var(--panel)); } .bk-pm .chip { justify-self: start; }
.bk-tree { display: grid; gap: 2px; max-height: 60vh; overflow: auto; }
.bk-acc { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; }
.bk-acc.l1 { font-weight: 700; background: var(--panel-3, var(--panel)); margin-top: 8px; } .bk-acc.l2 { font-weight: 600; padding-inline-start: 22px; } .bk-acc.l3 { padding-inline-start: 40px; } .bk-acc small { font-size: 12px; }
@media (max-width: 1100px) { .bk-per { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .bk-grid, .bk-bs, .bk-rc { grid-template-columns: 1fr; } .bk-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bk-vh { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bk-per { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ldg .c-text { min-width: 160px; } }
.bk-task b { color: var(--ink); font-weight: 600; }

/* ---------- v44 — roster: «today» is labelled, legend explains every colour, the scrollbar never sits on the card edge ---------- */
.rs-now { display: block; width: max-content; margin: 0 auto 4px; padding: 1px 8px; border-radius: 99px; background: var(--fill, var(--accent)); color: #fff; font-style: normal; font-size: 12px; font-weight: 700; }
.rs-t th.today, .rs-t td.today { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.rs-leg.now { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--ink); } .rs-leg.ok { color: var(--ok); } .rs-leg.bad { color: var(--bad); }
.rs-scope { margin: 2px 0 12px; font-size: 13px; line-height: 1.8; color: var(--ink-2); padding: 10px 12px; border-radius: 12px; background: var(--panel-3); }
.rs-wrap { padding-bottom: 10px; border-radius: 14px; } .rs-wrap::-webkit-scrollbar { height: 8px; } .rs-wrap::-webkit-scrollbar-thumb { border-radius: 8px; background: var(--line-2); }
.rs-c small.ok { color: var(--ok); }
/* v44 spacing: nav items never touch; only ONE highlighted state at a time */
.ngi { gap: 4px; }
@media (hover: hover) and (pointer: fine) { .nav a.on:hover { background: var(--accent-soft); } }
.iv-sku { font-size: 12px; color: var(--mute); letter-spacing: 0; direction: ltr; justify-self: start; }
.prod .plu { font-style: normal; font-size: 12px; color: var(--mute); font-weight: 500; margin-inline-start: 6px; }
@media (max-width: 1280px) { .bk-rc { grid-template-columns: 1fr; } }
.bk-rc .ldg .c-text { min-width: 0; white-space: normal; }
/* v44: the old mini-dashboard (cashier/supervisor) follows the theme — one hue + status tokens, solid heading (gradient text had no measurable contrast) */
.tone-gold, .tone-blue { --tone: var(--accent); } .tone-green { --tone: var(--ok); } .tone-orange { --tone: var(--warn); }
.hero h2 { background: none !important; -webkit-text-fill-color: currentColor; color: var(--ink); }
.rs-t th.today, .rs-t td.today { background: color-mix(in srgb, var(--accent) 7%, transparent); } .rs-c.off b { color: var(--ink-2); } .rs-c.t1 b { color: var(--accent-ink, var(--accent)); }

/* ---------- v44 floor plan (fp-*) ---------- */
.fp-bar { flex-wrap: wrap; gap: 8px; } .fp-leg { margin: 4px 0 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; } .fp-leg .mute { font-size: 12px; }
.fp-tip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: var(--accent-soft); font-size: 13px; }
.fp-zone { margin-bottom: 14px; }
.fp-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 6px; border-radius: 18px; }
.fp { position: relative; min-width: 640px; height: calc(var(--rows, 3) * 132px + 40px); min-height: 300px; border-radius: 18px; background: repeating-linear-gradient(0deg, transparent 0 39px, var(--line) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, var(--line) 39px 40px); background-color: var(--panel-2, var(--panel)); overflow: hidden; }
.fp.edit { outline: 2px dashed var(--accent); outline-offset: -2px; }
.fpt { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; align-content: center; gap: 2px; width: 92px; height: 92px; padding: 6px; border-radius: 18px; border: 1px solid var(--line-2, var(--line)); background: var(--panel); color: var(--ink); cursor: pointer; touch-action: none; transition: box-shadow 160ms var(--ease), transform 160ms var(--ease); }
.fpt.round { border-radius: 50%; } .fpt.long { width: 150px; height: 84px; }
.fpt b { font-size: 20px; line-height: 1; font-weight: 800; } .fpt small { font-size: 12px; line-height: 1.3; color: var(--ink-2); } .fpt small.fpw { color: var(--mute); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpt.busy { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.fpt.st-ordered { background: color-mix(in srgb, var(--warn) 14%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.fpt.st-serving { background: color-mix(in srgb, var(--info, var(--accent)) 16%, var(--panel)); border-color: color-mix(in srgb, var(--info, var(--accent)) 45%, transparent); }
.fpt.st-pay { background: color-mix(in srgb, var(--ok) 16%, var(--panel)); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.fpt.reserved { border-style: dashed; border-color: var(--accent); }
.fpt.sel { box-shadow: 0 0 0 3px var(--accent); }
.fpb { position: absolute; top: -8px; inset-inline-end: -8px; display: flex; gap: 3px; }
.fpb i { min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; color: #fff; background: var(--ink-2); }
.fpb i.ok { background: var(--ok); } .fpb i.bad { background: var(--bad); } .fpb i.w { background: var(--warn); } .fpb i svg.i { width: 13px; height: 13px; }
@media (hover: hover) and (pointer: fine) { .fp:not(.edit) .fpt:hover { box-shadow: 0 10px 24px -14px rgba(0,0,0,.5); } }
.fp.edit .fpt { cursor: grab; } .fp.edit .fpt:active { cursor: grabbing; }
@media (max-width: 700px) { .fp { min-width: 760px; } .fpt small.fpw { display: none; } }
/* v44 course firing */
.hold-t { margin-inline-start: 8px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; background: var(--panel-3); color: var(--ink-2); border: 1px dashed var(--line-2, var(--line)); }
.hold-t.on { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--ink); border-style: solid; border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.pendchip.held { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .pendchip.held .btn { margin-inline-start: auto; }
.kd-held { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--warn) 10%, var(--panel)); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); font-size: 13px; }
.kd-held b { font-weight: 700; } .kd-held .chip { gap: 6px; }
/* v44 tax e-invoice tab */
.tx-ready { margin: 12px 0; } .tx-ready.warn { background: color-mix(in srgb, var(--warn) 9%, var(--panel)); } .tx-ready.ok { background: color-mix(in srgb, var(--ok) 9%, var(--panel)); }
.tx-miss { margin: 4px 0 8px; padding: 0; list-style: none; display: grid; gap: 6px; } .tx-miss li { display: flex; gap: 8px; align-items: center; font-size: 13.5px; } .tx-miss svg.i { width: 16px; height: 16px; color: var(--warn); flex: none; }
.tx-kpi { margin: 0 0 12px; }
/* v44 manager flash */
.fl-wrap { display: grid; gap: 14px; } .fl-hero { display: grid; justify-items: center; gap: 6px; padding: 8px 0 4px; } .fl-hero b { font-size: 34px; font-weight: 800; line-height: 1.1; } .fl-hero small { color: var(--ink-2); }
.fl-row { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--panel-2, var(--panel)); font-size: 13.5px; } .fl-row.warn { background: color-mix(in srgb, var(--warn) 10%, var(--panel)); }
.acrow .rangebtn { flex: none; max-width: 100%; }

/* v45 hover box fix: the resting and the lit shadow lists have the SAME shape (glow · theme shadow · full-card inset tint), so only colours animate —
   an inset whose SPREAD animated 0 → 999px used to paint a hard frame with a flat box in the middle of the card on every hover. */
html[data-style="glass"] :is(.hk, .cp-card, .op2, .cv, .res-card, [data-tilt]) { box-shadow: 0 14px 28px -22px transparent, var(--shadow), inset 0 0 0 999px transparent; }
@media (hover: hover) and (pointer: fine) and (min-width: 901px) { html[data-style="glass"] :is(.hk, .cp-card, .op2, .cv, .res-card, [data-tilt]) { will-change: transform; } }
/* v45 daily summary: when · day switch · notes */
.fl-when { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; }
.fl-when .fl-date { display: grid; justify-items: center; gap: 2px; text-align: center; } .fl-date b { font-size: 17px; font-weight: 700; } .fl-date small { color: var(--ink-2); font-size: 13px; }
.fl-when .icon-btn svg.i { transform: scaleX(-1); } .fl-when .fl-prev svg.i { transform: none; }
.fl-when > :only-child, .fl-when > .fl-date:first-child:last-child { grid-column: 1 / -1; }
.fl-days { justify-content: center; } .fl-days .chip { gap: 6px; } .fl-shift { text-align: center; margin: 0; }
.fl-tips { display: grid; gap: 6px; } .fl-tips h4 { margin: 0 0 2px; font-size: 14px; font-weight: 700; }
.fl-tip { display: grid; grid-template-columns: 10px 1fr 16px; gap: 10px; align-items: center; text-align: start; padding: 10px 12px; border-radius: 14px; background: var(--panel-2, var(--panel)); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.7; color: var(--ink); cursor: pointer; }
.fl-tip .fl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); } .fl-tip.ok .fl-dot { background: var(--ok); } .fl-tip.warn .fl-dot { background: var(--warn); } .fl-tip.bad .fl-dot { background: var(--bad); } .fl-tip.info .fl-dot { background: var(--accent); }
.fl-tip svg.i { width: 16px; height: 16px; color: var(--mute); }
@media (hover: hover) and (pointer: fine) { .fl-tip:hover, .fl-t:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); } }
button.fl-t { cursor: pointer; text-align: inherit; font: inherit; color: inherit; }
.fl-busy { opacity: .6; transition: opacity 120ms var(--ease); } .fl-note { margin: 0; text-align: center; }
/* v46 product trend: four quiet numbers, reasons as chips */
.tr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 8px; }
.trs { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--panel-2, var(--panel)); border: 1px solid var(--line); min-width: 0; }
.trs b { font-size: 20px; font-weight: 800; line-height: 1.2; } .trs b small { font-size: 12px; font-weight: 500; color: var(--mute); } .trs > small { font-size: 12px; color: var(--ink-2); }
.tr-why { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; } .tr-note { margin: 8px 0 0; }
@media (max-width: 700px) { .tr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* v46 a table paid from the phone, still eating */
.legend-dots i.s-paid { background: transparent; box-shadow: inset 0 0 0 2px var(--ok); }
.fpt.st-paid, .tcard.st-paid, .seat.st-paid { border-style: dashed; border-color: color-mix(in srgb, var(--ok) 60%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
.chip.stg-paid { background: var(--ok-bg, color-mix(in srgb, var(--ok) 14%, transparent)); color: var(--ok); }
/* v46 QR bills: paid from the phone vs at the till */
.qrp { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.qrp-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .qrp-h b { font-size: 13.5px; font-weight: 700; }
.qrp-bar { height: 8px; border-radius: 4px; background: var(--panel-3, var(--line)); overflow: hidden; } .qrp-bar i { display: block; height: 100%; border-radius: 4px; background: var(--chart-1, var(--accent)); }
.qrp-l { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); } .qrp-l i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--panel-3, var(--line-2)); margin-inline-end: 6px; } .qrp-l i.on { background: var(--chart-1, var(--accent)); }
