/* Cabinet sections in the site design (Chip, 12.11.2026): Счёт, Лидеры, Партнёры, Академия, Помощь, Настройки and
   the checkout keep their markup and octo-cabinet.css, framed by the site header and footer (Shell.tsx). This sheet,
   loaded last, points the cabinet's colour variables at the site tokens of design-v2/terminal-look.css, so the pages
   follow the site's light and dark theme: paper #f4f4f4, header #ebebeb, ink #121212 in light; #0c0c0c, #efefef in
   dark; the buy green #62e89b; 6 px panels and pill buttons. */
html[data-bm-site] body:has(.oc-site), html[data-bm-site] .oc-site {
  --it-bg: var(--color-paper);
  --it-panel: var(--color-surface);
  --it-chart: var(--color-surface);
  --it-raised: var(--color-paper-3);
  --it-border: var(--color-rule-strong);
  --it-soft-border: var(--color-rule);
  --it-text: var(--color-ink);
  --it-muted: var(--color-muted);
  --it-faint: var(--color-muted);
  --it-radius: 6px;
  --ink-strong: var(--color-ink);
  --ink-field: var(--color-surface);
  --radius-button: 999px;
  /* The older cabinet sheets (app.css, refine.css) read this second set, which octo-theme.css pins to graphite. */
  --bg: var(--color-paper);
  --surface: var(--color-surface);
  --surface-2: var(--color-paper-2);
  --ink: var(--color-ink);
  --muted: var(--color-muted);
  --muted-strong: var(--color-muted);
  --line: var(--color-rule);
  --line-strong: var(--color-rule-strong);
  --accent: var(--site-green-text);
  --accent-text: var(--site-green-text);
  --profit: var(--site-green-text);
  --accent-fill: var(--color-brand);
  --accent-on-fill: var(--color-accent-ink);
  --accent-soft: color-mix(in srgb, var(--color-brand) 18%, transparent);
  --profit-soft: color-mix(in srgb, var(--color-brand) 18%, transparent);
  background: var(--color-paper);
  color: var(--color-ink);
}
html[data-bm-site] .oc-site { display: block; min-height: 60vh; padding: 32px 0 64px; font-family: var(--font-body); }
html[data-bm-site] .oc-site > .app-content { padding: 0; }

/* Text: headings and totals in ink, green text in a green that reads on paper (#11703f light, the buy green dark). */
html[data-bm-site] body:has(.oc-site), html[data-bm-site] .oc-site { --site-green-text: #11703f; --loss-text: #b3261e; }
html[data-bm-site][data-theme="dark"] body:has(.oc-site), html[data-bm-site][data-theme="dark"] .oc-site { --site-green-text: var(--color-brand); --loss-text: #ff6f68; }
/* Green figures and markers that the cabinet colours with --it-buy read on paper in the deeper green; fills that must
   stay the buy green (primary buttons, chosen pills) set --color-brand themselves below. */
html[data-bm-site][data-theme="light"] .oc-site { --it-buy: var(--site-green-text); }
html[data-bm-site] .oc-site :is(.app-head h1, .checkout .display, .checkout .display-sub, .pay-shell .display-sub, .receipt-total strong, h1, h2, h3) { color: var(--color-ink); }
html[data-bm-site] .oc-site :is(.tag, .accent), html[data-bm-site] .oc-site a:not(.button, .edu-tile, .pt-card) { color: var(--site-green-text); }
html[data-bm-site] .oc-site :is(.up, .pos, .profit, .tone-up) { color: var(--site-green-text); }
html[data-bm-site] .oc-site ::selection { background: color-mix(in srgb, var(--color-brand) 30%, transparent); color: var(--color-ink); }

/* Lines and fills that the cabinet wrote as graphite hex values. */
html[data-bm-site] .oc-site :is(.app-head, .faq details, .channel, .data td, .board td, .board th[scope="row"], .addon, .pay-method, .receipt-lines > div, .edu-list li) { border-color: var(--color-rule); }
html[data-bm-site] .oc-site :is(.figs, .band, .pt-card, .kyc-card, .support-box, .table-wrap, .board-wrap, .data th, .board thead th, .model-rules, .edu-tile, .edu-part-band, .addon-list, .pay-methods, .receipt, .pay-gate, .promo, .index-list > li, .index-list > li:last-child, .dd-strip) { border-color: var(--color-rule); }
html[data-bm-site] .oc-site .figs { background: var(--color-rule); }
html[data-bm-site] .oc-site :is(.dd-strip, .promo) { background: var(--color-paper-2); color: var(--color-ink); }
html[data-bm-site] .oc-site :is(.help-topic-head, .callout-gold) { background: var(--color-paper-2); }
html[data-bm-site] .oc-site :is(.meter, .tag-muted) { background: var(--color-paper-3); }
html[data-bm-site] .oc-site :is(.data th, .board thead th) { color: var(--color-muted); }
html[data-bm-site] .oc-site :is(.data tbody tr:hover td, .board tbody tr:hover td, .board tbody tr:hover th) { background: color-mix(in srgb, var(--color-ink) 4%, transparent); }
html[data-bm-site] .oc-site :is(.board tr.own td, .board tr.own th, .addon:has(input:checked), .pay-method:has(input:checked)) { background: color-mix(in srgb, var(--color-brand) 16%, transparent); }
html[data-bm-site] .oc-site a.edu-tile:hover, html[data-bm-site] .oc-site .pt-card:hover { background: var(--color-paper-2); border-color: var(--color-rule-strong); }
html[data-bm-site] .oc-site .avatar { background: var(--color-paper-3); border-color: var(--color-rule); color: var(--color-ink); }

/* Fields: the site's 4 px fields on the surface colour. */
/* .oc-site twice: the cabinet's field rule carries four :not() and would win otherwise. */
html[data-bm-site] .oc-site.oc-site :is(input:not([type=checkbox]):not([type=radio]), select, textarea, .pill) { background: var(--color-surface); border-color: var(--color-rule-strong); color: var(--color-ink); border-radius: var(--tl-radius); }
/* The chosen model and size stay filled: the field rule above out-specifies the button rule below (QA F09). */
html[data-bm-site] .oc-site.oc-site .pill:has(input:checked) { background: var(--color-brand); border-color: var(--color-brand); color: var(--color-accent-ink); }
html[data-bm-site] .oc-site :is(input, select, textarea):focus-visible { border-color: var(--color-ink); outline: 2px solid var(--color-ink); outline-offset: 1px; }
html[data-bm-site] .oc-site input[type="file"]::file-selector-button { background: var(--color-paper-3); border-color: var(--color-rule); color: var(--color-ink); }

/* Buttons: the site's pills. Primary is the buy green with dark text, quiet is a hairline pill. */
html[data-bm-site] .oc-site .button { border-radius: 999px; min-height: 40px; padding: 8px 18px; font-size: 13px; font-weight: 600; }
html[data-bm-site] .oc-site .button-primary, html[data-bm-site] .oc-site .pill:has(input:checked), html[data-bm-site] .oc-site .steps li[aria-current] .num { background: var(--color-brand); border-color: var(--color-brand); color: var(--color-accent-ink); }
html[data-bm-site] .oc-site .button-primary:hover { background: color-mix(in srgb, var(--color-brand) 85%, var(--color-ink)); }
html[data-bm-site] .oc-site .button-quiet { background: transparent; border: 1px solid var(--color-rule-strong); color: var(--color-ink); }
html[data-bm-site] .oc-site .button-quiet:hover { background: var(--color-paper-2); border-color: var(--color-ink); }
html[data-bm-site] .oc-site :is(.button, a, summary):focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; }

/* Labels, questions and the drawdown figures: ink and muted from the site, never a light grey on paper. */
html[data-bm-site] .oc-site :is(label, .form-field > span, .o-field > span, .receipt .label, .pay-gate-head .label) { color: var(--color-muted); }
html[data-bm-site] .oc-site :is(.help-questions summary, .faq summary) { color: var(--color-ink); }
html[data-bm-site] .oc-site :is(.faq details > p, .faq details > div) { color: var(--color-muted); }
html[data-bm-site] .oc-site :is(.dd-head h3, .dd-kv dd) { color: var(--color-ink); }
html[data-bm-site] .oc-site :is(.dd-head .num, .dd-kv dt, .dd-strip .hint) { color: var(--color-muted); }
html[data-bm-site] .oc-site :is(.down, .neg, .loss, .tone-down) { color: var(--loss-text); }

/* Polish (Chip, 12.11.2026). BEN list on «Партнёры»: the site bridge zeroes the item's left padding, so the cabinet's
   absolute dot floated above each line. A grid puts a small green marker beside the first line instead. */
html[data-bm-site] .oc-site .pt-ben-about li { display: grid; grid-template-columns: 6px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 16px 0; }
html[data-bm-site] .oc-site .pt-ben-about li::before { position: static; width: 6px; height: 6px; margin-top: calc(0.75em - 3px); border-radius: 50%; background: var(--site-green-text); }
/* Reward tiles: the figure and its text inside a padded tile, never against the border; one column on phones. */
html[data-bm-site] .oc-site .pt-hub-terms { gap: 12px; margin: 16px 0 20px; border-top: 0; }
html[data-bm-site] .oc-site .pt-hub-terms li { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border: 1px solid var(--color-rule); border-radius: 6px; background: var(--color-surface); }
html[data-bm-site] .oc-site .pt-hub-terms b { font-size: clamp(30px, 2.6vw, 38px); white-space: nowrap; }
@media (max-width: 559px) { html[data-bm-site] .oc-site .pt-hub-terms { grid-template-columns: minmax(0, 1fr); } }
/* Bonus lines in the settings: a bright green pill with a gift mark. */
html[data-bm-site] .oc-site .perk { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 5px 12px 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--color-brand) 22%, transparent); color: var(--site-green-text); font-size: 13px; font-weight: 600; line-height: 1.3; }
html[data-bm-site] .oc-site .perk-gift { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* File picker: the native input covers the row (clicks and keyboard reach it), our button and name show through. */
html[data-bm-site] .oc-site .file-pick { display: grid; gap: 6px; }
html[data-bm-site] .oc-site .file-pick-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px; border: 1px solid var(--color-rule-strong); border-radius: var(--tl-radius); background: var(--color-surface); }
html[data-bm-site] .oc-site.oc-site .file-pick-input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
html[data-bm-site] .oc-site .file-pick-button { flex: none; pointer-events: none; min-height: 36px; padding: 6px 14px; }
html[data-bm-site] .oc-site .file-pick-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-ink); font-size: 14px; }
html[data-bm-site] .oc-site .file-pick-row:has(.file-pick-input:focus-visible) { outline: 2px solid var(--color-ink); outline-offset: 2px; }
html[data-bm-site] .oc-site .file-pick-row:hover .file-pick-button { border-color: var(--color-ink); }

/* Admin pages on a phone (Евгений А., 13.11.2026: «на телефоне невозможно ничего понять»). The admins' table and
   the journal were wider than the screen and pushed the page sideways; below 720 px every row becomes a card with
   its labels (data-label), the section links wrap in two columns, and the admin forms get 44 px fields and buttons. */
html[data-bm-site] .oc-site .app-content { min-width: 0; }
html[data-bm-site] .oc-site .admin-decide :is(input:not([type=checkbox]):not([type=radio]), select, textarea, .button) { min-height: 44px; }
@media (max-width: 720px) {
  html[data-bm-site] .oc-site .app-head { flex-wrap: wrap; min-width: 0; }
  html[data-bm-site] .oc-site .app-head > div { min-width: 0; }
  html[data-bm-site] .oc-site .app-head-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; width: 100%; }
  html[data-bm-site] .oc-site .app-head-actions > .button { width: auto; min-width: 0; min-height: 44px; margin: 0; white-space: normal; text-align: center; }
  html[data-bm-site] .oc-site :is(table[data-admin-team], table[data-admin-log]) { display: block; width: 100%; max-width: 100%; border: 0; }
  html[data-bm-site] .oc-site :is(table[data-admin-team], table[data-admin-log]) thead { display: none; }
  html[data-bm-site] .oc-site :is(table[data-admin-team], table[data-admin-log]) tbody { display: grid; gap: 10px; }
  html[data-bm-site] .oc-site :is(table[data-admin-team], table[data-admin-log]) tr { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--color-rule); border-radius: var(--tl-radius, 12px); }
  html[data-bm-site] .oc-site :is(table[data-admin-team], table[data-admin-log]) td { display: block; position: relative; min-height: 18px; padding: 0 0 0 102px; border: 0; text-align: left; overflow-wrap: anywhere; }
  html[data-bm-site] .oc-site :is(table[data-admin-team], table[data-admin-log]) td::before { content: attr(data-label); position: absolute; top: 2px; left: 0; width: 92px; color: var(--color-muted); font-size: 12px; }
  html[data-bm-site] .oc-site table[data-admin-team] td.admin-row-actions { display: grid; gap: 8px; padding: 4px 0 0; }
  html[data-bm-site] .oc-site table[data-admin-team] td.admin-row-actions::before { content: none; }
  html[data-bm-site] .oc-site table[data-admin-team] td.admin-row-actions .button { width: 100%; min-height: 44px; }
  html[data-bm-site] .oc-site .admin-decide { display: grid; grid-template-columns: 1fr; gap: 10px; }
  html[data-bm-site] .oc-site .admin-decide .button { width: 100%; }
}

/* Task554: readable completion reason and touch-sized private image controls. */
html[data-bm-site] .oc-site .breach-download .button { min-height:44px; }
html[data-bm-site] .oc-site .breach-result { background:var(--color-paper-2); color:var(--color-ink); border-color:var(--loss-text); }
html[data-bm-site] .oc-site .breach-result :is(strong, span) { color:inherit; }
/* Registration directory follows the existing admin typography and colour tokens. */
html[data-bm-site] .oc-site .admin-users-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 16px; align-items: end; margin-block: 24px; }
html[data-bm-site] .oc-site .admin-users-filters .o-field { min-width: 0; margin: 0; }
html[data-bm-site] .oc-site .admin-users-filters :is(input, select, .button) { min-height: 44px; width: 100%; }
html[data-bm-site] .oc-site .admin-users-filters .actions { flex-wrap: nowrap; }
html[data-bm-site] .oc-site .admin-users-table { width: 100%; table-layout: fixed; }
html[data-bm-site] .oc-site .admin-users-table :is(td, th) { overflow-wrap: anywhere; font-size: 13px; padding: 12px 8px; }
@media (min-width: 1001px) { html[data-bm-site] .oc-site .admin-users-table :is(td, th):first-child { width: 18%; } }
html[data-bm-site] .oc-site .admin-users-pages { align-items: center; margin-block: 24px; }
@media (max-width: 1000px) {
  html[data-bm-site] .oc-site table[data-admin-users], html[data-bm-site] .oc-site table[data-admin-users] tbody { display: block; width: 100%; }
  html[data-bm-site] .oc-site table[data-admin-users] thead { display: none; }
  html[data-bm-site] .oc-site table[data-admin-users] tr { display: grid; gap: 10px; border-bottom: 1px solid var(--color-rule); padding-block: 20px; }
  html[data-bm-site] .oc-site table[data-admin-users] td { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 12px; padding: 0; border: 0; width: auto; }
  html[data-bm-site] .oc-site table[data-admin-users] td::before { content: attr(data-label); color: var(--color-muted); }
  html[data-bm-site] .oc-site table[data-admin-users] td > :is(br, span.muted) { grid-column: 2; }
  html[data-bm-site] .oc-site .admin-users-filters { grid-template-columns: 1fr; }
}

/* Admin journal (Evgeny A., 18.11.2026): one compact line per entry. Time, action and IP never wrap; who, object and
   details are cut with an ellipsis and open in full (details/summary) on click, Enter or tap; no sideways scroll. */
@media (min-width: 721px) {
  html[data-bm-site] .oc-site table[data-admin-log] { width: 100%; }
  html[data-bm-site] .oc-site table[data-admin-log] :is(td, th) { font-size: 13px; padding: 10px 8px; vertical-align: top; text-align: left; }
  html[data-bm-site] .oc-site table[data-admin-log] td:is(:nth-child(1), :nth-child(3), :nth-child(6)) { white-space: nowrap; }
  html[data-bm-site] .oc-site table[data-admin-log] td:nth-child(2) { width: 12%; max-width: 0; }
  html[data-bm-site] .oc-site table[data-admin-log] td:nth-child(4) { width: 20%; max-width: 0; }
  html[data-bm-site] .oc-site table[data-admin-log] td:nth-child(5) { width: 40%; max-width: 0; }
  html[data-bm-site] .oc-site table[data-admin-log] td:is(:nth-child(2), :nth-child(4), :nth-child(5)) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
html[data-bm-site] .oc-site .admin-log-clip { margin: 0; padding: 0; border: 0; }
html[data-bm-site] .oc-site .admin-log-clip summary { display: block; min-height: 0; padding: 0; font-size: inherit; line-height: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; list-style: none; text-decoration: underline dotted; text-underline-offset: 3px; }
html[data-bm-site] .oc-site .admin-log-clip summary::-webkit-details-marker { display: none; }
html[data-bm-site] .oc-site .admin-log-clip summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
html[data-bm-site] .oc-site .admin-log-clip > div { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--color-muted); }
@media (max-width: 720px) {
  html[data-bm-site] .oc-site table[data-admin-log] tr { grid-template-columns: minmax(0, 1fr); }
  html[data-bm-site] .oc-site table[data-admin-log] td:nth-child(1) :is(time, .local-t) { white-space: nowrap; }
  html[data-bm-site] .oc-site table[data-admin-log] td:nth-child(1) .local-t { display: inline-block; margin-left: 0.3em; }
  html[data-bm-site] .oc-site .admin-log-clip summary { min-height: 24px; }
}

/* «Показать скрытых» in the registration filters (Evgeny A., 18.11.2026): a plain checkbox, not a 44 px full-width field. */
html[data-bm-site] .oc-site .admin-users-filters .admin-users-hidden { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
html[data-bm-site] .oc-site .admin-users-filters .admin-users-hidden input { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; }
