/* Вкладка «Премии»: та же палитра, что у «Открытия смен». */
/* Вкладки: 6 колонок; «Открытие смен» и «Премии» делят последний ряд пополам. */
nav#tabs, nav#tabs.has-plans { grid-template-columns:repeat(6,minmax(0,1fr)); }
nav#tabs .tab { grid-column:span 2; }
nav#tabs:not(.has-plans) [data-view="checks"], nav#tabs:not(.has-plans) [data-view="cash"],
nav#tabs [data-view="shift-openings"], nav#tabs.has-plans [data-view="shift-openings"],
nav#tabs [data-view="gastro-bonuses"] { grid-column:span 3; }
nav#tabs [data-view="gastro-bonuses"] { font-size:13px; white-space:normal; line-height:1.3; }

.bonus-head, .bonus-cluster { min-width:0; max-width:100%; }
.bonus-head .shift-heading { margin-bottom:10px; }
.bonus-week { display:grid; grid-template-columns:44px 1fr 44px; gap:8px; align-items:center; margin-bottom:12px; }
.bonus-nav { height:44px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); color:var(--text); font-size:26px; line-height:1; cursor:pointer; }
.bonus-nav:disabled { opacity:.35; cursor:default; }
.bonus-nav:focus-visible, .bonus-copy:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.bonus-week-text { display:flex; flex-direction:column; align-items:center; gap:2px; padding:6px; border-radius:12px; background:var(--surface-2); }
.bonus-week-text strong { font-size:16px; font-variant-numeric:tabular-nums; }
.bonus-total-line { display:flex; justify-content:space-between; align-items:flex-end; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.bonus-total-line span { display:block; color:var(--muted); font-size:12px; }
.bonus-total-line strong { font-size:26px; line-height:1.15; font-variant-numeric:tabular-nums; }
.bonus-status { display:inline-block; padding:5px 9px; border-radius:999px; font-size:12px; font-weight:600; color:var(--text); background:var(--surface-3); }
.bonus-status-ok { color:var(--good); background:var(--good-soft); }
.bonus-status-bad { color:var(--bad); background:var(--bad-soft); }
.bonus-clusters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.bonus-clusters > div { display:flex; flex-direction:column; gap:3px; min-width:0; padding:9px 10px; border:1px solid var(--line); border-radius:11px; background:var(--surface-2); }
.bonus-clusters span { font-size:12px; color:var(--muted); line-height:1.3; }
.bonus-clusters strong { font-size:16px; font-variant-numeric:tabular-nums; }
.bonus-legend i { display:inline-block; min-width:30px; padding:1px 4px; border-radius:6px; font-style:normal; font-weight:700; text-align:center; }
.bonus-copy { width:100%; margin-top:12px; min-height:42px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); color:var(--text); font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.bonus-sum { font-size:17px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.bonus-cluster .shift-heading h2 { font-size:15px; }

/* График по дням недели */
.bonus-chart { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; margin-bottom:12px; }
.bonus-bar { display:flex; flex-direction:column; align-items:center; gap:4px; min-width:0; }
.bonus-bar-value { font-size:11px; font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; }
.bonus-bar-track { position:relative; width:100%; max-width:34px; height:70px; border-radius:7px; background:var(--surface-2); overflow:hidden; }
.bonus-bar-track i { position:absolute; left:0; right:0; bottom:0; border-radius:7px 7px 0 0; background:var(--primary-2); }
.bonus-bar-day { display:flex; flex-direction:column; align-items:center; font-size:12px; font-weight:600; line-height:1.2; }
.bonus-bar-day small { font-size:10px; font-weight:400; color:var(--muted); }
.bonus-bar.bonus-pending .bonus-bar-value, .bonus-bar.bonus-before .bonus-bar-value { color:var(--muted); font-weight:500; font-size:10px; }
.bonus-bar.bonus-missing .bonus-bar-value { color:var(--bad); font-weight:600; font-size:10px; }
.bonus-bar.bonus-pending .bonus-bar-track { background:repeating-linear-gradient(135deg,var(--surface-2) 0 5px,var(--surface-3) 5px 10px); }
.bonus-bar.bonus-missing .bonus-bar-track { background:var(--bad-soft); }

/* Таблица магазинов */
.bonus-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; margin:0 -4px; }
.bonus-table { width:100%; border-collapse:separate; border-spacing:1px 2px; font-size:12px; font-variant-numeric:tabular-nums; }
.bonus-table th, .bonus-table td { padding:5px 2px; text-align:center; white-space:nowrap; }
.bonus-table thead th { font-size:11px; color:var(--muted); font-weight:600; }
.bonus-table thead th.bonus-missing { color:var(--bad); }
.bonus-table .bonus-store { text-align:left; font-weight:600; white-space:normal; line-height:1.25; min-width:76px; max-width:112px; padding-left:2px; hyphens:auto;
  position:sticky; left:0; z-index:1; background:var(--surface); }
.bonus-table .bonus-total { text-align:right; font-weight:700; padding-right:4px; }
.bonus-cell { min-width:26px; border-radius:6px; font-size:11px; font-weight:700; }
.bonus-none { color:var(--muted); font-weight:400; }
.bonus-cell.bonus-pending, .bonus-cell.bonus-before { color:var(--muted); background:var(--surface-2); font-weight:400; }
.bonus-cell.bonus-missing { color:var(--bad); background:var(--bad-soft); font-weight:400; }
.bonus-table tfoot th, .bonus-table tfoot td { border-top:1px solid var(--line); color:var(--muted); font-weight:700; }
.bonus-table tfoot .bonus-total { color:var(--text); }

.bonus-place-1 { color:#6b4a00; background:#ffe08a; }
.bonus-place-2 { color:#36404d; background:#dfe4ec; }
.bonus-place-3 { color:#6a3415; background:#f6c7a6; }
.bonus-plan { color:var(--good); background:var(--good-soft); }
:root[data-theme="dark"] .bonus-place-1 { color:#ffe08a; background:rgba(255,200,60,.22); }
:root[data-theme="dark"] .bonus-place-2 { color:#e9eef6; background:rgba(220,228,240,.18); }
:root[data-theme="dark"] .bonus-place-3 { color:#ffc59d; background:rgba(240,140,80,.22); }
@media (max-width:360px) { .bonus-table { font-size:11px; } .bonus-cell { min-width:24px; font-size:10px; } .bonus-total-line strong { font-size:22px; } }
nav#tabs .tab[hidden] { display:none !important; }
/* v2: расчёт по bi-app — текущий день предварительный, турнирная таблица дня */
.bonus-bar { font:inherit; color:inherit; background:none; border:0; padding:2px 0; border-radius:9px; }
button.bonus-bar { cursor:pointer; }
button.bonus-bar:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.bonus-bar.is-active { background:var(--primary-soft); }
:root[data-theme="dark"] .bonus-bar.is-active { background:var(--surface-3); }
.bonus-bar.bonus-live .bonus-bar-track i { background:repeating-linear-gradient(135deg,var(--primary-2) 0 5px,var(--primary) 5px 10px); opacity:.7; }
.bonus-bar.bonus-future .bonus-bar-value { color:var(--muted); font-weight:500; }
.bonus-cell.bonus-live { opacity:.65; outline:1px dashed currentColor; outline-offset:-2px; }
.bonus-cell.bonus-future { background:var(--surface-2); }
.bonus-table thead th.bonus-live { color:var(--accent); }
.bonus-day-table { margin:0 0 12px; padding:10px 6px 4px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); }
.bonus-day-title { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; padding:0 4px 6px; font-size:14px; }
.bonus-day-table .bonus-table .bonus-store { background:var(--surface-2); }
.bonus-rank-table td { font-size:11.5px; }
.bonus-rank { color:var(--muted); font-weight:600; }
.bonus-rank i { display:inline-block; min-width:20px; border-radius:6px; font-style:normal; font-weight:800; }
.bonus-ok { color:var(--good); font-weight:700; }
.bonus-miss { color:var(--bad); font-weight:600; }
.bonus-rank-table th, .bonus-rank-table td { padding:5px 1px; }
/* Без «Премий» (не основная сеть) «Открытие смен» занимает весь ряд. */
nav#tabs:has([data-view="gastro-bonuses"][hidden]) [data-view="shift-openings"] { grid-column:1 / -1; }
/* v3: сетка, подсветка строки, выходные */
.bonus-table { border-collapse:collapse; border-spacing:0; }
.bonus-table th, .bonus-table td { border:1px solid var(--line); }
.bonus-table thead th { background:var(--surface-2); }
.bonus-table tbody tr:nth-child(even) > * { background-color:color-mix(in srgb, var(--surface-2) 60%, transparent); }
.bonus-table tbody tr[data-bonus-row] { cursor:pointer; }
.bonus-cell { border-radius:0; }
.bonus-table tbody tr > .bonus-place-1 { background:#ffe08a; }
.bonus-table tbody tr > .bonus-place-2 { background:#dfe4ec; }
.bonus-table tbody tr > .bonus-place-3 { background:#f6c7a6; }
.bonus-table tbody tr > .bonus-plan { background:var(--good-soft); }
:root[data-theme="dark"] .bonus-table tbody tr > .bonus-place-1 { background:rgba(255,200,60,.22); }
:root[data-theme="dark"] .bonus-table tbody tr > .bonus-place-2 { background:rgba(220,228,240,.18); }
:root[data-theme="dark"] .bonus-table tbody tr > .bonus-place-3 { background:rgba(240,140,80,.22); }
.bonus-table tbody tr.is-picked > * { background-color:var(--primary-soft); box-shadow:inset 0 2px 0 var(--primary-2), inset 0 -2px 0 var(--primary-2); }
.bonus-table tbody tr.is-picked > .bonus-store { color:var(--primary-2); }
:root[data-theme="dark"] .bonus-table tbody tr.is-picked > * { background-color:var(--surface-3); }
.bonus-table tbody tr.is-picked > [class*="bonus-place-"], .bonus-table tbody tr.is-picked > .bonus-plan { box-shadow:inset 0 2px 0 var(--primary-2), inset 0 -2px 0 var(--primary-2); }
/* Выходные: Сб и Вс */
.bonus-table th.bonus-weekend { color:var(--bad); }
.bonus-table td.bonus-weekend.bonus-none, .bonus-table td.bonus-weekend.bonus-future, .bonus-table td.bonus-weekend.bonus-before,
.bonus-table tfoot td.bonus-weekend { background-color:color-mix(in srgb, var(--bad-soft) 85%, transparent); }
.bonus-bar.bonus-weekend .bonus-bar-day { color:var(--bad); }
.bonus-bar.bonus-weekend .bonus-bar-track { background-color:var(--bad-soft); }
.bonus-day-title.bonus-weekend strong { color:var(--bad); }
/* v4: названия магазинов в одну строку, ровные колонки */
.bonus-table { table-layout:auto; width:100%; }
.bonus-table .bonus-store { white-space:nowrap; hyphens:manual; min-width:0; max-width:none; width:1%; padding:5px 6px 5px 5px; font-size:12px; }
.bonus-table .bonus-cell, .bonus-table thead th:not(.bonus-store):not(.bonus-total) { width:11%; min-width:24px; padding:5px 1px; }
.bonus-table .bonus-total { width:1%; white-space:nowrap; padding:5px 5px 5px 4px; }
.bonus-rank-table .bonus-rank { width:1%; padding:5px 4px; }
.bonus-rank-table td:not(.bonus-rank):not(.bonus-total) { white-space:nowrap; padding:5px 4px; text-align:right; }
.bonus-table-wrap { margin:0; border-radius:10px; }
@media (max-width:380px) { .bonus-table .bonus-store { font-size:11.5px; padding-right:4px; } .bonus-table .bonus-cell { font-size:10.5px; } }
/* Итоги: строка «За день» и колонка «Итого» — акцентный цвет, крупнее */
.bonus-table tbody td.bonus-total { color:var(--primary-2); font-size:13px; font-weight:800; background-color:color-mix(in srgb, var(--primary-soft) 70%, transparent); }
.bonus-table tfoot th, .bonus-table tfoot td { color:var(--primary-2); font-size:12.5px; font-weight:800; background-color:var(--primary-soft); border-top:2px solid var(--primary-2); }
.bonus-table tfoot td.bonus-total { font-size:14px; background-color:color-mix(in srgb, var(--primary) 22%, var(--primary-soft)); }
.bonus-table thead th.bonus-total { color:var(--primary-2); }
:root[data-theme="dark"] .bonus-table tbody td.bonus-total { color:#a9c2ff; background-color:rgba(122,160,255,.12); }
:root[data-theme="dark"] .bonus-table tfoot th, :root[data-theme="dark"] .bonus-table tfoot td { color:#a9c2ff; background-color:rgba(122,160,255,.16); border-top-color:#7aa0ff; }
:root[data-theme="dark"] .bonus-table tfoot td.bonus-total { background-color:rgba(122,160,255,.26); }
:root[data-theme="dark"] .bonus-table thead th.bonus-total { color:#a9c2ff; }
.bonus-table tfoot td.bonus-weekend { background-color:var(--primary-soft); }
/* v5: уместить таблицы в ширину телефона без прокрутки */
.bonus-cluster { padding:12px 6px; }
.bonus-cluster > .shift-heading { padding:0 6px; }
.bonus-cluster .bonus-chart { padding:0 4px; }
.bonus-table th, .bonus-table td { padding:4px 0; }
.bonus-table .bonus-store { padding:4px 4px 4px 4px; font-size:11.5px; letter-spacing:-.1px; }
.bonus-table .bonus-cell, .bonus-table thead th:not(.bonus-store):not(.bonus-total) { min-width:21px; padding:4px 0; font-size:10.5px; }
.bonus-table .bonus-total, .bonus-table tbody td.bonus-total { padding:4px 3px; font-size:12px; }
.bonus-table tfoot td.bonus-total { font-size:12.5px; }
.bonus-table tfoot th, .bonus-table tfoot td { font-size:11px; }
.bonus-rank-table td, .bonus-rank-table th { font-size:11px; }
.bonus-rank-table td:not(.bonus-rank):not(.bonus-total) { padding:4px 3px; }
.bonus-rank-table .bonus-rank { padding:4px 2px; }
.bonus-day-table { padding:8px 4px 4px; }
@media (max-width:380px) { .bonus-table .bonus-store { font-size:11px; } .bonus-table .bonus-cell { font-size:10px; min-width:19px; } .bonus-rank-table td, .bonus-rank-table th { font-size:10.5px; } }
@media (max-width:380px) {
  .bonus-cluster { padding:12px 3px; }
  .bonus-table .bonus-store { font-size:10.5px; padding:4px 3px; letter-spacing:-.2px; }
  .bonus-table .bonus-cell, .bonus-table thead th:not(.bonus-store):not(.bonus-total) { min-width:18px; font-size:9.5px; }
  .bonus-table .bonus-total, .bonus-table tbody td.bonus-total { font-size:11px; padding:4px 2px; }
  .bonus-table tfoot td.bonus-total { font-size:11.5px; }
  .bonus-table tfoot th, .bonus-table tfoot td { font-size:10px; }
  .bonus-rank-table td, .bonus-rank-table th { font-size:10px; }
  .bonus-rank-table td:not(.bonus-rank):not(.bonus-total) { padding:4px 2px; }
  .bonus-day-table { padding:8px 2px 4px; }
}
.bonus-table .bonus-cell.bonus-live { outline:none; font-style:italic; opacity:.6; }
/* v6: переключатель программ и фильтр кластера */
.bonus-programs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; margin-bottom:12px; padding:4px; border-radius:14px; background:var(--surface-2); }
.bonus-program { display:flex; flex-direction:column; align-items:center; gap:2px; min-width:0; padding:7px 4px; border:0; border-radius:10px; background:transparent; color:var(--text); font:inherit; cursor:pointer; }
.bonus-program span { font-size:11.5px; font-weight:600; line-height:1.2; text-align:center; }
.bonus-program strong { font-size:13px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.bonus-program.is-active { background:var(--primary-2); color:#fff; box-shadow:0 3px 9px rgba(29,61,140,.18); }
.bonus-program:focus-visible, .bonus-cluster-chip:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.bonus-cluster-chip { display:flex; flex-direction:column; align-items:flex-start; gap:3px; min-width:0; padding:9px 10px; border:1px solid var(--line); border-radius:11px; background:var(--surface-2); color:var(--text); font:inherit; text-align:left; cursor:pointer; }
.bonus-cluster-chip span { font-size:12px; color:var(--muted); line-height:1.3; }
.bonus-cluster-chip strong { font-size:16px; font-variant-numeric:tabular-nums; }
.bonus-cluster-chip small { font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums; }
.bonus-cluster-chip.is-active { border-color:var(--primary-2); box-shadow:inset 0 0 0 1px var(--primary-2); background:var(--primary-soft); }
.bonus-cluster-chip.is-active span, .bonus-cluster-chip.is-active strong { color:var(--primary-2); }
:root[data-theme="dark"] .bonus-cluster-chip.is-active { background:var(--surface-3); }
:root[data-theme="dark"] .bonus-cluster-chip.is-active span, :root[data-theme="dark"] .bonus-cluster-chip.is-active strong { color:#a9c2ff; }
.bonus-cluster-chip.is-dim { opacity:.55; }
.bonus-week-text strong { white-space:nowrap; font-size:clamp(13px, 4vw, 16px); }
/* v7: период (неделя/месяц/свой), живой календарь, длинный график, итоги периода */
.bonus-modes { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; margin-bottom:10px; padding:3px; border-radius:12px; background:var(--surface-2); }
.bonus-mode { min-height:36px; border:0; border-radius:9px; background:transparent; color:var(--text); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.bonus-mode.is-active { background:var(--surface); color:var(--primary-2); box-shadow:0 1px 4px rgba(29,61,140,.14); }
:root[data-theme="dark"] .bonus-mode.is-active { background:var(--surface-3); color:#a9c2ff; }
.bonus-mode:focus-visible, .bonus-cal-day:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.bonus-period-text { margin-bottom:10px; }
.bonus-cal { margin-bottom:12px; padding:8px; border:1px solid var(--line); border-radius:14px; background:var(--surface-2); }
.bonus-cal-head { display:grid; grid-template-columns:40px 1fr 40px; align-items:center; gap:6px; margin-bottom:6px; }
.bonus-cal-head strong { text-align:center; font-size:15px; text-transform:capitalize; }
.bonus-cal-head .bonus-nav { height:36px; font-size:22px; }
.bonus-cal-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
.bonus-cal-dw { text-align:center; font-size:11px; font-weight:600; color:var(--muted); padding:2px 0; }
.bonus-cal-dw.bonus-weekend { color:var(--bad); }
.bonus-cal-day { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; min-width:0; min-height:44px; padding:3px 0; border:1px solid transparent; border-radius:9px; background:var(--surface); color:var(--text); font:inherit; cursor:pointer; }
.bonus-cal-day span { font-size:14px; font-weight:600; line-height:1.1; }
.bonus-cal-day small { font-size:9.5px; font-weight:700; color:var(--primary-2); line-height:1.1; min-height:11px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.bonus-cal-day.bonus-weekend span { color:var(--bad); }
.bonus-cal-day.is-in { background:var(--primary-soft); }
.bonus-cal-day.is-sel { background:var(--primary-2); }
.bonus-cal-day.is-sel span, .bonus-cal-day.is-sel small { color:#fff; }
.bonus-cal-day.is-today { border-color:var(--primary-2); }
.bonus-cal-day:disabled { opacity:.3; cursor:default; }
:root[data-theme="dark"] .bonus-cal-day.is-in { background:var(--surface-3); }
:root[data-theme="dark"] .bonus-cal-day small { color:#a9c2ff; }
.bonus-live-text { font-style:italic; opacity:.7; }
.bonus-chart.is-wide { display:flex; gap:3px; overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:4px; }
.bonus-chart.is-wide .bonus-bar { flex:0 0 34px; }
.bonus-chart.is-wide .bonus-bar-value { font-size:9.5px; }
.bonus-period-table td:not(.bonus-total) { text-align:right; padding:4px 6px; font-variant-numeric:tabular-nums; }
.bonus-table.bonus-period-table thead th:not(.bonus-store):not(.bonus-total) { width:auto; padding:4px 6px; white-space:nowrap; }
.bonus-period-table .bonus-store { width:auto; }
/* v9: плашка периода открывает календарь */
.bonus-period-btn { width:100%; margin-bottom:10px; border:1px solid var(--line); color:var(--text); font:inherit; cursor:pointer; }
.bonus-period-btn .range-label { color:var(--muted); }
.bonus-period-btn.is-open { border-color:var(--primary-2); box-shadow:inset 0 0 0 1px var(--primary-2); }
.bonus-period-btn:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
/* v10: недельная таблица всегда в ширину экрана (фиксированные колонки в %) */
.bonus-table.bonus-week-table { table-layout:fixed; width:100%; }
.bonus-week-table thead th.bonus-store { width:27%; }
.bonus-week-table thead th.bonus-total { width:16%; }
.bonus-week-table thead th:not(.bonus-store):not(.bonus-total) { width:auto; min-width:0; }
.bonus-week-table .bonus-store { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bonus-week-table .bonus-cell { min-width:0; overflow:hidden; text-overflow:clip; letter-spacing:-.3px; }
.bonus-week-table .bonus-total { overflow:hidden; text-overflow:clip; }
.bonus-week-table thead th.bonus-total { white-space:normal; line-height:1.1; font-size:10px; }
.bonus-week-table tfoot tr > * { border-inline-color:color-mix(in srgb, var(--line-strong) 70%, var(--primary-2)); }
.bonus-week-table tfoot .bonus-cell { font-size:11px; padding-inline:2px; }
.bonus-week-table .bonus-foot-amount { letter-spacing:normal; }
@media (max-width:380px) { .bonus-week-table thead th.bonus-store { width:26%; } .bonus-week-table tfoot .bonus-cell { font-size:10.5px; } }
.bonus-week-table thead th .bonus-th-date { display:block; font-size:9px; font-weight:500; letter-spacing:-.3px; opacity:.8; line-height:1.1; }
@media (max-width:380px) { .bonus-week-table thead th .bonus-th-date { font-size:8.5px; } }
/* v11: шапка таблиц своим цветом, чтобы не сливалась с магазинами */
.bonus-table thead th { background:color-mix(in srgb, var(--primary-2) 14%, var(--surface)); color:var(--primary-2); font-weight:700; border-bottom:2px solid var(--primary-2); }
.bonus-table thead th.bonus-weekend { color:var(--bad); background:color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.bonus-table thead th.bonus-live { color:var(--accent); }
:root[data-theme="dark"] .bonus-table thead th { background:rgba(122,160,255,.18); color:#a9c2ff; border-bottom-color:#7aa0ff; }
:root[data-theme="dark"] .bonus-table thead th.bonus-weekend { background:rgba(255,110,110,.16); color:#ff9b9b; }
/* v12: «Итого, ₽» в шапке крупнее */
.bonus-week-table thead th.bonus-total { font-size:12.5px; line-height:1.15; white-space:normal; padding:3px 2px; }
@media (max-width:380px) { .bonus-week-table thead th.bonus-total { font-size:12px; } }
/* v13: полные названия — шире колонка магазина */
.bonus-week-table thead th.bonus-store { width:29%; }
.bonus-week-table thead th.bonus-total { width:15%; }
.bonus-week-table .bonus-fit { letter-spacing:-.2px; padding-left:4px; padding-right:2px; }
@media (max-width:380px) { .bonus-week-table thead th.bonus-store { width:29%; } }
/* v14: сетка календаря для периода длиннее недели */
.bonus-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; margin:4px 0 12px; }
.bonus-grid .bonus-cal-dw { text-align:center; font-size:11px; font-weight:700; color:var(--muted); padding-bottom:2px; }
.bonus-grid .bonus-cal-dw.bonus-weekend { color:var(--bad); }
.bonus-grid-day { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; min-width:0; min-height:46px; padding:4px 1px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); color:var(--text); font:inherit; }
.bonus-grid-day span { font-size:12px; font-weight:600; color:var(--muted); line-height:1.1; }
.bonus-grid-day.bonus-weekend span { color:var(--bad); }
.bonus-grid-day small { font-size:12.5px; font-weight:800; font-variant-numeric:tabular-nums; letter-spacing:-.3px; line-height:1.15; color:var(--muted); }
.bonus-grid-day.has-sum { background:color-mix(in srgb, var(--primary-2) calc(var(--lvl) * 32%), var(--surface)); border-color:color-mix(in srgb, var(--primary-2) calc(var(--lvl) * 45%), var(--line)); }
.bonus-grid-day.has-sum small { color:var(--primary-2); }
.bonus-grid-day.bonus-future, .bonus-grid-day.bonus-before { opacity:.45; }
.bonus-grid-day.bonus-live small { font-style:italic; opacity:.75; }
button.bonus-grid-day { cursor:pointer; }
.bonus-grid-day.is-active { box-shadow:inset 0 0 0 2px var(--primary-2); }
:root[data-theme="dark"] .bonus-grid-day.has-sum { background:rgba(122,160,255,calc(var(--lvl) * .35)); }
:root[data-theme="dark"] .bonus-grid-day.has-sum small { color:#a9c2ff; }
@media (max-width:380px) { .bonus-grid { gap:3px; } .bonus-grid-day small { font-size:11px; } .bonus-grid-day { min-height:42px; } }
/* v15: стрелки недель вокруг плашки периода */
.bonus-week .bonus-period-btn { margin-bottom:0; min-width:0; }
.bonus-week { margin-bottom:10px; }
/* v16: выходной остаётся красным и в текущий день */
.bonus-table thead th.bonus-weekend.bonus-live { color:var(--bad); }
:root[data-theme="dark"] .bonus-table thead th.bonus-weekend.bonus-live { color:#ff9b9b; }
