:root {
  /* SBX palette — change brand colors here only */
  --brand: #1b2350;          /* deep navy from the logo */
  --brand-hover: #141a3d;
  --brand-tint: #2a3366;     /* navy surfaces inside the sidebar */
  --accent: #4c6fff;         /* electric blue: focus, links, progress */
  --accent-soft: #eef1ff;
  --ink: #1b2134;
  --muted: #6b7288;
  --line: #e6e8f0;
  --surface: #ffffff;
  --canvas: #f5f6fa;
  --ok-bg: #e7f6ee; --ok-fg: #1d7a46;
  --low-bg: #fff4e0; --low-fg: #9a5b0b;
  --out-bg: #fdecec; --out-fg: #b42318;
  --sidebar-w: 236px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .05);
  /* Theme tokens (light values = the original design) */
  --surface-2: #fafbfc;      /* table headers, input addons */
  --hover-row: #f8f9fe;
  --group-hover: #e2e7ff;
  --muted-bg: #eceef3;
  --icon-fg: var(--brand);   /* navy glyphs on soft backgrounds */
  --code-fg: var(--brand);
  --btn-bg: var(--brand);
  --btn-hover: var(--brand-hover);
  --sidebar-bg: var(--brand);
  --sidebar-active: var(--brand-tint);
  --row-store-bg: var(--brand);
  --empty-ring: #f7f8ff;
  --auth-glow: #e3e8ff;
  --auth-bottom: #eceef6;
}

/* Dark theme: deep navy/slate surfaces consistent with the SBX logo; status colors stay recognisable. */
[data-bs-theme="dark"] {
  --accent: #7d95ff;
  --accent-soft: rgba(92, 122, 255, .16);
  --ink: #e4e8f3;
  --muted: #98a2bd;
  --line: #27304f;
  --surface: #131a31;
  --surface-2: #19213d;
  --canvas: #0b1022;
  --ok-bg: rgba(52, 168, 98, .18); --ok-fg: #74d8a0;
  --low-bg: rgba(245, 166, 35, .17); --low-fg: #f6bd5c;
  --out-bg: rgba(240, 82, 82, .18); --out-fg: #ff8f86;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .28);
  --hover-row: rgba(92, 122, 255, .08);
  --group-hover: rgba(92, 122, 255, .26);
  --muted-bg: #232c4b;
  --icon-fg: #b4c1ff;
  --code-fg: #b4c1ff;
  --btn-bg: #3f5ff0;
  --btn-hover: #3350d6;
  --sidebar-bg: #0f1530;
  --sidebar-active: #1e2750;
  --row-store-bg: #222d63;
  --empty-ring: rgba(92, 122, 255, .07);
  --auth-glow: rgba(76, 111, 255, .22);
  --auth-bottom: #080c1b;
  /* Bootstrap components (forms, tables, dropdowns, modals, alerts) inherit these */
  --bs-body-bg: var(--surface);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-secondary-color: var(--muted);
  --bs-tertiary-bg: var(--surface-2);
  --bs-secondary-bg: var(--surface-2);
  color-scheme: dark;
}
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--canvas); color: var(--ink); font-size: .925rem; }
a { color: var(--accent); }
code { color: var(--code-fg); }
.text-accent { color: var(--accent); }
.min-w-0 { min-width: 0; }
.tabular { font-variant-numeric: tabular-nums; }

/* Buttons */
.btn { border-radius: 10px; font-weight: 500; padding: .5rem 1rem; }
.btn-brand { background: var(--btn-bg); border-color: var(--btn-bg); color: #fff; }
.btn-brand:hover, .btn-brand:focus, .btn-brand:active { background: var(--btn-hover) !important; border-color: var(--btn-hover) !important; color: #fff !important; }
.btn-brand:disabled { background: #8a90ad; border-color: #8a90ad; }
.btn:focus-visible { box-shadow: 0 0 0 .2rem rgba(76, 111, 255, .3); }
.btn-light-outline { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn-light-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.btn-icon { border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 40px; height: 40px; padding: 0; font-size: 1.25rem; }
.form-control, .form-select, .input-group-text { border-radius: 10px; border-color: var(--line); }
.input-group-text { background: var(--surface-2); color: var(--muted); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(76, 111, 255, .18); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-label { font-weight: 500; font-size: .85rem; margin-bottom: .3rem; }

/* Layout */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--sidebar-bg); color: #fff; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 1.25rem .85rem; z-index: 1040; transition: transform .2s ease; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; padding: 0 .5rem 1.5rem; }
.brand:hover { color: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.1rem; letter-spacing: .08em; }
.brand-text small { font-size: .72rem; color: rgba(255, 255, 255, .65); letter-spacing: .02em; }
.brand-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: var(--brand); border: 1px solid rgba(255, 255, 255, .15); }
.brand-logo-lg { width: 112px; height: 112px; border-radius: 22px; object-fit: cover; box-shadow: var(--shadow); }
.nav-menu { display: flex; flex-direction: column; gap: .2rem; }
.nav-item { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 10px; color: rgba(255, 255, 255, .72); text-decoration: none; font-weight: 500; text-align: left; }
.nav-item i { font-size: 1.05rem; }
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: .85rem; }
.user-chip { display: flex; align-items: center; gap: .6rem; padding: .25rem .75rem .6rem; font-weight: 500; min-width: 0; }
.avatar { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .8rem; }
.main { flex: 1; margin-left: var(--sidebar-w); padding: 1.75rem 2rem 3rem; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-title { font-size: 1.45rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.page-subtitle { color: var(--muted); margin: .15rem 0 0; font-size: .875rem; }
.sidebar-backdrop { display: none; }

/* Surfaces */
.card-surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat { display: flex; gap: .9rem; align-items: flex-start; padding: 1.15rem 1.2rem; height: 100%; color: inherit; text-decoration: none; }
.stat-link { transition: border-color .15s, transform .15s; }
.stat-link:hover { border-color: var(--accent); transform: translateY(-1px); color: inherit; }
.stat-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--icon-fg); font-size: 1.15rem; }
.stat-icon.icon-low { background: var(--low-bg); color: var(--low-fg); }
.stat-icon.icon-out { background: var(--out-bg); color: var(--out-fg); }
.stat-label { color: var(--muted); font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-hint { color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.empty-state { text-align: center; padding: 3.5rem 1.5rem; }
.empty-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--accent-soft); color: var(--icon-fg); font-size: 2rem; box-shadow: 0 0 0 10px var(--empty-ring); }
.section-title { font-size: .95rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.section-title i { color: var(--accent); }
.meta { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; font-size: .85rem; }
.meta dt { color: var(--muted); font-weight: 500; }
.meta dd { margin: 0; text-align: right; }
.help code { color: var(--code-fg); background: var(--accent-soft); padding: 0 .25rem; border-radius: 4px; }
.help li { margin-bottom: .45rem; }

/* Status */
.status-pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; padding: .25rem .65rem; border-radius: 999px; }
.status-pill i { font-size: .5rem; }
.status-ok { background: var(--ok-bg); color: var(--ok-fg); }
.status-error { background: var(--out-bg); color: var(--out-fg); }
.status-warn { background: var(--low-bg); color: var(--low-fg); }
.status-info { background: var(--accent-soft); color: var(--accent); }
.status-muted { background: var(--muted-bg); color: var(--muted); }
.badge-status { display: inline-block; font-size: .75rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge-low { background: var(--low-bg); color: var(--low-fg); }
.badge-out { background: var(--out-bg); color: var(--out-fg); }
.badge-muted { background: var(--muted-bg); color: var(--muted); }

/* Table */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.filters .search { flex: 1 1 260px; }
.filters .form-select { flex: 0 1 200px; }
.data-table th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding: .75rem 1rem; white-space: nowrap; }
.data-table th a { color: inherit; text-decoration: none; }
.data-table th a:hover { color: var(--accent); }
.data-table td { padding: .8rem 1rem; border-color: var(--line); }
.data-table tbody tr:hover td { background: var(--hover-row); }
.table-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pagination .page-link { color: var(--icon-fg); border-color: var(--line); }
.messages .alert { border-radius: 12px; }

/* Auth */
body.auth { background: radial-gradient(circle at 15% 0%, var(--auth-glow) 0, transparent 45%), linear-gradient(180deg, var(--canvas), var(--auth-bottom)); min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.auth-card { width: 100%; max-width: 410px; padding: 2.5rem 2.25rem; border-top: 4px solid var(--btn-bg); }
.error-code { font-size: 3.5rem; font-weight: 700; color: var(--icon-fg); line-height: 1; }

/* Mobile */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(27, 35, 80, .35); z-index: 1030; }
  .main { margin-left: 0; padding: 1rem 1rem 2rem; }
  .stat-value { font-size: 1.4rem; }
  .data-table th, .data-table td { padding: .7rem .6rem; }
  .filters .form-select { flex: 1 1 140px; }
}

/* Sidebar extras */
.nav-section { color: rgba(255, 255, 255, .45); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: .25rem .75rem .4rem; }
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .08); }
.lang-switch button { border: 0; background: transparent; color: rgba(255, 255, 255, .7); font-size: .75rem; font-weight: 600; padding: .25rem .6rem; border-radius: 7px; }
.lang-switch button:hover { color: #fff; }
.lang-switch button.active { background: #fff; color: var(--brand); }
.lang-switch-light { background: var(--canvas); border: 1px solid var(--line); }
.lang-switch-light button { color: var(--muted); }
.lang-switch-light button:hover { color: var(--icon-fg); }
.lang-switch-light button.active { background: var(--btn-bg); color: #fff; }

/* Stock table (1C report layout) */
.stock-table th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; padding: .75rem 1rem; white-space: nowrap; border-bottom: 1px solid var(--line); }
.stock-table td { padding: .55rem 1rem; border-color: var(--line); vertical-align: middle; }
.stock-table .row-store td { background: var(--row-store-bg); color: #fff; font-weight: 700; border: 0; }
.stock-table .row-group td { background: var(--accent-soft); color: var(--icon-fg); font-weight: 600; cursor: pointer; user-select: none; }
.stock-table .row-group:hover td { background: var(--group-hover); }
.stock-table .row-group:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.stock-table .row-group .count { font-size: .72rem; font-weight: 600; color: var(--muted); background: var(--surface); border-radius: 999px; padding: .05rem .5rem; margin-left: .35rem; }
.stock-table .toggle-icon { display: inline-block; transition: transform .15s; }
.stock-table .row-group[aria-expanded="false"] .toggle-icon { transform: rotate(-90deg); }
.stock-table .row-item td:first-child { padding-left: 2.6rem; }
.stock-table .row-item:hover td { background: var(--hover-row); }
.stock-table .item-name { min-width: 260px; }
.stock-table .barcode { word-break: break-all; min-width: 110px; }
.stock-table .unit { color: var(--muted); font-size: .78rem; }
.qty-out, .stock-table td.qty-out { color: var(--out-fg); font-weight: 700; }
.qty-low, .stock-table td.qty-low { color: var(--low-fg); font-weight: 700; }
.legend { font-size: .9rem; }
.sort-select { flex: 0 1 190px !important; }

/* Administration */
.form-narrow { max-width: 760px; }
.stat-value-sm { font-size: 1.05rem; margin-top: .25rem; }
.badge-info { background: var(--accent-soft); color: var(--accent); }
.credentials { display: grid; grid-template-columns: auto 1fr; gap: .6rem 1.25rem; align-items: center; margin-bottom: 1.5rem; }
.credentials dt { color: var(--muted); font-weight: 500; }
.credentials dd { margin: 0; }
.credentials code { font-size: 1.15rem; color: var(--code-fg); background: var(--accent-soft); padding: .25rem .6rem; border-radius: 8px; user-select: all; }
.run-message { max-width: 520px; }

/* Phones: two stat cards per row are narrow, so the icon sits above the label and value to give them full width */
@media (max-width: 575.98px) {
  .stat { flex-direction: column; gap: .55rem; padding: 1rem; }
  .stat-icon { width: 36px; height: 36px; font-size: 1rem; }
  .stat-label { letter-spacing: .02em; overflow-wrap: anywhere; }
  .stat-value { overflow-wrap: anywhere; }
}

/* Mobile: the table fits the screen instead of scrolling under a pinned Quantity column (which overlapped the
   article/barcode cells): text columns may shrink and wrap inside their own cells; Quantity never wraps. */
@media (max-width: 767.98px) {
  .stock-table th, .stock-table td { padding-left: .45rem; padding-right: .45rem; }
  .stock-table th { white-space: nowrap; font-size: .58rem; letter-spacing: 0; padding-left: .25rem; padding-right: .25rem; }
  .stock-table .item-name { min-width: 0; overflow-wrap: anywhere; }
  .stock-table .row-item td { overflow-wrap: anywhere; }
  .stock-table .barcode { min-width: 0; word-break: break-all; }
  .stock-table th:last-child, .stock-table .row-item td:last-child, .stock-table .row-group td:last-child,
  .stock-table .row-store td:last-child { width: 1%; white-space: nowrap; overflow-wrap: normal; }
  .stock-table .row-item td:first-child { padding-left: 1.1rem; }
  .stock-table .unit { display: block; }  /* the unit under the number keeps the Quantity column narrow */
}

/* Turnover */
.period-bar { display: flex; flex-wrap: wrap; gap: .75rem; padding: 1rem; align-items: flex-end; }
.period-field { flex: 0 1 190px; }
.period-field .form-label { font-size: .75rem; color: var(--muted); margin-bottom: .2rem; }
.quick-ranges { display: flex; flex-wrap: wrap; gap: .35rem; margin-left: auto; }
.nav-item-sm { font-size: .85rem; padding: .45rem .75rem; }

/* Theme switch (sidebar: on navy; login: on the light/dark card) */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .08); }
.theme-switch button { border: 0; background: transparent; color: rgba(255, 255, 255, .7); font-size: .85rem; line-height: 1; padding: .3rem .5rem; border-radius: 7px; }
.theme-switch button:hover { color: #fff; }
.theme-switch button.active { background: #fff; color: var(--brand); }
.theme-switch button:focus-visible, .lang-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.theme-switch-light { background: var(--canvas); border: 1px solid var(--line); }
.theme-switch-light button { color: var(--muted); }
.theme-switch-light button:hover { color: var(--icon-fg); }
.theme-switch-light button.active { background: var(--btn-bg); color: #fff; }

/* Dark theme: Bootstrap pieces that use fixed light colors */
[data-bs-theme="dark"] .form-control:disabled { background: var(--surface-2); }
[data-bs-theme="dark"] .text-secondary { color: var(--muted) !important; }
[data-bs-theme="dark"] .border-top { border-color: var(--line) !important; }
[data-bs-theme="dark"] .alert-light { background: var(--surface-2); color: var(--ink); border-color: var(--line); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Import status: two sources */
.import-meta { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); }
.import-meta dd { text-align: left; }

/* Store-user turnover cabinet: rows with expandable 1C operations */
.cabinet-search { flex: 1 1 100%; }
/* (prefixed with .cabinet-table to win over Bootstrap's table cell color) */
.cabinet-table .flow-zero { color: var(--muted); }
.cabinet-table .flow-in { color: var(--ok-fg); font-weight: 600; }
.cabinet-table .flow-out { color: var(--low-fg); font-weight: 600; }
.cabinet-table .flow-neg { color: var(--out-fg); }
.cabinet-table .flow-money { color: var(--accent); font-weight: 600; }
.cabinet-table .cell-product { min-width: 200px; }
.ops-toggle .ops-label-short { display: none; }
/* Laptops (1200–1399px with the sidebar): tighter cells and a count-only operations button so all columns fit */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .cabinet-table > thead th, .cabinet-table > tbody > tr > td { padding-left: .6rem; padding-right: .6rem; }
  .cabinet-table .cell-product { min-width: 180px; }
  .ops-toggle .ops-label-full { display: none; }
  .ops-toggle .ops-label-short { display: inline; }
  .cabinet-table .ops-row > td { padding-left: .75rem; }
}
.cabinet-table > thead th, .ops-table th { white-space: normal; vertical-align: bottom; }
.ops-toggle { white-space: nowrap; }
.ops-toggle .bi { display: inline-block; transition: transform .15s; }
.ops-toggle[aria-expanded="true"] .bi { transform: rotate(180deg); }
.cabinet-table .ops-row > td { background: var(--surface-2); padding: .5rem 1rem 1rem 1.5rem; }
.cabinet-table tbody tr.ops-row:hover > td { background: var(--surface-2); }
.ops-table { --bs-table-bg: transparent; font-size: .875rem; }
.ops-table th { color: var(--muted); font-weight: 600; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding: .5rem .6rem; white-space: nowrap; }
.ops-table td { padding: .5rem .6rem; border-color: var(--line); vertical-align: top; }
.ops-table .op-document { min-width: 180px; }

/* Phones, tablets and narrow laptops: each turnover row and each operation becomes a compact card, so the
   eight-column table never has to scroll sideways */
@media (max-width: 1199.98px) {
  .cabinet-table thead, .ops-table thead { display: none; }
  .cabinet-table, .cabinet-table tbody, .cabinet-table tr, .cabinet-table td,
  .ops-table, .ops-table tbody, .ops-table tr, .ops-table td { display: block; width: 100%; }
  .cabinet-table .tv-row { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
  .cabinet-table .tv-row > td { padding: .2rem 0; border: 0; text-align: left !important; }
  .cabinet-table .tv-row .cell-date { grid-column: 1 / -1; color: var(--muted); font-size: .8rem; }
  .cabinet-table .tv-row .cell-product { grid-column: 1 / -1; min-width: 0; margin-bottom: .35rem; }
  .cabinet-table .tv-row .cell-toggle { grid-column: 1 / -1; margin-top: .4rem; }
  .cabinet-table .tv-row .cell-toggle .ops-toggle { width: 100%; }
  .cabinet-table .date-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .cabinet-table .date-row > td { display: block; width: auto; }
  .cabinet-table .date-row .date-actions { display: none; }
  .cabinet-table td[data-label]::before, .ops-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
  .cabinet-table .ops-row > td { padding: .25rem .75rem .75rem; border-bottom: 1px solid var(--line); }
  .ops-table tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: .75rem; padding: .6rem .25rem; border-bottom: 1px dashed var(--line); }
  .ops-table tr:last-child { border-bottom: 0; }
  .ops-table td { padding: .2rem 0; border: 0; text-align: left !important; }
  .ops-table .op-document { grid-column: 1 / -1; min-width: 0; font-weight: 600; }
  .cabinet-table .cell-empty { text-align: center !important; }
}
/* Turnover period: text date field (DD.MM.YYYY) with a calendar button; the native picker is invisible */
.date-input { position: relative; flex-wrap: nowrap; }
.date-picker-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; }
/* the transparent native date input covers only the calendar button, so a tap on it opens the native picker */
.date-input .date-picker-native { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; margin: 0; padding: 0; border: 0;
  opacity: 0; cursor: pointer; font-size: 16px; -webkit-appearance: none; appearance: none; background: transparent; }
.date-picker-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Turnover cabinet: date groups -> products -> operations */
.cabinet-table tr[hidden] { display: none !important; }  /* the mobile card layout sets display on rows */
.cabinet-table .date-row td { background: var(--accent-soft); color: var(--icon-fg); font-weight: 600; cursor: pointer; user-select: none; }
.cabinet-table .date-row:hover td { background: var(--group-hover); }
.cabinet-table .date-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cabinet-table .date-row .toggle-icon { display: inline-block; transition: transform .15s; }
.cabinet-table .date-row[aria-expanded="false"] .toggle-icon { transform: rotate(-90deg); }
.cabinet-table .date-row .count { font-size: .72rem; color: var(--muted); background: var(--surface); border-radius: 999px; padding: .05rem .5rem; margin-left: .35rem; }
.cabinet-table .date-row .date-earned { color: var(--accent); }
.cabinet-table .tv-row > td:first-child { padding-left: 1.6rem; }
.cabinet-table .sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.cabinet-table .sort-link:hover { color: var(--accent); }
