@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Vazirmatn:wght@400;500;600;700&display=swap");

/* ============================================================
   Soft console — glass, layered, emerald grade
   One sheet for the whole warehouse admin. Green is the default
   theme; blue and purple stay switchable. Every colour below is a
   token, so a theme only has to redefine the token blocks.
   admin-warm.css is no longer needed — its console, journey and
   row components live at the end of this file.
   ============================================================ */

:root,
[data-theme="green"] {
    /* brand — deep emerald, readable on white, calm in a long shift */
    --brand: #0d7d5f;
    --brand-deep: #0a6049;
    --brand-tint: #e3f3ec;
    --brand-ink: #09563f;
    --brand-on: #ffffff;
    --brand-glow: rgba(13, 125, 95, 0.26);

    /* the dark sidebar, hero, workbar and console */
    --side: #0b1d17;
    --side-deep: #07130f;
    --side-line: rgba(255, 255, 255, 0.07);
    --side-text: rgba(255, 255, 255, 0.68);
    --side-dim: rgba(255, 255, 255, 0.42);
    --side-faint: rgba(255, 255, 255, 0.34);
    --pop-side-bg: #0f2a21;

    /* tones used on dark surfaces — brand is mint, good is leaf,
       so "brand" and "done" never read as the same colour */
    --dk-brand: #5fe3b0;
    --dk-good: #a8e063;
    --dk-warn: #f7b955;
    --dk-bad: #ff8a95;
    --dk-info: #8fb6ff;

    /* the second light behind the page */
    --accent-glow: rgba(20, 184, 166, 0.08);
}

:root {
    --side-hover: rgba(255, 255, 255, 0.055);
    --side-on: rgba(255, 255, 255, 0.075);
    --side-on-shadow: none;
    --side-card: rgba(255, 255, 255, 0.06);
    --side-chipbg: rgba(255, 255, 255, 0.1);
    --side-mark-bg: linear-gradient(140deg, var(--brand), var(--brand-deep));
    --side-mark-ink: #ffffff;
    --side-face: rgba(255, 255, 255, 0.12);
    --side-hot-bg: rgba(245, 176, 65, 0.18);
    --side-hot-ink: #f5b041;

    --font: "Plus Jakarta Sans", -apple-system, system-ui, sans-serif;
    --font-rtl: "Vazirmatn", "Plus Jakarta Sans", system-ui, sans-serif;
    --font-display: "Plus Jakarta Sans", "Vazirmatn", system-ui, sans-serif;

    /* sage neutrals — a hint of green in the greys */
    --bg: #f3f6f4;
    --panel: rgba(255, 255, 255, 0.74);
    --panel-solid: #ffffff;
    --sunk: #eef2ef;
    --hover: #e6ece8;
    --line: #dbe3de;
    --line-soft: #e8eeea;

    --ink: #14201b;
    --ink-2: #43524b;
    --ink-3: #65746c;
    --ink-4: #8b9891;

    /* good leans leaf-green so it stays apart from the emerald brand */
    --good: #2b8a3e;
    --good-bg: #e7f4e5;
    --good-ink: #276b33;
    --warn: #9a6700;
    --warn-bg: #fbf1dc;
    --warn-ink: #8a5a00;
    --bad: #c0304a;
    --bad-bg: #fceded;
    --bad-ink: #b3253f;
    --info: #1c6bb8;
    --info-bg: #e9f1fa;
    --info-ink: #1f5bb5;

    --r-lg: 14px;
    --r: 10px;
    --r-sm: 7px;
    --r-xs: 5px;

    /* glass — the surface language of the whole console */
    --glass: rgba(255, 255, 255, 0.66);
    --glass-strong: rgba(255, 255, 255, 0.86);
    --glass-line: rgba(255, 255, 255, 0.7);
    --glass-shadow:
        0 1px 2px rgba(18, 46, 36, 0.06),
        0 12px 32px -12px rgba(18, 46, 36, 0.22);

    --lift: 0 0 0 1px rgba(18, 46, 36, 0.06), 0 1px 2px rgba(18, 46, 36, 0.05);
    --lift-2:
        0 0 0 1px rgba(18, 46, 36, 0.08), 0 10px 24px rgba(18, 46, 36, 0.14);
    --press:
        0 1px 1px rgba(18, 46, 36, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    --tab-shadow:
        0 1px 2px rgba(18, 46, 36, 0.1), 0 0 0 1px rgba(18, 46, 36, 0.05);

    --sidebar: 244px;
}

[data-theme="blue"] {
    --side: #0d1424;
    --side-deep: #0b1120;
    --pop-side-bg: #1a2140;
    --brand: #3b6cf6;
    --brand-deep: #2a55d6;
    --brand-tint: #eaf0fe;
    --brand-ink: #2247b8;
    --brand-on: #ffffff;
    --brand-glow: rgba(59, 108, 246, 0.28);
    --dk-brand: #9db8ff;
    --dk-good: #4fd39d;
    --dk-info: #7fd3f7;
    --accent-glow: rgba(245, 176, 65, 0.07);
}

[data-theme="purple"] {
    --side: #16102e;
    --side-deep: #120d26;
    --pop-side-bg: #221a44;
    --brand: #7a5af8;
    --brand-deep: #6541e4;
    --brand-tint: #f0ecfe;
    --brand-ink: #5732c4;
    --brand-on: #ffffff;
    --brand-glow: rgba(122, 90, 248, 0.28);
    --dk-brand: #b79dff;
    --dk-good: #4fd39d;
    --dk-info: #8fb6ff;
    --accent-glow: rgba(245, 176, 65, 0.07);
}

[data-mode="dark"] {
    --bg: #0b110f;
    --panel: rgba(19, 27, 24, 0.68);
    --panel-solid: #131b18;
    --sunk: #16201c;
    --hover: #1d2924;
    --line: #25332d;
    --line-soft: #1e2a25;

    --ink: #eef5f1;
    --ink-2: #bfccc5;
    --ink-3: #8fa099;
    --ink-4: #6d7d76;

    --good: #8fd66b;
    --good-bg: #1a2a12;
    --good-ink: #b7e896;
    --warn: #fbbf4a;
    --warn-bg: #2d2413;
    --warn-ink: #f7d17d;
    --bad: #f87f8f;
    --bad-bg: #2d1620;
    --bad-ink: #ffa6b3;
    --info: #60a5fa;
    --info-bg: #122236;
    --info-ink: #a9c8e6;

    --glass: rgba(19, 27, 24, 0.58);
    --glass-strong: rgba(19, 27, 24, 0.82);
    --glass-line: rgba(255, 255, 255, 0.08);
    --glass-shadow:
        0 1px 2px rgba(0, 0, 0, 0.35), 0 16px 40px -14px rgba(0, 0, 0, 0.6);

    --lift: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 2px 6px rgba(0, 0, 0, 0.4);
    --lift-2:
        0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 28px rgba(0, 0, 0, 0.55);
    --press:
        0 1px 2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --tab-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* green in the dark: brighter emerald, near-black forest sidebar */
[data-mode="dark"]:not([data-theme="blue"]):not([data-theme="purple"]) {
    --side: #07140f;
    --side-deep: #040d09;
    --pop-side-bg: #0c2019;
    --brand: #2fbf8a;
    --brand-deep: #45d19c;
    --brand-tint: #0f2a20;
    --brand-ink: #8fe6c2;
    --brand-on: #04110b;
    --brand-glow: rgba(47, 191, 138, 0.3);
}

[data-theme="blue"][data-mode="dark"] {
    --side: #0a1228;
    --side-deep: #070d1e;
    --pop-side-bg: #141d3a;
    --brand: #5b84f8;
    --brand-deep: #7397fa;
    --brand-tint: #17213a;
    --brand-ink: #a8c0fd;
    --brand-on: #0f1218;
    --brand-glow: rgba(91, 132, 248, 0.3);
    --good: #34d399;
    --good-bg: #0e2a22;
    --good-ink: #6ee7b7;
}

[data-theme="purple"][data-mode="dark"] {
    --side: #130c2c;
    --side-deep: #0d0820;
    --pop-side-bg: #1c1438;
    --brand: #9b7cfb;
    --brand-deep: #b096fc;
    --brand-tint: #1f1a3a;
    --brand-ink: #c8b5fd;
    --brand-on: #0f1218;
    --brand-glow: rgba(155, 124, 251, 0.3);
    --good: #34d399;
    --good-bg: #0e2a22;
    --good-ink: #6ee7b7;
}

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

body {
    background:
        radial-gradient(
            1100px 600px at 90% -10%,
            var(--brand-glow),
            transparent 60%
        ),
        radial-gradient(
            800px 500px at -10% 100%,
            var(--accent-glow),
            transparent 55%
        ),
        var(--bg);
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.008em;
}

/* the display face carries headings and every money figure */
.display,
.eyebrow h2,
.hero-line,
.panel-top h2,
.bd-head h3,
.card-top h3,
.lg-v,
.ty-v,
.kpi-v,
.hs-v,
.ck-v,
.scale-v,
.lede-v,
.q-v,
.auth-pitch h1,
.auth-form h2,
.head h1 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.034em;
}

/* figures stay aligned */
.n,
.lg-v,
.ty-v,
.kpi-v,
.hs-v,
.ck-v,
.scale-v {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* Kurdish and Arabic never take the tight display tracking */
body[dir="rtl"] .eyebrow h2,
body[dir="rtl"] .hero-line,
body[dir="rtl"] .panel-top h2,
body[dir="rtl"] .bd-head h3,
body[dir="rtl"] .card-top h3,
body[dir="rtl"] .auth-pitch h1,
body[dir="rtl"] .auth-form h2,
body[dir="rtl"] .head h1 {
    font-family: var(--font-rtl);
    font-weight: 700;
    letter-spacing: 0;
}

body[dir="rtl"] {
    font-family: var(--font-rtl);
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    font: inherit;
}

/* The hidden attribute always wins. Without this, any component that sets
   its own display (flex, grid, block) shows even when the page hides it —
   which is how empty rows like "Give back 0" and "Tax 0" appeared. */
[hidden] {
    display: none !important;
}

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

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

.n {
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}

/* every icon from the partial gets a safe default size */
.ico {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

/* motion the components share */
@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 currentColor;
        opacity: 1;
    }
    70% {
        box-shadow: 0 0 0 7px transparent;
        opacity: 0.85;
    }
    100% {
        box-shadow: 0 0 0 0 transparent;
        opacity: 1;
    }
}

/* ---------- the glass surface, shared ---------- */

.card,
.panel,
.facts,
.list,
.filters,
.filterbar,
.formcard,
.metric,
.q,
.kpis,
.ledger,
.tally,
.statline,
.chart-card,
.bd,
.cart,
.pay,
.tile,
.setup,
.step-card,
.gate,
.nothing,
.hunt,
.item-head,
.gauge,
.shelf,
.kin-one,
.done,
.palette,
.pop,
.hits,
.picker-pop,
.toast,
.ux-modal-box {
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid var(--glass-line);
    box-shadow: var(--glass-shadow);
}

/* ---------- shell ---------- */

.shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar);
    flex: 0 0 var(--sidebar);
    background: linear-gradient(180deg, var(--side), var(--side-deep));
    border-inline-end: 1px solid var(--side-line);
    color: var(--side-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.side-top {
    padding: 16px 14px 14px;
    flex: 0 0 auto;
}

.org {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px;
    border: 1px solid var(--side-line);
    border-radius: var(--r);
    background: var(--side-card);
    cursor: pointer;
    text-align: start;
    color: #ffffff;
    transition: background 0.14s ease;
}

.org:hover {
    background: rgba(255, 255, 255, 0.1);
}

.org-mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: var(--r-sm);
    background: var(--side-mark-bg);
    color: var(--side-mark-ink) !important;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 650;
    box-shadow: 0 2px 10px var(--brand-glow);
}

.org-text {
    min-width: 0;
    flex: 1;
    display: block;
}
.org-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.org-sub {
    display: block;
    font-size: 11.5px;
    color: var(--side-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.org svg {
    display: none;
}

.nav {
    padding: 4px 12px 16px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.nav-group-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--side-faint);
    padding: 17px 12px 6px;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.nav-group-title::before {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 10px 0 13px;
    border-radius: var(--r-sm);
    color: var(--side-text);
    position: relative;
    font-size: 14px;
    font-weight: 500;
    transition:
        background 0.12s,
        color 0.12s;
}

.nav-item:hover {
    background: var(--side-hover);
    color: #ffffff;
}

/* the active row glows in the brand colour */
.nav-item.on,
.nav-item[aria-current="page"] {
    background: color-mix(in srgb, var(--dk-brand) 13%, transparent);
    color: #ffffff;
    font-weight: 600;
}

.nav-item .chev {
    margin-inline-start: auto;
    width: 14px;
    height: 14px;
    opacity: 0.4;
}
.nav-item .nav-count + .chev {
    margin-inline-start: 8px;
}

.nav-item.on::before {
    content: "";
    position: absolute;
    inset-inline-start: -14px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--dk-brand);
    box-shadow: 0 0 12px var(--dk-brand);
}

body[dir="rtl"] .nav-item.on::before {
    border-radius: 3px 0 0 3px;
}

.nav-item svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    stroke-width: 1.7;
    opacity: 0.6;
}
.nav-item.on svg,
.nav-item[aria-current="page"] svg {
    opacity: 1;
    color: var(--dk-brand);
}
.nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-count,
.count-tag {
    margin-inline-start: auto;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--side-chipbg);
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    font-weight: 650;
    display: grid;
    place-items: center;
    font-variant-numeric: tabular-nums;
}

.nav-item.on .nav-count {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}
.nav-count.hot {
    background: var(--side-hot-bg);
    color: var(--side-hot-ink);
    box-shadow: inset 0 0 0 1px rgba(245, 176, 65, 0.35);
}

.side-foot {
    padding: 10px 12px 14px;
    border-top: 1px solid var(--side-line);
}

.me {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 7px 8px;
    border: none;
    background: none;
    border-radius: var(--r-sm);
    cursor: pointer;
    color: #ffffff;
    text-align: start;
}

.me:hover {
    background: rgba(255, 255, 255, 0.07);
}

.face {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 999px;
    background: var(--side-face);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 11.5px;
    font-weight: 650;
}

.me-text {
    min-width: 0;
    flex: 1;
    display: block;
}
.me-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.me-role {
    display: block;
    font-size: 11px;
    color: var(--side-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.me svg {
    width: 15px;
    height: 15px;
    color: var(--side-dim);
}

/* ---------- top bar ---------- */

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 58px;
    flex: 0 0 58px;
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--glass-line);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 30;
    flex-wrap: nowrap;
}

.crumbs {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    color: var(--ink-3);
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
}
.crumbs b {
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.crumbs .sep {
    color: var(--ink-4);
    display: inline-flex;
}
.crumbs .sep .ico {
    width: 15px;
    height: 15px;
}

.finder {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 9px;
    height: 38px;
    padding: 0 12px;
    min-width: 300px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    color: var(--ink-3);
    font-size: 13px;
    cursor: pointer;
    box-shadow: var(--press);
    transition: border-color 0.12s ease;
}

.finder:hover {
    border-color: var(--brand);
}
.finder svg {
    width: 15px;
    height: 15px;
}
.finder .kbd {
    margin-inline-start: auto;
}

.kbd {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--ink-4);
    background: var(--hover);
    border-radius: 5px;
    padding: 2px 6px;
}

.ibtn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    background: var(--glass-strong);
    border-radius: var(--r-sm);
    color: var(--ink-3);
    display: grid;
    place-items: center;
    cursor: pointer;
    position: relative;
    box-shadow: var(--press);
}

.ibtn:hover {
    color: var(--ink);
    background: var(--sunk);
}
.ibtn svg {
    width: 17px;
    height: 17px;
}

.ibtn .ping {
    position: absolute;
    top: 7px;
    inset-inline-end: 7px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--bad);
    box-shadow: 0 0 0 2px var(--panel-solid);
}

.pop {
    position: absolute;
    min-width: 216px;
    border-radius: var(--r);
    padding: 6px;
    z-index: 70;
}

.pop[hidden] {
    display: none;
}
.pop.at-side {
    bottom: 64px;
    inset-inline-start: 12px;
    width: 220px;
    background: var(--pop-side-bg);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.09),
        0 14px 34px rgba(0, 0, 0, 0.5);
}

.pop.at-side .pop-item {
    color: rgba(255, 255, 255, 0.78);
}
.pop.at-side .pop-item:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}
.pop.at-side .pop-item.danger:hover {
    background: rgba(240, 86, 107, 0.16);
    color: #ff9aa6;
}

.pop-head {
    padding: 8px 10px 9px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 5px;
}
.pop-head .a {
    font-size: 13px;
    font-weight: 600;
}
.pop-head .b {
    font-size: 11.5px;
    color: var(--ink-3);
}

.pop-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: none;
    background: none;
    border-radius: var(--r-xs);
    font-size: 13px;
    color: var(--ink-2);
    cursor: pointer;
    text-align: start;
}

.pop-item:hover {
    background: var(--hover);
    color: var(--ink);
}
.pop-item svg {
    width: 15px;
    height: 15px;
    opacity: 0.7;
}
.pop-item.danger:hover {
    background: var(--bad-bg);
    color: var(--bad);
}

/* the account menu and dropdowns go glass too */
.me-menu,
.dropdown {
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid var(--glass-line);
    box-shadow: var(--glass-shadow);
}

/* ---------- page ---------- */

.page {
    padding: 16px 20px 44px;
    max-width: 1540px;
}

.head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}
.head h1 {
    font-size: 24px;
    letter-spacing: -0.032em;
    margin: 0;
}
.head p {
    margin: 4px 0 0;
    font-size: 13.5px;
    color: var(--ink-3);
}
.head .acts {
    margin-inline-start: auto;
    display: flex;
    gap: 9px;
    flex-shrink: 0;
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 15px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: var(--glass-strong);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 550;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--press);
    transition:
        background 0.12s,
        box-shadow 0.14s,
        transform 0.14s;
}

.btn:hover {
    background: var(--sunk);
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(0.5px);
    box-shadow: none;
}
.btn svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.btn-go,
.btn.primary {
    background: linear-gradient(
        160deg,
        var(--brand) 0%,
        var(--brand-deep) 100%
    );
    border-color: transparent;
    color: var(--brand-on);
    font-weight: 600;
    box-shadow:
        0 1px 2px rgba(18, 46, 36, 0.12),
        0 8px 18px -8px var(--brand-glow);
}

.btn-go:hover,
.btn.primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow:
        0 2px 4px rgba(18, 46, 36, 0.14),
        0 14px 26px -10px var(--brand-glow);
}
.btn-go:active,
.btn.primary:active {
    transform: translateY(0.5px);
    box-shadow: 0 1px 2px rgba(18, 46, 36, 0.16);
}

.btn.dark {
    background: linear-gradient(180deg, var(--side), var(--side-deep));
    border-color: transparent;
    color: #fff;
}
.btn.danger {
    background: var(--bad);
    border-color: transparent;
    color: #fff;
}
.btn.danger:hover {
    filter: brightness(0.95);
}

.btn-quiet {
    border-color: transparent;
    background: none;
    box-shadow: none;
    color: var(--ink-2);
}
.btn-quiet:hover {
    background: var(--hover);
    color: var(--ink);
    transform: none;
}

.btn-sm {
    height: 32px;
    padding: 0 11px;
    font-size: 13px;
    border-radius: var(--r-xs);
}
.btn-icon {
    width: 38px;
    padding: 0;
}

/* ---------- tabs ---------- */

.tabs {
    display: inline-flex;
    padding: 3px;
    background: var(--hover);
    border-radius: var(--r);
    gap: 2px;
}

.tab {
    height: 30px;
    padding: 0 13px;
    border: none;
    background: none;
    border-radius: var(--r-xs);
    font-size: 13px;
    font-weight: 550;
    color: var(--ink-3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.tab:hover {
    color: var(--ink);
}

.tab.on {
    background: var(--glass-strong);
    color: var(--ink);
    font-weight: 600;
    box-shadow: var(--tab-shadow);
}

.tab .c {
    font-size: 11px;
    font-weight: 600;
    background: var(--line);
    color: var(--ink-3);
    border-radius: 999px;
    padding: 1px 6px;
    font-variant-numeric: tabular-nums;
}

.tab.on .c {
    background: var(--brand-tint);
    color: var(--brand-ink);
}

/* ---------- filter bar ---------- */

.filters {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: var(--r-lg);
}

.field {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    box-shadow: var(--press);
}

.field svg {
    width: 15px;
    height: 15px;
    color: var(--ink-4);
    flex: 0 0 15px;
}

.field input,
.field select {
    border: none;
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 13.5px;
    min-width: 0;
    outline: none;
}

.field input::placeholder {
    color: var(--ink-4);
}
.field.grow {
    flex: 1;
    min-width: 190px;
    max-width: 340px;
}
.field.grow input {
    width: 100%;
}
.field:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}
.field select {
    cursor: pointer;
    max-width: 190px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 6px 0 11px;
    border-radius: 999px;
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-size: 12.5px;
    font-weight: 550;
}

.chip button {
    width: 18px;
    height: 18px;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    display: grid;
    place-items: center;
    border-radius: 999px;
}

.chip button:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.07);
}

/* ---------- metric cards ---------- */

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric {
    border-radius: var(--r-lg);
    padding: 17px 18px 16px;
    position: relative;
    overflow: hidden;
}

.metric.hero {
    grid-column: span 2;
}

@media (max-width: 720px) {
    .metric.hero {
        grid-column: span 1;
    }
}

.metric-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 11px;
}

.metric-ico {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: var(--r-sm);
    display: grid;
    place-items: center;
    background: var(--brand-tint);
    color: var(--brand);
}

.metric-ico svg {
    width: 15px;
    height: 15px;
}
.metric-ico.g {
    background: var(--good-bg);
    color: var(--good);
}
.metric-ico.w {
    background: var(--warn-bg);
    color: var(--warn);
}
.metric-ico.d {
    background: var(--bad-bg);
    color: var(--bad);
}

.metric-k {
    font-size: 12.5px;
    font-weight: 550;
    color: var(--ink-3);
}

.metric-v {
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.032em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.metric.hero .metric-v {
    font-size: 34px;
}
.metric-v .u {
    font-size: 13px;
    font-weight: 550;
    color: var(--ink-4);
    letter-spacing: 0;
}
.metric-f {
    font-size: 12.5px;
    color: var(--ink-3);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.delta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 21px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.delta.up {
    background: var(--good-bg);
    color: var(--good-ink);
}
.delta.down {
    background: var(--bad-bg);
    color: var(--bad-ink);
}
.delta.flat {
    background: var(--hover);
    color: var(--ink-3);
}

.spark {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 26px;
    margin-top: 12px;
}
.spark i {
    flex: 1;
    background: var(--hover);
    border-radius: 2px 2px 0 0;
    min-height: 3px;
}
.spark i.hi {
    background: var(--brand);
}

/* the 30-day bars, where a day is a link */
.facts .spark {
    height: 120px;
    gap: 3px;
    padding: 14px 16px 6px;
    margin: 0;
    align-items: flex-end;
}
.spark-bar {
    flex: 1;
    min-width: 0;
    height: var(--h, 2%);
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, var(--brand), var(--brand-deep));
    opacity: 0.55;
    transition:
        opacity 120ms ease,
        transform 120ms ease;
}
.spark-bar:hover {
    opacity: 1;
    transform: scaleX(1.15);
}
.spark-bar:last-child {
    opacity: 1;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent);
}

/* ---------- queue ---------- */

.queue {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.q {
    border-radius: var(--r);
    padding: 14px 15px;
    display: block;
    transition:
        box-shadow 0.14s,
        transform 0.14s;
}

.q:hover {
    transform: translateY(-1px);
    box-shadow: var(--lift-2);
}
.q-v {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}
.q-k {
    font-size: 12.5px;
    color: var(--ink-2);
    font-weight: 500;
    margin-top: 2px;
}
.q-f {
    font-size: 11.5px;
    color: var(--ink-4);
    margin-top: 3px;
}
.q.alarm .q-v {
    color: var(--bad);
}
.q.caution .q-v {
    color: var(--warn);
}
.q.zero {
    box-shadow: none;
}
.q.zero .q-v {
    color: var(--ink-4);
    font-weight: 550;
}
.q.zero:hover {
    box-shadow: var(--glass-shadow);
    transform: none;
}

/* ---------- panels ---------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 12px;
    align-items: start;
}

.panel {
    border-radius: var(--r-lg);
    overflow: hidden;
}

.panel-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    background: transparent;
    border-bottom: 1px solid var(--line-soft);
}

.panel.hollow .panel-top {
    border-bottom: none;
    padding-bottom: 6px;
}

.panel-top h2 {
    font-size: 15.5px;
    margin: 0;
    letter-spacing: -0.012em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.panel-top .more {
    margin-inline-start: auto;
    font-size: 13px;
    color: var(--brand);
    font-weight: 550;
    white-space: nowrap;
}
.panel-top .more:hover {
    text-decoration: underline;
}

/* ---------- table ---------- */

table.t {
    width: 100%;
    border-collapse: collapse;
}

table.t th {
    text-align: start;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-3);
    padding: 9px 18px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--sunk);
    white-space: nowrap;
}

table.t td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
    vertical-align: middle;
}
table.t tbody tr:last-child td {
    border-bottom: none;
}
table.t tbody tr:hover {
    background: var(--hover);
}
table.t .r {
    text-align: end;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
table.t .b {
    font-weight: 600;
}
table.t .dim {
    color: var(--ink-3);
}
table.t .num,
table.t .n {
    font-variant-numeric: tabular-nums;
}

.two .l1 {
    font-weight: 550;
    line-height: 1.35;
}
.two .l2 {
    font-size: 12.5px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
}

/* ---------- share ---------- */

.share {
    display: flex;
    align-items: center;
    gap: 10px;
}
.share-track {
    flex: 1;
    height: 6px;
    background: var(--hover);
    border-radius: 999px;
    overflow: hidden;
    min-width: 50px;
    max-width: 104px;
}
.share-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--brand-deep));
}
.share-fill.alt {
    background: var(--ink-4);
    opacity: 0.5;
}
.share-pct {
    font-size: 11.5px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
    width: 32px;
    text-align: end;
}

/* ---------- feed ---------- */

.feed-row {
    display: flex;
    gap: 11px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line-soft);
    align-items: flex-start;
}
.feed-row:last-child {
    border-bottom: none;
}
.feed-row:hover {
    background: var(--hover);
}

.feed-ico {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: var(--r-xs);
    display: grid;
    place-items: center;
    background: var(--warn-bg);
    color: var(--warn);
}

.feed-ico svg {
    width: 14px;
    height: 14px;
}
.feed-ico.bad {
    background: var(--bad-bg);
    color: var(--bad);
}
.feed-text {
    font-size: 14px;
    line-height: 1.45;
}
.feed-when {
    font-size: 12.5px;
    color: var(--ink-4);
    margin-top: 3px;
}

/* ---------- compact empty ---------- */

.hollow-body {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 2px 18px 14px;
}

.hollow-ico {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: var(--r-sm);
    background: var(--sunk);
    color: var(--ink-4);
    display: grid;
    place-items: center;
}

.hollow-ico svg {
    width: 17px;
    height: 17px;
}
.hollow-copy {
    min-width: 0;
    display: block;
}
.hollow-copy b {
    display: block;
    font-size: 14px;
    font-weight: 600;
}
.hollow-copy span {
    display: block;
    font-size: 13.5px;
    color: var(--ink-3);
}
.hollow-body .btn {
    margin-inline-start: auto;
    flex-shrink: 0;
}

.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--r);
    background: var(--good-bg);
    color: var(--good-ink);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 16px;
}

.flash.err {
    background: var(--bad-bg);
    color: var(--bad-ink);
}
.flash.warn {
    background: var(--warn-bg);
    color: var(--warn-ink);
}

/* ---------- palette ---------- */

.veil {
    position: fixed;
    inset: 0;
    background: rgba(6, 20, 14, 0.4);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    z-index: 80;
}
.veil[hidden] {
    display: none;
}

.palette {
    position: fixed;
    top: 13vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(580px, 92vw);
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border-radius: var(--r-lg);
    z-index: 90;
    overflow: hidden;
}

.palette[hidden] {
    display: none;
}

.palette input {
    width: 100%;
    height: 52px;
    border: none;
    border-bottom: 1px solid var(--line-soft);
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    padding: 0 18px;
}

.palette input:focus {
    outline: none;
}
.palette-list {
    max-height: 340px;
    overflow-y: auto;
    padding: 7px;
}

.palette-item {
    display: flex;
    align-items: center;
    gap: 11px;
    height: auto;
    min-height: 38px;
    padding: 7px 12px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    color: var(--ink-2);
    cursor: pointer;
}

.palette-item.sel,
.palette-item:hover {
    background: var(--hover);
    color: var(--ink);
}
.palette-item .grp {
    margin-inline-start: auto;
    font-size: 11.5px;
    color: var(--ink-4);
}

/* ---------- responsive shell ---------- */

.burger {
    display: none;
}

@media (max-width: 1040px) {
    .sidebar {
        position: fixed;
        inset-inline-start: 0;
        top: 0;
        z-index: 75;
        transform: translateX(-100%);
        transition: transform 0.2s;
    }
    body[dir="rtl"] .sidebar {
        transform: translateX(100%);
    }
    .sidebar.open {
        transform: none;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
    }
    .burger {
        display: grid;
    }
    .finder {
        min-width: 0;
    }
    .finder span,
    .finder .kbd {
        display: none;
    }
    .page {
        padding: 18px 14px 40px;
    }
}

/* ============================================================
   Hero briefing — dark sheet with a brand light
   ============================================================ */

.hero {
    position: relative;
    background:
        radial-gradient(90% 130% at 0% 0%, var(--brand-glow), transparent 60%),
        radial-gradient(
            60% 80% at 100% 100%,
            var(--accent-glow),
            transparent 60%
        ),
        linear-gradient(180deg, var(--side), var(--side-deep));
    border-radius: var(--r-lg);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 20px 44px -22px rgba(4, 16, 11, 0.6);
    overflow: hidden;
    margin-bottom: 14px;
    color: #fff;
    animation: rise 460ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.hero-top {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 20px 24px 18px;
    border-bottom: none;
    position: relative;
}

.hero-top::before {
    display: none;
}

.hero-meta {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-meta .dot {
    opacity: 0.4;
}

.hero-line {
    color: #fff;
    font-size: 28px;
    letter-spacing: -0.032em;
    line-height: 1.3;
    margin: 0;
    max-width: 60ch;
}

.hero-line em {
    font-style: normal;
    font-variant-numeric: tabular-nums;
    color: #fff;
    font-weight: 700;
}
.hero-line .soft {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 550;
}
.hero-line .c-bad {
    color: var(--dk-bad);
}
.hero-line .c-warn {
    color: var(--dk-warn);
}
.hero-line .c-info {
    color: var(--dk-info);
}
.hero-line .c-brand {
    color: var(--dk-brand);
}
.hero-line .c-good {
    color: var(--dk-good);
}

.hero-sub {
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 10px;
}
.hero-sub b {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
}

.hero-range {
    margin-inline-start: auto;
    flex-shrink: 0;
}
.hero-range .tabs {
    background: rgba(255, 255, 255, 0.07);
}
.hero-range .tab {
    color: rgba(255, 255, 255, 0.55);
}
.hero-range .tab:hover {
    color: #fff;
}
.hero-range .tab.on {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    box-shadow: none;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.hs {
    padding: 15px 18px 17px 17px;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.07);
    border-top: 1px solid transparent;
    display: block;
    position: relative;
}

.hs:last-child {
    border-inline-end: none;
}
.hs:hover {
    background: rgba(255, 255, 255, 0.04);
}

.hs::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 15px;
    width: 3px;
    height: 20px;
    border-radius: 0 2px 2px 0;
    background: rgba(255, 255, 255, 0.22);
}

.hs.bad::before {
    background: var(--dk-bad);
    box-shadow: 0 0 12px var(--dk-bad);
}
.hs.warn::before {
    background: var(--dk-warn);
    box-shadow: 0 0 12px var(--dk-warn);
}
.hs.info::before {
    background: var(--dk-info);
    box-shadow: 0 0 12px var(--dk-info);
}
.hs.brand::before {
    background: var(--dk-brand);
    box-shadow: 0 0 12px var(--dk-brand);
}
.hs.good::before {
    background: var(--dk-good);
    box-shadow: 0 0 12px var(--dk-good);
}

.hs-v {
    font-size: 23px;
    letter-spacing: -0.036em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
}

.hs-v::before {
    display: none;
}
.hs.bad .hs-v {
    color: var(--dk-bad);
}

.hs-k {
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    margin-top: 5px;
    line-height: 1.35;
}
.hs-f {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
    line-height: 1.45;
}

@media (max-width: 620px) {
    .hero-line {
        font-size: 21px;
    }
    .hero-top {
        padding: 18px;
        flex-direction: column;
        gap: 14px;
    }
    .hero-range {
        margin-inline-start: 0;
    }
}

/* ---------- quick actions ---------- */

.quick {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

/* ---------- section label ---------- */

.eyebrow {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 9px;
    flex-wrap: wrap;
}

.eyebrow h2 {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin: 0;
}

.eyebrow .note {
    margin-inline-start: auto;
    font-size: 12.5px;
    color: var(--ink-3);
}
.eyebrow .go {
    font-size: 13px;
    font-weight: 550;
    color: var(--brand);
}
.eyebrow .go:hover {
    text-decoration: underline;
}

/* ---------- chart card ---------- */

.chart-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(320px, 1fr);
    gap: 16px;
    align-items: stretch;
}

@media (max-width: 1080px) {
    .chart-wrap {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chart-head {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 18px 20px 14px;
    flex-wrap: wrap;
}

.ck-k {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-2);
}
.ck-v {
    font-size: 26px;
    letter-spacing: -0.038em;
    line-height: 1.15;
    margin-top: 6px;
}
.ck-v.brand {
    color: var(--ink);
}
.ck-f {
    font-size: 12.5px;
    color: var(--ink-3);
    margin-top: 5px;
}
.chart-head .tabs {
    margin-inline-start: auto;
    align-self: center;
}

.chart-body {
    padding: 6px 10px 12px;
    flex: 1;
    display: flex;
}
.chart-body svg {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 210px;
}
.chart-axis {
    font-size: 10.5px;
    fill: var(--ink-4);
}
.chart-grid {
    stroke: var(--line-soft);
    stroke-width: 1;
}
.chart-line {
    fill: none;
    stroke: var(--brand);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.chart-area {
    fill: url(#cgrad);
}
.chart-dot {
    fill: var(--panel-solid);
    stroke: var(--brand);
    stroke-width: 2;
}

/* ---------- breakdown ---------- */

.bd {
    border-radius: var(--r-lg);
    overflow: hidden;
}
.bd-head {
    padding: 17px 20px 14px;
    border-bottom: 1px solid var(--line-soft);
}
.bd-head h3 {
    font-size: 15.5px;
    margin: 0;
    letter-spacing: -0.012em;
}
.bd-head p {
    font-size: 13.5px;
    color: var(--ink-3);
    margin: 4px 0 0;
}

.bd-row {
    padding: 13px 20px 14px;
    border-bottom: 1px solid var(--line-soft);
}
.bd-row:last-of-type {
    border-bottom: none;
}
.bd-top {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.bd-label {
    font-size: 14px;
    color: var(--ink);
    font-weight: 500;
}
.bd-val {
    margin-inline-start: auto;
    font-size: 14px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.bd-val.plus {
    color: var(--good);
}
.bd-val.minus {
    color: var(--bad);
}

.bd-bar {
    height: 3px;
    border-radius: 999px;
    background: var(--line-soft);
    margin-top: 9px;
    overflow: hidden;
}
.bd-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--brand-deep));
}
.bd-fill.minus {
    background: var(--bad);
}

.bd-total {
    padding: 16px 20px 18px;
    background: var(--sunk);
}
.bd-total .bd-top {
    align-items: center;
}
.bd-total .bd-label {
    font-size: 14px;
    font-weight: 620;
    color: var(--ink);
}
.bd-total .bd-val {
    font-size: 19px;
    color: var(--brand);
    letter-spacing: -0.02em;
}
.bd-note {
    font-size: 13px;
    color: var(--ink-3);
    line-height: 1.55;
    margin-top: 10px;
}

/* ============================================================
   Sign in
   ============================================================ */

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr minmax(0, 470px);
    background: var(--bg);
}

.auth-side {
    background: linear-gradient(172deg, var(--side) 0%, var(--side-deep) 100%);
    color: #fff;
    padding: 44px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-side::after {
    content: "";
    position: absolute;
    inset-inline-end: -180px;
    bottom: -220px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--brand-glow) 0%, transparent 68%);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 15px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.auth-brand .mark {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    background: linear-gradient(160deg, var(--brand), var(--brand-deep));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 650;
    box-shadow: 0 3px 12px var(--brand-glow);
}

.auth-pitch {
    position: relative;
    z-index: 1;
    max-width: 24ch;
}

.auth-pitch h1 {
    font-size: 35px;
    line-height: 1.18;
    letter-spacing: -0.034em;
    margin: 0 0 14px;
}

.auth-pitch p {
    font-size: 14.5px;
    line-height: 1.62;
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    max-width: 34ch;
}

.auth-facts {
    display: flex;
    gap: 34px;
    position: relative;
    z-index: 1;
}
.auth-fact b {
    display: block;
    font-size: 14px;
    font-weight: 600;
}
.auth-fact span {
    display: block;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.auth-panel {
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    backdrop-filter: blur(16px) saturate(1.3);
    padding: 48px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}
.auth-form h2 {
    font-size: 25px;
    letter-spacing: -0.03em;
    margin: 0 0 7px;
}
.auth-form .lede {
    color: var(--ink-3);
    font-size: 13.5px;
    margin: 0 0 28px;
    line-height: 1.55;
}

.auth .field {
    display: block;
    height: auto;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    margin-bottom: 16px;
}

.auth .field > label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 6px;
}

.auth .field input[type="text"],
.auth .field input[type="password"] {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    box-shadow: var(--press);
    transition:
        border-color 0.12s,
        box-shadow 0.12s;
}

.auth .field input::placeholder {
    color: var(--ink-4);
}

.auth .field input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}

.auth .field input[aria-invalid="true"] {
    border-color: var(--bad);
}
.auth .field-error {
    color: var(--bad);
    font-size: 12.5px;
    margin-top: 6px;
}

.auth .check {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    color: var(--ink-2);
    margin-bottom: 22px;
    cursor: pointer;
}

.auth .check input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
}

.btn-block {
    width: 100%;
    justify-content: center;
    height: 44px;
    font-size: 14.5px;
}

.auth-foot {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--line-soft);
    font-size: 12.5px;
    color: var(--ink-4);
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.5;
}

.auth-theme {
    margin-inline-start: auto;
    display: flex;
    gap: 7px;
    flex-shrink: 0;
}

.swatch {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2px solid var(--line);
    cursor: pointer;
    padding: 0;
}

.swatch[data-set="green"] {
    background: #0d7d5f;
}
.swatch[data-set="blue"] {
    background: #3b6cf6;
}
.swatch[data-set="purple"] {
    background: #7a5af8;
}
.swatch[aria-pressed="true"] {
    border-color: var(--ink);
}

@media (max-width: 900px) {
    .auth {
        grid-template-columns: 1fr;
    }
    .auth-side {
        display: none;
    }
    .auth-panel {
        padding: 36px 22px;
        min-height: 100vh;
    }
}

/* ============================================================
   Operations KPIs
   ============================================================ */

.kpis {
    border-radius: var(--r-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(186px, 1fr));
    margin-bottom: 18px;
}

.kpi {
    padding: 16px 18px 17px;
    border-inline-end: 1px solid var(--line-soft);
    position: relative;
}

.kpi:last-child {
    border-inline-end: none;
}
.kpi:hover {
    background: var(--hover);
}

.kpi-k {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 9px;
    line-height: 1.35;
}

.kpi-k::before {
    content: "";
    margin-top: 6px;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--ink-4);
    opacity: 0.45;
}

.kpi.good .kpi-k::before {
    background: var(--good);
    opacity: 1;
}
.kpi.warn .kpi-k::before {
    background: var(--warn);
    opacity: 1;
}
.kpi.bad .kpi-k::before {
    background: var(--bad);
    opacity: 1;
}
.kpi.bad .kpi-v {
    color: var(--bad);
}

.kpi-k .ico {
    display: none;
}

.kpi-v {
    font-size: 26px;
    letter-spacing: -0.038em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.kpi-v .u,
.kpi-v small {
    font-size: 13px;
    font-weight: 550;
    color: var(--ink-4);
    letter-spacing: 0;
    margin-inline-start: 3px;
}
.kpi-v.none {
    color: var(--ink-4);
    font-weight: 550;
    font-size: 16px;
    white-space: nowrap;
}

.kpi-meter {
    height: 4px;
    border-radius: 999px;
    background: var(--sunk);
    margin-top: 12px;
    overflow: hidden;
    position: relative;
}

.kpi-meter i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--ink-4);
    opacity: 0.4;
    transition: width 400ms ease;
}
.kpi.good .kpi-meter i {
    background: var(--good);
    opacity: 1;
}
.kpi.warn .kpi-meter i {
    background: var(--warn);
    opacity: 1;
}
.kpi.bad .kpi-meter i {
    background: var(--bad);
    opacity: 1;
}
.kpi-meter span {
    display: none;
}

.kpi-f,
.kpi-t {
    font-size: 12.5px;
    color: var(--ink-3);
    margin-top: 10px;
    line-height: 1.45;
}

.kpi-f b {
    font-weight: 600;
    color: var(--ink-3);
}
.kpi-state {
    display: none;
}

/* KPIs as a tile grid inside a glass panel */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.kpi-grid .kpi {
    border-inline-end: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}
.kpi-grid .kpi:nth-child(3n) {
    border-inline-end: none;
}
.kpi-grid .kpi:nth-last-child(-n + 3) {
    border-bottom: none;
}

@media (max-width: 800px) {
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
    .kpi-grid .kpi:nth-child(3n) {
        border-inline-end: 1px solid var(--line-soft);
    }
    .kpi-grid .kpi:nth-child(2n) {
        border-inline-end: none;
    }
}

/* the dashboard split */
.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
    gap: 14px;
    align-items: start;
}
@media (max-width: 1100px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Earnings ledger and count strip
   ============================================================ */

.ledger {
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 18px;
}

.ledger-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.lg {
    padding: 17px 19px 18px;
    border-inline-end: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

.lg:hover {
    background: var(--hover);
}

.lg-k {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 8px;
    line-height: 1.35;
}

.lg-v {
    font-size: 26px;
    letter-spacing: -0.038em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.lg-v .u {
    font-size: 12px;
    font-weight: 550;
    color: var(--ink-4);
    letter-spacing: 0;
}

.lg.minus .lg-v::before {
    content: "−";
    color: var(--ink-4);
    font-weight: 500;
    margin-inline-end: 1px;
}
.lg.net {
    background: var(--sunk);
    box-shadow: inset 0 2px 0 var(--brand);
}
.lg.net .lg-k {
    color: var(--ink);
}
.lg.net .lg-v {
    color: var(--ink);
    font-size: 29px;
}

.lg-f {
    font-size: 13px;
    color: var(--ink-3);
    margin-top: 9px;
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: 1.45;
    flex-wrap: wrap;
}

.tiny {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12.5px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    opacity: 0.92;
}

.tiny.up {
    color: var(--good);
}
.tiny.down {
    color: var(--bad);
}
.tiny.flat {
    color: var(--ink-4);
}

.ledger-foot {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 19px;
    background: var(--sunk);
    font-size: 13.5px;
    color: var(--ink-3);
    flex-wrap: wrap;
}

.ledger-foot b {
    color: var(--ink);
    font-weight: 620;
    font-variant-numeric: tabular-nums;
}
.ledger-foot .sep {
    width: 1px;
    height: 15px;
    background: var(--line);
}

/* ---- counts ---- */

.tally {
    border-radius: var(--r-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
    margin-bottom: 18px;
}

.ty {
    padding: 15px 17px 16px;
    border-inline-end: 1px solid var(--line-soft);
    display: block;
}

.ty:last-child {
    border-inline-end: none;
}
.ty:hover {
    background: var(--hover);
}
.ty-v {
    font-size: 25px;
    letter-spacing: -0.038em;
    line-height: 1.12;
}
.ty-k {
    font-size: 13.5px;
    color: var(--ink);
    font-weight: 600;
    margin-top: 4px;
    line-height: 1.35;
}
.ty-f {
    font-size: 12.5px;
    color: var(--ink-3);
    margin-top: 3px;
    line-height: 1.4;
}

/* ============================================================
   Scan bar on the dashboard
   ============================================================ */

.scanbar {
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid var(--glass-line);
    box-shadow: var(--glass-shadow);
    border-radius: var(--r-lg);
    padding: 18px 20px 19px;
    margin-bottom: 18px;
    position: relative;
    overflow: visible;
    border-inline-start: 4px solid var(--brand);
}

.scanbar::before {
    display: none;
}

.scanbar-top {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 13px;
    flex-wrap: wrap;
}
.scanbar-top h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.028em;
    margin: 0;
}
.scanbar-top p {
    font-size: 13px;
    color: var(--ink-3);
    margin: 0;
}
.scanbar-top .go {
    margin-inline-start: auto;
    font-size: 13px;
    font-weight: 550;
    color: var(--brand);
    white-space: nowrap;
}

.scanbar-field {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    padding: 0 16px;
    border: 2px solid var(--line);
    border-radius: var(--r);
    background: var(--sunk);
    transition:
        border-color 0.12s,
        box-shadow 0.12s,
        background 0.12s;
}

.scanbar-field:focus-within {
    border-color: var(--brand);
    background: var(--glass-strong);
    box-shadow: 0 0 0 4px var(--brand-tint);
}

.scanbar-field > .ico {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: var(--brand);
}

.scanbar-field input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    outline: none;
    color: var(--ink);
    font: inherit;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.scanbar-field input::placeholder {
    color: var(--ink-4);
    font-weight: 400;
}
.scanbar-field .btn {
    flex-shrink: 0;
    height: 40px;
}

.scanbar-wrap {
    position: relative;
}

.hits {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-start: 0;
    inset-inline-end: 0;
    border-radius: var(--r);
    z-index: 50;
    overflow: hidden;
    max-height: 340px;
    overflow-y: auto;
}

.hits[hidden] {
    display: none;
}

.hit {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-soft);
    cursor: pointer;
}

.hit:last-child {
    border-bottom: none;
}
.hit:hover,
.hit.sel {
    background: var(--hover);
}
.hit-main {
    min-width: 0;
    flex: 1;
    display: block;
}
.hit-name {
    display: block;
    font-size: 14.5px;
    font-weight: 550;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    unicode-bidi: isolate;
}
.hit-code {
    display: block;
    unicode-bidi: isolate;
    font-size: 12.5px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

.hit-stock {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.032em;
    font-variant-numeric: tabular-nums;
    text-align: end;
    min-width: 54px;
}

.hit-stock.gone {
    color: var(--bad);
}
.hit-stock small {
    display: block;
    font-family: var(--font);
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ink-4);
    letter-spacing: 0;
}
.hit-price {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: end;
    min-width: 84px;
}

.hit-empty {
    padding: 20px 16px;
    text-align: center;
    font-size: 14px;
    color: var(--ink-3);
}
.hit-empty b {
    display: block;
    color: var(--ink);
    font-weight: 600;
    margin-bottom: 3px;
}

/* ---- palette: products alongside pages ---- */

.palette-head {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-4);
    padding: 11px 12px 6px;
}

.palette-head:first-child {
    padding-top: 6px;
}

.pi-main {
    min-width: 0;
    flex: 1;
    display: block;
}
.pi-name {
    display: block;
    font-size: 14px;
    font-weight: 550;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    unicode-bidi: isolate;
}
.pi-note {
    display: block;
    font-size: 12px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
    unicode-bidi: isolate;
}

.pi-stock {
    margin-inline-start: auto;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.pi-stock.gone {
    color: var(--bad);
}
.palette-none {
    padding: 22px 14px;
    text-align: center;
    font-size: 14px;
    color: var(--ink-3);
}

.palette-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    border-top: 1px solid var(--line-soft);
    background: var(--sunk);
    font-size: 12px;
    color: var(--ink-4);
    flex-wrap: wrap;
}

.palette-foot .kbd {
    margin-inline-end: 2px;
}
.palette-foot .palette-tip {
    margin-inline-start: auto;
    color: var(--ink-3);
}

/* ---- pagination ---- */

.pager {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-top: 1px solid var(--line-soft);
    background: var(--sunk);
    flex-wrap: wrap;
}

.pager-said {
    font-size: 13px;
    color: var(--ink-3);
}
.pager-said b {
    color: var(--ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.pager-steps {
    margin-inline-start: auto;
    display: flex;
    gap: 4px;
    align-items: center;
}

.step {
    min-width: 34px;
    height: 34px;
    padding: 0 11px;
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
    font-weight: 550;
    color: var(--ink-2);
    background: var(--glass-strong);
    box-shadow: inset 0 0 0 1px var(--line);
    font-variant-numeric: tabular-nums;
}

.step:hover {
    background: var(--hover);
    color: var(--ink);
}
.step.on {
    background: linear-gradient(160deg, var(--brand), var(--brand-deep));
    color: var(--brand-on);
    box-shadow: 0 6px 14px -8px var(--brand-glow);
    font-weight: 700;
}
.step.off {
    color: var(--ink-4);
    background: none;
    box-shadow: none;
    cursor: not-allowed;
}
.step.gap {
    background: none;
    box-shadow: none;
    color: var(--ink-4);
    min-width: 20px;
    padding: 0;
}

/* ============================================================
   Searchable dropdown
   ============================================================ */

.picker {
    position: relative;
    display: inline-block;
    min-width: 0;
}
.field .picker,
.af .picker {
    display: block;
}
.picker-real {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.picker-face {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    padding: 0 10px 0 11px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    text-align: start;
    box-shadow: var(--press);
}

.picker-face:hover {
    border-color: var(--ink-4);
}
.picker-face.is-empty .picker-text {
    color: var(--ink-4);
}
.picker-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.picker-arrow {
    width: 15px;
    height: 15px;
    color: var(--ink-4);
    flex: 0 0 15px;
}
.picker-face[aria-expanded="true"] {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}

/* inside a .field the face has no chrome of its own */
.field .picker-face {
    height: 100%;
    border: none;
    background: none;
    box-shadow: none;
    padding: 0;
    font-size: 13.5px;
}

.field .picker-face:hover {
    border: none;
}
.field .picker-face[aria-expanded="true"] {
    box-shadow: none;
}

.picker-pop {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-start: 0;
    min-width: 100%;
    width: max-content;
    max-width: 340px;
    background: var(--glass-strong);
    border-radius: var(--r);
    z-index: 90;
    overflow: hidden;
}

.picker-pop.up {
    top: auto;
    bottom: calc(100% + 6px);
}
.picker-pop[hidden] {
    display: none;
}

.picker-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 42px;
    border-bottom: 1px solid var(--line-soft);
}

.picker-search .ico {
    width: 15px;
    height: 15px;
    color: var(--ink-4);
    flex: 0 0 15px;
}

.picker-search input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    outline: none;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

.picker-list {
    max-height: 264px;
    overflow-y: auto;
    padding: 5px;
}

.picker-row {
    padding: 8px 11px;
    border-radius: var(--r-xs);
    font-size: 14px;
    color: var(--ink-2);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picker-row.at {
    background: var(--hover);
    color: var(--ink);
}
.picker-row.on {
    font-weight: 650;
    color: var(--ink);
}
.picker-row.on::after {
    content: "✓";
    float: inline-end;
    color: var(--brand);
}
.picker-none {
    padding: 18px 12px;
    text-align: center;
    font-size: 13.5px;
    color: var(--ink-4);
}

/* a panel holding a picker must not clip it */
.panel.adjust,
.panel:has(.picker),
.scanbox:has(.picker),
.found:has(.picker),
.ledger:has(.picker) {
    overflow: visible;
}

.panel.adjust .panel-top {
    border-start-start-radius: var(--r-lg);
    border-start-end-radius: var(--r-lg);
}

/* ============================================================
   Find a product
   ============================================================ */

.hunt {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 52px;
    padding: 0 8px 0 16px;
    border-radius: var(--r);
    margin-bottom: 8px;
    transition: box-shadow 0.14s;
}

.hunt:focus-within {
    box-shadow:
        var(--glass-shadow),
        0 0 0 3px var(--brand-tint);
}
.hunt > .ico {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    color: var(--brand);
}

.hunt input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    outline: none;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.hunt input::placeholder {
    color: var(--ink-4);
    font-weight: 400;
    letter-spacing: -0.01em;
}
.hunt .btn {
    height: 38px;
    border-radius: var(--r-sm);
    padding: 0 18px;
    font-size: 14px;
    flex-shrink: 0;
}
.hunt-note {
    font-size: 12.5px;
    color: var(--ink-4);
    margin: 0 0 14px 2px;
}

/* ---- the item ---- */

.item {
    margin-bottom: 18px;
}

.item-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    padding: 14px 18px 13px;
    flex-wrap: wrap;
}

.item-face {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: var(--r-sm);
    background: linear-gradient(145deg, var(--brand-tint), var(--hover));
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.item-id {
    min-width: 0;
    flex: 1;
}
.item-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.032em;
    line-height: 1.2;
    margin: 0;
    unicode-bidi: isolate;
}
.item-tags {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.tag-code {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: var(--hover);
    color: var(--ink-2);
    border-radius: var(--r-xs);
    padding: 3px 7px;
    font-variant-numeric: tabular-nums;
}

.tag-soft {
    font-size: 12.5px;
    color: var(--ink-3);
    unicode-bidi: isolate;
}
.item-go {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- the stock bar ---- */

.gauge {
    display: flex;
    align-items: stretch;
    gap: 20px;
    flex-wrap: wrap;
    padding: 13px 18px 15px;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    border-top: 1px solid var(--line-soft);
}

.gauge-left {
    flex: 1;
    min-width: 300px;
}

.gauge-nums {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    margin-bottom: 11px;
}
.gauge-one {
    min-width: 0;
}
.gauge-k {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-3);
    margin-bottom: 2px;
}

.gauge-v {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.036em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.gauge-v .u {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-4);
    letter-spacing: 0;
}
.gauge-f {
    font-size: 11.5px;
    color: var(--ink-4);
    margin-top: 3px;
}
.gauge-one.sell .gauge-v {
    color: var(--brand);
}
.gauge-one.sell.gone .gauge-v {
    color: var(--bad);
}
.gauge-one.sell.low .gauge-v {
    color: var(--warn);
}

.bar {
    height: 8px;
    border-radius: 999px;
    background: var(--hover);
    display: flex;
    overflow: hidden;
}
.bar i {
    height: 100%;
    display: block;
}
.bar .free {
    background: linear-gradient(90deg, var(--brand), var(--brand-deep));
}
.bar .held {
    background: var(--ink-4);
    opacity: 0.45;
}

.bar-key {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--ink-3);
}
.bar-key span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.bar-key i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}
.bar-key .free {
    background: var(--brand);
}
.bar-key .held {
    background: var(--ink-4);
    opacity: 0.45;
}

/* ---- the price panel inside the item card ---- */

.pricebox {
    flex: 0 0 262px;
    align-self: stretch;
    padding: 13px 16px 14px;
    border-radius: var(--r);
    background: var(--sunk);
    box-shadow: inset 0 0 0 1px var(--line-soft);
}

.pricebox.is-bad {
    background: var(--bad-bg);
    box-shadow: inset 0 0 0 1px rgba(192, 48, 74, 0.2);
}

.pricebox-k {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-3);
}

.pricebox-v {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.042em;
    line-height: 1.05;
    margin-top: 3px;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.pricebox-v .u {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-4);
    letter-spacing: 0;
}
.pricebox-sub {
    font-size: 11.5px;
    color: var(--ink-4);
    margin-top: 4px;
    line-height: 1.4;
}

.pricebox-split {
    display: flex;
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--hover);
    margin: 11px 0 8px;
}

.pricebox-split i {
    display: block;
    height: 100%;
}
.pricebox-split i.cost {
    background: var(--ink-4);
    opacity: 0.4;
}
.pricebox-split i.keep {
    background: var(--good);
}
.pricebox.is-bad .pricebox-split i.keep {
    background: var(--bad);
}

.pricebox-keep {
    display: flex;
    align-items: baseline;
    gap: 7px;
    font-size: 12.5px;
    color: var(--ink-3);
}
.pricebox-keep b {
    font-size: 17px;
    font-weight: 800;
    color: var(--good);
    letter-spacing: -0.028em;
    font-variant-numeric: tabular-nums;
}
.pricebox.is-bad .pricebox-keep b {
    color: var(--bad);
}
.pricebox-keep em {
    font-style: normal;
    font-weight: 700;
    color: var(--ink-4);
    font-size: 12px;
}
.pricebox-cost {
    font-size: 12px;
    color: var(--ink-4);
    margin-top: 3px;
}
.pricebox-cost b {
    color: var(--ink-3);
    font-weight: 700;
}
.pricebox-warn {
    font-size: 12px;
    font-weight: 700;
    color: var(--bad);
    margin-top: 7px;
}

@media (max-width: 900px) {
    .pricebox {
        flex: 1 1 100%;
    }
}

/* ---- versions ---- */

.kin {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin: 10px 0;
}
.kin-k {
    font-size: 13px;
    color: var(--ink-3);
    margin-inline-end: 3px;
}

.kin-one {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 30px;
    padding: 0 11px;
    border-radius: var(--r-sm);
    font-size: 13px;
}

.kin-one:hover {
    box-shadow: var(--lift-2);
}
.kin-name {
    font-weight: 600;
}
.kin-n {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--ink-3);
}
.kin-n.gone {
    color: var(--bad);
}
.kin-one .swatch {
    width: 13px;
    height: 13px;
}

/* ---- shelves as tiles ---- */

.shelves {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 9px;
}

.shelf {
    border-radius: var(--r);
    padding: 11px 13px 12px;
    position: relative;
}

.shelf.soon {
    border-inline-start: 3px solid var(--warn);
}
.shelf.past {
    border-inline-start: 3px solid var(--bad);
}

.shelf-top {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
}
.shelf-code {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.shelf-qty {
    margin-inline-start: auto;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.shelf-batch {
    font-size: 11.5px;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
}
.shelf-when {
    font-size: 11.5px;
    color: var(--ink-4);
    margin-top: 2px;
}
.shelf.soon .shelf-when {
    color: var(--warn);
    font-weight: 600;
}
.shelf.past .shelf-when {
    color: var(--bad);
    font-weight: 600;
}

.life {
    height: 3px;
    border-radius: 999px;
    background: var(--hover);
    margin-top: 8px;
    overflow: hidden;
}
.life i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--good);
}
.life i.soon {
    background: var(--warn);
}
.life i.past {
    background: var(--bad);
}

/* ---- timeline: stock movements (.trail-row) and order steps (.trail-step) ---- */

.trail {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 18px 14px;
}
.trail-row {
    display: flex;
    gap: 12px;
    position: relative;
    padding-bottom: 12px;
}
.trail-row:last-child {
    padding-bottom: 0;
}

.trail-row::before {
    content: "";
    position: absolute;
    inset-inline-start: 11px;
    top: 26px;
    bottom: 0;
    width: 2px;
    background: var(--line);
}

.trail-row:last-child::before {
    display: none;
}

.trail-pip {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--hover);
    color: var(--ink-3);
    z-index: 1;
}

.trail-pip .ico {
    width: 14px;
    height: 14px;
}
.trail-pip.up {
    background: var(--good-bg);
    color: var(--good);
}
.trail-pip.down {
    background: var(--bad-bg);
    color: var(--bad);
}
.trail-body {
    min-width: 0;
    flex: 1;
    padding-top: 3px;
}
.trail-what {
    font-size: 13.5px;
    font-weight: 600;
}
.trail-who {
    font-size: 11.5px;
    color: var(--ink-4);
    margin-top: 1px;
}

.trail-n {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    padding-top: 3px;
}

.trail-n.up {
    color: var(--good);
}
.trail-n.down {
    color: var(--bad);
}

/* ---- buyers ---- */

.buyer {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 18px;
    border-bottom: 1px solid var(--line-soft);
}
.buyer:last-child {
    border-bottom: none;
}
.buyer:hover {
    background: var(--hover);
}

.buyer-face {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 999px;
    background: var(--hover);
    color: var(--ink-2);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
}

.buyer-main {
    min-width: 0;
    flex: 1;
    display: block;
}
.buyer-name {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.buyer-when {
    display: block;
    font-size: 12.5px;
    color: var(--ink-4);
}
.buyer-n {
    display: block;
    text-align: end;
    flex-shrink: 0;
}
.buyer-units {
    display: block;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.buyer-times {
    display: block;
    font-size: 12px;
    color: var(--ink-4);
}

/* ---- nothing found ---- */

.nothing {
    border-radius: var(--r-lg);
    padding: 30px 24px 32px;
    text-align: center;
}

.nothing .ring {
    width: 48px;
    height: 48px;
    margin: 0 auto 13px;
    border-radius: 999px;
    background: var(--hover);
    color: var(--ink-4);
    display: grid;
    place-items: center;
}

.nothing .ring .ico {
    width: 28px;
    height: 28px;
}
.nothing h2 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 6px;
}
.nothing p {
    font-size: 13.5px;
    color: var(--ink-3);
    margin: 0 auto 16px;
    max-width: 46ch;
    line-height: 1.6;
}
.nothing .btn {
    margin: 0 4px;
}

/* ---- take stock out / put it back ---- */

.adjust {
    margin-bottom: 18px;
}

.adjust-form {
    display: flex;
    align-items: flex-end;
    gap: 11px;
    padding: 13px 18px 32px;
    flex-wrap: wrap;
    overflow: visible;
}

.af {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    position: relative;
}
.af.grow {
    flex: 1;
    min-width: 190px;
}
.af-k {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-2);
    white-space: nowrap;
}
.af-opt {
    font-weight: 400;
    color: var(--ink-4);
}

.af-in {
    height: 34px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    box-shadow: var(--press);
    min-width: 0;
}

.af-in:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}
input.af-in {
    width: 84px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.af.grow input.af-in {
    width: 100%;
    font-weight: 400;
}
.af .picker {
    min-width: 150px;
}
.af .picker-face.is-af {
    height: 34px;
}

.swap {
    display: inline-flex;
    padding: 3px;
    background: var(--hover);
    border-radius: var(--r-sm);
    gap: 2px;
}
.swap label {
    cursor: pointer;
    margin: 0;
}
.swap input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.swap span {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 11px;
    border-radius: var(--r-xs);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-3);
    white-space: nowrap;
}

.swap input:checked + span {
    background: var(--glass-strong);
    box-shadow: var(--tab-shadow);
}
.swap label:first-child input:checked + span {
    color: var(--bad);
}
.swap label:last-child input:checked + span {
    color: var(--good);
}
.swap input:focus-visible + span {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}

.af-go {
    height: 34px;
    flex-shrink: 0;
}

.af-why {
    position: absolute;
    top: 100%;
    inset-inline-start: 2px;
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--ink-4);
    max-width: 190px;
    line-height: 1.3;
    pointer-events: none;
}

/* ---- an inline nudge toward the right tool ---- */

.hintline {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 18px;
    padding: 10px 13px;
    border-radius: var(--r-sm);
    background: var(--brand-tint);
    font-size: 13px;
    color: var(--brand-ink);
    flex-wrap: wrap;
}

.hintline .ico {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}
.hintline b {
    font-weight: 700;
}
.hintline span {
    flex: 1;
    min-width: 200px;
}
.hintline .btn {
    flex-shrink: 0;
}

/* ============================================================
   Till gate — opening and closing a shift
   ============================================================ */

.tillgate {
    display: flex;
    justify-content: center;
    padding: 8px 0 40px;
}

.gate {
    width: 100%;
    max-width: 520px;
    border-radius: var(--r-lg);
    padding: 28px 30px 30px;
    text-align: center;
}

.gate-mark {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: var(--r);
    background: var(--brand-tint);
    color: var(--brand);
    display: grid;
    place-items: center;
}

.gate-mark .ico {
    width: 25px;
    height: 25px;
}
.gate-mark.is-open {
    background: var(--warn-bg);
    color: var(--warn);
}
.gate-mark.is-good {
    background: var(--good-bg);
    color: var(--good);
}
.gate-mark.is-warn {
    background: var(--bad-bg);
    color: var(--bad);
}
.gate-mark.is-flat {
    background: var(--hover);
    color: var(--ink-4);
}

.gate h1 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.032em;
    margin: 0 0 8px;
}
.gate p {
    font-size: 14px;
    color: var(--ink-3);
    line-height: 1.6;
    margin: 0 auto 18px;
    max-width: 42ch;
}
.gate p b {
    color: var(--ink);
    font-weight: 700;
}

.gate-who {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--ink-4);
    margin-bottom: 20px;
}

.gate-who b {
    color: var(--ink-2);
    font-weight: 700;
}

.gate-sums {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 1px;
    background: var(--line-soft);
    border-radius: var(--r-sm);
    overflow: hidden;
    margin-bottom: 20px;
}

.gs {
    background: var(--glass-strong);
    padding: 11px 12px 13px;
    text-align: start;
}
.gs-k {
    font-size: 11.5px;
    color: var(--ink-3);
    font-weight: 600;
    margin-bottom: 4px;
}
.gs-v {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.gs.strong {
    background: var(--sunk);
}
.gs.strong .gs-v {
    color: var(--brand);
}
.gs.over .gs-v {
    color: var(--good);
}
.gs.under .gs-v {
    color: var(--bad);
}

.gate-form {
    text-align: start;
}
.gate-k {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 9px;
}

.gate-money {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gate-money input {
    flex: 1;
    min-width: 0;
    height: 58px;
    padding: 0 15px;
    border: 2px solid var(--line);
    border-radius: var(--r);
    background: var(--sunk);
    color: var(--ink);
    font: inherit;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    text-align: end;
}

.gate-money input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--glass-strong);
    box-shadow: 0 0 0 4px var(--brand-tint);
}

.gate-cur {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-4);
    flex-shrink: 0;
}
.gate-bad {
    font-size: 13px;
    color: var(--bad);
    margin-top: 8px;
}

.gate-diff {
    font-size: 13.5px;
    font-weight: 600;
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: var(--r-sm);
}
.gate-diff.ok {
    background: var(--good-bg);
    color: var(--good-ink);
}
.gate-diff.over {
    background: var(--warn-bg);
    color: var(--warn-ink);
}
.gate-diff.under {
    background: var(--bad-bg);
    color: var(--bad-ink);
}

.gate-quick {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--ink-4);
}

.gate-go {
    width: 100%;
    height: 48px;
    margin-top: 20px;
    font-size: 15px;
}
.gate-back {
    display: inline-block;
    margin-top: 14px;
    font-size: 13.5px;
    color: var(--ink-3);
}
.gate-back:hover {
    color: var(--brand);
}
.gate-quiet {
    font-size: 13.5px;
    color: var(--ink-4);
}

.gate-panel {
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    overflow: hidden;
    margin-bottom: 6px;
    text-align: start;
}
.gate-panel-top {
    padding: 9px 14px;
    background: var(--sunk);
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-3);
}
.gate-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-top: 1px solid var(--line-soft);
    font-size: 13.5px;
}
.gate-line b {
    margin-inline-start: auto;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.gate-line.sub {
    color: var(--ink-3);
    font-size: 13px;
}

/* ============================================================
   The till
   ============================================================ */

.till {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 352px;
    gap: 14px;
    align-items: start;
}

@media (max-width: 1100px) {
    .till {
        grid-template-columns: 1fr;
    }
}

.till-left {
    min-width: 0;
}

.till-msg {
    margin: 8px 0 0;
    padding: 9px 13px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    font-weight: 600;
}

.till-msg.good {
    background: var(--good-bg);
    color: var(--good-ink);
}
.till-msg.bad {
    background: var(--bad-bg);
    color: var(--bad-ink);
}

.cart {
    border-radius: var(--r-lg);
    margin-top: 12px;
    overflow: hidden;
    min-height: 320px;
}

.cart-empty {
    padding: 54px 20px;
    text-align: center;
}
.cart-empty-mark {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: var(--hover);
    color: var(--ink-4);
    display: grid;
    place-items: center;
}
.cart-empty-mark .ico {
    width: 22px;
    height: 22px;
}
.cart-empty b {
    display: block;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}
.cart-empty span {
    font-size: 13.5px;
    color: var(--ink-3);
}

.cl {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--line-soft);
}

.cl:last-child {
    border-bottom: none;
}
.cl:hover {
    background: var(--hover);
}
.cl-id {
    flex: 1;
    min-width: 0;
}
.cl-id .pic-row {
    gap: 9px;
}
.cl-id .twoline .a {
    font-size: 14px;
}
.cl-name {
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    unicode-bidi: isolate;
}
.cl-sku {
    font-size: 12px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
}

.cl-opts {
    display: inline-flex;
    gap: 4px;
    margin-inline-end: 6px;
    vertical-align: middle;
}
.cl-opts .vchip {
    height: 19px;
    font-size: 10.5px;
    padding: 0 6px;
}
.cl-opts .swatch {
    width: 10px;
    height: 10px;
}

.cl-qty {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.cl-qty button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    background: var(--glass-strong);
    color: var(--ink-2);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.cl-qty button:first-child {
    border-radius: var(--r-sm) 0 0 var(--r-sm);
}
.cl-qty button:last-child {
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
body[dir="rtl"] .cl-qty button:first-child {
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
body[dir="rtl"] .cl-qty button:last-child {
    border-radius: var(--r-sm) 0 0 var(--r-sm);
}
.cl-qty button:hover {
    background: var(--hover);
    color: var(--ink);
}

.cl-qty input {
    width: 54px;
    height: 32px;
    border: 1px solid var(--line);
    border-inline-start: none;
    border-inline-end: none;
    background: var(--glass-strong);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
    outline: none;
    min-width: 0;
}

.cl-each {
    width: 84px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    text-align: end;
    font-size: 13px;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.cl-price {
    width: 104px;
    height: 34px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: end;
    font-variant-numeric: tabular-nums;
}

.cl-price:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}

.cl-was {
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}
.cl-was.down {
    color: var(--bad);
}
.cl-was.up {
    color: var(--good);
}

.cl-sum {
    width: 96px;
    text-align: end;
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.cl-x {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: var(--ink-4);
    font-size: 19px;
    cursor: pointer;
    border-radius: var(--r-xs);
    flex-shrink: 0;
}

.cl-x:hover {
    background: var(--bad-bg);
    color: var(--bad);
}

/* ---- the payment rail ---- */

.pay {
    border-radius: var(--r-lg);
    padding: 14px 16px 16px;
    position: sticky;
    top: 74px;
}

.pay-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line-soft);
}
.pay-shift {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--ink-3);
    min-width: 0;
}
.pay-shift .ico {
    width: 15px;
    height: 15px;
    color: var(--brand);
    flex-shrink: 0;
}
.pay-close {
    margin-inline-start: auto;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-4);
    white-space: nowrap;
}
.pay-close:hover {
    color: var(--bad);
}

.pay-who {
    margin: 12px 0 14px;
}
.pay-who .af-k {
    display: block;
    margin-bottom: 5px;
}
.pay-who .af-in,
.pay-who .picker {
    width: 100%;
}

.pay-sums {
    border-top: 1px solid var(--line-soft);
    padding-top: 11px;
}
.ps {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    font-size: 13.5px;
    color: var(--ink-2);
}
.ps b {
    margin-inline-start: auto;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.ps b.down {
    color: var(--bad);
}
.ps b.up {
    color: var(--good);
}
.ps-in {
    margin-inline-start: auto;
}

.ps-in input {
    width: 108px;
    height: 30px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    color: var(--ink);
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    text-align: end;
    font-variant-numeric: tabular-nums;
}

.ps-in input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}

.pay-total {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 11px 0 14px;
    padding: 11px 13px;
    border-radius: var(--r-sm);
    background: var(--sunk);
}

.pay-total span {
    font-size: 14px;
    font-weight: 700;
}
.pay-total b {
    margin-inline-start: auto;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
}

.pay-methods .af-k {
    display: block;
    margin-bottom: 7px;
}
.chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.chip-pick {
    cursor: pointer;
}
.chip-pick input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip-pick span {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--r-sm);
    background: var(--hover);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.chip-pick input:checked + span {
    background: linear-gradient(160deg, var(--brand), var(--brand-deep));
    color: var(--brand-on);
}
.chip-pick input:focus-visible + span {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.pay-cash {
    margin-top: 14px;
}
.pay-cash .af-k {
    display: block;
    margin-bottom: 7px;
}
.pay-cash .gate-money input {
    height: 48px;
    font-size: 23px;
}
.quickcash {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 9px;
}

.change {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 11px;
    padding: 10px 13px;
    border-radius: var(--r-sm);
    background: var(--good-bg);
    color: var(--good-ink);
    font-size: 13.5px;
    font-weight: 600;
}

.change b {
    margin-inline-start: auto;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.change.short {
    background: var(--bad-bg);
    color: var(--bad-ink);
}

/* why the till cannot take the money yet */
.pay-whynot {
    margin: 0 0 9px;
    padding: 9px 11px;
    border-radius: var(--r-sm);
    background: var(--warn-bg);
    color: var(--warn-ink);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
}

.pay-go {
    width: 100%;
    height: 52px;
    margin-top: 15px;
    font-size: 16px;
}
.pay-go:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* ---- the receipt confirmation ---- */

.done {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, 92vw);
    background: var(--glass-strong);
    border-radius: var(--r-lg);
    padding: 30px 28px 26px;
    text-align: center;
    z-index: 95;
}

.done[hidden] {
    display: none;
}

.done-mark {
    width: 56px;
    height: 56px;
    margin: 0 auto 15px;
    border-radius: 999px;
    background: var(--good-bg);
    color: var(--good);
    display: grid;
    place-items: center;
}

.done-mark .ico {
    width: 28px;
    height: 28px;
}
.done h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.032em;
    margin: 0 0 10px;
}

.done-change {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 13px 16px;
    border-radius: var(--r-sm);
    background: var(--warn-bg);
    color: var(--warn-ink);
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
}

.done-change b {
    margin-inline-start: auto;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
}

/* what the customer still owes */
.done-owed {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 11px 14px;
    margin-bottom: 10px;
    border-radius: var(--r);
    background: var(--warn-bg);
    color: var(--warn-ink);
    font-size: 13.5px;
    font-weight: 650;
}
.done-owed b {
    margin-inline-start: auto;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.done-warning {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    background: var(--bad-bg);
    color: var(--bad-ink);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.45;
}

.done-sub {
    font-size: 13px;
    color: var(--ink-4);
    margin: 0 0 18px;
    font-variant-numeric: tabular-nums;
}
.done-go {
    display: flex;
    gap: 8px;
}
.done-go .btn {
    flex: 1;
    height: 44px;
}

/* ---- topbar extras ---- */

.pane-toggle {
    width: 34px;
    height: 34px;
    border: none;
    background: none;
    border-radius: var(--r-sm);
    color: var(--ink-3);
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.pane-toggle:hover {
    background: var(--hover);
    color: var(--ink);
}

.topbar .ibtn {
    border: none;
    background: none;
    box-shadow: none;
    width: 34px;
    height: 34px;
    border-radius: var(--r-sm);
}
.topbar .ibtn:hover {
    background: var(--hover);
}

.me-chip {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(140deg, var(--brand), var(--brand-deep));
    color: var(--brand-on);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 12px -4px var(--brand-glow);
}

.shell.tucked .sidebar {
    width: 0;
    flex: 0 0 0;
    overflow: hidden;
    border: none;
}

.topbar .finder {
    flex: 0 1 340px;
    min-width: 0;
}
.topbar .finder span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar .tools {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

@media (max-width: 820px) {
    .topbar .finder {
        flex: 0 0 44px;
        min-width: 44px;
        justify-content: center;
        padding: 0;
    }
    .topbar .finder span,
    .topbar .finder .kbd {
        display: none;
    }
}

/* ============================================================
   Shared page furniture
   ============================================================ */

.phead {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.phead h1 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.036em;
    margin: 0;
    line-height: 1.15;
}
body[dir="rtl"] .phead h1 {
    font-family: var(--font-rtl);
    letter-spacing: 0;
}
.phead p {
    font-size: 14px;
    color: var(--ink-3);
    margin: 5px 0 0;
}
.phead-go {
    margin-inline-start: auto;
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ---- amber notice ---- */

.notice {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 16px;
    border-radius: var(--r);
    background: var(--warn-bg);
    color: var(--warn-ink);
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 14px;
    box-shadow: inset 0 0 0 1px rgba(154, 103, 0, 0.18);
}

.notice .ico {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}
.notice b {
    font-weight: 700;
}
.notice.info {
    background: var(--brand-tint);
    color: var(--brand-ink);
    box-shadow: inset 0 0 0 1px
        color-mix(in srgb, var(--brand) 18%, transparent);
}

/* ---- light stat strip ----
   Scoped to .statline so it never collides with the .st status pill
   used in tables and on the order page. */

.statline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 14px;
}

.statline > .st {
    padding: 15px 18px 17px;
    border-inline-end: 1px solid var(--line-soft);
}
.statline > .st:last-child {
    border-inline-end: none;
}
.st-v {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.038em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}
.st-k {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin-top: 6px;
}
.statline > .st.bad .st-v {
    color: var(--bad);
}
.statline > .st.warn .st-v {
    color: var(--warn);
}
.statline > .st.good .st-v {
    color: var(--good);
}
.statline > .st.brand .st-v {
    color: var(--brand);
}

/* ---- dark work banner — every work screen's header ---- */

.workbar {
    background:
        radial-gradient(90% 130% at 0% 0%, var(--brand-glow), transparent 60%),
        radial-gradient(
            60% 80% at 100% 100%,
            var(--accent-glow),
            transparent 60%
        ),
        linear-gradient(180deg, var(--side), var(--side-deep));
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 14px;
    color: #fff;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 20px 44px -22px rgba(4, 16, 11, 0.6);
    animation: rise 460ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.workbar-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.workbar-title {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.62);
    display: flex;
    align-items: center;
    gap: 8px;
}
.workbar-title b {
    color: #fff;
    font-weight: 700;
}
.workbar-title .dot {
    opacity: 0.4;
}
.workbar-go {
    margin-inline-start: auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.workbar-go .btn,
.workbar .btn {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: none;
}

.workbar-go .btn:hover,
.workbar .btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}
.workbar-go .btn .ico {
    color: rgba(255, 255, 255, 0.72);
}
.workbar .btn-go {
    background: linear-gradient(160deg, var(--brand), var(--brand-deep));
    border-color: transparent;
    color: var(--brand-on);
}
.workbar .btn-go .ico {
    color: inherit;
}

.workbar-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.wb {
    padding: 14px 18px 16px 17px;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.07);
    position: relative;
    display: block;
}

.wb:last-child {
    border-inline-end: none;
}
.wb:hover {
    background: rgba(255, 255, 255, 0.04);
}

.wb::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 14px;
    width: 3px;
    height: 20px;
    border-radius: 0 2px 2px 0;
    background: rgba(255, 255, 255, 0.2);
}
body[dir="rtl"] .wb::before,
body[dir="rtl"] .hs::before {
    border-radius: 2px 0 0 2px;
}

.wb.bad::before {
    background: var(--dk-bad);
    box-shadow: 0 0 12px var(--dk-bad);
}
.wb.warn::before {
    background: var(--dk-warn);
    box-shadow: 0 0 12px var(--dk-warn);
}
.wb.info::before {
    background: var(--dk-info);
    box-shadow: 0 0 12px var(--dk-info);
}
.wb.brand::before {
    background: var(--dk-brand);
    box-shadow: 0 0 12px var(--dk-brand);
}
.wb.good::before {
    background: var(--dk-good);
    box-shadow: 0 0 12px var(--dk-good);
}
.wb.zero::before {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.wb-v {
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.038em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    color: #fff;
}
.wb.bad .wb-v {
    color: var(--dk-bad);
}
.wb.warn .wb-v {
    color: var(--dk-warn);
}
.wb.info .wb-v {
    color: var(--dk-info);
}
.wb.brand .wb-v {
    color: var(--dk-brand);
}
.wb.good .wb-v {
    color: var(--dk-good);
}
.wb.zero .wb-v {
    color: rgba(255, 255, 255, 0.38);
}
.wb-k {
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    margin-top: 4px;
}
.wb-f {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.42);
    margin-top: 3px;
    line-height: 1.4;
}

/* ---- filter card ---- */

.filterbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--r-lg);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.filterbar .field {
    box-shadow: none;
}
.filterbar .field.grow {
    flex: 1;
    min-width: 210px;
    max-width: 380px;
}
.filterbar .helper {
    margin-inline-start: auto;
}

.tick {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 13.5px;
    color: var(--ink-2);
    cursor: pointer;
    white-space: nowrap;
    background: var(--glass-strong);
}

.tick input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
    margin: 0;
}
.tick:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-tint);
    color: var(--brand-ink);
}

/* ---- list table ---- */

.list {
    border-radius: var(--r-lg);
    overflow: hidden;
}
.list table {
    width: 100%;
    border-collapse: collapse;
}

.list thead th {
    text-align: start;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-4);
    padding: 11px 16px;
    background: var(--sunk);
    border-bottom: 1px solid var(--line-soft);
    white-space: nowrap;
}

.list tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
    vertical-align: middle;
}
.list tbody tr:last-child td {
    border-bottom: none;
}
.list tbody tr:hover td {
    background: var(--hover);
}
.list .r {
    text-align: end;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.list .b {
    font-weight: 700;
}
.list .dim {
    color: var(--ink-3);
}

.list tbody tr.needs td:first-child {
    box-shadow: inset 3px 0 0 var(--warn);
}
.list tbody tr.late td:first-child {
    box-shadow: inset 3px 0 0 var(--bad);
}
body[dir="rtl"] .list tbody tr.needs td:first-child {
    box-shadow: inset -3px 0 0 var(--warn);
}
body[dir="rtl"] .list tbody tr.late td:first-child {
    box-shadow: inset -3px 0 0 var(--bad);
}

/* keyboard row focus */
tr.is-focus {
    outline: 2px solid var(--brand);
    outline-offset: -2px;
    background: var(--hover);
}

.rowlink,
a.rowlink {
    font-weight: 700;
    color: var(--brand-ink);
    font-variant-numeric: tabular-nums;
}
.rowlink:hover {
    color: var(--brand);
    text-decoration: underline;
}
.rowsub {
    font-size: 12px;
    color: var(--ink-4);
    margin-top: 2px;
}

.rowmenu {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    background: var(--glass-strong);
    border-radius: var(--r-sm);
    color: var(--ink-4);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.rowmenu:hover {
    background: var(--hover);
    color: var(--ink);
}
.rowmenu .ico {
    width: 15px;
    height: 15px;
}

.nextup {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--ink-4);
    margin-top: 4px;
}
.nextup b {
    color: var(--brand);
    font-weight: 700;
}
.nextup .ico {
    width: 13px;
    height: 13px;
}

/* row actions that reveal on hover, always on touch */
.rowacts {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    opacity: 0.55;
    transition: opacity 120ms ease;
}
tr:hover .rowacts,
tr:focus-within .rowacts {
    opacity: 1;
}
@media (hover: none) {
    .rowacts {
        opacity: 1;
    }
}
.rowact {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--glass-strong);
    color: var(--ink-3);
    display: grid;
    place-items: center;
    cursor: pointer;
    text-decoration: none;
}
.rowact:hover {
    color: var(--brand);
    border-color: var(--brand);
}
.rowact.go {
    background: linear-gradient(160deg, var(--brand), var(--brand-deep));
    border-color: transparent;
    color: var(--brand-on);
}
.rowact.go:hover {
    filter: brightness(1.06);
    color: var(--brand-on);
}

/* shortcut legend */
.keys {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: var(--ink-4);
    padding: 10px 4px 0;
}
.keys kbd {
    font: 600 10.5px/1 var(--font);
    padding: 3px 6px;
    border-radius: 5px;
    background: var(--sunk);
    border: 1px solid var(--line);
    color: var(--ink-3);
}

/* ---- centred empty state inside a card ---- */

.blank {
    padding: 46px 24px 50px;
    text-align: center;
}
.blank .ico {
    width: 26px;
    height: 26px;
    color: var(--ink-4);
    margin-bottom: 12px;
}
.blank b {
    display: block;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 7px;
}
.blank p {
    font-size: 13.5px;
    color: var(--ink-3);
    margin: 0 auto;
    max-width: 52ch;
    line-height: 1.6;
}
.blank .btn {
    margin-top: 18px;
}

/* ---- odds and ends the list pages need ---- */

.twoline {
    display: block;
    min-width: 0;
}
.twoline .a,
.twoline .b {
    display: block;
}
.twoline .a {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    unicode-bidi: isolate;
}
.twoline .b {
    font-size: 12px;
    color: var(--ink-4);
    margin-top: 2px;
    unicode-bidi: isolate;
}

.formcard {
    border-radius: var(--r-lg);
    padding: 18px 20px 20px;
    margin-bottom: 14px;
}
.formcard h2 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
}
.formcard p.lede {
    font-size: 13.5px;
    color: var(--ink-3);
    margin: 0 0 16px;
}

.fgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}
.fgrid.wide {
    grid-template-columns: 1fr;
}
.fld {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.fld > label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-2);
}
.fld .hint {
    font-size: 11.5px;
    color: var(--ink-4);
}

.fld input[type="text"],
.fld input[type="number"],
.fld input[type="date"],
.fld input[type="email"],
.fld input[type="tel"],
.fld input[type="password"],
.fld select,
.fld textarea {
    height: 38px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    width: 100%;
    box-shadow: var(--press);
}

.fld textarea {
    height: auto;
    min-height: 84px;
    padding: 9px 11px;
    resize: vertical;
}
.fld input:focus,
.fld select:focus,
.fld textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}
.fld .err {
    font-size: 12px;
    color: var(--bad);
}
.fld input[aria-invalid="true"],
.fld select[aria-invalid="true"] {
    border-color: var(--bad);
}

.formgo {
    display: flex;
    gap: 9px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.formgo .btn {
    min-width: 120px;
    justify-content: center;
}

.detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 14px;
    align-items: start;
}
@media (max-width: 1080px) {
    .detail {
        grid-template-columns: 1fr;
    }
}

/* order page: two columns that collapse */
.order-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 14px;
    align-items: start;
}
@media (max-width: 1000px) {
    .order-grid {
        grid-template-columns: 1fr;
    }
}

.facts {
    border-radius: var(--r-lg);
    overflow: hidden;
}
.facts-top {
    padding: 12px 16px;
    background: transparent;
    border-bottom: 1px solid var(--line-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-4);
}
.fact {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 13.5px;
}
.fact:last-child {
    border-bottom: none;
}
.fact span {
    color: var(--ink-3);
}
.fact b {
    margin-inline-start: auto;
    font-weight: 700;
    text-align: end;
    font-variant-numeric: tabular-nums;
}
.fact.big b {
    font-size: 18px;
    letter-spacing: -0.025em;
}

.money-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 9px 16px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 13.5px;
}
.money-row:last-child {
    border-bottom: none;
}
.money-row b {
    margin-inline-start: auto;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.money-row.total {
    background: var(--sunk);
    border-top: 2px solid var(--ink);
    font-size: 15px;
}
.money-row.total b {
    font-size: 19px;
    letter-spacing: -0.025em;
    color: var(--brand);
}

/* ---- report index cards ---- */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 12px;
}

.card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 16px;
    border-radius: var(--r-lg);
    transition:
        box-shadow 0.14s,
        transform 0.14s;
}

.card:hover {
    box-shadow: var(--lift-2);
    transform: translateY(-1px);
}

.card-ico {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: var(--r-sm);
    background: var(--brand-tint);
    color: var(--brand);
    display: grid;
    place-items: center;
}

.card-ico .ico {
    width: 19px;
    height: 19px;
}
.card-text {
    flex: 1;
    min-width: 0;
}
.card-text b {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.015em;
}
.card-text span {
    display: block;
    font-size: 12.5px;
    color: var(--ink-3);
    margin-top: 2px;
    line-height: 1.4;
}
.card > .ico {
    width: 16px;
    height: 16px;
    color: var(--ink-4);
    flex-shrink: 0;
}
body[dir="rtl"] .card > .ico {
    transform: scaleX(-1);
}
.card-top h3 {
    font-size: 15.5px;
    margin: 0;
}

/* ---- product thumbnails ---- */

.thumb {
    display: block;
    flex-shrink: 0;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--hover);
    position: relative;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb.blank-thumb {
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--ink-4);
    letter-spacing: -0.02em;
    background: linear-gradient(145deg, var(--hover), var(--sunk));
}

.thumb.sm {
    width: 34px;
    height: 34px;
    font-size: 13px;
}
.thumb.md {
    width: 44px;
    height: 44px;
    font-size: 16px;
}
.thumb.lg {
    width: 72px;
    height: 72px;
    font-size: 26px;
    border-radius: var(--r);
}
.thumb.xl {
    width: 108px;
    height: 108px;
    font-size: 38px;
    border-radius: var(--r);
}

/* a row that leads with a picture */
.pic-row {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}
.pic-row .twoline {
    min-width: 0;
    flex: 1;
}

/* gallery on a detail page */
.gallery {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.gallery .thumb {
    width: 64px;
    height: 64px;
    box-shadow: inset 0 0 0 1px var(--line);
    cursor: zoom-in;
}

/* ---- small action buttons at the end of a row ---- */

.rowgo {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}
.rowgo form {
    display: inline-flex;
    margin: 0;
}

.rgo {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    background: var(--glass-strong);
    border-radius: var(--r-sm);
    color: var(--ink-3);
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    flex-shrink: 0;
}

.rgo .ico {
    width: 15px;
    height: 15px;
}
.rgo:hover {
    background: var(--hover);
    color: var(--ink);
    border-color: var(--ink-4);
}
.rgo.go:hover {
    background: var(--brand-tint);
    color: var(--brand);
    border-color: var(--brand);
}
.rgo.warn:hover {
    background: var(--warn-bg);
    color: var(--warn);
    border-color: var(--warn);
}
.rgo.bad:hover {
    background: var(--bad-bg);
    color: var(--bad);
    border-color: var(--bad);
}
.rgo.good:hover {
    background: var(--good-bg);
    color: var(--good);
    border-color: var(--good);
}

/* ---- filter drawer ---- */

.filterbar.deep {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    flex-wrap: nowrap;
}
.filter-main {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    flex-wrap: wrap;
}
.filter-main .field.grow {
    flex: 1;
    min-width: 210px;
    max-width: 380px;
}
.filter-main .helper {
    margin-inline-start: auto;
}

.more-filters {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.more-filters:hover {
    background: var(--hover);
}
.more-filters .ico {
    width: 15px;
    height: 15px;
}
.more-filters .n {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--brand);
    color: var(--brand-on);
    font-size: 11px;
    font-weight: 700;
}

.filter-deep {
    display: none;
    padding: 13px 14px;
    border-top: 1px solid var(--line-soft);
}
.filter-deep.open {
    display: block;
}
.filter-deep .fgrid {
    gap: 11px;
}
.filter-deep .fld > label {
    font-size: 11.5px;
}
.filter-deep .fld input,
.filter-deep .fld select {
    height: 34px;
}

.chipline {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    padding: 0 14px 12px;
}
.chipline-k {
    font-size: 12px;
    color: var(--ink-4);
    margin-inline-end: 2px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 27px;
    padding: 0 6px 0 10px;
    border-radius: 999px;
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-size: 12.5px;
    font-weight: 600;
}

.pill a {
    color: inherit;
    opacity: 0.6;
    font-size: 15px;
    line-height: 1;
    padding: 0 3px;
}
.pill a:hover {
    opacity: 1;
}

/* ============================================================
   Filled status pills — colour carries the meaning
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 25px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 650;
    letter-spacing: -0.005em;
    white-space: nowrap;
    background: var(--hover);
    color: var(--ink-2);
    box-shadow: none;
}

.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    flex-shrink: 0;
    opacity: 0.85;
}

.badge.good {
    background: var(--good-bg);
    color: var(--good-ink);
}
.badge.warn {
    background: var(--warn-bg);
    color: var(--warn-ink);
}
.badge.bad {
    background: var(--bad-bg);
    color: var(--bad-ink);
}
.badge.info {
    background: var(--info-bg);
    color: var(--info-ink);
}
.badge.brand {
    background: var(--brand-tint);
    color: var(--brand-ink);
}
.badge.neutral,
.badge.plain {
    background: var(--hover);
    color: var(--ink-3);
}
.badge.plain::before,
.badge.neutral::before {
    display: none;
}

/* the strongest state on a page gets a solid pill */
.badge.solid {
    color: #fff;
}
.badge.solid::before {
    background: rgba(255, 255, 255, 0.8);
}
.badge.solid.good {
    background: var(--good);
}
.badge.solid.warn {
    background: var(--warn);
}
.badge.solid.bad {
    background: var(--bad);
}
.badge.solid.info {
    background: var(--info);
}
.badge.solid.brand {
    background: linear-gradient(160deg, var(--brand), var(--brand-deep));
    color: var(--brand-on);
}
[data-mode="dark"] .badge.solid {
    color: #0b110f;
}
[data-mode="dark"] .badge.solid::before {
    background: rgba(0, 0, 0, 0.55);
}

/* ---- what happens next, with the button to do it ---- */

.nextstep {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}
.nextstep .arrow {
    color: var(--ink-4);
    flex-shrink: 0;
}
.nextstep .arrow .ico {
    width: 14px;
    height: 14px;
}
body[dir="rtl"] .nextstep .arrow .ico {
    transform: scaleX(-1);
}
.nextstep-label {
    font-size: 12.5px;
    color: var(--ink-4);
}
.nextstep-label b {
    color: var(--brand);
    font-weight: 700;
}

.go-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 13px;
    border-radius: var(--r-sm);
    background: linear-gradient(160deg, var(--brand), var(--brand-deep));
    color: var(--brand-on);
    font-size: 13px;
    font-weight: 650;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 6px 14px -8px var(--brand-glow);
}

.go-btn:hover {
    filter: brightness(1.06);
}
.go-btn .ico {
    width: 14px;
    height: 14px;
}
.go-btn.quiet {
    background: var(--glass-strong);
    color: var(--brand);
    box-shadow: inset 0 0 0 1px var(--brand);
}
.go-btn.quiet:hover {
    background: var(--brand-tint);
}
.go-btn.dashed {
    background: none;
    color: var(--ink-3);
    box-shadow: none;
    border: 1px dashed var(--ink-4);
}
.go-btn.dashed:hover {
    color: var(--brand);
    border-color: var(--brand);
}

/* ---- a note under a row that needs attention ---- */

.rownote {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-top: 4px;
}
.rownote .ico {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
.rownote.warn {
    color: var(--warn);
}
.rownote.bad {
    color: var(--bad);
}
.rownote.dim {
    color: var(--ink-4);
}

/* ---- product cards, for browsing by picture ---- */

.viewswap {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: var(--hover);
    border-radius: var(--r-sm);
}

.viewswap a {
    width: 32px;
    height: 32px;
    border-radius: var(--r-xs);
    display: grid;
    place-items: center;
    color: var(--ink-3);
}

.viewswap a.on {
    background: var(--glass-strong);
    color: var(--ink);
    box-shadow: var(--tab-shadow);
}
.viewswap .ico {
    width: 15px;
    height: 15px;
}

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 12px;
}

.tile {
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        box-shadow 0.14s,
        transform 0.14s;
}

.tile:hover {
    box-shadow: var(--lift-2);
    transform: translateY(-2px);
}

.tile-pic {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--hover);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.tile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tile-pic .letter {
    font-size: 44px;
    font-weight: 800;
    color: var(--ink-4);
    letter-spacing: -0.04em;
}

.tile-flag {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 1;
}

.tile-body {
    padding: 11px 13px 13px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.tile-name {
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    unicode-bidi: isolate;
}
.tile-sub {
    font-size: 12px;
    color: var(--ink-4);
    margin-top: 2px;
}

.tile-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 9px;
    flex-wrap: wrap;
}

.tile-price b {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.028em;
    font-variant-numeric: tabular-nums;
}
.tile-price .sub {
    font-size: 11.5px;
    color: var(--ink-4);
}
.tile-go {
    display: flex;
    gap: 6px;
    margin-top: auto;
    padding-top: 11px;
}
.tile-go .btn {
    flex: 1;
    justify-content: center;
    height: 32px;
    font-size: 12.5px;
}
.tile-go .rgo {
    width: 32px;
    height: 32px;
}

@media (max-width: 860px) {
    .tiles {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }
}
@media (max-width: 420px) {
    .tiles {
        grid-template-columns: 1fr;
    }
}

/* ---- building product variations ---- */

.vb {
    background: var(--glass-strong);
    border-radius: var(--r);
    box-shadow: inset 0 0 0 1px var(--line);
    padding: 14px;
    margin-bottom: 12px;
}
.vb-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 11px;
    flex-wrap: wrap;
}
.vb-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.015em;
}
.vb-drop {
    margin-inline-start: auto;
}

.vb-vals {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.vb-val {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 11px;
    border-radius: 999px;
    background: var(--glass-strong);
    box-shadow: inset 0 0 0 1px var(--line);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    color: var(--ink-2);
}

.vb-val:hover {
    box-shadow: inset 0 0 0 1px var(--ink-4);
}
.vb-val input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.vb-val:has(input:checked) {
    background: var(--brand-tint);
    color: var(--brand-ink);
    box-shadow: inset 0 0 0 1.5px var(--brand);
}

.vb-val:has(input:checked) .swatch {
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.2),
        0 0 0 2px var(--panel-solid);
}

.vb-none {
    font-size: 13px;
    color: var(--ink-4);
    padding: 3px 0;
}

.vgrid {
    width: 100%;
    border-collapse: collapse;
}
.vgrid th {
    text-align: start;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-4);
    padding: 0 8px 7px;
}
.vgrid th.r,
.vgrid td.r {
    text-align: end;
}
.vgrid td {
    padding: 6px 8px;
    border-top: 1px solid var(--line-soft);
    vertical-align: middle;
}
.vgrid tr.off td {
    opacity: 0.45;
}

.vgrid-id {
    display: flex;
    align-items: center;
    gap: 8px;
}
.vgrid-chips {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.vchip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 23px;
    padding: 0 8px;
    border-radius: var(--r-xs);
    background: var(--hover);
    font-size: 11.5px;
    font-weight: 650;
    color: var(--ink-2);
    white-space: nowrap;
}

.vchip .swatch {
    width: 12px;
    height: 12px;
}

.vb-go {
    display: flex;
    gap: 9px;
    align-items: center;
    flex-wrap: wrap;
    margin: 4px 0 14px;
}
.vb-count {
    font-size: 13px;
    color: var(--ink-3);
}
.vb-count b {
    color: var(--ink);
    font-weight: 700;
}

/* ---- product pictures ---- */

.pics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
    gap: 10px;
}

.pic {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--r);
    overflow: hidden;
    background: var(--hover);
    box-shadow: inset 0 0 0 1px var(--line);
}

.pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pic-tag {
    position: absolute;
    top: 6px;
    inset-inline-start: 6px;
    z-index: 2;
}

.pic-go {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    gap: 5px;
    justify-content: center;
    padding: 6px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent);
    opacity: 0;
    transition: opacity 140ms ease;
}

.pic:hover .pic-go,
.pic:focus-within .pic-go {
    opacity: 1;
}
@media (hover: none) {
    .pic-go {
        opacity: 1;
    }
}
.pic-go form {
    display: inline-flex;
    margin: 0;
}

.pic-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--r-xs);
    background: rgba(255, 255, 255, 0.92);
    color: #14201b;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
}

.pic-btn:hover {
    background: #fff;
}
.pic-btn.bad:hover {
    background: var(--bad);
    color: #fff;
}
.pic-btn .ico {
    width: 14px;
    height: 14px;
}

.pic-drop {
    border: 1.5px dashed var(--ink-4);
    border-radius: var(--r);
    padding: 20px 16px;
    text-align: center;
    background: var(--sunk);
    cursor: pointer;
    display: block;
}

.pic-drop:hover,
.pic-drop.over {
    border-color: var(--brand);
    background: var(--brand-tint);
}
.pic-drop .ico {
    width: 24px;
    height: 24px;
    color: var(--ink-4);
}
.pic-drop:hover .ico,
.pic-drop.over .ico {
    color: var(--brand);
}
.pic-drop b {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-top: 7px;
}
.pic-drop span {
    display: block;
    font-size: 12.5px;
    color: var(--ink-4);
    margin-top: 3px;
}
.pic-drop input {
    display: none;
}

.pic-queue {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 11px;
}
.pic-queue img {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: var(--r-sm);
    box-shadow: inset 0 0 0 1px var(--line);
}

/* ---- Garida link state ---- */

.gchip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 19px;
    padding: 0 7px;
    border-radius: var(--r-xs);
    font-size: 11px;
    font-weight: 650;
    vertical-align: middle;
    margin-inline-start: 5px;
    white-space: nowrap;
    cursor: help;
}

.gchip .ico {
    width: 11px;
    height: 11px;
}
.gchip.good {
    background: var(--good-bg);
    color: var(--good-ink);
}
.gchip.warn {
    background: var(--warn-bg);
    color: var(--warn-ink);
}
.gchip.neutral {
    background: var(--hover);
    color: var(--ink-3);
}
.gchip.off {
    background: var(--hover);
    color: var(--ink-4);
}

/* the dark bars need their own chip colours */

.workbar .vchip,
.console .vchip {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
}

.workbar .vchip .swatch,
.console .vchip .swatch {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.workbar .gchip.good,
.console .gchip.good {
    background: color-mix(in srgb, var(--dk-good) 18%, transparent);
    color: var(--dk-good);
}
.workbar .gchip.warn,
.console .gchip.warn {
    background: color-mix(in srgb, var(--dk-warn) 18%, transparent);
    color: var(--dk-warn);
}
.workbar .gchip.neutral,
.workbar .gchip.off,
.console .gchip.neutral,
.console .gchip.off {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.workbar .thumb,
.console .thumb {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.workbar .thumb.blank-thumb,
.console .thumb.blank-thumb {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.55);
}

/* ---- guided setup ---- */

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.step-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border-radius: var(--r-lg);
}

.step-card.is-done {
    border-inline-start: 3px solid var(--good);
}
.step-card.is-todo {
    border-inline-start: 3px solid var(--warn);
}

.step-n {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 800;
    background: var(--hover);
    color: var(--ink-3);
}

.step-card.is-done .step-n {
    background: var(--good);
    color: #fff;
}
.step-card.is-todo .step-n {
    background: var(--warn);
    color: #fff;
}
.step-n .ico {
    width: 15px;
    height: 15px;
}

.step-text b {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.015em;
}
.step-text span {
    display: block;
    font-size: 11.5px;
    color: var(--ink-4);
    margin-top: 1px;
}

/* a setup block */
.setup {
    border-radius: var(--r-lg);
    margin-bottom: 14px;
    overflow: hidden;
}

.setup-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 18px 13px;
}

.setup-n {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-size: 12.5px;
    font-weight: 800;
}

.setup-head {
    flex: 1;
    min-width: 0;
}
.setup-head h2 {
    font-family: var(--font-display);
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}
.setup-head p {
    font-size: 13px;
    color: var(--ink-3);
    margin: 3px 0 0;
    line-height: 1.45;
}
.setup-count {
    flex-shrink: 0;
}

.setup-have {
    padding: 0 18px 14px;
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}
.setup-have:empty {
    display: none;
}

.setup-add {
    padding: 14px 18px 16px;
    background: var(--sunk);
    border-top: 1px solid var(--line-soft);
}
.setup-add-k {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin-bottom: 10px;
}
.setup-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.setup-f {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.setup-f.grow {
    flex: 1;
    min-width: 190px;
}
.setup-f > label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
}

.setup-f input[type="text"],
.setup-f input[type="number"],
.setup-f select {
    height: 38px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    width: 100%;
}

.setup-f input:focus,
.setup-f select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}
.setup-row .btn {
    height: 38px;
}
.setup-row .tick {
    height: 38px;
}

.setup-blocked {
    padding: 14px 18px;
    background: var(--warn-bg);
    color: var(--warn-ink);
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 860px) {
    .setup-row {
        flex-direction: column;
        align-items: stretch;
    }
    .setup-f,
    .setup-f.grow {
        width: 100%;
    }
    .setup-row .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ---- picking lines on an order ---- */

.lines {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
}
.lines th {
    text-align: start;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-4);
    padding: 0 8px 8px;
}
.lines th.r,
.lines td.r {
    text-align: end;
}
.lines td {
    padding: 6px 8px;
    border-top: 1px solid var(--line-soft);
    vertical-align: middle;
}
.lines tr.empty-row td {
    opacity: 0.55;
}

.line-pick {
    width: 100%;
    min-width: 210px;
}
.line-sum {
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.line-x {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-4);
    font-size: 17px;
    line-height: 1;
    padding: 0 4px;
}
.line-x:hover {
    color: var(--bad);
}

.line-total {
    display: flex;
    align-items: baseline;
    gap: 12px;
    justify-content: flex-end;
    padding: 14px 8px 0;
    margin-top: 8px;
    border-top: 2px solid var(--line);
}

.line-total span {
    font-size: 13.5px;
    font-weight: 650;
    color: var(--ink-3);
}
.line-total b {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 860px) {
    .lines thead {
        display: none;
    }
    .lines tr {
        display: block;
        padding: 10px 0;
        border-top: 1px solid var(--line-soft);
    }
    .lines td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        border: none;
        padding: 4px 0;
    }
    .lines td::before {
        content: attr(data-label);
        font-size: 12px;
        font-weight: 600;
        color: var(--ink-4);
    }
    .lines td.r {
        text-align: end;
    }
}

/* ============================================================
   Orders desk — the dark console, the journey card with its one
   "Move it to …" button, the step trail and the row status pill.
   Same shapes as Garida Store's order pages.
   ============================================================ */

.console {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.78);
    background:
        radial-gradient(90% 130% at 0% 0%, var(--brand-glow), transparent 60%),
        radial-gradient(
            60% 80% at 100% 100%,
            var(--accent-glow),
            transparent 60%
        ),
        linear-gradient(180deg, var(--side), var(--side-deep));
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 20px 44px -22px rgba(4, 16, 11, 0.6);
    animation: rise 460ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.console-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.console-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
}
.console-eyebrow b {
    color: #fff;
    font-weight: 700;
}
.console-sep {
    opacity: 0.45;
}
.console-live {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dk-brand);
    color: var(--dk-brand);
    animation: pulse-ring 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.console-acts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.console-acts .act {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: var(--r);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    transition:
        background 140ms ease,
        transform 140ms ease;
}
.console-acts .act:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: translateY(-1px);
}
.console-acts .act-solid {
    background: linear-gradient(160deg, var(--brand), var(--brand-deep));
    border-color: transparent;
    color: var(--brand-on);
    box-shadow: 0 8px 18px -8px var(--brand-glow);
}
.console-acts .act-solid:hover {
    background: linear-gradient(160deg, var(--brand), var(--brand-deep));
    color: var(--brand-on);
    filter: brightness(1.06);
}
.console-acts .act kbd {
    font: 600 10px/1 var(--font);
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.28);
    color: rgba(255, 255, 255, 0.75);
    margin-inline-start: 2px;
}

.cells {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}
.cell {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 16px 18px 17px;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
    color: inherit;
}
a.cell:hover {
    background: rgba(255, 255, 255, 0.04);
}
.cell:first-child {
    border-inline-start: none;
}
.cell::before {
    content: "";
    position: absolute;
    inset-inline-start: -1.5px;
    top: 16px;
    width: 3px;
    height: 22px;
    border-radius: 999px;
    background: var(--tone);
    box-shadow: 0 0 12px var(--tone);
}
.cell:first-child::before {
    inset-inline-start: 0;
}
.cell.is-clear::before {
    display: none;
}
.cell-n {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: isolate;
    color: var(--tone);
}
.cell-l {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
}
.cell-note {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
}
.cell {
    --tone: #ffffff;
}
.cell.t-plain {
    --tone: #ffffff;
}
.cell.t-good {
    --tone: var(--dk-good);
}
.cell.t-warn {
    --tone: var(--dk-warn);
}
.cell.t-bad {
    --tone: var(--dk-bad);
}
.cell.t-info {
    --tone: var(--dk-info);
}
/* t-copper is kept so older views keep working; it now means brand */
.cell.t-brand,
.cell.t-copper {
    --tone: var(--dk-brand);
}
.cell.is-clear:not(.t-plain) {
    --tone: rgba(255, 255, 255, 0.35);
}

/* ---------- journey: where an order is, and the one thing to press ---------- */

.journey {
    display: grid;
    grid-template-columns: 1fr auto 1.2fr;
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
    margin-bottom: 14px;
    border-radius: var(--r-lg);
    border: 1px solid var(--glass-line);
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: var(--glass-shadow);
    border-inline-start: 4px solid var(--brand);
}
.journey.is-done {
    border-inline-start-color: var(--good);
}
.journey.is-stuck {
    border-inline-start-color: var(--bad);
}
.journey-k {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 8px;
}
.journey-now {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    background: var(--brand-tint);
    color: var(--brand-ink);
    border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
}
.journey-now.good {
    background: var(--good-bg);
    color: var(--good-ink);
    border-color: color-mix(in srgb, var(--good) 30%, transparent);
}
.journey-now.bad {
    background: var(--bad-bg);
    color: var(--bad-ink);
    border-color: color-mix(in srgb, var(--bad) 30%, transparent);
}
.journey-why {
    font-size: 12.5px;
    color: var(--ink-3);
    margin-top: 8px;
    line-height: 1.5;
    max-width: 42ch;
}
.journey-arrow {
    color: var(--ink-4);
    display: flex;
    gap: 2px;
}
.journey-arrow i {
    width: 8px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    opacity: 0.5;
}

.move {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border-radius: var(--r-lg);
    border: 0;
    cursor: pointer;
    text-align: start;
    font: inherit;
    color: var(--brand-on);
    background: linear-gradient(
        160deg,
        var(--brand) 0%,
        var(--brand-deep) 100%
    );
    box-shadow:
        0 1px 2px rgba(18, 46, 36, 0.15),
        0 14px 30px -12px var(--brand-glow);
    transition:
        transform 140ms ease,
        box-shadow 140ms ease;
}
.move:hover {
    transform: translateY(-2px);
    box-shadow:
        0 2px 4px rgba(18, 46, 36, 0.15),
        0 20px 36px -12px var(--brand-glow);
}
.move:active {
    transform: translateY(0);
}
.move-k {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
}
.move-t {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 2px;
}
body[dir="rtl"] .move-t {
    font-family: var(--font-rtl);
    letter-spacing: 0;
}
.move-n {
    font-size: 11.5px;
    opacity: 0.8;
    margin-top: 4px;
}
.move-go {
    margin-inline-start: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex: none;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.16);
}
body[dir="rtl"] .move-go .ico {
    transform: scaleX(-1);
}
.move kbd {
    font: 600 10px/1 var(--font);
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.22);
}
.move.is-quiet {
    background: var(--glass-strong);
    color: var(--ink);
    box-shadow: var(--lift);
    border: 1px solid var(--line);
}
.move.is-quiet .move-go {
    background: var(--sunk);
    color: var(--ink-3);
}

.journey-after {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--ink-3);
    padding-top: 10px;
    border-top: 1px dashed var(--line);
}
.journey-after b {
    color: var(--ink-2);
}

/* the order trail: every step and when it happened */
.trail-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 8px 0;
}
.trail-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex: none;
    display: grid;
    place-items: center;
    border: 2px solid var(--line);
    background: var(--panel-solid);
    color: var(--ink-4);
    font-size: 11px;
}
.trail-step.is-done .trail-dot {
    border-color: var(--good);
    background: var(--good);
    color: #fff;
}
.trail-step.is-now .trail-dot {
    border-color: var(--brand);
    background: var(--brand-tint);
    color: var(--brand-ink);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}
.trail-b {
    flex: 1;
    padding-top: 2px;
}
.trail-t {
    font-size: 13px;
    font-weight: 600;
}
.trail-step.is-now .trail-t {
    color: var(--brand-ink);
}
.trail-m {
    font-size: 11.5px;
    color: var(--ink-3);
    margin-top: 1px;
}
.trail-step + .trail-step {
    border-top: 1px solid var(--line-soft);
}
.trail-next {
    font-size: 11.5px;
    color: var(--ink-4);
    padding: 8px 0 0;
    padding-inline-start: 34px;
    line-height: 1.6;
}

/* row status: pill plus the next step in one glance.
   Kept away from the .statline cells that share the class name. */
.st:not(.statline > .st) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 650;
    white-space: nowrap;
    background: var(--sunk);
    color: var(--ink-3);
}
.st:not(.statline > .st)::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.st.info:not(.statline > .st) {
    background: var(--info-bg);
    color: var(--info-ink);
}
.st.brand:not(.statline > .st) {
    background: var(--brand-tint);
    color: var(--brand-ink);
}
.st.good:not(.statline > .st) {
    background: var(--good-bg);
    color: var(--good-ink);
}
.st.warn:not(.statline > .st) {
    background: var(--warn-bg);
    color: var(--warn-ink);
}
.st.bad:not(.statline > .st) {
    background: var(--bad-bg);
    color: var(--bad-ink);
}
.st.neutral:not(.statline > .st) {
    background: var(--sunk);
    color: var(--ink-3);
}
.st-next {
    font-size: 11px;
    color: var(--ink-4);
}
.st-next b {
    color: var(--ink-2);
    font-weight: 600;
}
.st-late {
    display: block;
    font-size: 11px;
    color: var(--bad);
    margin-top: 3px;
}

@media (max-width: 1000px) {
    .cells {
        grid-template-columns: repeat(3, 1fr);
    }
    .cell:nth-child(4) {
        border-inline-start: none;
    }
    .cell:nth-child(n + 4) {
        border-top: 1px solid rgba(255, 255, 255, 0.07);
    }
    .journey {
        grid-template-columns: 1fr;
    }
    .journey-arrow {
        display: none;
    }
}
@media (max-width: 620px) {
    .cells {
        grid-template-columns: 1fr 1fr;
    }
    .cell:nth-child(4) {
        border-inline-start: 1px solid rgba(255, 255, 255, 0.07);
    }
    .cell:nth-child(odd) {
        border-inline-start: none;
    }
    .cell:nth-child(n + 3) {
        border-top: 1px solid rgba(255, 255, 255, 0.07);
    }
}

/* ============================================================
   Mobile — tables become cards
   ============================================================ */

@media (max-width: 860px) {
    .page {
        padding: 12px 12px 40px;
    }

    .phead {
        gap: 12px;
    }
    .phead h1 {
        font-size: 21px;
    }
    .phead-go {
        width: 100%;
    }
    .phead-go .btn {
        flex: 1;
        justify-content: center;
    }

    /* the stat strip scrolls sideways instead of squashing */
    .statline {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .statline > .st {
        flex: 0 0 46%;
        scroll-snap-align: start;
    }
    .statline::-webkit-scrollbar {
        height: 0;
    }

    /* filters stack */
    .filter-main {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-main .field,
    .filter-main .field.grow {
        max-width: none;
        width: 100%;
    }
    .filter-main .btn,
    .filter-main .more-filters {
        width: 100%;
        justify-content: center;
    }
    .filter-main .helper {
        margin: 0;
        text-align: center;
    }
    .filterbar {
        gap: 8px;
    }
    .filterbar .field {
        width: 100%;
    }
    .filter-deep .fgrid {
        grid-template-columns: 1fr 1fr;
    }

    /* every list table turns into stacked cards */
    .list {
        background: none;
        border: none;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .list table,
    .list thead,
    .list tbody,
    .list tr,
    .list td {
        display: block;
        width: 100%;
    }
    .list thead {
        display: none;
    }

    .list tbody tr {
        background: var(--glass);
        -webkit-backdrop-filter: blur(16px) saturate(1.3);
        backdrop-filter: blur(16px) saturate(1.3);
        border: 1px solid var(--glass-line);
        box-shadow: var(--glass-shadow);
        border-radius: var(--r-lg);
        margin-bottom: 10px;
        padding: 12px 14px;
        position: relative;
    }

    .list tbody tr:hover td {
        background: none;
    }
    .list tbody td {
        border: none;
        padding: 3px 0;
    }

    .list tbody td::before {
        content: attr(data-label);
        display: block;
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--ink-4);
        margin-bottom: 2px;
    }

    .list tbody td:first-child::before {
        display: none;
    }
    .list tbody td.r {
        text-align: start;
    }
    .list tbody tr.needs td:first-child,
    .list tbody tr.late td:first-child,
    body[dir="rtl"] .list tbody tr.needs td:first-child,
    body[dir="rtl"] .list tbody tr.late td:first-child {
        box-shadow: none;
    }
    .list tbody tr.needs {
        border-inline-start: 3px solid var(--warn);
    }
    .list tbody tr.late {
        border-inline-start: 3px solid var(--bad);
    }

    .rowgo,
    .rowacts {
        justify-content: flex-start;
        margin-top: 8px;
    }
    .rgo,
    .rowact {
        width: 34px;
        height: 34px;
    }

    .pager {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .pager-steps {
        margin: 0;
        justify-content: center;
        flex-wrap: wrap;
    }

    .keys {
        display: none;
    }

    /* detail pages stack */
    .detail {
        grid-template-columns: 1fr;
    }
    .grid {
        grid-template-columns: 1fr;
    }

    /* the item header on the scan page */
    .item-head {
        gap: 12px;
        padding: 13px 14px;
    }
    .item-name {
        font-size: 18px;
    }
    .item-go {
        width: 100%;
    }
    .item-go .btn {
        flex: 1;
        justify-content: center;
    }
    .gauge {
        flex-direction: column;
    }
    .gauge-left {
        min-width: 0;
    }
    .gauge-nums {
        gap: 18px;
    }
    .pricebox {
        flex: 1 1 100%;
    }

    /* the till stacks, payment rail first */
    .till {
        grid-template-columns: 1fr;
    }
    .till-right {
        order: -1;
    }
    .pay {
        position: static;
    }
    .cl {
        flex-wrap: wrap;
        gap: 8px;
    }
    .cl-id {
        flex: 1 1 100%;
    }
    .cl-each,
    .cl-sum {
        width: auto;
    }
    .cl-sum {
        margin-inline-start: auto;
    }

    .hunt {
        height: 48px;
        padding: 0 6px 0 12px;
    }
    .hunt input {
        font-size: 15px;
    }
    .hunt .btn {
        height: 36px;
        padding: 0 14px;
    }

    .shelves {
        grid-template-columns: 1fr 1fr;
    }
    .cards {
        grid-template-columns: 1fr;
    }

    .gate {
        padding: 20px 18px 22px;
    }
    .gate-money input {
        height: 50px;
        font-size: 23px;
    }

    .formcard {
        padding: 14px 14px 16px;
    }
    .fgrid {
        grid-template-columns: 1fr;
    }
    .formgo .btn {
        flex: 1;
    }

    .adjust-form {
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 16px;
    }
    .af {
        width: 100%;
    }
    .af .picker,
    .af-in,
    input.af-in,
    select.af-in {
        width: 100%;
        max-width: none;
    }
    .af-why {
        position: static;
        max-width: none;
    }
    .af-go {
        width: 100%;
    }

    .workbar-top,
    .console-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .workbar-go,
    .console-acts {
        margin: 0;
        width: 100%;
    }
    .workbar-go .btn,
    .console-acts .act {
        flex: 1;
        justify-content: center;
    }
    .console-acts .act kbd {
        display: none;
    }
    .workbar-stats {
        grid-template-columns: 1fr 1fr;
    }

    .journey {
        padding: 14px;
        gap: 12px;
    }
    .move {
        padding: 14px;
    }

    .hero-top {
        flex-direction: column;
    }
    .hero-line {
        font-size: 21px;
    }
    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }
    .ledger-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .statline > .st {
        flex: 0 0 64%;
    }
    .shelves {
        grid-template-columns: 1fr;
    }
    .filter-deep .fgrid {
        grid-template-columns: 1fr;
    }
    .hero-stats,
    .ledger-grid,
    .workbar-stats {
        grid-template-columns: 1fr;
    }
    .done-go {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .console,
    .workbar,
    .hero,
    .move {
        animation: none;
        transition: none;
    }
}

/* ============================================================
   The till — built for a queue
   Scan bar and basket on the left, the money on the right, and
   everything a cashier does a hundred times a day on one key.
   ============================================================ */

.tl kbd {
    font: 600 10px/1 var(--font);
    padding: 3px 6px;
    border-radius: 5px;
    background: var(--sunk);
    border: 1px solid var(--line);
    color: var(--ink-3);
    white-space: nowrap;
}
.console .tl-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: 10.5px;
    font-weight: 800;
    background: var(--dk-warn);
    color: #1a1204;
}
.console .act[aria-pressed="false"] {
    opacity: 0.6;
}
.tl-offline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--dk-bad) 22%, transparent);
    color: var(--dk-bad);
    font-weight: 700;
    font-size: 11px;
}

.tl-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 392px;
    gap: 14px;
    align-items: start;
}

/* ---- scan ---- */

.tl-scan {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 60px;
    padding: 0 10px 0 18px;
    border-radius: var(--r-lg);
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    backdrop-filter: blur(16px) saturate(1.3);
    border: 2px solid var(--glass-line);
    box-shadow: var(--glass-shadow);
    transition:
        border-color 0.12s,
        box-shadow 0.12s;
}
.tl-scan:focus-within {
    border-color: var(--brand);
    box-shadow:
        var(--glass-shadow),
        0 0 0 4px var(--brand-tint);
}
.tl-scan > .ico {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: var(--brand);
}
.tl-scan input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    outline: none;
    color: var(--ink);
    font: inherit;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.tl-scan input::placeholder {
    color: var(--ink-4);
    font-weight: 400;
}
.tl-scan .btn {
    height: 42px;
    padding: 0 20px;
}
.tl-scan.is-ok {
    border-color: var(--good);
}
.tl-scan.is-bad {
    border-color: var(--bad);
    animation: tl-shake 260ms ease;
}
@keyframes tl-shake {
    25% {
        transform: translateX(-4px);
    }
    75% {
        transform: translateX(4px);
    }
}

.tl-under {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 2px 12px;
    font-size: 12.5px;
    color: var(--ink-4);
}
.tl-under b {
    color: var(--ink-2);
}

.tl-toast {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: var(--r);
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tl-toast.good {
    background: var(--good-bg);
    color: var(--good-ink);
}
.tl-toast.bad {
    background: var(--bad-bg);
    color: var(--bad-ink);
}

/* ---- quick keys ---- */

.tl-quick {
    margin-bottom: 12px;
}
.tl-quick-k {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin: 0 2px 7px;
}
.tl-quick-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}
.tl-key {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: var(--r);
    background: var(--glass);
    border: 1px solid var(--glass-line);
    box-shadow: var(--lift);
    cursor: pointer;
    text-align: start;
    font: inherit;
    color: var(--ink);
    min-width: 0;
    transition:
        transform 0.12s,
        box-shadow 0.12s,
        border-color 0.12s;
}
.tl-key:hover {
    transform: translateY(-1px);
    box-shadow: var(--lift-2);
    border-color: var(--brand);
}
.tl-key .thumb {
    width: 34px;
    height: 34px;
}
.tl-key-t {
    min-width: 0;
    flex: 1;
}
.tl-key-n {
    display: block;
    font-size: 12.5px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tl-key-p {
    display: block;
    font-size: 11.5px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
}

/* ---- basket ---- */

.tl-basket {
    border-radius: var(--r-lg);
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid var(--glass-line);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    min-height: 360px;
    display: flex;
    flex-direction: column;
}
.tl-basket-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 10px 18px;
    border-bottom: 1px solid var(--line-soft);
}
.tl-basket-top h2 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}
.tl-basket-top .muted {
    font-size: 12.5px;
    color: var(--ink-4);
}
.tl-basket-acts {
    margin-inline-start: auto;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.tl-basket-acts .btn {
    gap: 6px;
}

.tl-empty {
    flex: 1;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 40px 20px;
    color: var(--ink-3);
}
.tl-empty .ring {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: var(--brand-tint);
    color: var(--brand);
    display: grid;
    place-items: center;
}
.tl-empty .ring .ico {
    width: 26px;
    height: 26px;
}
.tl-empty b {
    display: block;
    font-size: 16px;
    color: var(--ink);
    margin-bottom: 4px;
}

.tl-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 118px 104px 30px;
    align-items: center;
    gap: 12px;
    padding: 11px 12px 11px 16px;
    border-bottom: 1px solid var(--line-soft);
}
.tl-line:last-child {
    border-bottom: none;
}
.tl-line.is-new {
    animation: tl-flash 900ms ease;
}
@keyframes tl-flash {
    from {
        background: var(--brand-tint);
    }
    to {
        background: transparent;
    }
}
.tl-line.is-short {
    box-shadow: inset 3px 0 0 var(--bad);
}
body[dir="rtl"] .tl-line.is-short {
    box-shadow: inset -3px 0 0 var(--bad);
}
.tl-line-id {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}
.tl-line-id .thumb {
    width: 42px;
    height: 42px;
}
.tl-line-n {
    font-size: 14.5px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    unicode-bidi: isolate;
}
.tl-line-m {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 3px;
    font-size: 12px;
    color: var(--ink-4);
}
.tl-line-m .vchip {
    height: 20px;
    font-size: 11px;
}
.tl-line-m .swatch {
    width: 10px;
    height: 10px;
}
.tl-line-warn {
    color: var(--bad);
    font-weight: 700;
}

.tl-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    overflow: hidden;
}
.tl-qty button {
    width: 34px;
    height: 36px;
    border: none;
    background: none;
    color: var(--ink-2);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}
.tl-qty button:hover {
    background: var(--hover);
    color: var(--brand);
}
.tl-qty input {
    width: 50px;
    height: 36px;
    border: none;
    border-inline: 1px solid var(--line-soft);
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
    outline: none;
}

.tl-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.tl-price input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: end;
    font-variant-numeric: tabular-nums;
}
.tl-price input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}
.tl-price .plain {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.tl-was {
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}
.tl-was.down {
    color: var(--bad);
}
.tl-was.up {
    color: var(--good);
}

.tl-sum {
    text-align: end;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.tl-x {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    border-radius: var(--r-xs);
    color: var(--ink-4);
    font-size: 20px;
    cursor: pointer;
}
.tl-x:hover {
    background: var(--bad-bg);
    color: var(--bad);
}

/* ---- the money side ---- */

.tl-side {
    position: sticky;
    top: 72px;
}
.tl-pay {
    border-radius: var(--r-lg);
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid var(--glass-line);
    box-shadow: var(--glass-shadow);
    padding: 16px;
}
.tl-k {
    display: block;
    font-size: 12px;
    font-weight: 650;
    color: var(--ink-2);
    margin-bottom: 6px;
}
.tl-k .af-opt {
    font-weight: 400;
    color: var(--ink-4);
}
.tl-block + .tl-block {
    margin-top: 14px;
}
.tl-seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    padding: 3px;
    border-radius: var(--r);
    background: var(--hover);
}
.tl-seg label {
    margin: 0;
    cursor: pointer;
}
.tl-seg input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.tl-seg span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-3);
}
.tl-seg input:checked + span {
    background: var(--glass-strong);
    color: var(--ink);
    box-shadow: var(--tab-shadow);
}
.tl-seg input:focus-visible + span {
    outline: 2px solid var(--brand);
}

.tl-field {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
}
.tl-field:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}
.tl-field input,
.tl-field select {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    outline: none;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.tl-field .u {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-4);
}

.tl-rows {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
}
.tl-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 13.5px;
    color: var(--ink-2);
}
.tl-row b {
    margin-inline-start: auto;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}
.tl-row b.down {
    color: var(--bad);
}
.tl-row b.up {
    color: var(--good);
}
.tl-disc {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tl-disc input {
    width: 96px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    color: var(--ink);
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    text-align: end;
    font-variant-numeric: tabular-nums;
}
.tl-disc input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}
.tl-mini-seg {
    display: inline-flex;
    padding: 2px;
    border-radius: var(--r-xs);
    background: var(--hover);
}
.tl-mini-seg button {
    height: 26px;
    min-width: 34px;
    padding: 0 7px;
    border: none;
    background: none;
    border-radius: 4px;
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink-3);
    cursor: pointer;
}
.tl-mini-seg button[aria-pressed="true"] {
    background: var(--glass-strong);
    color: var(--ink);
    box-shadow: var(--tab-shadow);
}

.tl-total {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 12px 0 0;
    padding: 14px 16px;
    border-radius: var(--r);
    background: linear-gradient(160deg, var(--brand-tint), var(--sunk));
    border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
}
.tl-total span {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-2);
}
.tl-total b {
    margin-inline-start: auto;
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--brand-ink);
    font-variant-numeric: tabular-nums;
}
.tl-total small {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-4);
}

.tl-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.tl-method {
    cursor: pointer;
    margin: 0;
}
.tl-method input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.tl-method span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: var(--glass-strong);
    font-size: 13px;
    font-weight: 650;
    color: var(--ink-2);
    transition:
        background 0.12s,
        border-color 0.12s;
}
.tl-method span:hover {
    border-color: var(--brand);
}
.tl-method input:checked + span {
    background: linear-gradient(160deg, var(--brand), var(--brand-deep));
    border-color: transparent;
    color: var(--brand-on);
    box-shadow: 0 6px 14px -8px var(--brand-glow);
}
.tl-method input:focus-visible + span {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.tl-money {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 54px;
    padding: 0 14px;
    border: 2px solid var(--line);
    border-radius: var(--r);
    background: var(--glass-strong);
}
.tl-money:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-tint);
}
.tl-money input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    outline: none;
    color: var(--ink);
    font: inherit;
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-align: end;
    font-variant-numeric: tabular-nums;
}
.tl-money .u {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-4);
}
.tl-notes {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.tl-notes .btn {
    flex: 1 1 auto;
}
.tl-notes .btn.on {
    border-color: var(--brand);
    background: var(--brand-tint);
    color: var(--brand-ink);
}

.tl-change {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 10px;
    padding: 11px 14px;
    border-radius: var(--r);
    background: var(--warn-bg);
    color: var(--warn-ink);
    font-size: 13.5px;
    font-weight: 700;
}
.tl-change b {
    margin-inline-start: auto;
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.tl-change.short {
    background: var(--bad-bg);
    color: var(--bad-ink);
}

.tl-split {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--r);
    background: var(--sunk);
    display: grid;
    gap: 8px;
}
.tl-split-row {
    display: grid;
    grid-template-columns: 1fr 130px;
    gap: 8px;
    align-items: center;
}
.tl-split-row .tl-field {
    height: 36px;
}
.tl-link {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 12.5px;
    font-weight: 650;
    color: var(--brand);
    cursor: pointer;
}
.tl-link:hover {
    text-decoration: underline;
}

.tl-why {
    margin: 12px 0 0;
    padding: 9px 12px;
    border-radius: var(--r-sm);
    background: var(--warn-bg);
    color: var(--warn-ink);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
}
.tl-go {
    width: 100%;
    height: 56px;
    margin-top: 12px;
    font-size: 16px;
    border-radius: var(--r);
    justify-content: space-between;
    padding: 0 18px;
}
.tl-go kbd {
    background: rgba(0, 0, 0, 0.18);
    border-color: transparent;
    color: inherit;
}
.tl-go:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* ---- drawers: parked baskets, recent sales ---- */

.tl-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    width: min(420px, 94vw);
    z-index: 92;
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border-inline-start: 1px solid var(--glass-line);
    box-shadow: -20px 0 50px -20px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
}
.tl-drawer-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line-soft);
}
.tl-drawer-top h2 {
    font-family: var(--font-display);
    font-size: 17px;
    margin: 0;
}
.tl-drawer-top .tl-x {
    margin-inline-start: auto;
}
.tl-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}
.tl-drawer-none {
    padding: 36px 16px;
    text-align: center;
    color: var(--ink-4);
    font-size: 13.5px;
}
.tl-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--r);
    border: 1px solid var(--line-soft);
    background: var(--glass);
    margin-bottom: 8px;
}
.tl-item-t {
    flex: 1;
    min-width: 0;
}
.tl-item-t b {
    display: block;
    font-size: 14px;
}
.tl-item-t span {
    display: block;
    font-size: 12px;
    color: var(--ink-4);
    margin-top: 2px;
}
.tl-item-v {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
    .tl-grid {
        grid-template-columns: 1fr;
    }
    .tl-side {
        position: static;
        order: -1;
    }
}
@media (max-width: 720px) {
    .tl-line {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "id x"
            "qty sum";
        row-gap: 8px;
    }
    .tl-line-id {
        grid-area: id;
    }
    .tl-x {
        grid-area: x;
    }
    .tl-qty {
        grid-area: qty;
    }
    .tl-price {
        display: none;
    }
    .tl-sum {
        grid-area: sum;
    }
    .tl .keys {
        display: none;
    }
}

/* ============================================================
   Order desk
   ============================================================ */

.od-tabs {
    display: flex;
    gap: 3px;
    padding: 3px;
    margin-bottom: 12px;
    border-radius: var(--r);
    background: var(--hover);
    overflow-x: auto;
    scrollbar-width: none;
}
.od-tabs::-webkit-scrollbar {
    display: none;
}
.od-tabs .tab {
    flex: 0 0 auto;
    text-decoration: none;
}

.od-new {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: var(--r);
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-weight: 650;
    font-size: 13.5px;
}
.od-new .btn {
    margin-inline-start: auto;
}

.od-bulk {
    position: sticky;
    bottom: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    max-width: 100%;
    margin: 12px auto 0;
    padding: 10px 12px 10px 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--side), var(--side-deep));
    color: #fff;
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5);
    font-size: 13.5px;
}
.od-bulk .btn-quiet {
    color: rgba(255, 255, 255, 0.75);
}
.od-bulk .btn-quiet:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.od-items {
    font-size: 13px;
    color: var(--ink-2);
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.od-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ink-4);
    vertical-align: middle;
    margin-inline-end: 3px;
}
.od-dot.sent {
    background: var(--good);
}
.od-dot.waiting {
    background: var(--warn);
}
.od-dot.failed {
    background: var(--bad);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 25%, transparent);
}

.od-tel {
    color: inherit;
    text-decoration: none;
}
.od-tel:hover {
    color: var(--brand);
    text-decoration: underline;
}

.od-copy {
    border: none;
    background: none;
    padding: 0 4px;
    color: inherit;
    opacity: 0.55;
    cursor: pointer;
    font-size: 13px;
}
.od-copy:hover {
    opacity: 1;
}

.od-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.od-inline select,
.od-inline input {
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
}
.od-inline input {
    flex: 1;
    min-width: 180px;
}

/* ---- the status card on the order list ---- */

.list:has(.od-status) {
    overflow: visible;
}
.list:has(.od-status) thead th:first-child {
    border-start-start-radius: var(--r-lg);
}
.list:has(.od-status) thead th:last-child {
    border-start-end-radius: var(--r-lg);
}

.od-status {
    position: relative;
    display: inline-block;
    cursor: default;
    border-radius: var(--r-sm);
    outline: none;
}
.od-status:focus-visible {
    box-shadow: 0 0 0 3px var(--brand-tint);
}

.od-pop {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-start: -10px;
    z-index: 40;
    width: 310px;
    padding: 12px 14px;
    border-radius: var(--r-lg);
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid var(--glass-line);
    box-shadow: var(--lift-2), var(--glass-shadow);
    text-align: start;
    white-space: normal;
    animation: rise 160ms ease backwards;
}
.od-pop.up {
    top: auto;
    bottom: calc(100% + 6px);
}
/* a bridge, so moving the pointer into the card does not close it */
.od-pop::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: -8px;
    height: 8px;
}
.od-pop.up::before {
    top: auto;
    bottom: -8px;
}
.od-status:hover .od-pop,
.od-status:focus-within .od-pop {
    display: block;
}

.od-pop-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 12.5px;
    color: var(--ink-3);
}
.od-pop-top b {
    font-size: 14px;
    color: var(--ink);
}
.od-pop-top span {
    margin-inline-start: auto;
}
.od-pop-note {
    margin: 0 0 8px;
    font-size: 12.5px;
    color: var(--ink-3);
    line-height: 1.45;
}
.od-pop-note.bad {
    color: var(--bad);
    font-weight: 650;
}

.od-road {
    list-style: none;
    margin: 0;
    padding: 0;
}
.od-step {
    position: relative;
    display: flex;
    gap: 10px;
    padding: 5px 0;
}
.od-step:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-inline-start: 9px;
    top: 25px;
    bottom: -5px;
    width: 2px;
    background: var(--line);
}
.od-step.is-done:not(:last-child)::after {
    background: var(--good);
}
.od-step-dot {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
    border: 2px solid var(--line);
    background: var(--panel-solid);
    color: var(--ink-4);
}
.od-step.is-done .od-step-dot {
    background: var(--good);
    border-color: var(--good);
    color: #fff;
}
.od-step.is-now .od-step-dot,
.od-step.is-next .od-step-dot {
    border-color: var(--brand);
    background: var(--brand-tint);
    color: var(--brand-ink);
}
.od-step.is-now .od-step-dot {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}
.od-step.is-hold .od-step-dot {
    border-color: var(--warn);
    background: var(--warn-bg);
    color: var(--warn);
}
.od-step.is-failed .od-step-dot {
    border-color: var(--bad);
    background: var(--bad-bg);
    color: var(--bad);
}
.od-step-t {
    min-width: 0;
    padding-top: 1px;
}
.od-step-l {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 650;
    color: var(--ink);
}
.od-step.is-later .od-step-l {
    color: var(--ink-4);
    font-weight: 550;
}
.od-step-m {
    display: block;
    font-size: 11.5px;
    color: var(--ink-4);
    margin-top: 1px;
}
.od-own {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--brand-tint);
    color: var(--brand-ink);
}
.od-own.is-garida {
    background: var(--info-bg);
    color: var(--info-ink);
}

.od-pop-go {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
}
.od-pop-go:empty {
    display: none;
}
.od-pop-go .btn-go {
    flex: 1;
    justify-content: center;
}

@media (hover: none) {
    /* on a phone or tablet, a tap opens it (the cell takes focus) */
    .od-status:hover .od-pop {
        display: none;
    }
    .od-status:focus-within .od-pop {
        display: block;
    }
}
@media (max-width: 860px) {
    .od-pop {
        position: fixed;
        inset-inline: 12px;
        top: auto;
        bottom: 12px;
        width: auto;
    }
    .od-pop::before {
        display: none;
    }
}

/* ---- a customer's 12 months ---- */

.cu-months {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px;
    align-items: end;
    height: 120px;
    padding: 14px 16px 10px;
}
.cu-month {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}
.cu-month i {
    display: block;
    width: 100%;
    max-width: 30px;
    border-radius: 4px 4px 2px 2px;
    background: linear-gradient(180deg, var(--brand), var(--brand-deep));
    opacity: 0.8;
}
.cu-month:last-child i {
    opacity: 1;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent);
}
.cu-month span {
    font-size: 10.5px;
    color: var(--ink-4);
}

/* ============================================================
   Find a product
   ============================================================ */

.sc-cam {
    position: relative;
    margin: 10px 0;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: #000;
    max-width: 520px;
}
.sc-cam video {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}
.sc-cam-bar {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.sc-recent {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: -4px 0 14px;
}
.sc-recent #scRecentList {
    display: contents;
}
.sc-recent .kin-one {
    font-size: 12.5px;
    padding: 4px 10px;
}

.sc-chips {
    display: flex;
    gap: 4px;
    margin-top: 5px;
}
.sc-chips button {
    height: 24px;
    min-width: 30px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--glass-strong);
    color: var(--ink-2);
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}
.sc-chips button:hover {
    border-color: var(--brand);
    color: var(--brand-ink);
    background: var(--brand-tint);
}

.af-sum {
    flex-basis: 100%;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-3);
}

.sc-days {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 70px;
    padding: 12px 16px;
}
.sc-days i {
    flex: 1;
    min-width: 3px;
    border-radius: 3px 3px 1px 1px;
    background: linear-gradient(180deg, var(--brand), var(--brand-deep));
    opacity: 0.85;
}
.sc-days i.nil {
    background: var(--line);
    opacity: 1;
}
.sc-days i:last-child {
    opacity: 1;
}

/* ============================================================
   Dropdowns on top of the cards below them
   ------------------------------------------------------------
   Every glass card has a backdrop blur, and a blur makes the card
   its own layer. A dropdown's z-index only counts inside its own
   card, so the next card down the page painted over it. While a
   dropdown is open (or anything inside has focus), its card is
   lifted above its neighbours instead.

   These rules start with "html body" on purpose. The picker also
   ships styles in admin-ux.css and partials.picker, which load
   AFTER this file; the extra weight lets these win whatever order
   the files arrive in.
   ============================================================ */

html body .panel,
html body .formcard,
html body .facts,
html body .filterbar,
html body .filters,
html body .workbar,
html body .console,
html body .tl-pay,
html body .scanbox,
html body .found,
html body .ledger {
    position: relative;
}

html body .panel:has(.picker-face[aria-expanded="true"]),
html body .formcard:has(.picker-face[aria-expanded="true"]),
html body .facts:has(.picker-face[aria-expanded="true"]),
html body .filterbar:has(.picker-face[aria-expanded="true"]),
html body .filters:has(.picker-face[aria-expanded="true"]),
html body .workbar:has(.picker-face[aria-expanded="true"]),
html body .console:has(.picker-face[aria-expanded="true"]),
html body .tl-pay:has(.picker-face[aria-expanded="true"]),
html body .scanbox:has(.picker-face[aria-expanded="true"]),
html body .found:has(.picker-face[aria-expanded="true"]),
html body .ledger:has(.picker-face[aria-expanded="true"]),
html body .panel:has(.picker-pop:not([hidden])),
html body .formcard:has(.picker-pop:not([hidden])),
html body .facts:has(.picker-pop:not([hidden])),
html body .filterbar:has(.picker-pop:not([hidden])),
html body .tl-pay:has(.picker-pop:not([hidden])),
html body .panel:focus-within,
html body .formcard:focus-within,
html body .filterbar:focus-within,
html body .filters:focus-within,
html body .tl-pay:focus-within {
    z-index: 50;
}

/* The open list is solid: nothing behind it shows through the options. */
html body .picker-pop {
    z-index: 90;
    background: var(--panel-solid, #fff);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    opacity: 1;
    box-shadow:
        0 18px 44px -12px rgba(8, 24, 18, 0.35),
        0 2px 6px rgba(8, 24, 18, 0.08);
}

html body .picker-row {
    color: var(--ink-2);
    opacity: 1;
}
html body .picker-row.at,
html body .picker-row.on {
    color: var(--ink);
}

html body .picker-list {
    max-height: min(320px, 50vh);
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* ============================================================
   Product form
   ============================================================ */

.pd-names {
    margin-top: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--warn);
}

.vb-top-go {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pd-quick {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 40px;
}
.pd-margin {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--ink-3);
}
.pd-margin input {
    width: 52px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    color: var(--ink);
    font: inherit;
    text-align: end;
}

.pd-keep {
    font-size: 11.5px;
    margin-top: 3px;
    font-weight: 600;
    min-height: 15px;
}

.pd-warn {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 700;
    color: var(--bad);
    max-width: 170px;
}
.pd-warn[hidden] {
    display: none;
}

.pd-dropped {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--warn);
}
.pd-dropped[hidden] {
    display: none;
}
#vbRows tr.pd-off td {
    opacity: 0.6;
}

.pd-bar {
    position: sticky;
    bottom: 12px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 10px 12px 10px 16px;
    border-radius: var(--r-lg);
    background: var(--panel-solid);
    border: 1px solid var(--line);
    box-shadow: 0 14px 34px -14px rgba(8, 24, 18, 0.35);
}
.pd-bar-say {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--ink-3);
}
.pd-bar .btn-go kbd {
    margin-inline-start: 6px;
    font-size: 10px;
    opacity: 0.7;
}

/* ---- receiving ---- */

.rc-find {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--glass-strong);
    min-width: 260px;
}
.rc-find input {
    border: 0;
    background: none;
    outline: none;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    flex: 1;
    min-width: 0;
}

/* ---- stock counts ---- */

.ct-pick-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.ct-quick {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.ct-shelves {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    max-height: 340px;
    overflow-y: auto;
    padding: 2px;
}
.ct-shelf {
    position: relative;
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--glass-strong);
    cursor: pointer;
    font-size: 12.5px;
    color: var(--ink-3);
    transition:
        border-color 0.15s,
        background 0.15s;
}
.ct-shelf input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.ct-shelf b {
    font-size: 15px;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.ct-shelf small {
    font-size: 11px;
    color: var(--ink-4);
}
.ct-shelf.is-stale small {
    color: var(--warn);
    font-weight: 700;
}
.ct-shelf.is-empty {
    opacity: 0.6;
}
.ct-shelf.on {
    border-color: var(--brand);
    background: var(--brand-tint);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent);
}
.ct-shelf.on::after {
    content: "✓";
    position: absolute;
    top: 8px;
    inset-inline-end: 10px;
    color: var(--brand);
    font-weight: 800;
}
.ct-shelf[hidden] {
    display: none;
}

.ct-ok {
    color: var(--good);
    font-weight: 800;
}
#ctLines tr.ct-done td:first-child {
    box-shadow: inset 3px 0 0 var(--good);
}

@media print {
    .sidebar,
    .topbar,
    .console-acts,
    .keys,
    .od-tabs,
    .tl-scan,
    .notice,
    form .btn,
    .pager {
        display: none !important;
    }
    .ct-qty {
        border: 1px solid #000 !important;
        background: #fff !important;
    }
}

/* ---- move stock ---- */
.mv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--r);
    background: var(--brand-tint);
}
.mv-from {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
}

/* ---- transfers and supplier returns ---- */
.tr-inner {
    width: 100%;
    font-size: 13px;
    background: var(--sunk);
    border-radius: var(--r-sm);
}
.tr-inner td {
    padding: 7px 12px !important;
    border: 0 !important;
}

/* ---- picking ---- */
.pk-now {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: var(--r-lg, 18px);
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: #fff;
    box-shadow: 0 14px 34px -18px
        color-mix(in srgb, var(--brand) 70%, transparent);
}
.pk-now-shelf {
    min-width: 96px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
}
.pk-now-main {
    flex: 1;
    min-width: 0;
}
.pk-now-name {
    font-size: 18px;
    font-weight: 700;
}
.pk-now .rowsub {
    color: rgba(255, 255, 255, 0.72);
}
.pk-now-qty {
    text-align: center;
}
.pk-now-qty span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.75;
}
.pk-now-qty b {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}
.pk-finished {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--r-lg, 18px);
    background: var(--good-bg);
    color: var(--good);
}
.pk-finished div {
    flex: 1;
    display: grid;
    gap: 2px;
}
.pk-finished span {
    color: var(--ink-3);
    font-size: 13px;
}
#pkTable tr.pk-done td {
    opacity: 0.55;
}
@media (max-width: 640px) {
    .pk-now {
        flex-wrap: wrap;
    }
    .pk-now-shelf {
        font-size: 24px;
        min-width: 76px;
    }
}

/* ---- expenses ---- */
.ex-kind {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: none;
    font: inherit;
    color: var(--ink);
    cursor: pointer;
    text-align: start;
}
.ex-kind:hover {
    background: var(--sunk);
}
.ex-kind.on {
    border-color: var(--brand);
    background: var(--brand-tint);
}
.ex-kind-name {
    width: 190px;
    font-weight: 600;
    font-size: 13.5px;
}
.ex-kind-name small {
    display: block;
    font-weight: 500;
    color: var(--ink-4);
    font-size: 11.5px;
}
.ex-kind b {
    min-width: 110px;
    text-align: end;
    font-variant-numeric: tabular-nums;
}

/* ---- accounting ---- */
.act.act-on {
    background: var(--brand-tint);
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 35%, transparent);
}
#acTable tr.ac-head td {
    font-weight: 700;
    color: var(--ink-2);
    background: var(--sunk);
}
.je-grid td {
    vertical-align: top;
}
.je-grid .af-in {
    width: 100%;
}
.je-foot td {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    border-top: 2px solid var(--line) !important;
}
.je-off {
    color: var(--bad);
}
.je-ok {
    color: var(--good);
}

/* ---- garida ---- */
.gh-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-soft, var(--line));
}
.gh-check:last-child {
    border-bottom: 0;
}
.gh-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
    background: var(--good);
}
.gh-check.bad .gh-dot {
    background: var(--bad);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 18%, transparent);
}
.gh-label {
    flex: 1;
    font-size: 13.5px;
    font-weight: 600;
}
.gh-detail {
    font-size: 12.5px;
    color: var(--ink-3);
}
.gh-check.bad .gh-detail {
    color: var(--bad);
}
.gh-strip {
    display: flex;
    gap: 4px;
    padding: 0 16px 12px;
}
.gh-strip i {
    flex: 1;
    height: 22px;
    border-radius: 5px;
    background: var(--good);
    opacity: 0.85;
}
.gh-strip i.bad {
    background: var(--bad);
}
.gm-detail {
    display: grid;
    gap: 8px;
    padding: 4px 0;
}
.gm-pre {
    margin: 0;
    max-height: 320px;
    overflow: auto;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    background: var(--sunk);
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    direction: ltr;
    text-align: left;
}
.gm-pre.bad {
    background: color-mix(in srgb, var(--bad) 8%, var(--sunk));
    color: var(--bad);
}

/* ---- reports ---- */
.rp-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 4px;
    border-radius: var(--r);
    background: var(--glass);
    border: 1px solid var(--line);
    backdrop-filter: blur(16px);
}
.rp-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: var(--r-sm);
    color: var(--ink-3);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.rp-nav a:hover {
    background: var(--sunk);
    color: var(--ink);
}
.rp-nav a.on {
    background: var(--brand);
    color: #fff;
}
.rp-nav svg {
    width: 15px;
    height: 15px;
}
.rp-period {
    flex-wrap: wrap;
}
.rp-quick {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    flex-basis: 100%;
}
.rp-quick .pill {
    padding-inline-end: 10px;
}
.rp-group {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-4);
    margin: 6px 2px 10px;
}
.rp-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}
.rp-bar .kpi-meter {
    flex: 1;
}
.rp-days {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 140px;
    padding: 10px 16px 0;
}
.rp-days i {
    flex: 1;
    min-width: 3px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--brand), var(--brand-deep));
    opacity: 0.85;
}
.rp-days i.weekend {
    opacity: 0.55;
}
.rp-days i.best {
    background: var(--good);
    opacity: 1;
}
.rp-days-axis {
    display: flex;
    justify-content: space-between;
    padding: 4px 16px 12px;
    font-size: 11px;
    color: var(--ink-4);
}
.rp-rank {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--sunk);
    font-size: 11px;
    font-weight: 800;
    margin-inline-end: 8px;
}
.rp-rank.gold {
    background: #f5c542;
    color: #3a2a00;
}
@media print {
    .rp-nav,
    .rp-period,
    .console-acts {
        display: none !important;
    }
}

/* ---- company settings ---- */
.co-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: start;
}
.co-preview {
    position: sticky;
    top: 80px;
}
.co-preview-top {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-4);
    margin: 0 0 8px 2px;
}
.co-slip {
    display: grid;
    gap: 3px;
    padding: 18px 16px;
    border-radius: 6px;
    background: #fff;
    color: #111;
    font:
        12.5px/1.45 ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
    text-align: center;
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.35);
}
.co-slip b {
    font-size: 15px;
}
.co-slip span:empty {
    display: none;
}
.co-slip hr {
    border: 0;
    border-top: 1px dashed #999;
    margin: 8px 0;
    width: 100%;
}
.co-line {
    display: flex;
    justify-content: space-between;
    text-align: start;
}
.co-line.b {
    font-weight: 800;
}
.co-slip p {
    margin: 8px 0 0;
}
@media (max-width: 900px) {
    .co-wrap {
        grid-template-columns: 1fr;
    }
    .co-preview {
        position: static;
    }
}s
