/* =====================================================================
   StarSnow admin — tokens (see docs/brandbook.md §13–14). Same brand as site/css/store.css.
   Only --ad-* are used by admin CSS; the legacy storefront variables are remapped to them below,
   so older rules and the shared UI kit (js/ui.js) follow the brand too.
   ===================================================================== */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../assets/fonts/onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../assets/fonts/onest-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+20BD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(../assets/fonts/unbounded-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(../assets/fonts/unbounded-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+20BD; }

:root[data-admin] {
  color-scheme: light;
  --ad-bg: #EEF1F7; --ad-surface: #FFFFFF; --ad-surface-2: #F3F5FA; --ad-surface-3: #E7EBF3; --ad-line: #DADFEC; --ad-line-strong: #C5CCDD;
  --ad-text: #12141A; --ad-muted: #667087;
  --ad-accent: #1448D8; --ad-accent-hover: #0F3CB8; --ad-accent-ink: #FFFFFF; --ad-accent-soft: rgba(20, 72, 216, .1);
  --ad-lime: #C6F21E; --ad-lime-ink: #172000;
  --ad-ok: #4C6600; --ad-warn: #9A6B00; --ad-bad: #C7421C; --ad-amber: #F5B400;
  --ad-ok-soft: rgba(111, 143, 0, .14); --ad-warn-soft: rgba(245, 180, 0, .18); --ad-bad-soft: rgba(199, 66, 28, .11); --ad-info-soft: rgba(20, 72, 216, .1);
  --ad-side: #FFFFFF; --ad-side-ink: #12141A; --ad-side-muted: #667087; --ad-side-hover: #F3F5FA;
  --ad-tip-bg: #12141A; --ad-tip-ink: #F3F5FA; --ad-tip-muted: #A9B0C2;
  --ad-backdrop: rgba(10, 14, 28, .42); --ad-shadow-pop: 0 18px 44px -18px rgba(18, 30, 80, .35), 0 2px 6px rgba(18, 30, 80, .06);
  --ad-radius: 20px; --ad-radius-sm: 12px; --ad-radius-xs: 8px;
  --ad-font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ad-display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --ad-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* chart series: fixed order (brandbook §14) */
  --ad-c1: #1448D8; --ad-c2: #6F8F00; --ad-c3: #D4418C; --ad-c4: #8A4FD6; --ad-c5: #0B9A8D; --ad-c6: #E0662A; --ad-c-other: #9AA3B8;
  --ad-seq-1: #C9D6F8; --ad-seq-2: #93ADF0; --ad-seq-3: #5C83E8; --ad-seq-4: #1448D8; --ad-seq-5: #0C2E8F;
  /* legacy storefront variables, remapped (styles.css components used by the admin) */
  --bg: var(--ad-bg); --cell: var(--ad-surface); --cell-press: var(--ad-surface-2); --nav: var(--ad-surface);
  --text: var(--ad-text); --hint: var(--ad-muted); --section-header: var(--ad-muted); --separator: var(--ad-line);
  --brand: var(--ad-accent); --brand-2: var(--ad-accent); --accent: var(--ad-accent); --button: var(--ad-accent); --button-text: var(--ad-accent-ink);
  --accent-soft: var(--ad-accent-soft); --destructive: var(--ad-bad); --green: var(--ad-ok); --seg-bg: var(--ad-surface-2); --seg-on: var(--ad-surface);
  --toast: var(--ad-tip-bg); --shadow: none; --radius: var(--ad-radius); --card: var(--ad-surface);
  --font: var(--ad-font); --font-bold: var(--ad-font); --font-display: var(--ad-display); --font-text: var(--ad-font);
}
@media (prefers-color-scheme: dark) {
  :root[data-admin]:not([data-theme='light']) {
    color-scheme: dark;
    --ad-bg: #07080C; --ad-surface: #0F1117; --ad-surface-2: #151823; --ad-surface-3: #1B1F2C; --ad-line: #222634; --ad-line-strong: #2E3344;
    --ad-text: #F3F5FA; --ad-muted: #8B93A8;
    --ad-accent: #3D74FF; --ad-accent-hover: #5A89FF; --ad-accent-soft: rgba(61, 116, 255, .16);
    --ad-ok: #C6F21E; --ad-warn: #F5B400; --ad-bad: #ED704B;
    --ad-ok-soft: rgba(198, 242, 30, .12); --ad-warn-soft: rgba(245, 180, 0, .14); --ad-bad-soft: rgba(237, 112, 75, .14); --ad-info-soft: rgba(61, 116, 255, .16);
    --ad-side: #0B0D12; --ad-side-ink: #F3F5FA; --ad-side-muted: #8B93A8; --ad-side-hover: #151823;
    --ad-tip-bg: #F3F5FA; --ad-tip-ink: #12141A; --ad-tip-muted: #4E566B;
    --ad-backdrop: rgba(0, 0, 0, .6); --ad-shadow-pop: 0 18px 50px -12px rgba(0, 0, 0, .7);
    --ad-c1: #3D74FF; --ad-c2: #82A10A; --ad-c3: #D95A9D; --ad-c4: #9B7BF0; --ad-c5: #16A397; --ad-c6: #E26A3A; --ad-c-other: #5B6379;
    --ad-seq-1: #1B2A57; --ad-seq-2: #23408F; --ad-seq-3: #2D58C7; --ad-seq-4: #3D74FF; --ad-seq-5: #8FB0FF;
  }
}
:root[data-admin][data-theme='dark'] {
  color-scheme: dark;
  --ad-bg: #07080C; --ad-surface: #0F1117; --ad-surface-2: #151823; --ad-surface-3: #1B1F2C; --ad-line: #222634; --ad-line-strong: #2E3344;
  --ad-text: #F3F5FA; --ad-muted: #8B93A8;
  --ad-accent: #3D74FF; --ad-accent-hover: #5A89FF; --ad-accent-soft: rgba(61, 116, 255, .16);
  --ad-ok: #C6F21E; --ad-warn: #F5B400; --ad-bad: #ED704B;
  --ad-ok-soft: rgba(198, 242, 30, .12); --ad-warn-soft: rgba(245, 180, 0, .14); --ad-bad-soft: rgba(237, 112, 75, .14); --ad-info-soft: rgba(61, 116, 255, .16);
  --ad-side: #0B0D12; --ad-side-ink: #F3F5FA; --ad-side-muted: #8B93A8; --ad-side-hover: #151823;
  --ad-tip-bg: #F3F5FA; --ad-tip-ink: #12141A; --ad-tip-muted: #4E566B;
  --ad-backdrop: rgba(0, 0, 0, .6); --ad-shadow-pop: 0 18px 50px -12px rgba(0, 0, 0, .7);
  --ad-c1: #3D74FF; --ad-c2: #82A10A; --ad-c3: #D95A9D; --ad-c4: #9B7BF0; --ad-c5: #16A397; --ad-c6: #E26A3A; --ad-c-other: #5B6379;
  --ad-seq-1: #1B2A57; --ad-seq-2: #23408F; --ad-seq-3: #2D58C7; --ad-seq-4: #3D74FF; --ad-seq-5: #8FB0FF;
}
/* ===================== end of tokens ===================== */

.adm { padding-block: 16px 40px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.adm > * { min-width: 0; }
.adm h2 { font-size: 15px; color: var(--hint); font-weight: 600; margin: 4px 4px 6px; font-family: var(--font-bold); }
.adm .card { background: var(--cell); border-radius: 14px; padding: 14px 16px; }
.adm form.card { display: grid; gap: 10px; max-width: 360px; }
.adm input { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--separator); border-radius: 10px; padding: 9px 11px; min-width: 0; }
.adm button.btn { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 9px 14px; cursor: pointer; background: var(--button, #229ed9); color: var(--button-text, #fff); font-family: var(--font-bold); }
.adm button.btn--ghost { background: var(--separator); color: var(--text); }
.adm button.btn--danger { background: var(--destructive, #e53935); }
.adm button:disabled { opacity: .5; cursor: default; }
.tabsbar { display: flex; gap: 6px; flex-wrap: wrap; }
.tabsbar button, .tabsbar a { font: inherit; text-decoration: none; display: inline-block; border: 0; border-radius: 999px; padding: 7px 14px; background: var(--cell); color: var(--text); cursor: pointer; }
.tabsbar button[aria-selected="true"], .tabsbar a[aria-selected="true"] { background: var(--button, #229ed9); color: var(--button-text, #fff); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi b { display: block; font-size: 22px; }
.kpi span { color: var(--hint); font-size: 13px; }
/* activity heatmap: Telegram-blue levels, the busiest days in Stars gold */
.hm-card { position: relative; --c: 13px; --g: 3px; }
.hm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hm-total { margin: 0; color: var(--hint); font-size: 15px; }
.hm-total b { color: var(--text); }
.hm-seg { display: inline-flex; background: var(--bg); border-radius: 10px; padding: 2px; }
.hm-seg button { font: inherit; font-size: 13px; border: 0; background: none; color: var(--text); padding: 5px 12px; border-radius: 8px; cursor: pointer; }
.hm-seg button[aria-pressed="true"] { background: var(--cell); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); font-weight: 600; font-family: var(--font-bold); }
.hm-scroll { overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.hm-body { display: grid; grid-template-columns: 26px auto; grid-template-rows: 16px auto; gap: 4px 6px; width: max-content; }
.hm-months { grid-column: 2; display: grid; grid-template-columns: repeat(53, var(--c)); column-gap: var(--g); font-size: 11px; color: var(--hint); }
.hm-months span { white-space: nowrap; }
.hm-days { position: sticky; left: 0; z-index: 1; background: var(--cell); display: grid; grid-template-rows: repeat(7, var(--c)); row-gap: var(--g); font-size: 11px; color: var(--hint); line-height: var(--c); }
.hm-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, var(--c)); grid-auto-columns: var(--c); gap: var(--g); }
.hm-cell { display: block; width: var(--c); height: var(--c); border-radius: 4px; background: var(--separator); transition: transform .12s; }
.hm-grid .hm-cell:hover, .hm-cell.is-active { transform: scale(1.25); outline: 2px solid var(--text); outline-offset: 0; }
.hm-cell.l1 { background: #c5e6fb; }
.hm-cell.l2 { background: #7cc8f5; }
.hm-cell.l3 { background: #2aa0e6; }
.hm-cell.l4 { background: linear-gradient(135deg, #ffe066, #ffb400); box-shadow: inset 0 0 0 1px #e89400; }
.hm-future { visibility: hidden; }
:root[data-theme="dark"] .hm-cell.l1 { background: #12395a; }
:root[data-theme="dark"] .hm-cell.l2 { background: #1a6497; }
:root[data-theme="dark"] .hm-cell.l3 { background: #2aa0e6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hm-cell.l1 { background: #12395a; }
  :root:not([data-theme="light"]) .hm-cell.l2 { background: #1a6497; }
}
.hm-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: 12px; color: var(--hint); }
.hm-legend span { margin: 0 4px; }
.hm-tip { position: absolute; z-index: 5; transform: translate(-50%, calc(-100% - 10px)); pointer-events: none; background: var(--cell); color: var(--text); border-radius: 12px; padding: 8px 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, .22); font-size: 13px; white-space: nowrap; display: grid; gap: 2px; }
.hm-tip span { color: var(--hint); font-size: 12px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-block; max-width: 190px; font-size: 12px; line-height: 1.3; padding: 3px 10px; border-radius: 12px; background: var(--separator); white-space: normal; vertical-align: top; }
.pill--ok, .st-fulfilled { background: #2e7d3233; color: #2e9e45; }
.pill--bad, .st-failed, .st-refunded { background: #e5393533; color: #e53935; }
.pill--warn { background: #ffb40033; color: #c98a00; }
.st-pending, .st-expired { background: var(--separator); color: var(--hint); }
.st-paid, .st-fulfilling { background: #229ed933; color: #229ed9; }
.warn { color: #e53935; margin: 4px 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--separator); vertical-align: top; }
.tbl tr.row-click { cursor: pointer; }
.tbl-wrap { overflow-x: auto; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.detail { display: grid; gap: 6px; font-size: 13px; }
.detail code { word-break: break-all; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--separator); }
.msg { font-size: 13px; color: var(--hint); }
.meter { height: 8px; border-radius: 4px; background: var(--separator); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #2aa0e6, #ffb400); }
/* TON spend bars */
.bars { display: block; width: 100%; height: auto; margin-top: 12px; }
.bars__bar { fill: #2aa0e6; transition: fill .15s; }
.bars__bar:hover { fill: #f5a300; }
.bars__grid { stroke: var(--separator); stroke-width: 1; }
.bars__axis { fill: var(--hint); font-size: 11px; }
.adm input[type="number"] { width: 120px; }

/* Stable layout: no jumping left/right or up/down when switching tabs, filtering or opening a row */
.view { min-height: 70vh; }
.adm { overflow-anchor: none; }
.adm .toolbar .ui-dd { min-width: 160px; }
.adm .toolbar input[type="search"] { flex: 1 1 220px; }
.orders-list { transition: opacity .15s; }
.orders-list.is-loading { opacity: .55; pointer-events: none; }
.tbl--orders { table-layout: fixed; min-width: 760px; }
.tbl--orders th:nth-child(1) { width: 17%; }
.tbl--orders th:nth-child(2) { width: 25%; }
.tbl--orders th:nth-child(3) { width: 17%; }
.tbl--orders th:nth-child(4) { width: 11%; }
.tbl--orders th:nth-child(5) { width: 13%; }
.tbl--orders td { overflow-wrap: anywhere; }
.orders-summary { margin: 0 4px; }
.field { display: grid; gap: 4px; margin-bottom: 10px; }
.field .ui-dd { max-width: 340px; }
.adm .detail { display: grid; gap: 6px; padding: 4px 2px 8px; font-size: 13px; }
.adm .detail code { overflow-wrap: anywhere; }

/* Price breakdown */
.formula { display: grid; gap: 2px; margin-top: 10px; border-top: 1px solid var(--separator); }
.formula__row { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 9px 0; border-bottom: 1px solid var(--separator); }
.formula__row span { color: var(--hint); font-size: 14px; }
.formula__row b { font-size: 15px; text-align: right; }
.formula__row small { grid-column: 1 / -1; color: var(--hint); font-size: 12px; line-height: 1.4; margin-top: 2px; }
.formula__row:last-child b { font-size: 18px; color: var(--accent); }

/* Login */
.login-box { display: grid; gap: 12px; max-width: 380px; margin: 40px auto; }
.login-box h2 { margin: 0; }
.adm .btn--tg, .login-box .btn--tg { min-height: 48px; font-size: 16px; background: #229ed9; color: #fff; border: 0; border-radius: 12px; font-weight: 600; cursor: pointer; font-family: var(--font-bold); }
.login-alt summary { cursor: pointer; color: var(--hint); font-size: 14px; padding: 6px 0; }
.login-pw { display: grid; gap: 10px; margin-top: 8px; }

/* ---------- Telegram-style groups in the admin ---------- */
.blk { display: grid; gap: 0; }
.blk + .blk, .adm > .blk { margin-top: 2px; }
.adm .group-header { padding: 18px 16px 7px; }
.adm .group-footer { padding: 7px 16px 0; }
.adm .row { min-height: 52px; }
.row__value { margin-left: auto; padding-left: 12px; font-weight: 600; font-size: 16px; text-align: right; white-space: nowrap; color: var(--text); font-family: var(--font-bold); }
.row__value.is-good { color: #2fb84f; }
.row__value.is-bad { color: var(--destructive); }
.row__value.is-muted { color: var(--hint); }
.adm .row__title { flex: 1 1 auto; min-width: 0; }
.adm .row__sub { white-space: normal; }
.row--btn { width: 100%; border: 0; text-align: left; font: inherit; color: var(--text); cursor: pointer; background: var(--cell); }
.row--btn:hover { background: var(--cell-press); }
.row--btn:active { background: var(--cell-press); }
.row--btn .chev { margin-left: 4px; }
.tile--red { background: linear-gradient(180deg, #ff7b72, #e5483d); }
.chip { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--seg-bg); color: var(--hint); font-family: var(--font-bold); }
.chip.is-good { background: rgba(47, 184, 79, .16); color: #2fb84f; }
.chip.is-bad { background: rgba(229, 72, 61, .16); color: var(--destructive); }
.meter-wrap { padding: 0 16px; margin-top: -6px; }
.chart { padding: 8px 10px 4px; }
.bars__bar.is-neg { fill: #e5483d; }
.view-body { display: grid; gap: 0; align-content: start; min-height: 60vh; transition: opacity .15s; }
.view-body--auto { min-height: 0; }
.view-body.is-loading { opacity: .55; pointer-events: none; }
.hm-head h2.group-header { padding-inline: 4px; }

/* tabs: one scrollable line on phones */
.tabsbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; -webkit-overflow-scrolling: touch; }
.tabsbar::-webkit-scrollbar { display: none; }
.tabsbar button, .tabsbar a { flex: none; white-space: nowrap; }
.tile svg { width: 18px; height: 18px; }

/* admin header: same look as the shop's, buttons are plain text */
.admin .brand { flex: 0 1 auto; min-width: 0; }
.admin .brand__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.text-btn { background: none; border: 0; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; padding: 6px 4px; font-family: var(--font-bold); }
.text-btn--muted { color: var(--hint); font-weight: 500; }
@media (max-width: 420px) { .text-btn--muted { display: none; } }

/* sheets in the admin: lists inside, newlines in row subtitles (audit log) */
.ui-sheet--wide .ui-sheet__panel { width: min(100%, 560px); }
.ui-sheet .group, .ui-sheet .blk { margin-bottom: 4px; }
.ui-sheet .group-header { padding-inline: 4px; }
.ui-actions--one { grid-template-columns: 1fr; }
.adm .row__sub { white-space: pre-line; overflow-wrap: anywhere; }
.toolbar--end { justify-content: space-between; align-items: center; margin-top: 2px; }
.toolbar--end .orders-summary { flex: 1 1 auto; }
/* Header on phones: the controls keep their size; the title gives way (logo only on narrow screens) */
.admin .navbar__actions > * { flex: none; }
.admin .brand { min-width: 0; flex: 0 1 auto; }
.admin .brand__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .admin .brand__name { display: none; } }

/* Card titles with an icon tile, and small block titles inside a card */
.card-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 17px; }
.card-head .tile { width: 30px; height: 30px; }
.blk-title { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--hint); text-transform: uppercase; letter-spacing: .02em; font-family: var(--font-bold); }
/* Sections as tabs: one scrollable row, the chosen tab filled */
/* Wide screens: the tabs wrap onto as many rows as needed; on phones they scroll in one row */
.sec-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 12px; }
@media (max-width: 720px) { .sec-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .sec-tabs::-webkit-scrollbar { display: none; } }
.sec-tab { flex: none; padding: 7px 14px; border: 0; border-radius: 999px; background: var(--seg-bg); color: var(--text); font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.sec-tab[aria-selected='true'] { background: var(--button); color: var(--button-text, #fff); font-weight: 600; font-family: var(--font-bold); }

/* The hidden attribute must win over the layout rules of sections (tabs hide whole sections) */
.adm [hidden], .view-body[hidden], .blk[hidden] { display: none !important; }

.prem-term { display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid var(--separator); }
.prem-term:first-of-type { border-top: 0; }
.prem-term__head { display: flex; justify-content: space-between; align-items: baseline; }

/* wallet address in the "Wallet and Fragment" list */
.adm .addr { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; user-select: all; overflow-wrap: anywhere; }

/* delivery error under an order in the list */
.tbl__err { margin-top: 3px; font-size: 12px; line-height: 1.3; color: var(--destructive); white-space: normal; max-width: 360px; }
.tbl__sub { margin-top: 2px; font-size: 12px; color: var(--hint); white-space: nowrap; }
.tbl--orders td:nth-child(4) { white-space: nowrap; }

/* Rows inside windows (order, customer): a long value drops under the title instead of squeezing it letter by letter */
.ui-sheet .row { flex-wrap: wrap; row-gap: 2px; }
.ui-sheet .row__title { flex: 1 1 100px; min-width: 0; overflow-wrap: break-word; word-break: normal; }
.ui-sheet .row__value { flex: 0 1 auto; max-width: 100%; margin-left: auto; white-space: normal; text-align: right; overflow-wrap: anywhere; }
.ui-sheet .row__sub { overflow-wrap: anywhere; }
.ui-sheet .row .chev { display: none; }

/* chart tooltip: same look as the activity map's, but floating over everything */
.chart-tip { position: fixed; z-index: 70; left: 0; top: 0; pointer-events: none; background: var(--cell); color: var(--text); border-radius: 12px; padding: 8px 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, .28); border: 0.5px solid var(--separator); font-size: 13px; line-height: 1.35; white-space: nowrap; display: grid; gap: 2px; opacity: 0; transform: translateY(3px); transition: opacity .12s, transform .12s; }
.chart-tip.is-on { opacity: 1; transform: none; }
.chart-tip b { font-size: 13px; font-weight: 700; font-family: var(--font-bold); }
.chart-tip span { color: var(--hint); font-size: 12.5px; }
.bars__hit { fill: transparent; outline: none; cursor: default; }
.bars__bar { transition: filter .12s; }
.bars__bar.is-hot { filter: brightness(1.18); }
.st-cancelled { background: var(--separator); color: var(--hint); }

/* Payment systems: a row with a click-through area and an on/off switch */
.pay-row { display: flex; align-items: center; gap: 10px; padding-right: 14px; }
.pay-row__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pay-row__sw { flex: none; display: inline-flex; }
.pay-sheet .group { margin: 8px 0; }

/* Price calculator */
.pc .pc-tabs { display: flex; width: 100%; margin: 12px 0 14px; }
.pc .pc-tabs button { flex: 1; }
.pc-hero { display: grid; gap: 12px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; }
.pc-main { position: relative; overflow: hidden; display: grid; align-content: center; justify-items: start; gap: 6px; padding: 18px 20px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #34c759, #1f9d46); box-shadow: 0 8px 24px rgba(52, 199, 89, .28); }
.pc-main.is-mid { background: linear-gradient(135deg, #ffb020, #f08c00); box-shadow: 0 8px 24px rgba(245, 159, 0, .28); }
.pc-main.is-bad { background: linear-gradient(135deg, #ff6b61, #e5483d); box-shadow: 0 8px 24px rgba(229, 72, 61, .28); }
.pc-main::after { content: ''; position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.pc-main__l { font-size: 13px; opacity: .9; }
.pc-main__v { font-size: 34px; line-height: 1.1; font-family: var(--font-bold); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pc-pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .22); }
.pc-main small { font-size: 12px; opacity: .9; }
.pc-stats { display: grid; gap: 8px; }
.pc-stat { display: grid; gap: 1px; padding: 10px 14px; border-radius: 14px; background: var(--seg-bg); }
.pc-stat span { font-size: 12px; color: var(--hint); }
.pc-stat b { font-size: 17px; font-family: var(--font-bold); font-variant-numeric: tabular-nums; }
.pc-stat small { font-size: 11px; color: var(--hint); }
.pc-stat.is-good b { color: #2a9d4a; }
.pc-stat.is-bad b { color: var(--destructive, #e5483d); }
.pc-sec { margin-top: 20px; }
.pc-sec h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--section-header, var(--hint)); }
.pc-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--seg-bg); gap: 2px; }
.pc-seg { display: block; height: 100%; min-width: 3px; }
.pc-seg--ton { background: #229ed9; } .pc-seg--ex { background: #f59f00; } .pc-seg--fee { background: #976fff; } .pc-seg--wd { background: #8e9aaf; } .pc-seg--profit { background: #34c759; }
.pc-legend { display: grid; gap: 2px; margin-top: 10px; }
.pc-leg { display: grid; grid-template-columns: 14px 1fr auto 52px; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--separator); font-size: 14px; }
.pc-leg:last-child { border-bottom: 0; }
.pc-dot { width: 10px; height: 10px; border-radius: 50%; display: block; }
.pc-leg b { font-variant-numeric: tabular-nums; }
.pc-leg small { text-align: right; color: var(--hint); font-variant-numeric: tabular-nums; }
.pc-advice { margin-top: 8px; font-size: 14px; color: var(--hint); }
.pc-over { display: grid; }
.pc-row { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr 64px 1fr; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--separator); font-size: 14px; font-variant-numeric: tabular-nums; }
.pc-row:last-child { border-bottom: 0; }
.pc-row--head { font-size: 12px; color: var(--hint); padding-top: 0; }
.pc-row__c, .pc-row__r { text-align: right; }
.pc-row__n { font-weight: 600; }
.pc-badge { justify-self: center; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--seg-bg); }
.pc-badge.is-good { background: rgba(52, 199, 89, .16); color: #2a9d4a; }
.pc-badge.is-mid { background: rgba(245, 159, 0, .18); color: #c27a00; }
.pc-badge.is-bad { background: rgba(255, 59, 48, .14); color: var(--destructive, #e5483d); }
.pc-toggle { display: block; width: 100%; margin-top: 20px; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--seg-bg); color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-align: left; position: relative; }
.pc-toggle::after { content: '›'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%) rotate(90deg); transition: transform .2s; font-size: 20px; }
.pc-toggle[aria-expanded='true']::after { transform: translateY(-50%) rotate(-90deg); }
.pc-inputs { margin-top: 6px; }
.pc-inputs[hidden], .pc-field[hidden] { display: none !important; }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; }
.pc-field { display: grid; gap: 5px; min-width: 0; }
.pc-field__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--hint); }
.pc-field__box { display: flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 12px; background: var(--seg-bg); }
.pc-field__box:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.pc-field__box input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; padding: 11px 0; font: inherit; font-size: 16px; color: var(--text); outline: 0; }
.pc-field__box em { font-style: normal; color: var(--hint); font-size: 14px; }
.pc-field small { color: var(--hint); font-size: 12px; }
.pc-chip { border: 0; border-radius: 999px; padding: 1px 8px; font: inherit; font-size: 11px; font-weight: 600; background: var(--accent-soft); color: var(--accent); cursor: default; }
.pc-chip.is-own { background: rgba(245, 159, 0, .18); color: #c27a00; cursor: pointer; }
.adm .pc > button.btn { margin: 14px 0 6px; }
@media (max-width: 560px) { .pc-hero { grid-template-columns: 1fr; } .pc-main__v { font-size: 30px; } .pc-row { grid-template-columns: minmax(0, 1fr) auto 56px auto; } }
.pc .pc-tabs button { white-space: nowrap; padding-inline: 4px; font-size: 14px; }
.pc-field { align-content: start; } .pc-grid { align-items: start; }

/* Books */
.pc-seg--ads { background: #ff6b9a; } .pc-seg--oth { background: #f59f00; }
.books-body { margin-top: 12px; }
.pc-stats--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.books-cat { grid-template-columns: 0 1fr auto 52px; }
.books-dl { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.adm .books-dl button.btn { margin: 0; }
.books-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 14px; margin: 12px 0; }
.books-form .books-form__note { grid-column: 1 / -1; }
.books-form input[type='date'] { width: 100%; border: 0; background: none; padding: 11px 0; font: inherit; font-size: 16px; color: var(--text); outline: 0; }
.books-form .ui-dd__btn { width: 100%; }
.books-filter { display: flex; flex-wrap: wrap; margin: 12px 0 4px; }
.books-filter button { white-space: nowrap; }
.adm .card > .toolbar { margin: 10px 0 0; }
.books-form .ui-dr .ui-dd__btn { width: 100%; }
.books-cur { display: flex; width: 100%; }
.books-cur button { flex: 1; white-space: nowrap; }
.books-conv { color: var(--hint); font-size: 12px; margin-top: 2px; }
.books-conv.is-bad { color: var(--destructive, #e5483d); }

/* Toggle switch (iOS style) for every on/off checkbox of the admin */
.switch input[type='checkbox'], .pay-row__sw input[type='checkbox'] {
  -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 51px; height: 31px; margin: 0; border: 0; border-radius: 999px;
  background: var(--seg-bg); cursor: pointer; transition: background-color .2s; -webkit-tap-highlight-color: transparent;
}
.switch input[type='checkbox']::after, .pay-row__sw input[type='checkbox']::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .28); transition: transform .2s;
}
.switch input[type='checkbox']:checked, .pay-row__sw input[type='checkbox']:checked { background: #34c759; }
.switch input[type='checkbox']:checked::after, .pay-row__sw input[type='checkbox']:checked::after { transform: translateX(20px); }
.switch input[type='checkbox']:focus-visible, .pay-row__sw input[type='checkbox']:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input[type='checkbox']:disabled { opacity: .5; cursor: default; }
@media (prefers-reduced-motion: reduce) { .switch input[type='checkbox'], .switch input[type='checkbox']::after, .pay-row__sw input[type='checkbox'], .pay-row__sw input[type='checkbox']::after { transition: none; } }
.pay-sheet .group > .switch { padding: 10px 14px; border-bottom: 0; }
.pc-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.pc-presets button { border: 0; border-radius: 999px; padding: 8px 14px; background: var(--accent-soft); color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; font-family: var(--font-bold); }
.pc-presets button:active { opacity: .7; }
.adm .card > .msg + button.btn, .adm .card > .pc-field + .msg + button.btn { margin-top: 12px; }

/* ---------- Dashboard shell (TZ 4.7): left menu on wide screens, graphite + cool accents, StarSnow identity ---------- */
.tabsbar a { display: inline-flex; align-items: center; gap: 8px; }
:root[data-admin] { --adm-accent: #3aa6ff; --adm-accent2: #8b7bff; --adm-cyan: #2fd4e6; }
@media (min-width: 960px) {
  main.adm.adm--shell { max-width: 1320px; display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 22px; align-items: start; }
  main.adm.adm--shell > .tabsbar { position: sticky; top: 72px; flex-direction: column; flex-wrap: nowrap; overflow: visible; margin: 0; padding: 10px; gap: 2px; background: var(--cell); border-radius: 18px; }
  main.adm.adm--shell > .tabsbar a { border-radius: 12px; padding: 9px 12px; background: transparent; }
  main.adm.adm--shell > .tabsbar a:hover { background: var(--separator); }
  main.adm.adm--shell > .tabsbar a[aria-selected="true"] { background: linear-gradient(90deg, var(--adm-accent), var(--adm-accent2)); color: #fff; box-shadow: 0 4px 18px rgba(58, 166, 255, .28); }
}
@media (min-width: 960px) {
  .adm .blk .group { border-radius: 16px; }
}
:root[data-theme="dark"][data-admin], :root[data-admin]:not([data-theme="light"]) { }
@media (prefers-color-scheme: dark) {
  :root[data-admin]:not([data-theme="light"]) body.admin { background: #0b0d12; }
  :root[data-admin]:not([data-theme="light"]) .tabsbar { background: #12151c; }
}
:root[data-admin][data-theme="dark"] body.admin { background: #0b0d12; }
:root[data-admin][data-theme="dark"] .tabsbar { background: #12151c; }
.adm textarea, .adm select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--separator); border-radius: 10px; padding: 9px 11px; min-width: 0; }
.adm form.card label { display: grid; gap: 4px; font-size: 14px; color: var(--hint); }
.adm .toolbar { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 14px; }
.adm .toolbar a.btn { text-decoration: none; }

/* ---------- Dashboard home (TZ 4.7) ---------- */
.tile--cyan { background: linear-gradient(180deg, #5eead4, #14b8c6); }
.dash { display: grid; gap: 16px; min-width: 0; }
.dash-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dash-title { font-size: 22px; margin: 0; font-family: var(--font-bold); }
.dash-search { flex: 1 1 260px; max-width: 460px; font: inherit; color: var(--text); background: var(--cell); border: 1px solid var(--separator); border-radius: 12px; padding: 9px 14px; }
.dash-status { margin-left: auto; font-size: 13px; padding: 5px 12px; border-radius: 999px; font-weight: 600; }
.dash-status--ok { background: rgba(47, 184, 79, .16); color: #2fb84f; }
.dash-status--bad { background: rgba(229, 57, 53, .16); color: #e5534b; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.dash-kpi { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 12px; align-items: center; background: var(--cell); border-radius: 16px; padding: 14px; border: 1px solid transparent; }
.dash-kpi:hover, .dash-kpi:focus-visible { border-color: var(--adm-accent, #3aa6ff); }
.dash-kpi__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.dash-kpi__icon svg { width: 22px; height: 22px; }
.dash-kpi--blue .dash-kpi__icon { background: linear-gradient(180deg, #4fc3f7, #229ed9); }
.dash-kpi--green .dash-kpi__icon { background: linear-gradient(180deg, #5fd776, #2fb84f); }
.dash-kpi--violet .dash-kpi__icon { background: linear-gradient(180deg, #b48cff, #8c5cf5); }
.dash-kpi--cyan .dash-kpi__icon { background: linear-gradient(180deg, #5eead4, #14b8c6); }
.dash-kpi--red .dash-kpi__icon { background: linear-gradient(180deg, #ff8a80, #e5534b); }
.dash-kpi--muted .dash-kpi__icon { background: var(--separator); }
.dash-kpi__body { display: grid; min-width: 0; }
.dash-kpi__label { font-size: 13px; color: var(--hint); }
.dash-kpi__value { font-size: 24px; font-family: var(--font-bold); line-height: 1.15; }
.dash-kpi__sub { font-size: 12px; color: var(--hint); }
.dash-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1180px) { .dash-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.dash-main, .dash-side { display: grid; gap: 16px; min-width: 0; }
.dash-card { background: var(--cell); border-radius: 18px; padding: 16px; min-width: 0; }
.dash-card__title { font-size: 15px; margin: 0 0 12px; color: var(--hint); font-family: var(--font-bold); font-weight: 600; }
.dash-attention { border: 1px solid rgba(229, 83, 75, .35); }
.dash-tools { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.dash-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dash-item { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; }
.dash-item:hover, .dash-item:focus-visible { background: var(--separator); }
.dash-item span:last-child { display: grid; min-width: 0; }
.dash-item small, .dash-err { color: var(--hint); font-size: 12px; display: block; }
.dash-err { color: var(--destructive, #e5534b); }
.dash-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; }
.dash-dot--ok { background: #2fb84f; } .dash-dot--warn { background: #f59f00; } .dash-dot--bad { background: #e5534b; }
.dash-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.dash-row em { margin-left: auto; font-style: normal; color: var(--hint); font-size: 13px; }
.dash-empty { color: var(--hint); margin: 0; }
.dash-tablewrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash-table th { text-align: left; font-weight: 600; color: var(--hint); font-size: 12px; padding: 6px 8px; }
.dash-table td { padding: 9px 8px; border-top: 1px solid var(--separator); vertical-align: top; }
.dash-table tr.is-click { cursor: pointer; }
.dash-table tr.is-click:hover { background: var(--separator); }
.dash-pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--separator); white-space: nowrap; }
.dash-pill--good { background: rgba(47, 184, 79, .16); color: #2fb84f; }
.dash-pill--bad { background: rgba(229, 83, 75, .16); color: #e5534b; }
.dash-pill--info { background: rgba(58, 166, 255, .16); color: #3aa6ff; }
.dash-big { font-size: 30px; font-family: var(--font-bold); margin-bottom: 8px; }
.dash-dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0 0 12px; font-size: 14px; }
.dash-dl dt { color: var(--hint); } .dash-dl dd { margin: 0; text-align: right; }
.dash-meter { height: 6px; border-radius: 3px; background: var(--separator); overflow: hidden; margin-bottom: 10px; }
.dash-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--adm-cyan, #2fd4e6), var(--adm-accent2, #8b7bff)); }
.dash-more { all: unset; cursor: pointer; margin-top: 10px; color: var(--adm-accent, #3aa6ff); font-size: 14px; }
.dash-more:hover { text-decoration: underline; }
@media (max-width: 600px) { .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-status { margin-left: 0; } }
@media (min-width: 960px) { .dash-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } .dash-kpi { padding: 12px; gap: 10px; } .dash-kpi__value { font-size: 22px; } }

/* ---------- 8 groups + pills (TZ 4.6) ---------- */
.adm-main { min-width: 0; display: grid; gap: 14px; align-content: start; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.subtabs a { text-decoration: none; color: var(--text); background: var(--cell); padding: 7px 16px; border-radius: 999px; font-size: 14px; border: 1px solid transparent; }
.subtabs a:hover { border-color: var(--adm-accent, #3aa6ff); }
.subtabs a[aria-current="page"] { background: linear-gradient(90deg, var(--adm-accent, #3aa6ff), var(--adm-accent2, #8b7bff)); color: #fff; }
.tabsbar__brand { display: none !important; }
.tabsbar__badge { margin-left: auto; min-width: 20px; padding: 0 6px; height: 20px; border-radius: 10px; background: #e5534b; color: #fff; font-size: 12px; line-height: 20px; text-align: center; font-weight: 700; }
@media (min-width: 960px) {
  main.adm.adm--shell > .tabsbar .tabsbar__brand { display: flex !important; align-items: center; gap: 10px; padding: 8px 12px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--separator); border-radius: 0; font-family: var(--font-bold); font-size: 17px; color: var(--text); background: transparent; }
  main.adm.adm--shell > .tabsbar .tabsbar__brand:hover { background: transparent; }
}

/* ---------- Dashboard, reference layout (TZ 4.7) ---------- */
.dash-card { border: 1px solid var(--separator); border-radius: 16px; }
.dash-card__title { color: var(--text); font-size: 17px; margin: 0 0 12px; }
.dash-card__title--big { font-size: 20px; margin: 0; }
.dash-btn { text-decoration: none; color: var(--text); border: 1px solid var(--separator); background: var(--cell); padding: 9px 16px; border-radius: 999px; font-size: 14px; }
.dash-btn:hover { border-color: var(--adm-accent, #3aa6ff); }
/* KPI cards: icon + name on the left, arrow on the right, a big number below */
.dash-kpi { flex-direction: column; align-items: stretch; gap: 14px; padding: 14px 16px; border: 1px solid var(--separator); border-radius: 16px; }
.dash-kpi__head { display: flex; align-items: center; gap: 8px; }
.dash-kpi__icon { width: 22px; height: 22px; border-radius: 0; background: none !important; display: grid; place-items: center; }
.dash-kpi__icon svg { width: 18px; height: 18px; }
.dash-kpi__label { font-size: 14px; color: var(--text); flex: 1; }
.dash-arrow { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--separator); font-size: 13px; color: var(--hint); }
.dash-kpi:hover .dash-arrow { background: var(--adm-accent, #3aa6ff); color: #fff; }
.dash-kpi__value { font-size: 30px; line-height: 1.05; }
/* items for the period */
.dash-assets__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.dash-assets__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.dash-asset { background: var(--bg); border: 1px solid var(--separator); border-radius: 14px; padding: 14px; display: grid; gap: 14px; }
.dash-asset__row { display: flex; align-items: center; gap: 10px; }
.dash-asset__row small { display: block; color: var(--hint); font-size: 12px; }
.dash-asset__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--separator); font-size: 17px; }
.dash-asset__n { margin-left: auto; font-size: 18px; color: var(--hint); }
.dash-asset__row--end { justify-content: space-between; }
.dash-asset__money { font-size: 22px; }
.dash-delta { font-size: 12px; font-weight: 600; }
.dash-delta.is-up { color: #3ddc84; } .dash-delta.is-down { color: #ff6b61; }
/* two lists side by side */
.dash-two { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1500px) { .dash-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.dash-feed { list-style: none; margin: 0; padding: 0; display: grid; }
.dash-feed li + li { border-top: 1px solid var(--separator); }
.dash-feed__row { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 10px; }
.dash-feed__row:hover, .dash-feed__row:focus-visible { background: var(--separator); }
.dash-date { display: grid; justify-items: center; line-height: 1.1; min-width: 34px; padding-right: 10px; border-right: 3px solid #4aa8ff; }
.dash-date b { font-size: 20px; } .dash-date small { font-size: 11px; color: var(--hint); }
.dash-date--green { border-color: #3ddc84; } .dash-date--red { border-color: #ff6b61; }
.dash-feed__body { display: grid; min-width: 0; flex: 1; }
.dash-feed__body b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-feed__body small { color: var(--hint); font-size: 12px; }
.dash-feed__chips { display: grid; gap: 4px; justify-items: end; }
.dash-amount { font-weight: 700; font-size: 14px; white-space: nowrap; }
.dash-amount.is-good { color: #3ddc84; } .dash-amount.is-bad { color: #ff6b61; }
/* wallet overview */
.dash-wallet { background: linear-gradient(160deg, rgba(58, 166, 255, .16), rgba(139, 123, 255, .08) 60%, transparent), var(--cell); }
.dash-caption { color: var(--hint); font-size: 12px; margin: 0 0 6px; }
.dash-caption--c { text-align: center; margin: 2px 0 12px; }
.dash-big { text-align: center; font-size: 30px; font-family: var(--font-bold); color: var(--adm-accent, #3aa6ff); margin: 8px 0 0; }
.dash-lines { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.dash-lines li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--separator); border-radius: 10px; padding: 8px 12px; }
.dash-lines li span { color: var(--hint); }
/* sidebar like the reference: quiet icons, a soft highlight on the active item */
@media (min-width: 960px) {
  main.adm.adm--shell > .tabsbar a[aria-selected="true"] { background: rgba(58, 166, 255, .14); color: var(--text); box-shadow: inset 3px 0 0 var(--adm-accent, #3aa6ff); border-radius: 10px; }
}
.subtabs a[aria-current="page"] { background: rgba(58, 166, 255, .18); color: var(--text); border-color: var(--adm-accent, #3aa6ff); }
@media (min-width: 960px) {
  main.container.adm.adm--shell { max-width: min(1560px, calc(100% - 32px)); grid-template-columns: 220px minmax(0, 1fr); }
  .dash-kpi__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (min-width: 1180px) { .dash-grid { grid-template-columns: minmax(0, 1fr) 330px; } }
@media (min-width: 960px) { main.container.adm.adm--shell { width: min(1560px, calc(100% - 32px)); max-width: none; } }
.dash-chart svg { max-height: 230px; width: 100%; }
.dash-attention .dash-item b { font-size: 14px; font-weight: 600; }
.dash-attention .dash-item { padding: 6px 8px; }

/* ---------- One look for every page (TZ 4.6 / 4.7): the same cards, headings, pills and buttons as the dashboard ---------- */
.adm .group, .adm .card, .adm .tbl-wrap { background: var(--cell); border: 1px solid var(--separator); border-radius: 16px; box-shadow: none; }
.adm .card { padding: 16px; }
.adm .group-header { padding: 20px 4px 10px; font-size: 17px; font-weight: 600; text-transform: none; color: var(--text); font-family: var(--font-bold); }
.adm .group-footer { padding: 8px 4px 0; }
.adm .row:hover:not(.row--static) { background: rgba(255, 255, 255, .03); }
.adm .row.row--btn:hover { background: var(--separator); }
.adm .blk { margin: 0; }
.adm-main > .view > .adm { padding-block: 0; }
.sec-tab { background: var(--cell); border: 1px solid transparent; }
.sec-tab:hover { border-color: var(--adm-accent, #3aa6ff); }
.sec-tab[aria-selected='true'] { background: rgba(58, 166, 255, .18); color: var(--text); border-color: var(--adm-accent, #3aa6ff); font-weight: 600; }
.adm button.btn, .adm a.btn { border-radius: 999px; padding: 9px 18px; }
.adm button.btn--ghost, .adm a.btn--ghost { background: var(--cell); border: 1px solid var(--separator); color: var(--text); }
.adm input, .adm select, .adm textarea { border-radius: 12px; }
.tbl th { color: var(--hint); font-weight: 600; font-size: 12px; text-transform: none; }
.tbl tr.row-click:hover td { background: rgba(255, 255, 255, .03); }
.dash-top { margin-bottom: 2px; }
/* ---------- Adaptive: phone → tablet → desktop → wide ---------- */
.adm-main, .adm-main > .view, .adm-main .adm, .adm-main .view-body { min-width: 0; max-width: 100%; }
.adm-main img, .adm-main svg { max-width: 100%; }
.adm .row { min-width: 0; }
.adm .row__title { min-width: 0; overflow-wrap: anywhere; }
.adm .row__value { max-width: 55%; text-align: right; overflow-wrap: anywhere; }
.adm .toolbar > * { min-width: 0; }
.adm .toolbar .ui-dd, .adm .toolbar input[type="search"] { flex: 1 1 160px; }
@media (max-width: 959px) {
  main.adm.adm--shell { display: block; padding-inline: 16px; }
  main.adm.adm--shell > .tabsbar { display: flex; flex-direction: row; overflow-x: auto; flex-wrap: nowrap; gap: 6px; margin: 0 -16px 12px; padding: 4px 16px; position: static; background: none; border-radius: 0; scrollbar-width: none; }
  main.adm.adm--shell > .tabsbar::-webkit-scrollbar { display: none; }
  main.adm.adm--shell > .tabsbar a { flex: none; background: var(--cell); border-radius: 999px; padding: 7px 14px; }
  main.adm.adm--shell > .tabsbar a[aria-selected="true"] { background: rgba(58, 166, 255, .18); box-shadow: inset 0 0 0 1px var(--adm-accent, #3aa6ff); }
  .tabsbar__brand { display: none !important; }
}
@media (max-width: 720px) {
  .dash-title { font-size: 19px; }
  .dash-top { gap: 8px; }
  .dash-search { flex-basis: 100%; max-width: none; order: 3; }
  .dash-btn { padding: 7px 12px; }
  .dash-feed__row { flex-wrap: wrap; }
  .dash-feed__chips { justify-items: start; grid-auto-flow: column; width: 100%; }
  .adm .row__value { max-width: 50%; }
  .subtabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .subtabs::-webkit-scrollbar { display: none; }
  .subtabs a { flex: none; white-space: nowrap; }
}
@media (max-width: 420px) { .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-kpi__value { font-size: 24px; } .dash-kpi__label { font-size: 13px; } .dash-arrow { display: none; } }
@media (min-width: 1900px) { main.container.adm.adm--shell { width: min(1760px, calc(100% - 48px)); } }
.hm-head, .hm-seg { max-width: 100%; min-width: 0; }
.hm-seg { flex-wrap: wrap; }
@media (max-width: 480px) {
  .hm-head { flex-direction: column; align-items: stretch; }
  .hm-seg { display: flex; width: 100%; }
  .hm-seg button { flex: 1 1 auto; padding: 6px 8px; }
}

/* brand icons (star / crown / TON / arrows) replace emoji and text symbols everywhere in the admin */
.gi { width: 1.15em; height: 1.15em; vertical-align: -0.2em; display: inline-block; flex: none; }
.gi--line { width: 1em; height: 1em; vertical-align: -0.12em; }
.dash-asset__icon .gi { width: 22px; height: 22px; vertical-align: middle; }
.dash-arrow .gi { width: 14px; height: 14px; vertical-align: middle; }
.dash-delta .gi { width: 12px; height: 12px; vertical-align: -0.1em; }
.dash-btn .gi { width: 12px; height: 12px; }
.row__title .gi, .tbl .gi { width: 1.05em; height: 1.05em; }

/* the shop's own animated icons in the sidebar and on the KPI cards */
.tabsbar .ai { width: 26px; height: 26px; flex: none; vertical-align: middle; }
.dash-kpi__icon { width: 30px; height: 30px; }
.dash-kpi__icon .ai { width: 30px; height: 30px; }
.dash-kpi__head { gap: 10px; }
@media (max-width: 959px) { .tabsbar .ai { width: 22px; height: 22px; } }
.dash-kpi__icon .ai svg { width: 100%; height: 100%; stroke: none; }
.dash-kpi__icon { width: 30px; height: 30px; }

/* icon frames: exactly the grey rounded square of the items for the period; the icon inside has its own colour */
.ico-frame { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--separator); border: 0; box-shadow: none; }
.ico-frame .ai { width: 24px; height: 24px; filter: none; vertical-align: middle; }
.ico-frame--lg { width: 38px; height: 38px; }
.ico-frame--lg .ai { width: 26px; height: 26px; }
/* every section gets its own colour: the shop's blue icons are turned to green / violet / pink… (white and gold parts stay) */
.ico-frame .ai-card { filter: hue-rotate(-62deg) saturate(1.1); }
.ico-frame .ai-users { filter: hue-rotate(78deg); }
.ico-frame .ai-heart { filter: hue-rotate(142deg) saturate(1.15); }
.ico-frame .ai-clock { filter: hue-rotate(-150deg) saturate(1.2); }
.ico-frame .ai-help { filter: hue-rotate(160deg) saturate(1.15); }
.ico-frame .ai-gift { filter: hue-rotate(-30deg); }
.tabsbar .ico-frame { width: 34px; height: 34px; }
.tabsbar .ico-frame .ai { width: 22px; height: 22px; }
.dash-kpi__icon { width: auto; height: auto; }
.dash-kpi__head { gap: 12px; }
@media (max-width: 959px) { .tabsbar .ico-frame { width: 28px; height: 28px; border-radius: 9px; } .tabsbar .ico-frame .ai { width: 18px; height: 18px; } }
.dash-kpi, .dash-kpi__head, .dash-kpi__label { min-width: 0; }
.dash-kpi__label { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) {
  .ico-frame--lg { width: 30px; height: 30px; border-radius: 9px; }
  .ico-frame--lg .ai { width: 20px; height: 20px; }
  .dash-kpi { padding: 12px; }
  .dash-kpi__head { gap: 8px; }
}

/* the shop's colour tiles (gradient square + white glyph) in the sidebar and on the KPI cards */
.tabsbar .tile { width: 34px; height: 34px; border-radius: 11px; flex: none; }
.tabsbar .tile svg { width: 20px; height: 20px; stroke: #fff; }
.dash-kpi__icon { width: auto; height: auto; background: none !important; display: block; }
.dash-kpi__icon .tile { width: 38px; height: 38px; border-radius: 12px; }
.dash-kpi__icon .tile svg { width: 22px; height: 22px; stroke: #fff; }
@media (max-width: 959px) { .tabsbar .tile { width: 28px; height: 28px; border-radius: 9px; } .tabsbar .tile svg { width: 17px; height: 17px; } }
@media (max-width: 420px) { .dash-kpi__icon .tile { width: 30px; height: 30px; border-radius: 9px; } .dash-kpi__icon .tile svg { width: 18px; height: 18px; } }

.dash-kpi .dash-kpi__icon .tile svg { stroke: #fff !important; }

/* ---------- admin top bar: same width as the workspace, calm pills ---------- */
.admin .navbar { background: var(--bg); border-bottom: 1px solid var(--separator); }
.admin .navbar .container { max-width: none; width: min(1560px, calc(100% - 32px)); }
@media (min-width: 1900px) { .admin .navbar .container { width: min(1760px, calc(100% - 48px)); } }
.adm-badge { margin-left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--adm-accent, #3aa6ff); background: rgba(58, 166, 255, .14); border: 1px solid rgba(58, 166, 255, .3); }
.admin .navbar__actions { gap: 8px; flex-wrap: wrap; }
.admin .navbar .icon-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--cell); border: 1px solid var(--separator); display: inline-grid; place-items: center; color: var(--text); }
.admin .navbar .icon-btn:hover { border-color: var(--adm-accent, #3aa6ff); }
.admin .navbar .text-btn { border: 1px solid var(--separator); background: var(--cell); border-radius: 999px; padding: 7px 14px; font-size: 14px; color: var(--hint); }
.admin .navbar .text-btn:hover { border-color: var(--adm-accent, #3aa6ff); color: var(--text); }
.admin .navbar #logout { color: var(--text); border-color: rgba(58, 166, 255, .45); }
@media (max-width: 560px) { .admin .navbar__row { min-height: 0; padding-block: 8px; } .admin .navbar .text-btn { padding: 6px 10px; font-size: 13px; } }

.dash-refresh { all: unset; cursor: pointer; margin-left: 6px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--separator); color: var(--adm-accent, #3aa6ff); font-size: 13px; line-height: 20px; }
.dash-refresh:hover { border-color: var(--adm-accent, #3aa6ff); }
.dash-refresh.is-spin { animation: dashspin 1s linear infinite; opacity: .6; }
@keyframes dashspin { to { transform: rotate(360deg); } }
.funnel-sub { display: grid; gap: 4px; }
.funnel-bar { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--adm-accent, #3aa6ff), var(--adm-accent2, #8b7bff)); }
.funnel-sub small { color: var(--hint); }
.dash-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--hint); }
.tbl td.is-good { color: #3ddc84; font-weight: 600; } .tbl td.is-bad { color: #ff6b61; font-weight: 600; }

/* ---------- reviews page (admin): quiet cards, one row of tabs, one line for the reward ---------- */
.rvA { gap: 14px; }
.rvA-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.rvA-score { display: flex; align-items: baseline; gap: 10px; }
.rvA-score b { font-size: 34px; font-family: var(--font-bold); line-height: 1; }
.rvA-score small { color: var(--hint); }
.rvA-stars { color: #f5b301; letter-spacing: 1px; white-space: nowrap; }
.rvA-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.rvA-tabs button { font: inherit; font-size: 14px; color: var(--text); background: var(--cell); border: 1px solid var(--separator); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.rvA-tabs button em { font-style: normal; color: var(--hint); margin-left: 2px; }
.rvA-tabs button[aria-pressed="true"] { background: rgba(58, 166, 255, .18); border-color: var(--adm-accent, #3aa6ff); }
.rvA-tabs button.has-new em { color: #fff; background: #e5534b; border-radius: 999px; padding: 0 7px; }
.rvA-list { display: grid; gap: 10px; }
.rvA-card { background: var(--cell); border: 1px solid var(--separator); border-radius: 16px; padding: 14px 16px; display: grid; gap: 8px; }
.rvA-card.is-pending { border-color: rgba(245, 179, 1, .45); }
.rvA-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rvA-top small { color: var(--hint); margin-left: auto; }
.rvA-text { margin: 0; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.rvA-why { margin: 0; color: var(--hint); font-size: 13px; }
.rvA-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rvA-state { margin-left: auto; font-size: 12px; color: var(--hint); }
.rvA-state--published { color: #3ddc84; } .rvA-state--pending { color: #f5b301; } .rvA-state--hidden { color: #ff6b61; }
.rvA-empty { color: var(--hint); text-align: center; padding: 28px 0; margin: 0; }
.rvA-reward { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border: 1px dashed var(--separator); border-radius: 14px; color: var(--hint); }
.rvA-form { display: grid; gap: 12px; padding: 4px 2px 8px; }
.rvA-form label { display: grid; gap: 4px; font-size: 14px; color: var(--hint); }
.rvA-form input[type="number"], .rvA-form select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--separator); border-radius: 12px; padding: 9px 12px; }
.rvA-check { display: flex !important; align-items: center; gap: 8px; color: var(--text) !important; }
.rvA-form details { display: grid; gap: 10px; } .rvA-form details > label { margin-top: 10px; }
.rvA-hint { margin: 0; font-size: 13px; color: var(--hint); }

.books-partners { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 4px 0 12px; }
@media (max-width: 640px) { .books-partners { grid-template-columns: 1fr; } }

/* ---- payment method look (admin editor + preview of what the buyer sees) ---- */
.pl-method { padding: 4px 8px; border-bottom: 1px solid var(--separator); }
.pl-method:last-child { border-bottom: 0; }
.pl-slot { flex: 1; min-width: 0; }
.pl-line { display: flex; align-items: center; gap: 8px; }
.pl-edit { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--seg-bg, rgba(127,127,127,.15)); color: var(--text); font-size: 16px; cursor: pointer; }
.pl-hint { display: block; padding: 0 12px 6px 60px; margin: -4px 0 0; }
.pl-more { margin: 4px 0; } .pl-more summary { cursor: pointer; color: var(--hint); font-size: 14px; padding: 6px 0; } .pl-more .pl-field { margin-top: 8px; }
.pl-health { margin: 10px 0 0; } .pl-health summary { cursor: pointer; font-weight: 600; padding: 10px 4px; color: #2fbf71; } .pl-health.is-bad summary { color: #e5534b; }
.pl-card { background: var(--cell); border-radius: 14px; padding: 2px; }
.pl-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.pl-tile { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.pl-tile svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
/* an own picture covers the whole rounded square */
.pl-tile--pic { overflow: hidden; background: none; }
.pl-pic { display: block; width: 100%; height: 100%; object-fit: cover; }
.pl-tile--blue { background: linear-gradient(135deg, #3aa6ff, #2b7be4); } .pl-tile--violet { background: linear-gradient(135deg, #9a86ff, #6a55e8); }
.pl-tile--green { background: linear-gradient(135deg, #3ed48a, #1fa463); } .pl-tile--gold { background: linear-gradient(135deg, #ffc24a, #f08c1b); }
.pl-tile--red { background: linear-gradient(135deg, #ff7a7a, #e5484d); } .pl-tile--cyan { background: linear-gradient(135deg, #34d6e8, #1b9fc4); }
.pl-tile--gray { background: linear-gradient(135deg, #8896ab, #5f6f86); }
.pl-title { flex: 1; min-width: 0; display: grid; }
.pl-title small { color: var(--hint); font-size: 13px; }
.pl-badge { flex: none; font-size: 12px; padding: 3px 9px; border-radius: 20px; background: rgba(47, 191, 113, .18); color: #2fbf71; white-space: nowrap; font-weight: 600; }
.pl-radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--separator); }
.pl-form { display: grid; gap: 10px; margin: 12px 0; }
.pl-field { display: grid; gap: 4px; }
.pl-field span, .pl-label { font-size: 12px; color: var(--hint); }
.pl-field input { width: 100%; background: var(--bg, transparent); border: 1px solid var(--separator); color: var(--text); border-radius: 11px; padding: 10px 12px; font: inherit; }
.pl-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; }
.pl-ic { border: 2px solid transparent; border-radius: 14px; padding: 4px; background: none; cursor: pointer; display: grid; gap: 3px; justify-items: center; color: var(--hint); font: inherit; }
.pl-ic i { font-style: normal; font-size: 11px; }
.pl-ic.is-on { border-color: var(--adm-accent, #3aa6ff); color: var(--text); }
.pl-colors { display: flex; gap: 10px; flex-wrap: wrap; }
.pl-cl { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; }
.pl-cl.is-on { outline-color: var(--text); }
.pl-upload { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.rvA-guest { margin-left: 6px; font-size: 11px; font-weight: 600; background: rgba(245, 179, 1, .18); color: #9a6a00; border-radius: 8px; padding: 2px 7px; }

.exp-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0; }
@media (max-width: 720px) { .exp-form { grid-template-columns: 1fr; } }
.exp-info { font-weight: 600; color: var(--text); }
.exp-info.is-bad { color: #e53935; }
.exp-cols { font-size: 12px; line-height: 1.5; }

/* the period picker and the download button sit side by side, small, not across the whole page */
.adm .toolbar.books-bar { justify-content: flex-start; }
.adm .toolbar.books-bar .ui-dd { flex: 0 0 auto; width: 200px; min-width: 0; }
.adm .toolbar.books-bar .btn { flex: 0 0 auto; }
@media (max-width: 520px) { .adm .toolbar.books-bar .ui-dd { width: 100%; flex: 1 1 100%; } }

/* a campaign: its links and the edit fields */
.cmp-link { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: center; margin: 8px 0; }
.cmp-link b { grid-column: 1 / -1; font-size: 13px; color: var(--hint); }
.cmp-link input { width: 100%; min-width: 0; background: var(--bg, transparent); border: 1px solid var(--separator); color: var(--text); border-radius: 11px; padding: 10px 12px; font: inherit; font-size: 13px; }
.cmp-link small { grid-column: 1 / -1; }
.cmp-edit { display: grid; gap: 10px; margin: 10px 0; }
/* the date range is a compact control next to the buttons, never a stretched bar; its calendar is the default small one */
.adm .toolbar .ui-dr { flex: 0 1 auto; min-width: 190px; width: auto; }
.cmp-edit input[type='text'], .cmp-link input { width: 100%; min-width: 0; border: 0; border-radius: 12px; background: var(--seg-bg); color: var(--text); padding: 11px 12px; font: inherit; font-size: 16px; outline: 0; }
.cmp-edit input[type='text']:focus, .cmp-link input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.cmp-edit input::placeholder { color: var(--hint); }
/* the form's switches stay on one line; «Что вносим» takes two columns because its second label is long */
.books-form .hm-seg { display: flex; flex-wrap: nowrap; width: 100%; }
.books-form .hm-seg button { flex: 1 1 auto; white-space: nowrap; padding: 7px 8px; }
.books-form .pc-field--wide { grid-column: span 2; }
@media (max-width: 560px) { .books-form .pc-field--wide { grid-column: 1 / -1; } }
.pl-input { flex: 1 1 160px; min-width: 0; border: 0; border-radius: 12px; background: var(--seg-bg); color: var(--text); padding: 11px 12px; font: inherit; font-size: 16px; outline: 0; }
.pl-input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.pl-input::placeholder { color: var(--hint); }
/* export: one form everywhere, in a card or in a sheet; the fields stack on a phone, nothing is cut off */
.exp-sheet .exp-form { grid-template-columns: 1fr; }
.exp .actions { margin-top: 12px; }
.exp-btn { white-space: nowrap; }
.exp-cols { overflow-wrap: anywhere; }

/* orders: a search bar, then compact filters (never stretched across the page) */
.adm .toolbar.orders-filters { padding-top: 0; }
.adm .toolbar.orders-filters .ui-dd, .adm .toolbar.orders-filters .ui-dr { flex: 0 1 auto; width: auto; min-width: 0; max-width: 190px; }
.adm .toolbar.orders-filters .ui-dd__btn { padding-inline: 12px; font-size: 14px; }
.orders-slot { display: contents; }
.exp-sheet .ui-dr__pop { position: static; box-shadow: none; width: 100%; max-width: none; margin-top: 8px; }
.exp-filters { overflow-wrap: anywhere; }
@media (max-width: 520px) { .adm .toolbar.orders-filters .ui-dd, .adm .toolbar.orders-filters .ui-dr { flex: 1 1 42%; max-width: none; } }

/* service accounts: the «add» row is one line on a wide screen, stacked on a phone */
.int-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 10px 0 4px; }
.int-add .ui-input { width: 100%; min-width: 0; }
@media (max-width: 640px) { .int-add { grid-template-columns: 1fr; } .int-add .btn { justify-self: start; } }

/* bot texts */
.bt-field { display: grid; gap: 4px; margin: 12px 0; }
.bt-label { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--hint); }
.bt-count.is-bad { color: #e53935; }
.bt-area { width: 100%; min-height: 70px; resize: vertical; font: inherit; line-height: 1.4; }

/* discounts: a percent per product, in a tidy grid */
.disc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 12px; margin: 6px 0 10px; }
.disc-grid .field { margin: 0; }

/* ---------- «Рассылки» ---------- */
.bc { display: grid; gap: 14px; }
.bc-grid { display: grid; gap: 14px; align-items: start; }
@media (min-width: 1000px) { .bc-grid { grid-template-columns: minmax(0, 1fr) 340px; } .bc-side { position: sticky; top: 84px; } }
.bc-lbl, .bc-section { font: 600 12px/1.2 var(--font-bold); letter-spacing: .5px; text-transform: uppercase; color: var(--hint); margin: 14px 0 6px; }
.bc-section { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--separator); }
.bc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.bc-chipbtn { border: 0; border-radius: 999px; padding: 7px 13px; background: var(--seg-bg, rgba(118, 118, 128, .14)); color: var(--text); font: 600 13px var(--font-bold); cursor: pointer; }
.bc-chipbtn[aria-pressed="true"] { background: var(--accent); color: #fff; }
.bc-range { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.bc-num { width: 92px; text-align: center; font-weight: 600; }
.bc-note { display: block; margin-bottom: 8px; }
.bc-two { display: grid; gap: 0 14px; }
@media (min-width: 700px) { .bc-two { grid-template-columns: 1fr 1fr; } }
.bc-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.bc-spacer { flex: 1; }
.bc-tool { min-width: 38px; padding: 6px 10px; font-weight: 700; }
.bc-text { min-height: 170px; }
.bc-btn { margin: 8px 0; }
.bc-btnrow { display: grid; gap: 8px; }
@media (min-width: 700px) { .bc-btnrow { grid-template-columns: 1fr 1.6fr; } }
.bc-check { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; color: var(--text); font-size: 14px; line-height: 1.35; cursor: pointer; }
.bc-check input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--accent); }
.bc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bc-start[disabled] { opacity: .5; }
.bc-msg:empty { display: none; }
.bc-result { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--seg-bg, rgba(118, 118, 128, .12)); }
.bc-count { margin: 0 0 8px; font-size: 18px; }
.bc-count b { font-size: 26px; font-family: var(--font-bold); }
.bc-samples { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.bc-chip { padding: 4px 10px; border-radius: 999px; background: var(--cell); font-size: 12px; color: var(--hint); }
.bc-link code { word-break: break-all; }
/* the Telegram bubble */
.bc-phone { border-radius: 18px; overflow: hidden; background: #0e1621 radial-gradient(circle at 20% 10%, #16263a, #0e1621 65%); border: 1px solid var(--separator); }
.bc-phone__bar { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; background: #17212b; color: #fff; }
.bc-phone__bar small { color: #6c7883; }
.bc-bubble { margin: 14px 12px 18px; max-width: 94%; padding: 9px 12px 10px; border-radius: 14px 14px 14px 4px; background: #182533; color: #fff; font-size: 15px; line-height: 1.38; }
.bc-bubble__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bc-bubble__text code { font-family: ui-monospace, Consolas, monospace; background: rgba(255, 255, 255, .1); padding: 0 4px; border-radius: 4px; }
.bc-kb { display: grid; gap: 4px; margin: 10px -4px -2px; }
.bc-kb__btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 8px; border-radius: 9px; background: rgba(255, 255, 255, .08); color: #6ab3f3; font: 600 14px var(--font-bold); text-align: center; }
.bc-kb__btn--off { min-height: 30px; font-size: 12px; font-weight: 500; color: #7f8b97; }
.bc-kb__app { font-size: 11px; opacity: .8; }
/* history */
.bc-history { display: grid; gap: 10px; }
.bc-card { padding: 14px; border-radius: 14px; background: var(--seg-bg, rgba(118, 118, 128, .1)); display: grid; gap: 8px; }
.bc-card__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bc-card__top small { margin-left: auto; color: var(--hint); }
.bc-state { padding: 2px 10px; border-radius: 999px; font: 600 12px var(--font-bold); background: rgba(52, 199, 89, .16); color: #1f9d4a; }
.bc-state.is-sending { background: rgba(62, 136, 247, .18); color: var(--accent); }
.bc-state.is-cancelled { background: rgba(229, 83, 75, .16); color: #e5534b; }
.bc-bar { height: 8px; border-radius: 4px; background: var(--separator); overflow: hidden; }
.bc-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4fc3f7, #3e88f7); transition: width .6s; }
.bc-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.bc-stats b { font-family: var(--font-bold); }
.bc-buyers b { color: #1f9d4a; }
/* broadcasts v2: picture, A/B, schedule */
.bc-imgrow { display: flex; align-items: flex-start; gap: 12px; margin: 10px 0; }
.bc-imgcol { display: grid; gap: 6px; }
.bc-imgbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.bc-thumb { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; background: var(--seg-bg, rgba(118, 118, 128, .14)); flex: none; }
.bc-at { width: auto; margin-left: 8px; }
.bc-hour { width: 96px; }
.bc-bubble__img { display: block; width: calc(100% + 24px); max-height: 260px; margin: -9px -12px 8px; object-fit: cover; border-radius: 14px 14px 0 0; }
.bc-bubble__time { display: block; text-align: right; margin-top: 4px; color: #6c7883; font-size: 11px; }
.bc-variant { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: rgba(106, 179, 243, .18); color: #6ab3f3; font: 600 11px var(--font-bold); }
.bc-state.is-scheduled { background: rgba(245, 179, 1, .2); color: #b07d00; }
.bc-state.is-wait { background: rgba(151, 111, 255, .2); color: #7d5ae6; }
.bc-vs { display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; background: var(--cell); font-size: 14px; }
.bc-var b:first-child { margin-right: 4px; }
.bc-bubble { position: relative; }

/* ---------- «Скидка новичкам» ---------- */
.fo { display: grid; gap: 14px; }
.fo-on { margin: 14px 0 6px; padding: 13px 16px; border: 0; border-radius: 14px; background: var(--seg-bg, rgba(118, 118, 128, .1)); font-weight: 600; font-size: 15px; }
.fo-unit { display: flex; align-items: center; gap: 8px; }
.fo-unit > span { color: var(--hint); font-size: 14px; white-space: nowrap; }
.fo-dd { position: relative; }
.fo-dd__btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; max-width: 280px; text-align: left; cursor: pointer; font: inherit; }
.fo-dd__chev { color: var(--hint); font-size: 12px; transition: transform .2s; }
.fo-dd__btn[aria-expanded='true'] .fo-dd__chev { transform: rotate(180deg); }
.fo-dd__menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 100%; max-width: 280px; padding: 6px; border-radius: 14px; background: var(--card, var(--bg, #1c1c1e)); border: 1px solid var(--separator); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.fo-dd__menu[hidden] { display: none; }
.fo-dd__opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.fo-dd__opt:hover { background: var(--seg-bg, rgba(118, 118, 128, .14)); }
.fo-dd__opt input { width: 18px; height: 18px; accent-color: var(--accent); }
.fo-grid { display: grid; gap: 0 18px; margin-top: 8px; }
@media (min-width: 800px) { .fo-grid { grid-template-columns: 1fr 1fr; } }
.fo-num { width: 110px; text-align: center; font-weight: 600; }
.fo-col { display: grid; gap: 8px; }
.fo-status:empty { display: none; }
.fo-table { display: grid; gap: 4px; overflow-x: auto; }
.fo-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr 1fr 1.4fr 1.4fr; gap: 8px; align-items: center; padding: 9px 12px; border-radius: 12px; background: var(--seg-bg, rgba(118, 118, 128, .1)); font-size: 14px; min-width: 860px; }
.fo-row--head { background: none; color: var(--hint); font: 600 12px var(--font-bold); text-transform: uppercase; letter-spacing: .4px; padding-bottom: 2px; }
.fo-row.is-off { opacity: .5; }
.fo-item { display: grid; }
.fo-item small, .fo-row small { color: var(--hint); }
.fo-price { font-weight: 700; font-family: var(--font-bold); }
.fo-net { color: #1f9d4a; font-weight: 700; font-family: var(--font-bold); }
:root[data-theme='dark'] .fo-net { color: #4ee07a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .fo-net { color: #4ee07a; } }
.fo-neg { color: #e5534b; font-weight: 700; }
.fo-tag { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(245, 179, 1, .22); color: #a97500; font: 600 11px var(--font-bold); font-style: normal; }
@media (max-width: 860px) {
  .fo-row--head { display: none; }
  .fo-table { overflow: visible; }
  .fo-row { grid-template-columns: 1fr 1fr; min-width: 0; }
  .fo-row > span::before { content: attr(data-l); display: block; color: var(--hint); font: 600 11px var(--font-bold); text-transform: uppercase; letter-spacing: .3px; }
  .fo-item { grid-column: 1 / -1; }
  .fo-item::before { display: none; }
}
.fo-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.fo-kpi { padding: 12px 14px; border-radius: 14px; background: var(--seg-bg, rgba(118, 118, 128, .1)); display: grid; gap: 3px; }
.fo-kpi small { color: var(--hint); }
.fo-kpi b { font: 700 22px/1.1 var(--font-bold); }
.fo-kpi em { font-style: normal; color: var(--hint); font-size: 12px; }
.fo-kpi.is-net { background: linear-gradient(135deg, rgba(52, 199, 89, .2), rgba(79, 195, 247, .12)); }
.fo-kpi.is-net.is-bad { background: rgba(229, 83, 75, .18); }
.fo-kpi.is-given b { color: #d27a00; }
.fo-h { margin-top: 6px; }
.fo-recent { display: grid; gap: 6px; }
.fo-order { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 9px 12px; border-radius: 12px; background: var(--seg-bg, rgba(118, 118, 128, .1)); font-size: 14px; }
.fo-order b { font-family: ui-monospace, Consolas, monospace; color: var(--accent); }
.fo-given { color: #d27a00; }
.fo-order small { margin-left: auto; color: var(--hint); }
.fo-unit input { margin: 0; }

.fo-table--cac .fo-row { grid-template-columns: 1.3fr 1fr 1fr 1.1fr 1fr 1.4fr 1.4fr 1.3fr; min-width: 980px; }
@media (max-width: 760px) { .fo-table--cac .fo-row { grid-template-columns: 1fr 1fr; min-width: 0; } }


/* StarSnow catalog admin — matching the storefront's dark, quiet surfaces and blue focus. */
.catalog-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.catalog-card { min-width:0; padding:16px; border:1px solid var(--separator); border-radius:16px; background:var(--cell); display:grid; gap:10px; }
.catalog-card__head { display:flex; align-items:center; gap:10px; min-width:0; }
.catalog-card__head .tile { width:38px; height:38px; flex:0 0 38px; border-radius:12px; }
.catalog-card__head .tile svg { width:19px; height:19px; }
.catalog-card__title { min-width:0; display:grid; gap:2px; }
.catalog-card__title b { font-size:15px; }
.catalog-card__title small { color:var(--hint); font-size:12px; }
.catalog-card__desc { color:var(--hint); font-size:13px; line-height:1.45; margin:0; }
.catalog-state { display:inline-flex; align-items:center; gap:6px; width:max-content; max-width:100%; border-radius:999px; padding:4px 9px; background:var(--seg-bg); color:var(--hint); font-size:11px; font-weight:650; }
.catalog-state::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.catalog-state.is-ready { color:#269b58; background:rgba(38,155,88,.12); }
.catalog-state.is-warn { color:#b8831d; background:rgba(184,131,29,.13); }
.catalog-card__meta { font-size:12px; color:var(--hint); }
.catalog-refresh { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.catalog-refresh .btn { min-height:40px; }
.catalog-empty { padding:12px; border-radius:12px; background:var(--seg-bg); color:var(--hint); font-size:13px; line-height:1.45; }
@media(max-width:620px) { .catalog-grid { grid-template-columns:minmax(0,1fr); } .catalog-card { padding:14px; } }


/* Admin inherits the same StarSnow visual language as the storefront. */
.admin {
  min-height:100vh;
  background:var(--bg);
  color:var(--text);
}
.admin .navbar { background:var(--nav); border-bottom:1px solid var(--separator); }
.admin .container { width:min(100% - 40px, 906px); margin-inline:auto; }
.admin .adm { padding-block:24px 54px; gap:16px; }
.admin .adm--shell { min-height:calc(100vh - 53px); }
.admin .tabsbar { gap:9px; margin:0; padding:0; overflow:visible; }
.admin .tabsbar a {
  display:flex; align-items:center; gap:9px; min-height:48px;
  padding:8px 13px; border:1px solid var(--separator); border-radius:13px;
  background:var(--cell); color:var(--text); transition:border-color .16s,background .16s;
}
.admin .tabsbar a[aria-selected="true"] {
  border-color:rgba(54,160,215,.65);
  background:color-mix(in srgb,var(--button) 10%,var(--cell));
  color:var(--text);
}
.admin .tabsbar .tile { width:30px; height:30px; flex:0 0 30px; border-radius:9px; box-shadow:none; }
.admin .tabsbar .tile svg { width:17px; height:17px; }
.admin .tabsbar__label { font-size:13px; font-weight:650; white-space:nowrap; }
.admin .subtabs { display:flex; flex-wrap:wrap; gap:7px; }
.admin .subtabs a {
  padding:7px 12px; border:1px solid var(--separator); border-radius:999px;
  background:var(--cell); color:var(--hint); font-size:12px;
}
.admin .subtabs a[aria-current="page"] { border-color:rgba(54,160,215,.65); color:var(--accent); background:color-mix(in srgb,var(--button) 9%,var(--cell)); }
.admin .card,.admin .catalog-card,.admin .kpi,.admin .blk {
  border:1px solid var(--separator); border-radius:16px;
  background:var(--cell); box-shadow:0 8px 26px rgba(10,20,35,.035);
}
.admin .card { padding:16px 18px; }
.admin .adm h2,.admin .group-header { color:var(--text); }
.admin .row { border-color:var(--separator); }
@media(max-width:760px) {
  .admin .container { width:calc(100% - 28px); }
  .admin .adm { padding-block:16px 36px; gap:12px; }
  .admin .tabsbar { flex-wrap:nowrap; overflow-x:auto; margin-inline:-14px; padding:2px 14px 7px; scrollbar-width:none; }
  .admin .tabsbar::-webkit-scrollbar { display:none; }
  .admin .tabsbar a { flex:0 0 auto; min-height:44px; padding:7px 10px; }
  .admin .tabsbar__label { font-size:12px; }
  .admin .card { padding:13px 14px; }
}
@media(max-width:360px) {
}

/* One icon colour across the admin (the logo's blue), in both themes: the tiles no longer differ by colour. Status is told by words and value colours. */
.admin .tile, .admin .tile--blue, .admin .tile--gold, .admin .tile--green, .admin .tile--violet, .admin .tile--red, .admin .tile--cyan,
.admin .pl-tile:not(.pl-tile--pic) {
  background: var(--accent-soft); color: var(--accent); box-shadow: none;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.admin .tile svg, .admin .tabsbar .tile svg, .admin .dash-kpi__icon .tile svg, .admin .dash-kpi .dash-kpi__icon .tile svg, .admin .pl-tile svg { stroke: var(--accent) !important; }
.admin .tabsbar a[aria-selected="true"] .tile { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* =====================================================================
   2026-11 redesign: shell (sidebar, top bar, login) + kit + dashboard. Later rules win over the older ones above.
   ===================================================================== */
body.admin { background: var(--ad-bg); color: var(--ad-text); font-family: var(--ad-font); font-size: 15px; line-height: 1.45; letter-spacing: 0; -webkit-font-smoothing: antialiased; }
.admin :focus-visible { outline: 2px solid var(--ad-accent); outline-offset: 2px; }
.admin h1, .admin h2, .admin h3 { font-family: var(--ad-font); }
.adm-skip { position: fixed; left: 12px; top: -60px; z-index: 90; padding: 10px 16px; border-radius: var(--ad-radius-sm); background: var(--ad-accent); color: var(--ad-accent-ink); font-weight: 600; }
.adm-skip:focus { top: 12px; }
.nav-ic { width: 20px; height: 20px; flex: none; }

/* ---------- layout: sidebar + frame ---------- */
:root[data-admin] { --side-w: 248px; }
:root[data-admin].adm-collapsed { --side-w: 76px; }
.adm-side { display: none; }
.adm-authed .adm-side { display: flex; }
.adm-side { position: fixed; z-index: 45; inset: 0 auto 0 0; width: var(--side-w); flex-direction: column; background: var(--ad-side); color: var(--ad-side-ink); border-right: 1px solid var(--ad-line); transition: width .2s ease, transform .25s ease; }
.adm-side__brand { display: flex; align-items: center; gap: 8px; min-height: 68px; padding: 0 16px; border-bottom: 1px solid var(--ad-line); }
.adm-side__logo { width: 32px; height: 32px; border-radius: 10px; flex: none; }
.adm-side__name { font: 800 16px/1 var(--ad-display); letter-spacing: -.03em; white-space: nowrap; }
.adm-side .adm-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border: 1px solid var(--ad-accent-soft); border-radius: 999px; background: var(--ad-accent-soft); color: var(--ad-accent); font: 700 9.5px/1.2 var(--ad-font); letter-spacing: .05em; flex: none; text-transform: uppercase; white-space: nowrap; }
/* the shop's lime dot (the same as the storefront's eyebrow) */
.adm-side .adm-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--ad-lime); box-shadow: 0 0 0 2px rgba(198, 242, 30, .18); flex: none; }
.adm-side__nav { flex: 1; overflow-y: auto; padding: 12px; scrollbar-width: none; }
.admin .tabsbar { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px; margin: 0; padding: 0; overflow: visible; background: none; border: 0; }
/* the sidebar's own list: no box of its own in any theme, so it lines up with the brand and the frame */
:root[data-admin] .adm-side .adm-side__nav .tabsbar { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; }
.tabsbar__sec { padding: 16px 12px 6px; font: 600 11px/1.2 var(--ad-font); letter-spacing: .09em; text-transform: uppercase; color: var(--ad-side-muted); white-space: nowrap; }
.tabsbar__sec:first-child { padding-top: 4px; }
.admin .tabsbar a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--ad-radius-sm); background: none; color: var(--ad-side-muted); font: 500 14px/1.2 var(--ad-font); text-decoration: none; white-space: nowrap; box-shadow: none; transition: background .15s, color .15s; }
.admin .tabsbar a:hover { background: var(--ad-side-hover); color: var(--ad-side-ink); }
.admin .tabsbar a[aria-selected="true"] { background: var(--ad-accent-soft); color: var(--ad-accent); font-weight: 600; box-shadow: none; }
:root[data-admin][data-theme="dark"] .admin .tabsbar a[aria-selected="true"] { color: #8FB0FF; }
@media (prefers-color-scheme: dark) { :root[data-admin]:not([data-theme="light"]) .admin .tabsbar a[aria-selected="true"] { color: #8FB0FF; } }
.admin .tabsbar__label { font: inherit; overflow: hidden; text-overflow: ellipsis; }
.admin .tabsbar__badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--ad-bad); color: #fff; font: 600 11.5px/20px var(--ad-font); text-align: center; }
.adm-side__foot { padding: 12px; border-top: 1px solid var(--ad-line); }
.adm-collapse { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--ad-radius-sm); background: none; color: var(--ad-side-muted); font: 500 14px var(--ad-font); cursor: pointer; }
.adm-collapse:hover { background: var(--ad-side-hover); color: var(--ad-side-ink); }
.adm-collapse svg { width: 20px; height: 20px; flex: none; }
.adm-collapsed .adm-collapse svg { transform: scaleX(-1); }
.adm-scrim { position: fixed; inset: 0; z-index: 44; background: var(--ad-backdrop); }
.adm-scrim[hidden] { display: none; }
.adm-frame { min-height: 100vh; min-width: 0; }
@media (min-width: 1024px) {
  .adm-authed .adm-frame { margin-left: var(--side-w); }
  .adm-burger { display: none !important; }
  .adm-authed .adm-topbar .brand { display: none; }
  .adm-collapsed .adm-side__name, .adm-collapsed .adm-side .adm-badge, .adm-collapsed .tabsbar__label, .adm-collapsed .adm-collapse__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .adm-collapsed .tabsbar__sec { height: 1px; padding: 0; margin: 10px 8px; background: var(--ad-line); font-size: 0; }
  .adm-collapsed .adm-side__brand { padding: 0 22px; }
  .adm-collapsed .admin .tabsbar a, .adm-collapsed .tabsbar a { justify-content: center; padding: 0; }
  .adm-collapsed .tabsbar__badge { position: absolute; top: 2px; right: 4px; min-width: 18px; height: 16px; line-height: 16px; font-size: 10px; padding: 0 4px; }
  .adm-collapsed .adm-collapse { justify-content: center; padding: 0; }
}
@media (max-width: 1023px) {
  .adm-side { width: min(300px, 86vw); transform: translateX(-102%); box-shadow: none; }
  .adm-drawer-open .adm-side { transform: none; box-shadow: var(--ad-shadow-pop); }
  .adm-side__foot { display: none; }
  .adm-drawer-open body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .adm-side, .adm-frame { transition: none !important; } }

/* ---------- top bar ---------- */
.admin .navbar.adm-topbar { position: sticky; top: 0; z-index: 30; background: var(--ad-bg); border-bottom: 1px solid var(--ad-line); }
.admin .adm-topbar .container { width: 100%; max-width: 1336px; margin: 0 auto; padding: 0 24px; }
.admin .adm-topbar .navbar__row { min-height: 64px; gap: 12px; justify-content: flex-start; }
.adm-topbar .brand { gap: 10px; }
.adm-topbar .brand__logo { width: 32px; height: 32px; border-radius: 10px; }
.admin .adm-topbar .brand__name { font: 800 16px/1 var(--ad-display); letter-spacing: -.03em; color: var(--ad-text); text-shadow: none; }
.adm-crumb { display: none; align-items: center; gap: 8px; min-width: 0; color: var(--ad-muted); font-size: 14px; white-space: nowrap; }
.adm-crumb b { color: var(--ad-text); font-weight: 600; }
.adm-crumb b::before { content: '/'; margin-right: 8px; color: var(--ad-line-strong); font-weight: 400; }
@media (min-width: 1024px) { .adm-authed .adm-crumb { display: inline-flex; } }
.adm-search { flex: 1 1 auto; max-width: 440px; margin-left: auto; height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; border-radius: var(--ad-radius-sm); background: var(--ad-surface); border: 1px solid var(--ad-line); color: var(--ad-muted); cursor: text; }
.adm-search[hidden] { display: none; }
.adm-search svg { width: 18px; height: 18px; flex: none; }
.adm-search:focus-within { border-color: var(--ad-accent); box-shadow: 0 0 0 3px var(--ad-accent-soft); }
.admin .adm-search input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: none; color: var(--ad-text); font: 500 14px var(--ad-font); outline: none; box-shadow: none; }
.adm-search input::placeholder { color: var(--ad-muted); }
.adm-search input::-webkit-search-cancel-button { display: none; }
.adm-kbd { flex: none; min-width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--ad-line); border-radius: 6px; font: 500 12px var(--ad-mono); color: var(--ad-muted); }
.admin .adm-topbar .navbar__actions { flex: none; gap: 8px; flex-wrap: nowrap; margin-left: auto; }
.adm-search:not([hidden]) + .navbar__actions { margin-left: 0; }
.admin .adm-topbar .icon-btn { width: 40px; height: 40px; border-radius: var(--ad-radius-sm); background: var(--ad-surface); border: 1px solid var(--ad-line); color: var(--ad-text); display: inline-grid; place-items: center; }
.admin .adm-topbar .icon-btn:hover { border-color: var(--ad-line-strong); background: var(--ad-surface-2); }
.admin .adm-topbar .icon-btn svg { width: 19px; height: 19px; }
.admin .adm-topbar .lang { display: inline-grid; gap: 2px; padding: 3px; height: 40px; border-radius: var(--ad-radius-sm); background: var(--ad-surface); border: 1px solid var(--ad-line); }
.admin .adm-topbar .lang .seg__btn { min-height: 32px; padding: 0 10px; border-radius: 9px; font: 600 12.5px var(--ad-font); color: var(--ad-muted); box-shadow: none; }
.admin .adm-topbar .lang .seg__btn[aria-pressed="true"] { background: var(--ad-surface-3); color: var(--ad-text); box-shadow: none; }
.admin .adm-topbar .text-btn { height: 40px; padding: 0 16px; border: 1px solid var(--ad-line); border-radius: var(--ad-radius-sm); background: var(--ad-surface); color: var(--ad-text); font: 600 14px var(--ad-font); }
.admin .adm-topbar .text-btn:hover { border-color: var(--ad-line-strong); background: var(--ad-surface-2); }
.admin .adm-topbar .text-btn--muted { color: var(--ad-muted); font-weight: 500; }
.admin .adm-topbar #logout { color: var(--ad-text); border-color: var(--ad-line); }
@media (max-width: 1023px) { .admin .adm-topbar .container { padding: 0 16px; } .admin .adm-topbar .navbar__row { min-height: 60px; } }
@media (max-width: 720px) {
  /* on a phone the bar has no full-width rule under it: the search field is the bar's own edge */
  .admin .navbar.adm-topbar { border-bottom: 0; }
  .admin .adm-topbar .navbar__row { flex-wrap: wrap; row-gap: 8px; padding-block: 10px; }
  .adm-search { order: 5; flex: 1 0 100%; max-width: none; margin: 0; }
  .adm-kbd, .admin .adm-topbar .text-btn--muted { display: none; }
  .admin .adm-topbar .brand__name { display: none; }
}
@media (max-width: 420px) { .admin .adm-topbar #shopLink { display: none; } .admin .adm-topbar .text-btn { padding: 0 12px; } }

/* ---------- content column ---------- */
.admin main.container.adm, .admin main.container.adm.adm--shell { display: block; width: 100%; max-width: 1336px; margin: 0 auto; padding: 28px 24px 64px; }
.admin .adm-main { display: grid; gap: 16px; align-content: start; min-width: 0; }
.admin .dash-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 0 0 4px; }
.admin .dash-title { margin: 0; font: 800 26px/1.15 var(--ad-display); letter-spacing: -.04em; color: var(--ad-text); }
.dash-top__group { color: var(--ad-muted); font-size: 14px; }
.dash-sub { margin: 6px 0 0; color: var(--ad-muted); font-size: 14px; }
.dash-top__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 1023px) { .admin main.container.adm, .admin main.container.adm.adm--shell { padding: 20px 16px 48px; } .admin .dash-title { font-size: 22px; } }
.admin .subtabs { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 4px; width: max-content; max-width: 100%; border-radius: 14px; background: var(--ad-surface); border: 1px solid var(--ad-line); }
.admin .subtabs a { flex: none; padding: 8px 14px; border: 0; border-radius: 10px; background: none; color: var(--ad-muted); font: 500 14px/1.2 var(--ad-font); white-space: nowrap; text-decoration: none; }
.admin .subtabs a:hover { color: var(--ad-text); background: var(--ad-surface-2); }
.admin .subtabs a[aria-current="page"] { background: var(--ad-accent); color: var(--ad-accent-ink); font-weight: 600; border: 0; }

/* ---------- kit: cards, lists, buttons, fields, pills ---------- */
.admin .card, .admin .group, .admin .dash-card, .admin .catalog-card, .admin .kpi { background: var(--ad-surface); border: 1px solid var(--ad-line); border-radius: var(--ad-radius); box-shadow: none; }
.admin .card { padding: 20px; }
.admin .blk { background: none; border: 0; border-radius: 0; box-shadow: none; }
.admin .group { overflow: hidden; }
.admin .adm .group-header, .admin .group-header { padding: 8px 4px 10px; font: 600 15px/1.3 var(--ad-font); color: var(--ad-text); text-transform: none; letter-spacing: 0; }
.admin .group-footer { padding: 8px 4px 0; color: var(--ad-muted); font-size: 13px; }
.admin .row { min-height: 56px; padding: 10px 16px; background: none; font-size: 15px; }
.admin .row + .row::before { left: 16px; background: var(--ad-line); height: 1px; }
.admin .row--icon + .row--icon::before { left: 64px; }
.admin .row__title { font-size: 15px; } .admin .row__sub { font-size: 13px; color: var(--ad-muted); }
.admin .row__value { font: 600 15px var(--ad-font); font-variant-numeric: tabular-nums; color: var(--ad-text); }
.admin .row__value.is-good { color: var(--ad-ok); } .admin .row__value.is-bad { color: var(--ad-bad); } .admin .row__value.is-muted { color: var(--ad-muted); }
.admin .row--btn:hover { background: var(--ad-surface-2); }
.admin .tile { width: 36px; height: 36px; border-radius: 11px; border: 0; background: var(--ad-accent-soft); color: var(--ad-accent); }
.admin .tile svg { width: 20px; height: 20px; stroke: currentColor !important; }
.admin .chev { border-color: var(--ad-muted); }
.admin .adm h2 { font: 600 15px/1.3 var(--ad-font); color: var(--ad-text); }
.admin .card-head { font: 600 16px var(--ad-font); }
.admin .msg { color: var(--ad-muted); font-size: 13px; }
.admin .warn { color: var(--ad-bad); }
.admin .adm button.btn, .admin .adm a.btn, .admin .btn { min-height: 40px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--ad-radius-sm); background: var(--ad-accent); color: var(--ad-accent-ink); font: 600 14px/1 var(--ad-font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: background .15s, border-color .15s; }
.admin .adm button.btn:hover:not(:disabled) { background: var(--ad-accent-hover); }
.admin .adm button.btn--ghost, .admin .adm a.btn--ghost { background: var(--ad-surface-2); border-color: var(--ad-line); color: var(--ad-text); }
.admin .adm button.btn--ghost:hover:not(:disabled) { background: var(--ad-surface-3); }
.admin .adm button.btn--danger { background: none; border-color: color-mix(in srgb, var(--ad-bad) 55%, transparent); color: var(--ad-bad); }
.admin .adm button.btn--danger:hover:not(:disabled) { background: var(--ad-bad-soft); }
.admin .btn--sm { min-height: 32px !important; padding: 0 12px !important; font-size: 13px !important; }
.admin .adm input:not([type=checkbox]):not([type=radio]):not([type=range]), .admin .adm select, .admin .adm textarea, .admin .ui-input, .admin .ui-dd__btn {
  min-height: 44px; padding: 10px 14px; border: 1px solid var(--ad-line); border-radius: var(--ad-radius-sm); background-color: var(--ad-surface-2); color: var(--ad-text); font: 500 14.5px var(--ad-font); }
.admin .adm textarea { min-height: 88px; }
.admin .adm input:focus, .admin .adm select:focus, .admin .adm textarea:focus, .admin .ui-input:focus, .admin .ui-dd__btn:focus-visible, .admin .ui-dd__btn[aria-expanded="true"] { outline: 0; border-color: var(--ad-accent); box-shadow: 0 0 0 3px var(--ad-accent-soft); }
.admin .adm input[aria-invalid="true"] { border-color: var(--ad-bad); color: var(--ad-text); }
.admin .ui-dd__btn.is-set { border-color: var(--ad-accent); color: var(--ad-text); }
.admin .ui-dd__menu { border: 1px solid var(--ad-line); border-radius: 14px; background: var(--ad-surface); box-shadow: var(--ad-shadow-pop); padding: 6px; }
.admin .ui-dd__opt { min-height: 38px; border-radius: 9px; font-size: 14px; font-family: var(--ad-font); }
.admin .ui-dd__opt.is-active, .admin .ui-dd__opt:hover { background: var(--ad-surface-2); }
.admin .ui-dd__opt[aria-selected="true"] { color: var(--ad-accent); font-family: var(--ad-font); }
.admin .ui-dr__day { height: 34px; border-radius: 9px; }
.admin .ui-dr__day.is-edge { background: var(--ad-accent); color: var(--ad-accent-ink); border-radius: 9px; }
.admin .ui-dr__day.is-in { background: var(--ad-accent-soft); }
.admin .ui-dr__preset { min-height: 30px; border-radius: 999px; background: var(--ad-surface-2); font-family: var(--ad-font); }
.admin .hm-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--ad-surface-2); border: 1px solid var(--ad-line); }
.admin .hm-seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--ad-muted); font: 500 13px var(--ad-font); cursor: pointer; box-shadow: none; }
.admin .hm-seg button[aria-pressed="true"] { background: var(--ad-surface); color: var(--ad-text); font-weight: 600; font-family: var(--ad-font); box-shadow: 0 0 0 1px var(--ad-line); }
.admin .sec-tabs { gap: 4px; padding: 0 0 2px; margin-bottom: 8px; border-bottom: 1px solid var(--ad-line); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.admin .sec-tab { flex: none; padding: 10px 14px; margin-bottom: -3px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--ad-muted); font: 500 14px var(--ad-font); }
.admin .sec-tab:hover { color: var(--ad-text); border-color: var(--ad-line-strong); }
.admin .sec-tab[aria-selected="true"] { background: none; color: var(--ad-text); font-weight: 600; font-family: var(--ad-font); border-color: var(--ad-accent); }
.admin .switch input[type=checkbox], .admin .pay-row__sw input[type=checkbox] { width: 44px; height: 26px; background: var(--ad-surface-3); box-shadow: inset 0 0 0 1px var(--ad-line); }
.admin .switch input[type=checkbox]::after, .admin .pay-row__sw input[type=checkbox]::after { width: 20px; height: 20px; top: 3px; left: 3px; background: var(--ad-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.admin .switch input[type=checkbox]:checked, .admin .pay-row__sw input[type=checkbox]:checked { background: var(--ad-lime); box-shadow: none; }
.admin .switch input[type=checkbox]:checked::after, .admin .pay-row__sw input[type=checkbox]:checked::after { transform: translateX(18px); background: var(--ad-lime-ink); }
.admin .switch { border-color: var(--ad-line); }
.admin .chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: var(--ad-surface-3); color: var(--ad-muted); font: 600 12px var(--ad-font); }
.admin .chip.is-good { background: var(--ad-ok-soft); color: var(--ad-ok); } .admin .chip.is-bad { background: var(--ad-bad-soft); color: var(--ad-bad); }
.admin .chip .gi { width: 12px; height: 12px; }
.admin .pill { border-radius: 999px; padding: 3px 10px; font: 600 12px/1.35 var(--ad-font); background: var(--ad-surface-3); color: var(--ad-muted); }
.admin .pill--ok, .admin .st-fulfilled { background: var(--ad-ok-soft); color: var(--ad-ok); }
.admin .pill--bad, .admin .st-failed, .admin .st-refunded { background: var(--ad-bad-soft); color: var(--ad-bad); }
.admin .pill--warn { background: var(--ad-warn-soft); color: var(--ad-warn); }
.admin .st-pending, .admin .st-expired, .admin .st-cancelled { background: var(--ad-surface-3); color: var(--ad-muted); }
.admin .st-paid, .admin .st-fulfilling { background: var(--ad-info-soft); color: var(--ad-accent); }
.ad-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font: 600 12px/1 var(--ad-font); white-space: nowrap; background: var(--ad-surface-3); color: var(--ad-muted); }
.ad-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.ad-pill--ok { background: var(--ad-ok-soft); color: var(--ad-ok); }
.ad-pill--warn { background: var(--ad-warn-soft); color: var(--ad-warn); }
.ad-pill--bad { background: var(--ad-bad-soft); color: var(--ad-bad); }
.ad-pill--info { background: var(--ad-info-soft); color: var(--ad-accent); }
.admin .meter { height: 8px; border-radius: 999px; background: var(--ad-surface-3); }
.admin .meter i, .dash-meter i { background: var(--ad-accent); border-radius: 999px; }
.meter.is-warn i, .dash-meter.is-warn i { background: var(--ad-amber); } .meter.is-bad i, .dash-meter.is-bad i { background: var(--ad-bad); }
/* tables */
.admin .tbl-wrap { background: var(--ad-surface); border: 1px solid var(--ad-line); border-radius: var(--ad-radius); overflow-x: auto; }
.admin .tbl { font-size: 14px; border-collapse: separate; border-spacing: 0; }
.admin .tbl th { position: sticky; top: 0; z-index: 1; padding: 12px 14px; background: var(--ad-surface); border-bottom: 1px solid var(--ad-line); font: 600 11.5px/1.2 var(--ad-font); letter-spacing: .08em; text-transform: uppercase; color: var(--ad-muted); white-space: nowrap; }
.admin .tbl td { padding: 12px 14px; border-bottom: 1px solid var(--ad-line); vertical-align: middle; }
.admin .tbl tbody tr:last-child td { border-bottom: 0; }
.admin .tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin .tbl tr.row-click:hover td { background: var(--ad-surface-2); }
.admin .tbl tr.row-click:focus-visible { outline: 2px solid var(--ad-accent); outline-offset: -2px; }
.admin .tbl__sub { display: block; color: var(--ad-muted); font: 500 12px var(--ad-mono); }
.admin .tbl__err { color: var(--ad-bad); }
@media (max-width: 640px) {
  .admin .tbl--stack thead { display: none; }
  .admin .tbl--stack, .admin .tbl--stack tbody, .admin .tbl--stack tr, .admin .tbl--stack td { display: block; width: 100%; }
  .admin .tbl--stack tr { padding: 12px 14px; border-bottom: 1px solid var(--ad-line); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .admin .tbl--stack tbody tr:last-child { border-bottom: 0; }
  .admin .tbl--stack td { padding: 0; border: 0; text-align: left !important; }
  .admin .tbl--stack td::before { content: attr(data-label); display: block; margin-bottom: 3px; font: 600 10.5px/1.2 var(--ad-font); letter-spacing: .08em; text-transform: uppercase; color: var(--ad-muted); }
  .admin .tbl--stack td:first-child { grid-column: 1 / -1; }
  .admin .tbl--stack td:first-child::before { display: none; }
  .admin .tbl-wrap:has(.tbl--stack) { overflow: visible; }
}
/* sheets, toasts, tooltips */
.admin .ui-sheet__backdrop { background: var(--ad-backdrop); }
.admin .ui-sheet__panel, :root[data-admin][data-theme='dark'] .ui-sheet__panel { background: var(--ad-surface); border: 1px solid var(--ad-line); color: var(--ad-text); box-shadow: var(--ad-shadow-pop); }
@media (prefers-color-scheme: dark) { :root[data-admin]:not([data-theme='light']) .ui-sheet__panel { background: var(--ad-surface); border: 1px solid var(--ad-line); } }
@media (min-width: 600px) { .admin .ui-sheet__panel { border-radius: 24px; padding: 20px 24px 24px; } }
.admin .ui-sheet__head h2 { font: 800 19px/1.2 var(--ad-display); letter-spacing: -.03em; }
.admin .ui-sheet__x { width: 36px; height: 36px; border-radius: 10px; background: var(--ad-surface-2); color: var(--ad-muted); }
.admin .ui-btn { min-height: 44px; border-radius: var(--ad-radius-sm); font: 600 15px var(--ad-font); }
.admin .ui-btn--primary { background: var(--ad-accent); color: var(--ad-accent-ink); }
.admin .ui-btn--danger { background: var(--ad-bad); color: #fff; }
.admin .ui-btn--ghost { background: var(--ad-surface-2); color: var(--ad-text); box-shadow: inset 0 0 0 1px var(--ad-line); }
.admin .ui-toast { background: var(--ad-tip-bg); color: var(--ad-tip-ink); border-radius: 14px; font: 500 14px var(--ad-font); box-shadow: var(--ad-shadow-pop); }
.admin .ui-toast[data-kind='ok']::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ad-lime); }
.chart-tip { background: var(--ad-tip-bg); color: var(--ad-tip-ink); border: 0; border-radius: 12px; padding: 9px 12px; box-shadow: var(--ad-shadow-pop); font: 500 13px/1.4 var(--ad-font); }
.chart-tip b { font: 600 13px var(--ad-font); }
.chart-tip span { color: var(--ad-tip-muted); font-size: 12.5px; }
.chart-tip__row { display: flex; align-items: center; gap: 6px; }
.chart-tip__row i { width: 8px; height: 8px; border-radius: 2px; }
.chart-tip__row em { font-style: normal; color: var(--ad-tip-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.admin .bars__bar { fill: var(--ad-c1); } .admin .bars__bar.is-neg { fill: var(--ad-c6); } .admin .bars__bar:hover { fill: var(--ad-c1); }
.admin .bars__grid { stroke: var(--ad-line); } .admin .bars__axis { fill: var(--ad-muted); font-family: var(--ad-font); }
.admin .hm-cell { background: var(--ad-surface-3); } .admin .hm-cell.l1 { background: var(--ad-seq-1); } .admin .hm-cell.l2 { background: var(--ad-seq-2); } .admin .hm-cell.l3 { background: var(--ad-seq-4); } .admin .hm-cell.l4 { background: var(--ad-seq-5); box-shadow: none; }
:root[data-admin][data-theme="dark"] .admin .hm-cell.l1 { background: var(--ad-seq-1); } :root[data-admin][data-theme="dark"] .admin .hm-cell.l2 { background: var(--ad-seq-2); }
.admin .hm-days { background: var(--ad-surface); }
/* empty, skeleton, legend */
.ad-empty { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; text-align: center; }
.ad-empty__img { width: 104px; height: 104px; margin-bottom: 6px; }
.ad-empty__title { font: 600 15px var(--ad-font); }
.ad-empty__text { margin: 0; max-width: 340px; color: var(--ad-muted); font-size: 14px; }
.ad-skel { display: block; height: 14px; border-radius: 8px; background: var(--ad-surface-3); animation: ad-pulse 1.4s ease-in-out infinite; }
.ad-skel-lines { display: grid; gap: 10px; }
.ad-skel-page { display: grid; gap: 16px; margin-top: 12px; }
.ad-skel-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.ad-skel--card { height: 112px; border-radius: var(--ad-radius); }
.ad-skel--block { height: 300px; border-radius: var(--ad-radius); }
.view > .msg { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@keyframes ad-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .ad-skel { animation: none; } }
.ad-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--ad-muted); }
.ad-legend li { display: inline-flex; align-items: center; gap: 8px; }
.ad-legend b { color: var(--ad-text); font-weight: 600; }
.ad-legend__key { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ---------- KPI cards ---------- */
.ad-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1279px) { .ad-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .ad-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.admin .ad-kpi { all: unset; box-sizing: border-box; position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 18px 18px 16px 26px; border-radius: var(--ad-radius); background: var(--ad-surface); border: 1px solid var(--ad-line); color: var(--ad-text); font-family: var(--ad-font); }
.admin .ad-kpi::before { content: ''; position: absolute; left: 11px; top: 16px; bottom: 16px; width: 4px; border-radius: 4px; background: var(--ad-line-strong); }
.ad-kpi--blue::before { background: var(--ad-accent) !important; } .ad-kpi--lime::before { background: var(--ad-lime) !important; }
.ad-kpi--red::before { background: var(--ad-bad) !important; } .ad-kpi--amber::before { background: var(--ad-amber) !important; }
.admin .ad-kpi.is-click { cursor: pointer; transition: border-color .15s; }
.admin .ad-kpi.is-click:hover { border-color: var(--ad-line-strong); }
.admin .ad-kpi.is-click:focus-visible { outline: 2px solid var(--ad-accent); outline-offset: 2px; }
.ad-kpi__label { padding-right: 24px; font: 600 11.5px/1.25 var(--ad-font); letter-spacing: .08em; text-transform: uppercase; color: var(--ad-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin .ad-kpi__value { font: 800 30px/1.05 var(--ad-display); letter-spacing: -.04em; color: var(--ad-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-kpi__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 20px; font-size: 13px; color: var(--ad-muted); }
.ad-kpi__sub { color: var(--ad-muted); font-size: 13px; }
.ad-kpi__go { position: absolute; top: 14px; right: 14px; color: var(--ad-muted); opacity: .6; }
.ad-kpi__go .gi { width: 14px; height: 14px; }
.ad-kpi.is-click:hover .ad-kpi__go { opacity: 1; color: var(--ad-accent); }
.ad-delta { display: inline-flex; align-items: center; gap: 4px; font: 600 13px var(--ad-font); white-space: nowrap; }
.ad-delta .gi { width: 13px; height: 13px; }
.ad-delta.is-good { color: var(--ad-ok); } .ad-delta.is-bad { color: var(--ad-bad); } .ad-delta.is-flat { color: var(--ad-muted); font-weight: 500; }
.ad-delta__lbl { color: var(--ad-muted); font-weight: 500; }
.kpis .kpi { padding: 16px 18px; }
@media (max-width: 420px) { .admin .ad-kpi { padding: 14px 12px 14px 22px; } .admin .ad-kpi::before { left: 9px; } .admin .ad-kpi__value { font-size: 24px; } .ad-kpi__label { font-size: 10.5px; } .ad-delta__lbl { display: none; } }

/* ---------- dashboard ---------- */
.admin .dash { display: grid; gap: 16px; }
.dash-status { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; margin: 0; border-radius: var(--ad-radius-sm); border: 1px solid var(--ad-line); background: var(--ad-surface); font: 600 13px var(--ad-font); color: var(--ad-text); }
.dash-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ad-ok); box-shadow: 0 0 0 4px var(--ad-ok-soft); }
:root[data-admin]:not([data-theme="dark"]) .dash-status--ok i { background: #7FA800; }
.dash-status--bad i { background: var(--ad-bad); box-shadow: 0 0 0 4px var(--ad-bad-soft); }
.dash-status--ok, .dash-status--bad { background: var(--ad-surface); color: var(--ad-text); }
.dash-period .hm-seg { height: 40px; align-items: center; background: var(--ad-surface); }
.admin .dash-card { padding: 20px; min-width: 0; }
.dash-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.admin .dash-card__title { margin: 0; font: 600 15px/1.3 var(--ad-font); color: var(--ad-text); }
.dash-count { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--ad-bad-soft); color: var(--ad-bad); font: 600 12px/24px var(--ad-font); text-align: center; }
.admin .dash-more { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; margin: 0; padding: 4px 2px; color: var(--ad-accent); font: 600 13.5px var(--ad-font); border-radius: 6px; }
.admin .dash-more:hover { text-decoration: underline; }
.admin .dash-more:focus-visible { outline: 2px solid var(--ad-accent); }
.dash-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1180px) { .admin .dash-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
.dash-main, .dash-side { display: grid; gap: 16px; min-width: 0; }
.admin .dash-attention { border-color: color-mix(in srgb, var(--ad-bad) 35%, var(--ad-line)); padding-bottom: 12px; }
.admin .dash-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.admin .dash-list > li + li { border-top: 1px solid var(--ad-line); }
.admin .dash-item { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 6px; border-radius: 10px; cursor: pointer; }
.admin .dash-item:hover { background: var(--ad-surface-2); }
.admin .dash-item:focus-visible { outline: 2px solid var(--ad-accent); }
.dash-item__txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dash-item__txt b { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.dash-item__txt small { color: var(--ad-muted); font-size: 12.5px; }
.dash-hero { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: -2px 0 8px; }
.dash-hero__value { font: 800 34px/1.1 var(--ad-display); letter-spacing: -.045em; }
.dash-hero__cap { color: var(--ad-muted); font-size: 13px; }
.dash-chart { position: relative; margin: 0 -6px; }
.dash-chart__empty { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); margin: 0; padding: 8px 14px; border-radius: 10px; background: var(--ad-surface); color: var(--ad-muted); font-size: 14px; white-space: nowrap; }
.ad-line { position: relative; outline: none; border-radius: 12px; }
.ad-line:focus-visible { box-shadow: 0 0 0 2px var(--ad-accent); }
.ad-line__plot { width: 100%; touch-action: pan-y; }
.ad-line__svg { display: block; overflow: visible; }
.ad-grid { stroke: var(--ad-line); stroke-width: 1; }
.ad-axis-base { stroke: var(--ad-line-strong); stroke-width: 1; }
.ad-tick { fill: var(--ad-muted); font: 500 12px var(--ad-font); font-variant-numeric: tabular-nums; }
.ad-line__path { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.ad-line__area { opacity: .1; }
.is-empty .ad-line__path, .is-empty .ad-line__area, .is-empty .ad-line__end { opacity: 0; }
.ad-line__end, .ad-line__dot { stroke: var(--ad-surface); stroke-width: 2; }
.ad-line__cross { stroke: var(--ad-muted); stroke-width: 1; }
.ad-datatable { margin: 8px 6px 0; }
.ad-datatable summary { cursor: pointer; width: max-content; color: var(--ad-muted); font: 500 13px var(--ad-font); padding: 4px 0; }
.ad-datatable summary:hover { color: var(--ad-text); }
.ad-datatable .tbl-wrap { margin-top: 8px; max-height: 280px; overflow: auto; }
/* donut */
.ad-donut { display: grid; justify-items: center; gap: 18px; }
.ad-donut__ring { position: relative; display: grid; place-items: center; }
.ad-donut__svg { display: block; }
.ad-donut__track { fill: none; stroke: var(--ad-surface-2); }
.ad-donut__seg { fill: none; transition: opacity .15s; }
.ad-donut__seg.is-dim { opacity: .3; }
.ad-donut__mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; pointer-events: none; }
.ad-donut__mid b { font: 800 20px/1.1 var(--ad-display); letter-spacing: -.04em; }
.ad-donut__mid span { color: var(--ad-muted); font-size: 12px; }
.ad-donut__legend { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; }
.ad-donut__legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 52px; align-items: center; gap: 10px; padding: 10px 6px; border-top: 1px solid var(--ad-line); border-radius: 8px; font-size: 14px; outline: none; }
.ad-donut__legend li.is-hot, .ad-donut__legend li:focus-visible { background: var(--ad-surface-2); }
.ad-donut__name { display: grid; min-width: 0; }
.ad-donut__name small { color: var(--ad-muted); font-size: 12px; }
.ad-donut__legend b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-donut__legend em { font-style: normal; color: var(--ad-muted); text-align: right; font-variant-numeric: tabular-nums; }
.dash-split__empty { display: grid; justify-items: center; gap: 12px; padding: 8px 0 12px; color: var(--ad-muted); font-size: 14px; text-align: center; }
.ad-donut__ring--empty { width: 140px; height: 140px; border-radius: 50%; border: 18px solid var(--ad-surface-2); }
.dash-split__deltas { list-style: none; margin: 10px 0 0; padding: 12px 6px 0; border-top: 1px solid var(--ad-line); display: grid; gap: 8px; font-size: 13px; color: var(--ad-muted); }
.dash-split__deltas li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-split__deltas li > span:first-child { flex: 1; }
.dash-split__deltas b { color: var(--ad-text); font-weight: 600; }
.dash-split__deltas .ad-delta__lbl { display: none; }
/* recent orders */
.admin .dash-recent .tbl-wrap { border: 0; border-radius: 0; margin: 0 -20px -20px; background: none; }
.admin .dash-recent .tbl th:first-child, .admin .dash-recent .tbl td:first-child { padding-left: 20px; }
.admin .dash-recent .tbl th:last-child, .admin .dash-recent .tbl td:last-child { padding-right: 20px; }
.dash-table__what b { font-weight: 600; white-space: nowrap; }
.tbl__time { color: var(--ad-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .admin .dash-recent .tbl-wrap { margin: 0 -20px -20px; } .admin .dash-recent .tbl--stack tr { padding: 12px 20px; } }
/* events feed */
.admin .dash-feed { list-style: none; margin: 0; padding: 0; }
.admin .dash-feed li + li { border-top: 1px solid var(--ad-line); }
.admin .dash-feed__row { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 6px; border-radius: 10px; cursor: pointer; }
.admin .dash-feed__row:hover { background: var(--ad-surface-2); }
.dash-feed__mark { width: 4px; align-self: stretch; border-radius: 4px; background: var(--ad-c1); }
.dash-feed__mark.is-bad { background: var(--ad-bad); }
.admin .dash-feed__body { flex: 1; display: grid; min-width: 0; }
.admin .dash-feed__body b { font-weight: 600; font-size: 14px; }
.admin .dash-feed__body small { color: var(--ad-muted); font-size: 12.5px; }
.admin .dash-amount { font: 600 14px var(--ad-font); font-variant-numeric: tabular-nums; }
.admin .dash-amount.is-good { color: var(--ad-text); } .admin .dash-amount.is-bad { color: var(--ad-bad); }
.dash-empty { color: var(--ad-muted); margin: 0; }
/* wallet + integrations */
.admin .dash-wallet { background: var(--ad-surface); }
.admin .dash-big { margin: 0; text-align: left; font: 800 30px/1.1 var(--ad-display); letter-spacing: -.04em; color: var(--ad-text); }
.admin .dash-caption { margin: 6px 0 16px; text-align: left; color: var(--ad-muted); font-size: 13px; }
.dash-meter-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ad-muted); margin-bottom: 8px; }
.dash-meter-row b { color: var(--ad-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.admin .dash-meter { height: 8px; border-radius: 999px; background: var(--ad-surface-3); margin: 0 0 14px; }
.admin .dash-lines { display: grid; margin: 0 0 12px; padding: 0; }
.admin .dash-lines > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--ad-line); font-size: 14px; }
.admin .dash-lines dt { color: var(--ad-muted); } .admin .dash-lines dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.admin .dash-refresh { all: unset; box-sizing: border-box; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--ad-line); color: var(--ad-muted); cursor: pointer; font-size: 16px; }
.admin .dash-refresh:hover { color: var(--ad-text); background: var(--ad-surface-2); }
.admin .dash-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; font-size: 14px; }

/* ---------- login ---------- */
.admin main.adm:not(.adm--shell) { max-width: 1080px; padding-top: 48px; }
.login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 560px; border-radius: 32px; overflow: hidden; background: var(--ad-surface); border: 1px solid var(--ad-line); }
.login-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 18px; padding: 40px; background: radial-gradient(110% 80% at 50% 110%, var(--ad-accent-soft), transparent 62%), var(--ad-surface-2); }
.login-hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; width: max-content; height: 30px; padding: 0 13px; border-radius: 999px; background: var(--ad-surface); border: 1px solid var(--ad-line); color: var(--ad-muted); font-size: 12.5px; }
.login-hero__eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--ad-lime); box-shadow: 0 0 0 4px rgba(198, 242, 30, .22); }
.login-hero__title { position: relative; z-index: 1; max-width: 400px; margin: 0; font: 800 36px/1.06 var(--ad-display); letter-spacing: -.045em; text-wrap: balance; }
.login-hero__mascot { position: absolute; right: -20px; bottom: -40px; width: 340px; height: auto; pointer-events: none; }
.login-card { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 48px 44px; }
.login-title { margin: 0; font: 800 28px/1.1 var(--ad-display); letter-spacing: -.04em; }
.login-lead { margin: 0 0 6px; color: var(--ad-muted); font-size: 15px; }
.login-field { display: grid; gap: 6px; font-size: 13px; color: var(--ad-muted); }
.admin .login-input { width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--ad-line); border-radius: 14px; background: var(--ad-surface-2); color: var(--ad-text); font: 500 16px var(--ad-font); }
.admin .login-input:focus { outline: 0; border-color: var(--ad-accent); box-shadow: 0 0 0 3px var(--ad-accent-soft); }
.admin .login-input[aria-invalid="true"] { border-color: var(--ad-bad); }
.login-pw { display: grid; gap: 12px; margin-top: 4px; }
.admin .login-submit { width: 100%; min-height: 52px !important; border-radius: 14px !important; font-size: 15px !important; }
.login-msg { margin: 0; min-height: 18px; color: var(--ad-bad); font-size: 13.5px; }
.login-msg:empty { display: none; }
.login-tg { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 0 16px; border: 1px solid var(--ad-line); border-radius: 16px; background: var(--ad-surface-2); color: var(--ad-text); font: inherit; text-align: left; cursor: pointer; }
.login-tg:hover { border-color: var(--ad-accent); }
.login-tg__ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--ad-accent); color: var(--ad-accent-ink); }
.login-tg__txt { flex: 1; display: grid; } .login-tg__txt small { color: var(--ad-muted); font-size: 13px; }
.admin .login-alt summary { color: var(--ad-muted); font-size: 14px; padding: 8px 0; }
@media (max-width: 860px) {
  .admin main.adm:not(.adm--shell) { padding-top: 16px; }
  .login { grid-template-columns: 1fr; min-height: 0; border-radius: 24px; }
  .login-hero { min-height: 200px; padding: 24px; }
  .login-hero__title { font-size: 24px; max-width: 220px; }
  .login-hero__mascot { width: 200px; right: -16px; bottom: -36px; }
  .login-card { padding: 28px 22px 32px; }
}
@media (max-width: 640px) { .admin .dash-item { align-items: flex-start; flex-wrap: wrap; } .admin .dash-item .ad-pill { order: 2; } .admin .dash-item__txt { flex-basis: calc(100% - 30px); } .admin .dash-top { align-items: flex-start; } }

/* a supplier item's own picture next to its name in the orders table */
.ord-ico { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; vertical-align: -6px; margin-right: 6px; }

/* brands: one card per brand in the supplier's catalogue */
.br-list { display: grid; gap: 10px; margin-top: 12px; }
.br-list.is-loading { opacity: .6; }
.br-card { padding: 0; overflow: hidden; }
.br-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.br-head.is-on { background: color-mix(in srgb, var(--accent, #3d74ff) 6%, transparent); }
.br-picslot { flex: none; }
.br-pic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: var(--seg-bg, rgba(118,118,128,.14)); font: 700 18px var(--font-bold); font-style: normal; }
.br-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.br-name { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.br-name b { overflow-wrap: anywhere; }
.br-open { flex: none; }
.br-body { display: grid; gap: 12px; padding: 4px 14px 14px; border-top: 1px solid var(--separator, rgba(128,128,128,.2)); }
.br-body[hidden] { display: none; }
.br-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.br-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.br-subtitle { margin: 4px 0 0; font-size: 13px; opacity: .8; }
.br-vars { display: grid; gap: 6px; }
.br-var { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--seg-bg, rgba(118,118,128,.1)); }
.br-var.is-off { opacity: .6; }
.br-reg { font-size: 12px; letter-spacing: .04em; }
.br-vname { overflow-wrap: anywhere; font-size: 14px; }
.br-more { display: flex; justify-content: center; margin: 12px 0; }
.sku-found { display: grid; gap: 6px; margin-top: 8px; }
.sku-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--seg-bg, rgba(118,118,128,.1)); }
.sku-code { font-size: 12px; opacity: .8; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .br-cols { grid-template-columns: minmax(0, 1fr); }
  .br-head { flex-wrap: wrap; }
  .br-var { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .br-var small { grid-column: 2 / 4; }
  .sku-row { grid-template-columns: minmax(0, 1fr); }
}
.br-markupbox { display: grid; gap: 2px; justify-items: end; flex: none; }
.br-pct { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.br-markup { width: 68px; padding: 7px 8px; border-radius: 10px; border: 1px solid var(--separator, rgba(128,128,128,.3)); background: var(--bg, transparent); color: inherit; font: 700 15px var(--font-bold); text-align: right; }
.br-markup--sm { width: 58px; padding: 5px 6px; font-size: 13px; }
.br-markup::placeholder { opacity: .45; }
.br-defbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; margin: 12px 0; border-radius: 14px; background: var(--seg-bg, rgba(118,118,128,.1)); }
.br-var { grid-template-columns: 52px minmax(0, 1fr) auto auto auto; }
.br-vname { display: grid; gap: 1px; }
.br-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .br-var { grid-template-columns: 44px minmax(0, 1fr) auto; } .br-var .br-price { grid-column: 2; } .br-var .br-pct { grid-column: 3; } .br-markupbox { justify-items: start; } }
.br-sel { flex: none; width: 18px; height: 18px; }
.br-hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.br-hints:empty { display: none; }
.br-accept { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0 0 0 4px; }
.br-bulk { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin: 10px 0; border-radius: 14px; background: var(--cell, #fff); border: 1px solid var(--accent, #3d74ff); box-shadow: 0 8px 24px -12px rgba(0,0,0,.35); }
.br-bulk[hidden] { display: none; }
.br-bulkall { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.br-merge input { flex: 1 1 220px; }
