/* Garage Mall - compact iOS-native feel, Windows-desktop-first, phone friendly. No inline styles anywhere (CSP). */
:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --text: #14181f;
  --muted: #667085;
  --line: #e4e7ec;
  --accent: #0b5fff;
  --accent-ink: #ffffff;
  --accent-soft: #e8f0ff;
  --pos: #12805c;
  --neg: #c8382d;
  --warn: #a15c00;
  --warn-soft: #fff3dc;
  --overlay: rgba(16, 24, 40, 0.45);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --radius: 12px;
  --side-w: 236px;
  --tabbar-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Armenian", "Sylfaen", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
/* Dark palette: when the system is dark and the user did not force light (auto), or when the user forced dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116; --surface: #171b22; --surface-2: #1d222b; --text: #eef1f5; --muted: #98a2b3; --line: #2a303b;
    --accent: #4d8bff; --accent-ink: #06122b; --accent-soft: #1a2a4d; --pos: #3fcf9a; --neg: #ff7a6e; --warn: #f5b04a; --warn-soft: #3a2c10;
    --overlay: rgba(0, 0, 0, 0.6); --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  --bg: #0e1116; --surface: #171b22; --surface-2: #1d222b; --text: #eef1f5; --muted: #98a2b3; --line: #2a303b;
  --accent: #4d8bff; --accent-ink: #06122b; --accent-soft: #1a2a4d; --pos: #3fcf9a; --neg: #ff7a6e; --warn: #f5b04a; --warn-soft: #3a2c10;
  --overlay: rgba(0, 0, 0, 0.6); --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
/* The page never scrolls sideways and never zooms (owner request): only the pieces that scroll on purpose (tables, chip bars) pan horizontally. */
html { -webkit-text-size-adjust: 100%; overflow-x: clip; max-width: 100%; overscroll-behavior-x: none; touch-action: pan-y; }
.seg, .chipbar, .tbl-wrap, .tt-wrap, .sheet-body, textarea, input { touch-action: pan-x pan-y; }
html.sheet-open, html.sheet-open body { overflow: hidden; }
body { margin: 0; overflow-x: clip; max-width: 100%; touch-action: pan-y; background: var(--bg); color: var(--text); overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 1px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num, .amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.93em; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.warn { color: var(--warn); }
.ic { width: 20px; height: 20px; flex: none; }
.r { text-align: right; }

/* ---------- shell ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.sidebar { display: none; }
.main { min-width: 0; padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); }
.views { max-width: 1360px; margin: 0 auto; padding: 12px 16px 16px; }
/* phone header: brand left, burger (everything that is not on the tab bar) right */
.topbar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: calc(52px + var(--safe-t)); padding: var(--safe-t) 8px 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .brand { padding: 0; }
.topbar-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: none; color: var(--text); }
.topbar-btn .ic { width: 26px; height: 26px; }
.topbar-btn .nav-badge { position: absolute; top: 3px; right: 1px; margin: 0; }
.view { display: block; }
.offline-bar { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 6px 12px; font-size: 13px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: var(--surface);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
.tab { flex: 1 1 0; min-width: 0; min-height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 3px;
  color: var(--muted); background: none; border: 0; font-size: 10px; line-height: 1.15; text-align: center; overflow-wrap: break-word; letter-spacing: -0.1px; }
.tab.active { color: var(--accent); }
.tab .ic { width: 23px; height: 23px; }
/* the big round middle button (New sale) */
.tab-fab { overflow: visible; color: var(--accent); font-weight: 650; }
.tab-fab .ic { width: 52px; height: 52px; padding: 13px; margin-top: -26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 10px rgba(11, 95, 255, 0.35); border: 3px solid var(--surface); }

@media (min-width: 900px) {
  .shell { grid-template-columns: var(--side-w) 1fr; }
  .sidebar { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--line); }
  .tabbar { display: none; }
  .topbar { display: none; }
  .main { padding-bottom: 24px; }
  .views { padding: 20px 28px 32px; }
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.brand-name { font-weight: 700; font-size: 16px; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; letter-spacing: 0.5px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--text); min-height: 38px; }
.side-link:hover { background: var(--surface-2); }
.side-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-user { display: flex; flex-direction: column; padding: 8px; border-top: 1px solid var(--line); }

/* ---------- page ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.2px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.toolbar .searchbar { flex: 1 1 150px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.sort-btn { margin-left: auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-title { font-size: 14px; font-weight: 650; margin-bottom: 8px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sub-title { font-size: 13px; font-weight: 650; color: var(--muted); margin: 14px 0 6px; text-transform: none; }
.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.grid-cash { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 900px) {
  .grid-kpi { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 3fr 2fr; }
  .grid-cash { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (min-width: 1280px) { .grid-kpi { grid-template-columns: repeat(6, 1fr); } }
.lfl { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.lfl .ic { width: 16px; height: 16px; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.empty-error { color: var(--neg); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.count-line { margin: 4px 2px; }

/* ---------- kpi ---------- */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; min-width: 0; }
.kpi-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; margin: 2px 0 6px; display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.kpi-unit { font-size: 12px; font-weight: 500; color: var(--muted); }
.kpi-deltas { display: flex; flex-direction: column; gap: 3px; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; flex-wrap: wrap; }
.delta .ic { width: 14px; height: 14px; }
.delta-up { color: var(--pos); }
.delta-down { color: var(--neg); }
.delta-none { color: var(--muted); }
.delta-l { color: var(--muted); }
.kpi-sk { min-height: 92px; }
/* home: one big total card (revenue + litres), then compact cards that always sit side by side */
.kpi-total { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0 14px; margin-bottom: 10px; padding: 14px 16px; }
.kpi-total .kt-side { border-left: 1px solid var(--line); padding-left: 14px; min-width: 0; }
.kpi-total .kpi-value { font-size: 26px; }
.kpi-total .kt-side .kpi-value { font-size: 20px; }
.grid-3, .grid-2c { display: grid; gap: 8px; margin-bottom: 10px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2c { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi-sm { padding: 9px 8px; }
.kpi-sm .kpi-label { font-size: 12px; line-height: 1.2; min-height: 2.4em; align-items: flex-start; }
.kpi-sm .kpi-value { font-size: 17px; margin: 2px 0 4px; }
.kpi-sm .delta { font-size: 10.5px; gap: 3px; flex-wrap: nowrap; white-space: nowrap; }
.kpi-sm .delta .ic { width: 12px; height: 12px; }
@media (max-width: 380px) { .kpi-total { grid-template-columns: 1fr; gap: 10px; } .kpi-total .kt-side { border-left: 0; border-top: 1px solid var(--line); padding: 10px 0 0; } .kpi-sm .kpi-value { font-size: 15px; } }
/* quick access: three coloured buttons on one row */
.quick-access { margin-bottom: 12px; }
.qa-title { font-size: 13px; font-weight: 650; color: var(--muted); margin: 0 2px 6px; }
.qa-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qa-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 10px 6px; border-radius: var(--radius); text-align: center; font-size: 13px; font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; color: var(--qa-fg); background: var(--qa-bg); border: 1px solid var(--qa-line); }
.qa-btn .ic { width: 26px; height: 26px; }
.qa-blue { --qa-fg: #0b5fff; --qa-bg: #e6efff; --qa-line: #c5d8ff; }
.qa-orange { --qa-fg: #b45309; --qa-bg: #fff1dd; --qa-line: #fbd9a8; }
.qa-green { --qa-fg: #0f7a55; --qa-bg: #def6ec; --qa-line: #b4e8d0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .qa-blue { --qa-fg: #8db4ff; --qa-bg: #172746; --qa-line: #25407a; }
  :root:not([data-theme="light"]) .qa-orange { --qa-fg: #f5b86b; --qa-bg: #382a12; --qa-line: #6b4d1c; }
  :root:not([data-theme="light"]) .qa-green { --qa-fg: #5fd6a5; --qa-bg: #12342a; --qa-line: #1f6a50; }
}
:root[data-theme="dark"] .qa-blue { --qa-fg: #8db4ff; --qa-bg: #172746; --qa-line: #25407a; }
:root[data-theme="dark"] .qa-orange { --qa-fg: #f5b86b; --qa-bg: #382a12; --qa-line: #6b4d1c; }
:root[data-theme="dark"] .qa-green { --qa-fg: #5fd6a5; --qa-bg: #12342a; --qa-line: #1f6a50; }
.sk-line, .sk-row { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; border-radius: 6px; animation: shimmer 1.4s linear infinite; }
.sk-line { height: 12px; width: 60%; margin: 6px 0; }
.sk-big { height: 24px; width: 80%; }
.sk-row { height: 44px; margin-bottom: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton { padding: 4px 0; }

/* ---------- chart ---------- */
.bars { display: flex; align-items: stretch; gap: 4px; height: 168px; }
.bar { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; background: none; border: 0; padding: 0; border-radius: 6px; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar-fill { display: block; width: 100%; max-width: 30px; height: var(--h, 0%); min-height: 2px; background: var(--line); border-radius: 5px 5px 2px 2px; transition: background 0.15s; }
.bar:hover .bar-fill { background: var(--accent-soft); }
.bar.sel .bar-fill { background: var(--accent); }
.bar-l { font-size: 10.5px; color: var(--muted); height: 28px; padding-top: 4px; text-align: center; line-height: 1.1; }
.bar-l small { display: block; font-size: 10px; opacity: 0.8; }
.bar.sel .bar-l { color: var(--accent); font-weight: 700; }
.bar-caption { margin-top: 6px; }
.card-net .net-value { font-size: 26px; font-weight: 700; margin: 4px 0; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; text-align: center; line-height: 1.15; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ghost.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-block { display: flex; width: 100%; margin: 8px 0; }
.btn-sm { padding: 0 12px; font-size: 14px; }
.badge { min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--accent); color: var(--accent-ink); font-size: 11px; display: inline-grid; place-items: center; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; border-radius: 10px; color: var(--muted); padding: 0; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:disabled { opacity: 0.35; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--accent); font-weight: 600; text-align: left; min-height: 32px; }
@media (min-width: 900px) and (pointer: fine) {
  .btn { min-height: 36px; }
  .btn-sm { min-height: 34px; }
  .icon-btn { width: 36px; height: 36px; }
}

input, select, textarea { font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 44px; padding: 0 12px; width: 100%; min-width: 0; }
@media (min-width: 900px) and (pointer: fine) { input, select { font-size: 14.5px; min-height: 36px; } }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.field-inline { display: flex; flex-direction: column; gap: 2px; font-size: 12px; flex: 1 1 0; min-width: 0; }
.form-error { color: var(--neg); font-size: 14px; margin: 4px 0 10px; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

.searchbar { position: relative; display: flex; align-items: center; min-width: 0; }
.searchbar input { padding-left: 36px; padding-right: 40px; }
.searchbar-ic { position: absolute; left: 10px; color: var(--muted); display: grid; pointer-events: none; }
.searchbar-x { position: absolute; right: 0; }
input[type="search"]::-webkit-search-cancel-button { display: none; }

.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 2px; gap: 2px; max-width: 100%; margin-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .seg { display: inline-flex; } }
.seg-center { display: flex; justify-content: center; margin: 14px auto 0; width: fit-content; }
.seg-btn { flex: 1 0 auto; min-height: 40px; min-width: 44px; padding: 0 12px; border: 0; background: none; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13.5px; text-align: center; line-height: 1.15; }
.seg-btn.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
@media (min-width: 900px) and (pointer: fine) { .seg-btn { min-height: 30px; } }

.period { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: flex-end; margin-bottom: 4px; }
.period-dates { display: flex; gap: 8px; flex: 1 1 260px; max-width: 420px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 8px 0 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--accent-soft); color: var(--accent); font-size: 13px; text-align: left; }
.chip .ic { width: 16px; height: 16px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-weight: 600; }
.banner .ic { width: 18px; height: 18px; }

.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 2px; }
.stepper-label { position: relative; min-width: 150px; text-align: center; padding: 0 6px; font-weight: 650; display: grid; place-items: center; min-height: 44px; cursor: pointer; }
.stepper-label input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
@media (min-width: 900px) and (pointer: fine) { .stepper-label { min-height: 36px; } }

.info-mark { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; background: none; color: var(--muted); border-radius: 50%; vertical-align: middle; }
.info-mark::after { content: ""; position: absolute; inset: -12px; }
.info-mark .ic { width: 16px; height: 16px; }
.info-pop { position: absolute; z-index: 60; background: var(--text); color: var(--bg); padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.35; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }

/* ---------- totals strip ---------- */
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 8px 0 12px; }
.totals > div { display: flex; flex-direction: column; min-width: 0; }
.totals strong, .totals .num { font-size: 16px; font-weight: 700; }

/* ---------- tables (wide) and lists (phone) ---------- */
.only-narrow { display: block; }
.only-wide { display: none; }
@media (min-width: 900px) {
  .only-narrow { display: none; }
  .only-wide { display: block; }
}
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl th.r { text-align: right; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.tbl td.r { white-space: nowrap; overflow-wrap: normal; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .tfoot th, .tbl .tfoot td { background: var(--surface-2); border-top: 1px solid var(--line); font-weight: 700; color: var(--text); }
.th-sort { display: inline-flex; align-items: center; gap: 3px; background: none; border: 0; padding: 0; font: inherit; color: inherit; white-space: nowrap; }
.th-sort .ic { width: 13px; height: 13px; opacity: 0.55; }
.th-sort.active { color: var(--accent); }
.th-sort.active .ic { opacity: 1; }
.tappable tr[data-entry], .tappable li[data-entry], .tappable tr[data-pour], .tappable li[data-pour], .tappable tr[data-card], .tappable li[data-card], .tappable tr[data-id], .tappable li[data-id], .tappable tr[data-name], .tappable li[data-name] { cursor: pointer; }

.list { list-style: none; margin: 0; padding: 0; }
.li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); min-height: 48px; }
.li:last-child { border-bottom: 0; }
.li-main { min-width: 0; flex: 1 1 auto; }
.li-title { font-weight: 550; overflow-wrap: anywhere; }
.li-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.li-end { text-align: right; flex: none; max-width: 48%; }
.li-amt { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.li-side { font-size: 12px; color: var(--muted); white-space: nowrap; }
.li-total { background: var(--surface-2); font-weight: 700; }
.day { overflow: hidden; }
.day-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.day-sum { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; }
.kvs { display: grid; grid-template-columns: 1fr; gap: 6px 16px; margin: 8px 0 12px; }
@media (min-width: 600px) { .kvs { grid-template-columns: 1fr 1fr; } }
.kv { display: flex; flex-direction: column; min-width: 0; }
.kv dt { font-size: 12px; color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.sheet-name { font-size: 18px; margin-bottom: 4px; }

/* ---------- sheets ---------- */
.sheet-overlay { position: fixed; inset: 0; z-index: 50; background: var(--overlay); opacity: 0; transition: opacity 0.18s; display: flex; align-items: flex-end; justify-content: center; }
.sheet-overlay.open { opacity: 1; }
.sheet-overlay.closing { opacity: 0; }
.sheet { width: 100%; max-height: 90vh; max-height: 90dvh; background: var(--surface); border-radius: 16px 16px 0 0; display: flex; flex-direction: column; transform: translateY(100%); transition: transform 0.2s ease-out; outline: 0; }
.sheet-overlay.open .sheet { transform: none; }
.sheet-overlay.closing .sheet { transform: translateY(100%); }
.sheet-grab { width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px 4px 16px; }
.sheet-title { font-size: 17px; font-weight: 700; }
.sheet-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 16px 16px; -webkit-overflow-scrolling: touch; }
.sheet-text { padding: 8px 0; }
.sheet-actions { display: flex; gap: 10px; padding: 10px 16px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet-actions .btn { flex: 1; }
@media (min-width: 900px) {
  .sheet-overlay { align-items: center; }
  .sheet { width: 520px; border-radius: 16px; max-height: 82vh; transform: translateY(14px) scale(0.98); }
  .sheet-wide { width: 820px; }
  .sheet-grab { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-overlay { transition: none; } .sk-line, .sk-row, .boot-spinner { animation: none; } }

.pick-scroll { max-height: 52vh; overflow-y: auto; margin: 8px -16px 0; }
.pick-list, .pick-children { list-style: none; margin: 0; padding: 0; }
.pick-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 16px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; }
.pick-head { padding: 0; gap: 0; }
.pick-toggle { display: grid; place-items: center; width: 56px; min-height: 48px; background: none; border: 0; padding: 0; }
.pick-expand { display: flex; align-items: center; gap: 10px; flex: 1; min-height: 48px; background: none; border: 0; padding: 0 16px 0 0; text-align: left; }
.pick-child { padding-left: 40px; background: var(--surface-2); }
.pick-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pick-count { color: var(--muted); font-size: 12.5px; }
.pick-chev { color: var(--muted); display: grid; transition: transform 0.15s; }
.pick-chev.open { transform: rotate(90deg); }
.pick-selected { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.cb { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line); display: inline-grid; place-items: center; flex: none; color: var(--accent-ink); background: var(--surface); }
.cb .ic { width: 15px; height: 15px; stroke-width: 3; }
.cb-all, .cb-some { background: var(--accent); border-color: var(--accent); }

/* ---------- login / toast ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; background: linear-gradient(160deg, var(--accent-soft), var(--bg) 55%); }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 32px rgba(16, 24, 40, 0.12); padding: 24px 22px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand h1 { font-size: 20px; }
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 900px) { #toasts { bottom: 24px; } }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); font-size: 14px; }
.toast.ok { background: var(--pos); color: #fff; }
.update-banner { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); z-index: 80; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 520px; margin: 0 auto; padding: 10px 12px 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); }
.update-banner[hidden] { display: none; }
.update-text { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.update-banner .btn { flex: none; }
@media (min-width: 900px) { .update-banner { bottom: 24px; } }
.more-list { display: flex; flex-direction: column; }
.more-link { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 4px; color: var(--text); border-bottom: 1px solid var(--line); }
.more-link > span:first-of-type { flex: 1; overflow-wrap: anywhere; }
.more-link .badge { flex: none; }
.more-link .ic:last-child { color: var(--muted); }

/* ---------- refinements ---------- */
.card:not(.flush) .list .li { padding-left: 0; padding-right: 0; }
.btn-outline { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
input[type="date"], input[type="month"] { min-width: 0; }
.period-dates input { padding: 0 8px; }
.period-dates input::-webkit-calendar-picker-indicator { margin-left: 0; padding: 0; }
.more-list button.more-link { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; padding: 0 4px; }
.seg-scroll { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); }
@media (min-width: 900px) { .seg-scroll { -webkit-mask-image: none; mask-image: none; } }
@media (max-width: 420px) {
  .seg-btn { padding: 0 8px; font-size: 13px; }
  .views { padding-left: 14px; padding-right: 14px; }
}

.period { min-width: 0; }
.period .seg { flex: 0 1 auto; }

@media (max-width: 350px) { .tab { font-size: 8.5px; letter-spacing: -0.3px; padding: 4px 1px; } }

.car-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.car-item { border: 1px solid var(--line, #e3e6ec); border-radius: 10px; padding: 8px 10px; min-width: 0; overflow-wrap: anywhere; }
.car-main { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }

.chipbar { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.chipbar::-webkit-scrollbar { display: none; }
.cat-btn { flex: none; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; white-space: nowrap; }
.cat-btn.small { min-height: 36px; font-size: 13px; }
.cat-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 650; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field small { font-size: 12px; color: var(--muted); }
.car-block { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.car-edit { margin-left: auto; width: 36px; height: 36px; }
.nav-badge { margin-left: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--neg); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tab .nav-badge { position: absolute; top: 4px; margin-left: 14px; }
.tab { position: relative; }
.req-list { display: grid; gap: 10px; }
.req { padding: 12px; }
.req-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.req-changes { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.req-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.pill-pending { background: var(--accent-soft); color: var(--accent); }
.pill-approved { color: var(--pos); }
.pill-rejected, .pill-stale { color: var(--neg); }
.toolbar-wrap .searchbar { flex: 1 1 100%; }
@media (min-width: 900px) { .toolbar-wrap .searchbar { flex: 1 1 260px; } }

/* sale screen */
.sale { display: grid; gap: 12px; padding-bottom: 84px; }
.sale-col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.card.pad { padding: 12px; }
.sub-title.first { margin-top: 0; }
@media (min-width: 900px) { .sale { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); padding-bottom: 80px; } }
.row-btns { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin-top: 8px; }
.grow { flex: 1 1 140px; min-width: 0; }
.sel-customer { display: flex; justify-content: space-between; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.pick-list { list-style: none; margin: 6px 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pick { width: 100%; min-height: 48px; padding: 6px 12px; display: flex; gap: 8px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); text-align: left; color: var(--text); }
.pick-list li:last-child .pick { border-bottom: 0; }
.chipbar.quick { padding-top: 8px; }
.sale-lines { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.sale-line { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.sl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; overflow-wrap: anywhere; }
.sl-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; }
.qty { width: 64px; text-align: center; padding: 0 4px; }
.sl-total { margin-left: auto; }
.pay-rows { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.pay-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pay-m { min-width: 84px; font-weight: 600; }
.pay-amt { flex: 1 1 100px; text-align: right; }
.pay-extra { flex: 1 1 100%; display: grid; gap: 6px; }
.warn { color: var(--neg); font-size: 14px; margin: 8px 0; }
.num.big { font-size: 1.25em; }
.neg { color: var(--neg); }
.sale-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 40; padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .sale-bar { position: sticky; bottom: 0; grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 12px; } }
.sale-bar .btn { display: flex; justify-content: center; gap: 10px; }
.pay-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pay-list li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.blank { flex: 1 1 100%; margin: 4px 0; padding: 8px; background: var(--surface-2); border-radius: 8px; white-space: pre-wrap; font-size: 13px; }
.cat-btn:disabled { opacity: 0.4; }

/* warehouse: floating head, table head sticks below it, chunked list */
.inv-head { position: sticky; top: 0; z-index: 25; background: var(--bg, var(--surface-2)); padding-top: 4px; margin: 0 -2px; }
.inv-head .page-head { margin-bottom: 6px; }
.inv-card .tbl-wrap { overflow: visible; }
.inv-card .tbl th { position: sticky; top: var(--inv-head-h, 0px); z-index: 5; }
.btn.icon-only { min-width: 44px; padding: 0; justify-content: center; }
.btn.icon-only.active { border-color: var(--accent); color: var(--accent); }
.sentinel { min-height: 40px; }
.narrow-only { display: none; }
@media (max-width: 899px) { .narrow-only { display: inline; } }
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.col-check { padding: 10px 0; min-height: 44px; }
.card.flush.inv-card { overflow: visible; }

/* stocktaking */
.stk-banner { display: flex; align-items: center; gap: 10px; background: var(--accent-soft); color: var(--accent); padding: 8px 14px; font-size: 14px; font-weight: 600; }
.stk-banner span { flex: 1; min-width: 0; }
.stk-banner a { flex: none; min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 18px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 650; }
.stk-blind { display: flex; gap: 6px; align-items: center; margin: 0 0 8px; }
.stk-progress { display: flex; flex-direction: column; gap: 4px; font-size: 13px; margin-bottom: 8px; }
.stk-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.stk-bar i { display: block; height: 100%; background: var(--accent); transition: width 0.2s; }
.stk-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .stk-list { grid-template-columns: repeat(2, 1fr); } }
.stk-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stk-row.done { border-color: var(--pos); }
.stk-name { font-weight: 600; overflow-wrap: anywhere; }
.stk-tick { color: var(--pos); display: inline-flex; vertical-align: middle; }
.stk-inputs { display: flex; gap: 10px; }
.stk-inputs input { min-height: 44px; text-align: right; font-size: 16px; }
.stk-charge { display: flex; gap: 10px; margin-top: 8px; }
.stk-charge .field-inline:first-child { flex: 2 1 0; }
.stk-charge-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.stk-charge-foot .muted { flex: 1; min-width: 120px; }
.stk-pay { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; }
.stk-actions { display: flex; justify-content: flex-end; margin: 12px 0; }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius); padding: 8px 12px; font-size: 13px; }
.pour-hint { display: inline-flex; vertical-align: middle; }
.pour-hint .ic { width: 14px; height: 14px; }
.kpi-sub { display: block; font-weight: 400; }

/* staff: payroll cards and the timetable grid */
.pay-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .pay-grid { grid-template-columns: repeat(2, 1fr); } }
.pay-card { margin: 0; }
.pay-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pay-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); min-width: 0; }
.pay-line > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.pay-sum { font-variant-numeric: tabular-nums; }
.pay-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.tt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tt { border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.tt th, .tt td { min-width: 40px; height: 44px; padding: 0 4px; text-align: center; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.tt thead th { height: 34px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.tt .tt-name { position: sticky; left: 0; z-index: 1; min-width: 118px; max-width: 150px; text-align: left; background: var(--surface); font-weight: 600; white-space: normal; padding: 4px 8px; }
.tt thead .tt-name { background: var(--surface-2); }
.tt .tt-total { min-width: 48px; font-weight: 700; }
.tt td.we { background: var(--surface-2); }
.tt td.today, .tt th.today { box-shadow: inset 0 -2px 0 var(--accent); }
.tt td.zero { color: var(--neg); }
.tt td[data-cell] { cursor: pointer; }
@media (min-width: 900px) and (pointer: fine) { .tt th, .tt td { min-width: 33px; padding: 0 2px; } .tt .tt-name { min-width: 150px; } }

.work-card { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 10px 14px; margin: 0 0 10px; }
.work-card.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.tt td.flag { box-shadow: inset 0 0 0 2px var(--neg); }
.flag-key::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; border: 2px solid var(--neg); border-radius: 2px; }
.att-hint { margin: 0 0 10px; line-height: 1.5; }
textarea { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); color: var(--text); }
.plate { font-weight: 700; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.car-in { margin-bottom: 10px; }
.car-in .field { margin-bottom: 8px; }
.car-date { margin-bottom: 8px; }
/* long Armenian tab names must not run into each other (5 tabs on a 320 px phone): one line, cut with an ellipsis */
.tab span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; max-width: 100%; overflow: hidden; overflow-wrap: anywhere; }

/* ---------- exceptions inbox ---------- */
.seg-row { margin: 10px 0; }
.exc { padding: 12px; }
.exc-title { overflow-wrap: anywhere; min-width: 0; }
.exc-detail { overflow-wrap: anywhere; margin: 4px 0; }
.exc-event { margin: 6px 0 0; padding-left: 8px; border-left: 2px solid var(--line); overflow-wrap: anywhere; }
.exc-ok { border-left-color: var(--pos); }
.exc .req-actions { flex-wrap: wrap; }
@media (min-width: 900px) { .exc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.card > p + p, .card > .req-actions + p { margin-top: 8px; }
.card > p + .field { margin-top: 12px; }

/* ---------- offline outbox bar ---------- */
.stk-banner button { flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: var(--accent); color: #fff; font-weight: 650; }
.outbox-bar.outbox-bad { background: var(--warn-soft); color: var(--warn); }
.outbox-bar.outbox-bad button { background: var(--warn); }

/* ---------- product photo, payroll cross-check ---------- */
.card-photo { display: block; max-width: 100%; max-height: 240px; margin: 10px auto; border-radius: 12px; object-fit: contain; background: var(--surface-2); }
.photo-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.photo-btn { cursor: pointer; }
.pay-excel-box { display: inline-flex; align-items: center; gap: 8px; }
.pay-excel-box input { width: 120px; min-height: 36px; text-align: right; }

/* ---------- new sale: customer finder + product finder ---------- */
.search-add { display: flex; gap: 8px; align-items: stretch; }
.search-add .searchbar { flex: 1 1 auto; }
.btn-add { flex: none; width: 44px; min-width: 44px; padding: 0; }
.btn-add .ic { width: 22px; height: 22px; }
.cat-icon { display: inline-flex; align-items: center; gap: 6px; }
.cat-icon .ic { width: 18px; height: 18px; }
.prod-search input { padding-right: 90px; }
.searchbar-filter { position: absolute; right: 44px; width: 44px; }
.searchbar-filter.on { color: var(--accent); }
.searchbar-filter.on::after { content: ""; position: absolute; top: 9px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--surface); }
.prod-results { max-height: 340px; overflow-y: auto; }
.pick-prod { align-items: center; flex-wrap: nowrap; }
.pp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; overflow-wrap: anywhere; }
.pp-add { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.pp-add .ic { width: 18px; height: 18px; }
.chipbar.wrap { flex-wrap: wrap; overflow: visible; }
.pill-ok { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
/* Oil finder */
.of-form { display: flex; gap: 8px; align-items: stretch; margin-bottom: 8px; }
.of-form .searchbar { flex: 1 1 auto; }
.of-form .btn { flex: 0 0 auto; }
.of-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.of-chip { white-space: nowrap; flex: none; display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--text); }
.of-chip.btn-like { cursor: pointer; font: inherit; font-size: 13px; }
.of-recent { margin-bottom: 4px; }
.of-car { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 10px; font-size: 16px; }
.of-spec-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.of-status { padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 650; }
.of-status.confirmed { background: var(--accent-soft); color: var(--pos); }
.of-status.unconfirmed { background: var(--warn-soft); color: var(--warn); }
.of-grades { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.of-grade { font-size: 24px; font-weight: 750; letter-spacing: 0.2px; }
.of-grade.alt { font-size: 18px; font-weight: 600; color: var(--muted); align-self: flex-end; }
.of-line { margin: 8px 0 4px; }
.of-sources { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.of-src { display: flex; align-items: flex-start; gap: 6px; min-height: 36px; color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.of-src svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.of-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.of-actions .btn { flex: 1 1 130px; }
.of-h { font-size: 15px; margin: 16px 0 8px; }
.of-prod-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 4px 8px; margin-bottom: 8px; }
.of-prod-head strong { flex: 1 1 60%; min-width: 0; }
.of-level { flex: none; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 10px; }
.of-level.full { background: var(--accent-soft); color: var(--pos); }
.of-level.partial { background: var(--warn-soft); color: var(--warn); }
.of-level.viscosity { background: var(--surface-2); color: var(--muted); }
.of-variants { display: flex; flex-direction: column; }
.of-var { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; min-height: 40px; border-top: 1px solid var(--line); }
.of-var:first-child { border-top: 0; }
.of-var .amt { text-align: right; font-weight: 600; }
.of-stock { font-size: 12px; min-width: 70px; text-align: right; }
.of-stock.in { color: var(--pos); }
.of-stock.out { color: var(--neg); }
.of-hist { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.of-hist:first-of-type { border-top: 0; }
.of-wait { text-align: center; padding: 22px 14px; }
.of-spin { width: 28px; height: 28px; margin: 0 auto 10px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: of-spin 0.9s linear infinite; }
@keyframes of-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .of-spin { animation-duration: 3s; } }
.of-msg p { margin: 0 0 8px; }
.of-ai { margin: 0 0 8px; }
.of-pending { margin-bottom: 4px; }
.of-help { margin: -4px 0 14px; }
