/* CHES.MONEY look: near-black surfaces, white type, the logo's coin gold as the one accent. */
/* 30.10: the hryvnia sign (U+20B4) is drawn wrongly (like «ё») by the web font Manrope: for that one character take a system font that has it,
   the rest of the text stays in Manrope (--font starts with this family; it covers nothing but U+20B4) */
@font-face { font-family: "FCS Cur"; unicode-range: U+20B4; src: local("Segoe UI"), local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Roboto"), local("DejaVu Sans"), local("Noto Sans"); }
:root {
  --bg: #0e0e0f; --panel: #18181a; --panel-2: #202023; --text: #f3f3f1; --muted: #9b9b98; --line: #2b2b2f;
  --gold: #f5c518; --gold-2: #e0a90b; --on-gold: #111; --good: #3ccf7a; --bad: #ff5d5d; --warn: #ffb547;
  --radius: 14px; --font: "FCS Cur", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand: "Montserrat", var(--font);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f4f2; --panel: #fff; --panel-2: #f0f0ee; --text: #121212; --muted: #6d6d6a; --line: #e4e4e0;
    --gold: #e9b200; --gold-2: #c99600; --good: #14a352; --bad: #d93636; --warn: #c27a00; color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4f4f2; --panel: #fff; --panel-2: #f0f0ee; --text: #121212; --muted: #6d6d6a; --line: #e4e4e0;
  --gold: #e9b200; --gold-2: #c99600; --good: #14a352; --bad: #d93636; --warn: #c27a00; color-scheme: light;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }  /* space for the scrollbar is always reserved, so short and long pages line up */
body { margin: 0; font: 14px/1.5 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--gold); text-decoration: none; }
code { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 12.5px; background: var(--panel-2);
       padding: 1px 6px; border-radius: 6px; }

/* --- top bar --- */
header.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
             backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .inner { display: flex; align-items: center; gap: 12px; max-width: 1440px; margin: 0 auto; padding: 10px 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex-shrink: 0; }
.brand img { height: 30px; }
.brand b { font: 700 15px/1 var(--brand); letter-spacing: .22em; }
.brand small { display: block; font-size: 10px; letter-spacing: .3em; color: var(--muted); margin-top: 3px; }
/* Items sit together after the logo (no stretching across the bar); the free space goes to the right of the menu. */
nav.menu { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; justify-content: flex-start; margin-left: 18px; }
nav.menu a { padding: 7px 12px; font-size: 13px; border-radius: 999px; color: var(--muted); white-space: nowrap; font-weight: 600; }
nav.menu a:hover { color: var(--text); }
nav.menu a.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
nav.menu a b { color: var(--gold); font-weight: 700; }  /* an owner's balance next to «Баланс» */
nav.menu a b.bal-out { color: var(--bad); }
.top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rate-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; font-weight: 800; white-space: nowrap;
  font-variant-numeric: tabular-nums; cursor: default; }
button.rate-badge { cursor: pointer; color: var(--text); font-family: inherit; line-height: inherit; }
button.rate-badge:hover { background: var(--panel-2); border-color: var(--gold); }
.rate-badge .rb-grp { display: inline-flex; gap: 4px; }
.rate-badge .plat { gap: 0; }
.rate-badge .plat svg { width: 14px; height: 14px; }
.rate-badge .rb-sep { width: 1px; height: 15px; background: var(--line); }

main { padding: 22px 20px 48px; max-width: 1440px; margin: 0 auto; }
h1 { font: 700 24px/1.2 var(--font); margin: 0 0 18px; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 12px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.head-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line);
             border-radius: 999px; color: var(--text); font-weight: 600; font-size: 13px; text-decoration: none; }
.head-link:hover { border-color: var(--gold); }
@media (max-width: 1399px) { .sec-link { display: none; } }  /* the menu needs the room; the page links to it too */

/* --- surfaces --- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; overflow-x: auto; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 18px; }
.grid.tiles7 { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }  /* dashboard: 7 tiles in one row at 1150 px */
.stat small { display: block; font-size: 12px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat span { color: var(--muted); font-size: 12px; font-weight: 600; }
i.money { font-style: normal; }  /* dollars; the euros are in its tooltip */
small.hint.act-yes { color: var(--good); }  /* «активирован» under the platform */
.stat b { display: block; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; letter-spacing: -.01em; }
.stat.accent { background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 18%, var(--panel)), var(--panel)); border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); }

/* --- tables --- */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: center; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
td.num, th.num { text-align: center; }
td.wrap { white-space: normal; }
/* 14.11 (user: «сначала появляются аккаунты, потом папки»): a long list's rows stay unseen until its script has put them
   into their groups and folded the folded ones (accounts.js, cloud.js take data-pending off) — one draw, and the browser
   lays out the hundreds of rows once instead of during the parse and again after. Should the script fail they show by
   themselves after 4 s. */
tbody[data-pending] { display: none; animation: tb-show 0s 4s forwards; }
@keyframes tb-show { to { display: table-row-group; } }

/* --- controls --- */
input, select, textarea, button { font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 11px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
textarea { width: 100%; max-width: 100%; min-height: 120px; resize: vertical; font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 12.5px; }
button { cursor: pointer; background: var(--gold); color: var(--on-gold); border: 0; font-weight: 700;
         user-select: none; -webkit-user-select: none; }  /* a double click must not select the label */
.badge, summary, label.row, th { user-select: none; -webkit-user-select: none; }
button:hover { background: var(--gold-2); }
button:disabled { opacity: .45; cursor: default; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 600; }
button.ghost:hover { border-color: var(--muted); }
button.danger { background: var(--bad); color: #fff; }
button.icon { padding: 6px 10px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.form-grid { display: grid; grid-template-columns: minmax(200px, 320px) 1fr; gap: 10px 18px; align-items: center; max-width: 760px; }
.form-grid label { color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
small.hint { display: block; color: var(--muted); font-size: 12px; }

/* --- badges & platforms --- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
         background: color-mix(in srgb, currentColor 12%, transparent); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-online, .s-bought, .s-running { color: var(--good); }
.s-error, .s-captcha, .s-needs_login, .s-discarded { color: var(--bad); }
.s-logging_in { color: var(--warn); }
.badge.busy::before { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(.6); } }
.s-offline, .s-to_assign, .s-assigned, .s-stopped { color: var(--muted); }
.plat { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.plat svg { width: 16px; height: 16px; fill: currentColor; }
.plat.ps { color: #4a8cff; } .plat.xbox { color: #3ccf4e; } .plat.pc { color: #ff7a29; } .plat.console { color: var(--muted); }
.l-warn td, .l-warn { color: var(--warn); } .l-error td, .l-error { color: var(--bad); }
.banner { padding: 8px 16px; background: var(--warn); color: #000; text-align: center; font-weight: 700; }

/* --- accounts table: filters, bulk bar, tick boxes --- */
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: "▸ "; color: var(--muted); }
details.card[open] > summary::before { content: "▾ "; }
details.card > summary.row { display: flex; }
details.card > summary .add-btn { padding: 7px 14px; }
details.card[open] > summary .add-btn { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
details.card[open] > summary .add-btn::after { content: " — свернуть"; color: var(--muted); font-weight: 600; }
.filters { margin-bottom: 12px; }
.filters input[type="search"] { min-width: 170px; max-width: 200px; }
/* A drop-down with ticks (status filter): the summary looks like the selects around it. */
.msel { position: relative; }
.msel summary { list-style: none; cursor: pointer; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 30px 8px 11px; white-space: nowrap; position: relative; user-select: none; }
.msel summary::-webkit-details-marker { display: none; }
.msel summary::after { content: "▾"; position: absolute; right: 11px; color: var(--muted); }
.msel[open] summary, .msel.on summary { border-color: var(--gold); }
.msel-list { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 100%; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.msel-list label { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; white-space: nowrap; cursor: pointer; }
.msel-list label:hover { background: var(--panel-2); }
.msel-acts { gap: 6px; padding: 6px 4px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.msel-acts button { padding: 4px 10px; font-size: .9em; }
/* Inside a card (it scrolls sideways) a list hanging out would give the card a scrollbar: float it over the page,
   placed under its button by base.html (placeMsel) before it is drawn. */
.card .msel-list { position: fixed; }
/* Lists of plain <select>s, drawn by base.html in the same style (one choice: the current one is gold). */
.csel-list { position: fixed; z-index: 60; max-height: min(360px, 70vh); overflow-y: auto; }
.csel-list button { display: block; width: 100%; text-align: left; background: transparent; color: var(--text); font-weight: 400;
  padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.csel-list button:hover { background: var(--panel-2); }
.csel-list button.on { color: var(--gold); font-weight: 600; }
.csel-list button:disabled { color: var(--muted); cursor: default; background: transparent; }
select.csel-open { border-color: var(--gold); }
/* The select's own arrow, the same ▾ as the tick drop-downs (their summary::after). */
select:not([multiple]) { appearance: none; -webkit-appearance: none; padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0h8L4 5z' fill='%239b9b98'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
.bulk { padding: 10px 12px; margin-bottom: 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--panel-2); font-variant-numeric: tabular-nums; }
.bulk > b.muted { min-width: 96px; }  /* "Отмечено: 12" must not change the row's wrapping as the number changes */
.bulk button, .bulk .ghost { padding-left: 9px; padding-right: 9px; }  /* nine controls must fit one 1150 px row */
.bulk select { min-width: 0; width: 118px; max-width: 118px; }
.bulk[data-count="0"] button { opacity: .5; }
.bulk[data-count="0"] button:hover { opacity: 1; }
.bulk .danger-text { color: var(--bad); }
table.accounts th, table.accounts td { padding: 7px 5px; }
/* The column names stay under the site header while the list scrolls (with 400 accounts nobody knew which column was
   which). A sticky cell needs no scrolling box around it, so the card stops scrolling sideways where the table fits.
   Only the accounts card: in a scrolling card (proxy / key folders) a sticky head slid down over the first rows (24.10). */
@media (min-width: 1100px) {
  .card.acc-card { overflow: visible; }
  /* the filters stick under the site header, the column names right under the filters */
  .acc-card .filters { position: sticky; top: var(--hdr-h, 58px); z-index: 5; background: var(--panel); padding: 8px 0; margin-top: -8px; }
  .acc-card table.accounts thead tr:first-child th { position: sticky; top: calc(var(--hdr-h, 58px) + var(--flt-h, 0px)); z-index: 4;
    background: var(--panel); box-shadow: inset 0 -1px 0 var(--line); }
}
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; vertical-align: middle; }
table.accounts select, table.accounts input:not([type="checkbox"]) { padding: 5px 7px; border-radius: 8px; }
table.accounts input.num { text-align: right; width: 44px; }
table.accounts select.proxy { max-width: 110px; }
table.accounts td.email { max-width: 165px; overflow: hidden; text-overflow: ellipsis; }
table.accounts td.email small.hint { overflow: hidden; text-overflow: ellipsis; }
table.accounts button.act { display: inline-flex; align-items: center; gap: 4px; padding: 6px 7px; font-size: 14px; line-height: 1; }
table.accounts button.act .lbl { font-size: 12px; }
table.accounts button.act.login { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
table.accounts button.act.login:hover { background: color-mix(in srgb, var(--good) 14%, transparent); }
table.accounts button.act.del { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
table.accounts button.act.del:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }
button.reveal { display: inline-flex; align-items: center; gap: 6px; min-width: 112px; justify-content: center; }
button.reveal .eye-off, button.reveal .lbl-hide { display: none; }
button.reveal.open .eye, button.reveal.open .lbl-reveal { display: none; }
button.reveal.open .eye-off, button.reveal.open .lbl-hide { display: inline; }
table.accounts tr.edit td { background: var(--panel-2); padding: 10px 12px; }
table.accounts tr.edit label { display: inline-flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }
table.accounts tr.edit label input { color: var(--text); font-size: 14px; font-weight: 400; }
table.accounts tr.work td { background: color-mix(in srgb, var(--good) 9%, transparent); }
table.accounts tr.work:hover td { background: color-mix(in srgb, var(--good) 15%, transparent); }
table.accounts tr.work td:first-child { box-shadow: inset 3px 0 0 var(--good); }
.legend { font-size: 12px; margin-left: 10px; padding: 1px 8px; border-radius: 6px; }
.legend.work { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.legend.off { opacity: .6; }
table.accounts tr.off td { opacity: .6; }
table.accounts tr.off td:first-child, table.accounts tr.off td:last-child { opacity: 1; }
@media (max-width: 1250px) { table.accounts .opt { display: none; } table.accounts td.email { max-width: 150px; } }

/* --- import preview: rows without a tick are dimmed and not imported --- */
table.preview tr.skipped td:not(:first-child) { opacity: .4; text-decoration: line-through; }
table.preview td.pv-n { text-align: right; width: 1%; padding-right: 14px; }
/* Long verdicts ("обновлю: TOTP, прокси", "неверный логин или пароль") wrap instead of widening the table. */
table.preview .badge { white-space: normal; line-height: 1.3; max-width: 190px; }
/* keys (27.10): the row's market — its icons and a small select to change it */
table.preview .plat-cell { gap: 10px; flex-wrap: nowrap; align-items: center; justify-content: flex-start; }
table.preview .plat-cell select { width: auto; height: 30px; padding: 0 24px 0 8px; font-size: 13px; }

/* --- login --- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-box { width: 100%; max-width: 380px; text-align: center; }
.login-box img { width: 120px; }
.login-box .word { font: 800 22px/1 var(--brand); letter-spacing: .28em; margin: 14px 0 4px; }
.login-box form { display: grid; gap: 10px; margin-top: 24px; text-align: left; }

@media (max-width: 720px) {
  header.top .inner { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  nav.menu { order: 3; flex-basis: 100%; margin-left: 0; }
  .brand small { display: none; }
  main { padding: 16px 16px 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; }
  .stat b { font-size: 20px; }
}

/* --- coloured ghost buttons (bulk bar) --- */
:root { --blue: #4a8cff; }
button.ghost[class*="tone-"] { font-weight: 700; }
button.ghost.tone-good { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
button.ghost.tone-good:hover { background: color-mix(in srgb, var(--good) 14%, transparent); }
button.ghost.tone-bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
button.ghost.tone-bad:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }
button.ghost.tone-gold { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
button.ghost.tone-gold:hover { background: color-mix(in srgb, var(--gold) 14%, transparent); }
button.ghost.tone-blue { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); }
button.ghost.tone-blue:hover { background: color-mix(in srgb, var(--blue) 14%, transparent); }

/* --- tabs inside a strip --- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs .tab { background: transparent; color: var(--muted); border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; padding: 8px 14px; font-weight: 700; margin-bottom: -1px; }
.tabs .tab:hover { color: var(--text); background: transparent; }
.tabs .tab.on { color: var(--text); border-bottom-color: var(--gold); }
a.ghost.icon.act { display: inline-flex; align-items: center; gap: 4px; padding: 6px 7px; font-size: 14px; line-height: 1;
  color: var(--text); border: 1px solid var(--line); border-radius: 10px; background: transparent; font-weight: 600; }
a.ghost.icon.act:hover { border-color: var(--muted); }
a.ghost.icon.act .lbl { font-size: 12px; }

/* bulk bar: compact enough for one line at ~1100 px */
.bulk { gap: 6px; }
.bulk button { padding: 6px 9px; }
.bulk select { max-width: 112px; padding: 6px 8px; }
.bulk input.group-new { padding: 6px 8px; width: 110px; }

/* bulk bar: every control the same height, shape and weight */
.bulk button, .bulk select, .bulk input.group-new { height: 32px; padding: 0 12px; border-radius: 8px; font-weight: 600;
  font-size: 13px; line-height: 30px; border: 1px solid var(--line); background: transparent; color: var(--text); box-sizing: border-box; }
.bulk select { min-width: 0; width: 118px; max-width: 118px; padding-right: 24px; }
.bulk input.group-new { width: 120px; line-height: normal; }
.bulk button.ghost:hover, .bulk select:hover { border-color: var(--muted); }
.bulk .danger-text { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.bulk .danger-text:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }

/* dropdown menus: the <option> list must have its own colours, otherwise transparent selects give
   near-white text on the browser's white popup */
select { background-color: var(--panel-2); }
select option { background: var(--panel); color: var(--text); }
.bulk select { background-color: var(--panel-2); }

/* file inputs look like our ghost buttons instead of the browser's default */
input[type="file"] { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; margin-right: 10px; cursor: pointer; }
input[type="file"]::file-selector-button:hover { border-color: var(--muted); }
/* row action buttons on every page (accounts, proxies, keys) */
button.act { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; font-size: 14px; line-height: 1; }
button.act .lbl { font-size: 13px; }
button.act.login { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
button.act.login:hover { background: color-mix(in srgb, var(--good) 14%, transparent); }
button.act.del { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
button.act.del:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.plat-select, table select[name="folder_id"] { max-width: 118px; }
table.accounts tr.edit td { white-space: normal; }
td.email { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }

/* cards page */
td.clip { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
td.nowrap, .nowrap { white-space: nowrap; }
table.cards td.wrap { white-space: normal; line-height: 1.35; }
table.cards small.hint { white-space: normal; }

/* page tabs (Журнал: Карточки / События) */
.page-tabs { margin: -6px 0 16px; }
.page-tabs .tab { text-decoration: none; display: inline-block; }
/* «Облако»'s five tabs (14.11, «Настройки» added) are wider than a phone: the strip scrolls sideways instead of widening
   the page; the strip's line is an inset shadow so the scroll box does not clip the gold underline of the open tab */
@media (max-width: 640px) {
  .cl-tabs { overflow-x: auto; scrollbar-width: none; border-bottom: 0; box-shadow: inset 0 -1px var(--line); }
  .cl-tabs::-webkit-scrollbar { display: none; }
  .cl-tabs .tab { flex: none; margin-bottom: 0; padding: 8px 11px; white-space: nowrap; }
}

/* dashboard blocks */
.dash-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.dash-grid .card { margin-bottom: 0; }
.chart-card { grid-column: 1 / -1; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-col .bar { width: 100%; min-height: 2px; background: linear-gradient(180deg, var(--gold), var(--gold-2)); border-radius: 6px 6px 2px 2px; opacity: .9; }
.bar-col:hover .bar { opacity: 1; }
.bar-col small { color: var(--muted); font-size: 11px; margin-top: 4px; }
.funnel { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.funnel > div, .funnel > div > a { display: flex; flex-direction: column; min-width: 92px; color: inherit; text-decoration: none; }
.funnel span { font-size: 12px; font-weight: 600; }
.funnel b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.funnel b.good { color: var(--good); } .funnel b.bad { color: var(--bad); }
.funnel b.gold { color: var(--gold); }
.funnel a:hover b { color: var(--gold); }
.dash-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-grid .card { overflow-x: hidden; min-width: 0; }
@media (max-width: 1000px) { .dash-3, .dash-2 { grid-template-columns: 1fr; } }

/* One-off notices ("saved", "refreshing…") pop up in the top-right corner and fade out by themselves,
   so the page never jumps. Error notices stay a little longer. */
.rown { display: inline-block; min-width: 17px; margin-right: 3px; text-align: right; font-size: .7em; color: var(--muted);
        font-variant-numeric: tabular-nums; vertical-align: middle; }
.status-strip { gap: 6px; margin: -4px 0 12px; }
.status-strip:empty { display: none; }
.chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-weight: 600;
        font-size: .88em; cursor: pointer; }
.chip b { color: var(--text); margin-left: 2px; }
.chip:hover, .chip.on { border-color: currentColor; }
.chip.on { background: color-mix(in srgb, currentColor 14%, var(--panel-2)); }
a.chip { text-decoration: none; color: var(--muted); display: inline-block; }
a.chip.on { color: var(--gold); }
table.stats td.bar-cell { width: 22%; min-width: 120px; padding-left: 4px; }
table.stats .bar { display: block; height: 10px; border-radius: 5px; background: var(--gold); min-width: 0; }
table.stats tr.muted td { opacity: .55; }
/* A calm one-line notice (not an alarm): amber dot, muted details, explanation in the tooltip. */
.sale-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 14px; margin-bottom: 14px;
  border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 10px; background: var(--panel);
  font-size: .9em; cursor: help; }
.sale-alert b { font-weight: 700; }
.sa-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.flash { position: fixed; top: 84px; right: 24px; z-index: 50; max-width: 440px; padding: 10px 32px 10px 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,.45); animation: flash-in .25s ease-out; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.flash-x { position: absolute; top: 4px; right: 6px; border: 0; background: none; padding: 0 4px; line-height: 1;
  font-size: 18px; cursor: pointer; color: var(--muted); opacity: .7; }
.flash-x:hover { opacity: 1; color: inherit; }
@media (max-width: 700px) { .flash { left: 16px; right: 16px; max-width: none; } }

/* Every table is centred: cells, the button rows inside them and the inputs. Sortable headers show the arrow. */
td > .row, th > .row { justify-content: center; }
td input:not([type=checkbox]), td select { text-align: center; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--text); }
th[data-sort] .arr { display: inline-block; width: .7em; opacity: .35; font-size: 9px; margin-left: 1px; }
th[data-sort].on .arr { opacity: 1; color: var(--gold); }

/* Secrets in edit forms are plain text inputs drawn as dots: Chrome then never offers to save them as passwords. */
input.secret { -webkit-text-security: disc; }
input.secret.shown { -webkit-text-security: none; }

/* "online" that EA has not confirmed for over an hour: probably dead, shown muted with a question mark. */
.s-stale { color: var(--muted); }

/* "Итого" row under the accounts header: quiet, but the numbers stand out. */
table.accounts tr.totals td { background: var(--panel-2); font-size: 13px; border-bottom: 1px solid var(--line); }
table.accounts tr.totals b { color: var(--gold); }

/* Settings: the Save button breathes while there are unsaved changes. */
#save-btn.pulse { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 60%, transparent); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Start / stop next to the sale badge in the header: same look as the row action buttons. */
#engine-ctl button.act { padding: 4px 7px; font-size: 13px; line-height: 1; }
#engine-ctl button.act.login { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
#engine-ctl button.act.del { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }

/* The edit row spans every column: its wide form must not reshape the columns when it opens. `contain`
   keeps the form's content out of the table's width calculation (the form wraps inside the row instead). */
table.accounts tr.edit td > form { contain: inline-size; display: flex; flex-wrap: wrap; }
/* …and inside it the fields share the full width in one line; the hint text drops to a line of its own. */
table.accounts tr.edit td > form { gap: 8px 12px; align-items: flex-end; }
table.accounts tr.edit td > form > label { flex: 1 1 120px; min-width: 0; }
table.accounts tr.edit td > form > label > input, table.accounts tr.edit td > form > label > select,
table.accounts tr.edit td > form > label > .row { width: 100%; box-sizing: border-box; }
table.accounts tr.edit td > form > label.group-pick .group-select { flex: 1 1 auto; min-width: 0; }
table.accounts tr.edit td > form > span.muted { flex-basis: 100%; }

/* An expired EA session is routine (they last ~80 min): a calm yellow "перезаход", not a red alarm. */
.s-relogin { color: var(--warn); }
.s-new { color: #6ea8ff; }  /* imported, never signed in yet */

/* Key folders fold like drawers: the summary is the folder's title line. */
details.folder > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.folder > summary h2 { display: inline; margin: 0; text-align: left; }
details.folder > summary .fold-hint { margin-left: auto; }
details.folder > summary .fold-hint::after { content: "развернуть"; font-size: .85em; }
details.folder[open] > summary .fold-hint::after { content: "свернуть"; }
details.folder:not([open]) { padding-top: 12px; padding-bottom: 12px; }
button.act.gold { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
button.act.gold:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); }
details.folder > summary .fold-acts { margin-left: 12px; }

/* Accounts: rows sit in blocks by group under a header row that folds the block. */
/* Same side padding as the account rows: the group row must not widen any column (the table fits 1150 px). */
table.accounts tr.ghead td { background: var(--panel-2); text-align: left; padding: 8px 5px; cursor: pointer; border-top: 1px solid var(--line); }
table.accounts tr.ghead td:first-child { padding-left: 12px; }
table.accounts tr.ghead td.gh-on { white-space: normal; line-height: 1.25; font-size: .85em; max-width: 72px; }
/* Long status words («вход не удался», «в очереди») wrap inside the badge instead of widening the column. */
table.accounts td[data-live$=".status"] .badge { white-space: normal; line-height: 1.2; max-width: 82px; }
table.accounts tr.ghead td.num { text-align: right; }
table.accounts tr.ghead .gh-arrow::before { content: "▾ "; color: var(--muted); }
table.accounts tr.ghead.folded .gh-arrow::before { content: "▸ "; }
table.accounts tr.ghead .gh-hint { float: right; font-size: .85em; }
table.accounts tr.ghead .gh-hint::after { content: "свернуть"; }
table.accounts tr.ghead.folded .gh-hint::after { content: "развернуть"; }
/* The group header stays to unfold it. collapse (not display:none) keeps the folded rows in the column widths,
   so the columns don't jump when a group folds or unfolds. */
table.accounts tr.folded:not(.ghead) { visibility: collapse; }
/* Compact selects (tables, action bar) set their own padding: keep room for the ▾ arrow. */
table select:not([multiple]), .bulk select { padding-right: 24px !important; background-position: right 9px center; }
.bulk select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0h8L4 5z' fill='%239b9b98'/%3E%3C/svg%3E");
  background-repeat: no-repeat; }
/* TOTP generator in the header (and «🔢 код» in an account's edit form). */
.totp-pop { position: relative; }
.totp-pop > summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px;
  font-weight: 600; line-height: 1.4; }
.totp-pop > summary::-webkit-details-marker { display: none; }
.totp-pop > summary:hover, .totp-pop[open] > summary { border-color: var(--gold); }
.totp-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.totp-panel .totp-out { margin-top: 10px; min-height: 1.4em; }
.totp-panel button { white-space: nowrap; }
.totp-code { color: var(--gold); font-size: 1.6em; letter-spacing: .06em; font-variant-numeric: tabular-nums; cursor: pointer; }
.totp-out .totp-code { font-size: 1.25em; }
.totp-panel .totp-out .totp-code { font-size: 1.6em; }
/* TOTP-ключ field: room for the field plus the 🔢/🔐 icons on one line; the code shows on the full-width line below. */
table.accounts tr.edit td > form > label.totp-field { flex: 1 1 260px; }
table.accounts tr.edit td > form > label.totp-field > .row { width: 100%; }
table.accounts tr.edit td > form > label.totp-field input { flex: 1 1 auto; min-width: 0; }
table.accounts tr.edit td > form > span.totp-out:empty { display: none; }

/* --- drop a file anywhere on an import page: a full-screen hint (base.js) --- */
.drop-hi-page::after { content: "Отпустите файл — откроется предпросмотр"; position: fixed; inset: 10px; z-index: 9999;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; color: var(--gold);
  border: 3px dashed var(--gold); border-radius: 16px; background: color-mix(in srgb, var(--gold) 10%, var(--bg) 85%);
  pointer-events: none; }

/* --- commission tiers table in Settings --- */
.tier-table { border-collapse: separate; border-spacing: 0 6px; margin: 6px 0 4px; width: 440px; max-width: 100%; table-layout: fixed; }
.tier-table th { text-align: right; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 0 0 2px 10px; line-height: 1.25; vertical-align: bottom; }
.tier-table th:first-child, .tier-table td:first-child { padding-left: 0; }
.tier-table td { padding: 0 0 0 10px; }
.tier-table input { width: 100%; box-sizing: border-box; text-align: right; }

/* --- referral code chip on the balance page --- */
.ref-code { cursor: pointer; font-family: ui-monospace, "Cascadia Mono", monospace; letter-spacing: 1px;
  color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); border-radius: 6px;
  padding: 1px 8px; user-select: all; }
.ref-code:hover { background: color-mix(in srgb, var(--gold) 14%, transparent); }
/* the invite link (/join/<code>) as a copy-to-clipboard chip, next to the code */
.ref-link { cursor: pointer; color: var(--gold); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.ref-link:hover { background: color-mix(in srgb, var(--gold) 14%, var(--panel-2)); }
.ref-url { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 12px; word-break: break-all; }

/* --- /join/<code>: the honeypot field — off screen for people, filled by bots (app/web/client_routes.py) --- */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* ===== 25.10 redesign: side menu instead of the top bar ===== */
:root { --hdr-h: 0px; --side: color-mix(in srgb, var(--panel) 45%, var(--bg)); }
.shell { display: flex; min-height: 100vh; align-items: stretch; }
.side { position: sticky; top: 0; height: 100vh; width: 236px; flex: none; box-sizing: border-box; display: flex;
  flex-direction: column; gap: 22px; padding: 22px 14px 18px; border-right: 1px solid var(--line); background: var(--side);
  overflow-y: auto; z-index: 20; }
.side .brand { padding: 6px 8px; margin: -6px 0; }
.side .brand img { height: 32px; }
.side nav.menu { flex: none; flex-direction: column; gap: 2px; overflow: visible; margin-left: 0; justify-content: flex-start; }
.side nav.menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.side nav.menu a .ic { flex: none; }
.side nav.menu a.on { background: var(--panel-2); color: var(--text); box-shadow: none; }  /* same weight as the others: a bolder active item grew by ~1.4px and nudged its neighbours on the narrow top bar (3.11) */
.side nav.menu a.on .ic { color: var(--gold); }
.side nav.menu a b { margin-left: auto; }
/* «Продать монеты» (24.11, /sell): the newcomers' simple page — gold, first in a client's menu */
.side nav.menu a.nav-sell, .side nav.menu a.nav-sell .ic { color: var(--gold); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.rate-card { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--text); font-weight: 800;
  font-variant-numeric: tabular-nums; cursor: pointer; }
.rate-card:hover { background: var(--panel); border-color: var(--gold); }
.rc-head { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.rc-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.rc-row .rb-grp { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; }
.rc-row .plat { gap: 0; }
.rc-row .plat svg { width: 14px; height: 14px; }
.rc-sub { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 4px; white-space: nowrap; }
.side-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sw-ava { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--gold); font-weight: 800; font-size: 14px; }
.sw-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sw-txt b { color: var(--text); font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-txt small { color: var(--muted); font-size: 11px; }
.engine-ctl:empty, .engine-ctl[hidden] { display: none; }
.engine-ctl form, .engine-ctl button { width: 100%; justify-content: center; }
.side-tools { display: flex; gap: 8px; align-items: center; }
/* In the sidebar the 2FA box opens to the right of it, over the page (fixed: it never widens the sidebar or adds a
   scrollbar, never covers the rate card). */
.side-tools .totp-panel { position: fixed; left: 248px; right: auto; top: auto; bottom: 16px; width: 300px; max-width: calc(100vw - 264px); box-sizing: border-box; }
.side-tools .totp-panel .totp-form { flex-wrap: wrap !important; }
.side-tools .totp-panel .totp-form input { flex: 1 1 140px; min-width: 0; }
.side-tools .totp-pop > summary:focus { outline: none; }
.side-tools .totp-pop > summary:focus-visible { outline: 2px solid var(--line); outline-offset: 2px; }
.side-tools .totp-pop[open] > summary { border-color: var(--line); background: var(--panel-2); }
.side .brand { border-radius: 10px; }
.side .brand.on { background: var(--panel-2); }
.side-tools #theme-btn { display: flex; align-items: center; justify-content: center; padding: 8px 10px; }
.side-logout { flex: 1; }
.side-logout button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; }
.shell > main { flex: 1; min-width: 0; max-width: 1480px; margin: 0; padding: 28px 36px 48px; }
h1 { font-size: 28px; font-weight: 800; }
.card { border-radius: 16px; }
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { height: auto; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px;
    border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .side nav.menu { order: 3; flex-basis: 100%; flex-direction: row; overflow-x: auto; }
  .side nav.menu a { padding: 8px 10px; white-space: nowrap; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .rate-card { display: none; }
  .sw-txt small { display: none; }
  .engine-ctl form, .engine-ctl button { width: auto; }
  .side-tools .totp-pop { position: static; }  /* QA 14.11: on a phone the panel hangs from the whole top bar, not from the little button (it went half off the left edge) */
  .side-tools .totp-panel { position: absolute; left: 16px; right: 16px; width: auto; bottom: auto; top: calc(100% + 8px); max-width: none; box-sizing: border-box; }
  .shell > main { padding: 16px 16px 40px; }
}

/* ===== dashboard: sale state + «требует внимания», four numbers of the day ===== */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
.hero .card { margin: 0; padding: 22px 24px; overflow: visible; }
.hs-title { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.hs-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); flex: none; }
.hs-dot.on { background: var(--good); box-shadow: 0 0 0 6px color-mix(in srgb, var(--good) 18%, transparent); }
.hs-pool { margin-top: 4px; }  /* «Пул прокси: свободно N из M» under the accounts line (admin, 26.10) */
.hs-bar { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin: 14px 0 16px; }
.hs-bar i { display: block; height: 100%; background: var(--good); border-radius: 999px; }
.hero-state button.ghost { padding: 10px 18px; font-weight: 700; }
.btn-link { font-weight: 700; }
.hero-todo h2 { font-size: 16px; margin: 0 0 6px; }
.todo { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.todo-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.todo-dot.bad { background: var(--bad); } .todo-dot.warn { background: var(--warn); }
.todo-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.todo-txt small { color: var(--muted); font-size: 13px; }
.todo-act { flex: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-weight: 700; font-size: 13px; }
.todo-act:hover { border-color: var(--gold); color: var(--text); }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpis .stat { padding: 18px 20px; border-radius: 16px; }
.kpis .stat > span { font-size: 13px; }
.kpis .stat b { font-size: 30px; }
.kpis .stat small { color: var(--muted); font-size: 13px; }
.kpis .stat small span { color: inherit; font-size: inherit; font-weight: 700; }
.dash-grid { gap: 16px; }
.dash-grid .card { padding: 20px 22px; }
.demo-banner { border-radius: 10px; margin: -12px 0 18px; padding: 6px 14px; font-size: 13px; }

/* ===== dashboard lists (purchases, problems): one line per item, no wide tables ===== */
.chart-card { margin-bottom: 16px; }
.bar-col .bar { background: color-mix(in srgb, var(--gold) 45%, var(--panel-2)); }
.bar-col.today .bar { background: linear-gradient(180deg, var(--gold), var(--gold-2)); }
.dlist { display: flex; flex-direction: column; }
.dl-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.dl-row:first-child { border-top: 0; }
.dl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dl-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-main small, .dl-side small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-side { flex: none; text-align: right; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.dl-side .good { color: var(--good); font-weight: 700; }
.dl-wrap { white-space: normal; line-height: 1.4; }
.dl-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dl-dot.bad { background: var(--bad); } .dl-dot.warn { background: var(--warn); }
.dl-time { flex: none; }
.dl-empty { margin: 6px 0; }
/* the 14-day chart: the hovered day lights up and shows its date and sum over the bar (in the header's currency) */
.bar-col { position: relative; cursor: default; }
.bar-col .bar { position: relative; transition: background .12s, filter .12s; }
.bar-col:hover .bar { background: linear-gradient(180deg, var(--gold), var(--gold-2)); filter: brightness(1.15); }
.bar-v { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); display: none; z-index: 5;
  padding: 4px 8px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.25);
  color: var(--text); font-size: 12.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-v small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; margin: 0; }
.bar-col:hover .bar-v { display: block; }

/* ===== dashboard without half-empty cards (user 26.10: «везде такие пустоты надо убрать») =====
   The two hero cards share a row: whichever is lower centres its content instead of leaving the bottom empty. The four
   tiles keep the caption and the number on top and push the footnote(s) to the bottom edge, so every tile of the row
   ends on the same line whatever its footnote's length. */
/* the two hero cards keep their titles on one line (top-aligned); the shorter one's body takes the rest of the height
   instead of floating in the middle (review 26.10) */
.hero .card { display: flex; flex-direction: column; justify-content: flex-start; }
.hero-todo .todo { flex: 1 1 auto; }
/* the chart's hover badge may stand above the card's top edge; the two rightmost ones hug the column's right edge so they
   never cover «всего …» in the head line */
.chart-card { overflow: visible; }
.bars .bar-col:nth-last-child(-n+2) .bar-v { left: auto; right: 0; transform: none; }
.kpis .stat { display: flex; flex-direction: column; }
.kpis .stat > b + small { margin-top: auto; padding-top: 6px; }
/* «Последние покупки» sets the row's height; «Проблемы за сутки» (wrapped lines, often the longer list) fills that height
   and scrolls inside instead of stretching the row and leaving the purchases card half empty */
.dash-lists > .card:last-child { display: flex; flex-direction: column; }
.dash-lists > .card:last-child > [data-live] { flex: 1 1 0; min-height: 260px; overflow-y: auto; contain: size; }
@media (max-width: 1000px) { .dash-lists > .card:last-child > [data-live] { contain: none; max-height: 420px; } }
/* 9.11: in one column nothing stands beside it — an empty list («За сутки проблем не было») no longer keeps those 260 px, which
   on a phone was a tall empty box under one line; the line with its tick, and the card ends */
@media (max-width: 1000px) { .dash-lists > .card:last-child > [data-live]:has(.dl-ok) { flex: none; min-height: 0; } }
/* «Всё в порядке»: a green tick before the title, so the calm card doesn't read as an empty box */
.hero-todo.ok h2 { display: flex; align-items: center; gap: 10px; }
.hero-todo.ok h2::before { content: "✓"; flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-size: 14px; font-weight: 800; color: var(--good); background: color-mix(in srgb, var(--good) 16%, transparent); }
.hero-todo.ok p { padding-left: 36px; }
/* a tall bar (≥ 55 %) shows its badge inside its own top: above it the badge would sit in the head line over «всего …» */
.bar-col.tall .bar-v { bottom: auto; top: 6px; }
/* sidebar foot, two strips (user 26.10): 🔢 + theme; then the user on the left and «Выйти» on the right, the last line */
.side-user { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.side-user .side-who { flex: 1 1 auto; min-width: 0; }
.side-user .side-logout { flex: none; }
.side-user .side-logout button { width: auto; padding: 8px 12px; }
.side-tools .ghost.icon.side-cm[aria-pressed="true"] { color: var(--gold); }  /* «монеты ↔ деньги» on: the icon gold */
.stat span[data-coins] { color: inherit; font-size: inherit; font-weight: inherit; }  /* a tile's number, not its small grey label (.stat span) */
html.coins-money .cm-unit { display: none; }  /* «продано $12.30», not «$12.30 монет» */
.side-tools .ghost.icon, .side-tools .totp-pop > summary { flex: 1 1 0; display: inline-flex; justify-content: center; }
@media (max-width: 900px) { .side-user { gap: 8px; } .side-tools .ghost.icon, .side-tools .totp-pop > summary { flex: none; } }
/* 🔢 and the theme button are the same box (user 26.10): equal width, height, radius */
.side-tools .ghost.icon, .side-tools .totp-pop > summary, .side-tools #theme-btn { box-sizing: border-box; height: 38px; padding: 0 10px;
  margin: 0; border: 1px solid var(--line); border-radius: 10px; align-items: center; font-size: 15px; line-height: 1; }
.side-tools .totp-pop { flex: 1 1 0; display: flex; }
.side-tools .totp-pop > summary { width: 100%; }
/* ===== sidebar middle (26.10): «Сегодня» and the three all-accounts buttons (base.html, `side` in the context) =====
   The same box as the rate card below it: panel, line border, radius 12, 10–12 px padding, a 12 px muted head. */
.side-mid { display: flex; flex-direction: column; gap: 8px; }
.today-card { display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px 11px; line-height: 1.3; font-variant-numeric: tabular-nums; cursor: default; }
.today-card .rc-head { margin-bottom: 3px; }
.td-row { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; font-size: 12px; color: var(--muted);
  font-weight: 600; min-width: 0; }  /* gap 4: «125,3 млн монет» still whole next to «продано» */
.td-row > b { font-size: 15px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-row > b small { font-size: 11px; font-weight: 600; color: var(--muted); }
.td-fee { margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.td-fee b { color: var(--text); font-weight: 800; }
/* the thin gold bar to the next tier; its width comes from side.progress (first render) and the live cell (base.js) */
.td-bar { display: block; height: 4px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin: 4px 0 3px; }
.td-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-2), var(--gold)); border-radius: 999px; transition: width .4s; }
.td-next { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .side-mid { display: none; } }
.side-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }  /* two equal cells: 🔢 and the theme button */
.side-tools .totp-pop { display: block; min-width: 0; }
.side-tools .totp-pop > summary, .side-tools #theme-btn { width: 100%; display: inline-flex; justify-content: center; }
.side-tools:has(#coins-money) { grid-template-columns: 1fr 1fr 1fr; }  /* + «монеты ↔ деньги» (11.11): three equal cells */
.side-tools #coins-money { width: 100%; }
@media (max-width: 900px) { .side-tools:has(#coins-money) { gap: 6px; } }  /* a phone's top strip: «администратор» stays whole at 375 px */
/* «Сегодня»: two parts (user 26.10) — the day (sold, earned: the $ bright) above a thin rule, the fee and the road to the
   next tier below; every percent gold */
.today-card .td-fee { margin-top: 6px; padding-top: 7px; border-top: 1px solid var(--line); }
.today-card .td-fee b, .today-card .td-next b.td-pct { color: var(--gold); font-weight: 800; }
.td-row > b[data-live="side.earned"] { color: var(--text); font-weight: 800; }

/* --- nothing jumps while filtering (user 26.10) ---
   «найдено N из M» lives inside the search field, at its right end: it comes and goes without touching the filters
   beside it. «сбросить» keeps its place while there is nothing to reset (visibility, not display). The wrapper gets its
   own flex size from the page (accounts.css, keys.css); the field fills it. */
.srch { position: relative; display: flex; flex: 1 1 190px; min-width: 150px; }
.srch > input[type="search"] { flex: 1 1 auto; width: 100%; min-width: 0; max-width: none; }
.srch > .srch-hint { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); margin: 0; font-size: 12.5px;
  white-space: nowrap; pointer-events: none; }
.srch > .srch-hint[hidden] { display: none; }
.srch:has(> .srch-hint:not([hidden])) > input[type="search"] { padding-right: 124px; }
/* The field without focus (user 8.11, «найдено 1 из 146» over the text at 113 px): the text is cut with «…», the counter
   shrinks with the field — below 300 px of field only «N из M», below 200 px smaller and tighter; the padding follows,
   so the text, Chrome's ✕ and the counter never overlap. The wrapper is a size container for that. */
.srch { container-type: inline-size; }
.srch > input[type="search"]:not(:focus) { text-overflow: ellipsis; }
@container (max-width: 300px) {
  .srch > .srch-hint .sh-w { display: none; }
  .srch:has(> .srch-hint:not([hidden])) > input[type="search"] { padding-right: 76px; }
}
@container (max-width: 200px) {
  .srch > .srch-hint { right: 9px; font-size: 11px; }
  .srch:has(> .srch-hint:not([hidden])) > input[type="search"] { padding-left: 10px; padding-right: 52px; }
}
a.rst.idle { visibility: hidden; pointer-events: none; }

/* ===== the user menu in the sidebar foot (user 26.10): a click on the initial + login opens a small list UP over the page ===== */
.side-user { position: relative; }
.side-um { flex: 1 1 auto; min-width: 0; }
.side-um > summary { list-style: none; cursor: pointer; border-radius: 10px; padding: 4px 8px 4px 4px; margin: -4px 0 -4px -4px;
  transition: background .12s; }
.side-um > summary::-webkit-details-marker { display: none; }
.side-um > summary:hover, .side-um[open] > summary { background: var(--panel-2); }
.side-um > summary:focus { outline: none; }
.side-um > summary:focus-visible { outline: 2px solid var(--line); outline-offset: 1px; }
.side-um > summary .sw-txt { flex: 1 1 auto; }
.side-um > summary::after { content: ""; flex: none; width: 6px; height: 6px; margin-left: auto; margin-right: 2px;
  border-right: 1.6px solid var(--muted); border-top: 1.6px solid var(--muted); transform: translateY(1px) rotate(-45deg);
  transition: transform .15s; }
.side-um[open] > summary::after { transform: translateY(-1px) rotate(135deg); }
/* the list: over the block, the sidebar's width (absolute inside .side-user, which sits inside the sidebar: nothing is clipped) */
.side-um-list { position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); z-index: 70; display: flex; flex-direction: column; gap: 2px;
  padding: 6px; box-sizing: border-box; text-align: left; background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.45); font-size: 13.5px; }
.side-um-list .mi { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; box-sizing: border-box; padding: 9px 10px;
  border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-weight: 600; text-align: left;
  text-decoration: none; cursor: pointer; line-height: 1.3; white-space: nowrap; }
.side-um-list .mi .ic { flex: none; color: var(--muted); }
.side-um-list .mi:hover, .side-um-list .mi:focus-visible { background: var(--panel-2); outline: none; }
.side-um-list .mi:hover .ic { color: var(--gold); }
.side-um-list form { margin: 0; }
.side-um-list .mi-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.side-um-note { padding: 6px 10px 4px; font-size: 12px; line-height: 1.35; color: var(--muted); }
@media (max-width: 900px) {  /* the sidebar is a top bar here: the list opens DOWN, from the right edge */
  .side-user { position: static; }
  .side-um { position: relative; }
  .side-um-list { left: auto; right: 0; top: calc(100% + 10px); bottom: auto; min-width: 240px; }
}

/* ===== «Сменить пароль» on /security ===== */
.sec-card { scroll-margin-top: 24px; }
.sec-card:target { border-color: var(--gold); }
.sec-pass { display: grid; gap: 14px; max-width: 360px; margin: 0; }
.sec-pass label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sec-pass input { width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 15px; color: var(--text); }
.sec-pass-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 2px; }
.sec-pass-foot button { padding: 10px 18px; }
.sec-pass-foot .muted { font-size: 13px; }

/* ===== audit 26.10 (sidebar foot, /security): equal heights, nothing wider than its box ===== */
/* «Выйти» next to the user menu is an icon square like 🔢 and the theme button (38×38): the login and the role get the whole
   width left (a text button of a fixed width cut «demo-owner» to «demo-o…» and let «администратор» run under it) */
.side-user .side-logout { flex: none; }
.side-user .side-logout button { box-sizing: border-box; width: 38px; height: 38px; padding: 0; margin: 0; display: flex; align-items: center;
  justify-content: center; border: 1px solid var(--line); border-radius: 10px; }
.side-user .side-logout button:hover { border-color: var(--muted); background: var(--panel-2); }
/* the Telegram bot link (15.11): the same 38×38 square as «Выйти», right before it */
.side-user .side-tg { flex: none; box-sizing: border-box; width: 38px; height: 38px; display: flex; align-items: center;
  justify-content: center; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; }
.side-user .side-tg:hover { border-color: var(--muted); background: var(--panel-2); }
.side-user .side-tg + .side-logout { margin-left: -4px; }  /* the two squares 6 px apart, the login keeps 10 */
.side-um > summary .sw-txt b, .side-um > summary .sw-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-um > summary { gap: 8px; }
/* the 🔢 box: the field and the button are one height */
.totp-panel .totp-form input, .totp-panel .totp-form button { box-sizing: border-box; height: 38px; margin: 0; }
/* /security: a field and the button next to it are one height; the 2FA key is one plaque that wraps inside itself */
.sec-card .sec-code { align-items: stretch; }
.sec-card .sec-code input, .sec-card .sec-code button, .sec-pass input, .sec-pass-foot button { box-sizing: border-box; height: 44px; margin: 0; }
.sec-card .sec-code button { display: inline-flex; align-items: center; justify-content: center; }
.sec-step code { display: inline-block; max-width: 100%; box-sizing: border-box; padding: 4px 8px; margin-top: 2px; word-break: break-all; user-select: all; }

/* ===== audit 26.10 (dashboard) ===== */
/* «Проблемы за сутки» scrolls inside its card: its bottom edge fades out, so a row cut by the edge reads as «the list goes on»,
   and the fade goes away once the list is scrolled to its end (scroll-driven animation of --dl-fade over the last 40 px of
   scrolling; a list that fits has no scroll timeline, so no fade; a browser without scroll timelines shows no fade at all) */
@property --dl-fade { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes dl-fade-off { from { --dl-fade: 40px; } to { --dl-fade: 0px; } }
@supports (animation-timeline: scroll()) {
  .dash-lists > .card:last-child > [data-live] {
    -webkit-mask-image: linear-gradient(#000 calc(100% - var(--dl-fade)), transparent);
    mask-image: linear-gradient(#000 calc(100% - var(--dl-fade)), transparent);
    animation: dl-fade-off linear both; animation-timeline: scroll(self block); animation-range: calc(100% - 40px) 100%;
  }
}
/* no problems: the calm message sits in the middle of the card (it is as tall as «Последние покупки» next to it), a green tick over it */
.dash-lists > .card:last-child > [data-live] .dlist:has(> .dl-ok) { min-height: 100%; justify-content: center; align-items: center; }
.dl-empty.dl-ok { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0; text-align: center; }
.dl-empty.dl-ok::before { content: "✓"; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-size: 17px; font-weight: 800; color: var(--good); background: color-mix(in srgb, var(--good) 16%, transparent); }
/* «Всё в порядке»: the card is as tall as «Продажа …» next to it, so it is one composition — a large tick on the left, the
   title and the line on the right, all in the middle of the height — instead of a title and a line at the top of an empty box */
.hero-todo.ok { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 16px; align-content: center; align-items: center; }
.hero-todo.ok::before { content: "✓"; grid-column: 1; grid-row: 1 / span 2; width: 46px; height: 46px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: var(--good);
  background: color-mix(in srgb, var(--good) 16%, transparent); }
.hero-todo.ok h2 { grid-column: 2; grid-row: 1; display: block; margin: 0 0 4px; }
.hero-todo.ok h2::before { content: none; }
.hero-todo.ok p { grid-column: 2; grid-row: 2; padding-left: 0; }
/* light theme: the gold links on a white card were pale (#e9b200 on #fff ≈ 1.9:1) — a darker gold, ≈ 5:1 */
:root[data-theme="light"] .dash-lists .page-head a, :root[data-theme="light"] .hero .btn-link { color: color-mix(in srgb, var(--gold-2) 68%, #000); }
:root[data-theme="light"] .dash-lists .page-head a:hover, :root[data-theme="light"] .hero .btn-link:hover { color: var(--text); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .dash-lists .page-head a, :root:not([data-theme="dark"]) .hero .btn-link { color: color-mix(in srgb, var(--gold-2) 68%, #000); }
  :root:not([data-theme="dark"]) .dash-lists .page-head a:hover, :root:not([data-theme="dark"]) .hero .btn-link:hover { color: var(--text); }
}

/* A file field with a Russian caption (accounts / keys / proxies import): the real input lies transparent over a
   «Выбрать файл» button, the chosen name shows beside it (base.js) */
.fpick { position: relative; display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin: 0; cursor: pointer; }
.fpick input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; font-size: 0; }
.fpick input[type="file"]::file-selector-button { cursor: pointer; }
.fpick .fp-btn { display: inline-flex; align-items: center; box-sizing: border-box; height: 38px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap; }
.fpick:hover .fp-btn { border-color: var(--muted); }
.fpick:has(input:focus-visible) .fp-btn { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
.fpick .fp-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.fpick.has-file .fp-name { color: var(--text); }
/* «Сменить пароль»: «Сгенерировать» beside the new password, an eye for all three, the hidden username for the browser */
.sec-pass { max-width: 460px; }
.sec-pass .pw-box { display: flex; gap: 8px; align-items: stretch; }
.sec-pass .pw-box input { flex: 1 1 auto; min-width: 0; }
.sec-pass .pw-gen, .sec-pass .pw-eye { box-sizing: border-box; height: 44px; margin: 0; padding: 0 14px; white-space: nowrap; font-size: 13px; }
.sec-pass .pw-eye[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.vh { position: absolute !important; width: 1px !important; height: 1px !important; min-width: 0 !important; padding: 0 !important; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0 !important; }  /* !important: a form's own input width (100%) made the hidden login on /security stick out — sideways scroll (28.10) */
.pw-done { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; font-size: 14px; }
.pw-done[hidden] { display: none; }
.pw-done .pw-again { height: 36px; padding: 0 12px; font-size: 13px; }

/* --- a pasted list in the search (list_search.js, 27.10): «Список: найдено N из M · не найдено: …» right under the search
   row of «Аккаунты», «Прокси», «API-ключи»; shown only while the search holds a list --- */
.ls-note { margin: 8px 0 0; padding: 7px 12px; border: 1px dashed color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: 10px;
  font-size: 13px; line-height: 1.45; color: var(--muted); word-break: break-word; }
.ls-note[hidden] { display: none; }
.ls-note b { color: var(--text); }
.ls-note .ls-miss { color: var(--ink-warn, var(--warn)); }
.k-tools .ls-note { margin: 8px 0 10px; }  /* «Прокси», «API-ключи»: under the search row, above the bulk bar */
.ls-note { max-height: 4.5em; overflow-y: auto; }  /* a long «не найдено» scrolls in three lines, the table moves little */
.acc-card > .ls-note { margin: -4px 0 12px; }  /* «Аккаунты» (16.11): under the filter form (its 12 px margin), not in its flex line */
.ls-note { min-width: 0; overflow-wrap: anywhere; }  /* a pasted import line «email:пароль:коды» has no spaces: it wraps, never widens the card */

/* «Привяжите почту…» (base.html, 27.10): a quiet line over the page — the panel's own colours, no alarm. Laid out as the
   invite strip under it (28.10): the words and «Настройки →» as one group, the «×» on the right of the first line — on a
   phone too, where the link goes under the words */
.mail-nag { display: flex; align-items: flex-start; gap: 10px 14px; margin: 0 0 16px; padding: 7px 8px 7px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--muted); font-size: 13px; }
.mail-nag-off .mail-nag { display: none; }  /* put away by its «×» (theme.js decides in <head>) */
.mail-nag-b { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; min-height: 24px; }
.mail-nag-t { flex: 1 1 auto; min-width: 0; }
.mail-nag a { margin-left: auto; color: var(--gold); font-weight: 700; white-space: nowrap; }
@media (max-width: 600px) { .mail-nag a { margin-left: 0; } }
.mail-nag-x { flex: none; padding: 0 8px; min-height: 0; height: 24px; line-height: 22px; font-size: 18px; background: none;
  border: 0; color: var(--muted); cursor: pointer; }
.mail-nag-x:hover { color: var(--text); background: none; }
/* light theme: plain gold on panel-2 is ≈ 1.7:1 — the darker gold the dashboard links use (≈ 4.6:1) */
:root[data-theme="light"] .mail-nag a { color: color-mix(in srgb, var(--gold-2) 68%, #000); }
:root[data-theme="light"] .mail-nag a:hover { color: var(--text); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .mail-nag a { color: color-mix(in srgb, var(--gold-2) 68%, #000); }
  :root:not([data-theme="dark"]) .mail-nag a:hover { color: var(--text); }
}
/* «Пригласите друга…» (base.html, 28.10): the mail strip's quiet look, under it when both show. The words, then the link chip
   with «Подробнее» as one group on the right (under «Настройки →» of the mail strip); when the line is short the group goes
   under the words, on a phone the link under the chip. A link longer than the line is cut with «…»; the «×» stays on the
   right of the first line */
.ref-strip { display: flex; align-items: flex-start; gap: 10px 14px; margin: 0 0 16px; padding: 7px 8px 7px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--muted); font-size: 13px; }
.ref-strip-off .ref-strip { display: none; }  /* put away by its «×» (theme.js decides in <head>) */
.ref-strip-b { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; min-height: 24px; }
.ref-strip-t { flex: 1 1 auto; min-width: 0; }
.ref-strip-acts { display: flex; align-items: center; gap: 6px 14px; min-width: 0; max-width: 100%; margin-left: auto; }
.ref-strip-link { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 11px;
  font-size: 12.5px; line-height: 18px; }
.ref-strip-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.ref-strip a { flex: none; color: var(--gold); font-weight: 700; white-space: nowrap; }
.ref-strip-x { flex: none; padding: 0 8px; min-height: 0; height: 24px; line-height: 22px; font-size: 18px; background: none;
  border: 0; color: var(--muted); cursor: pointer; }
.ref-strip-x:hover { color: var(--text); background: none; }
.ref-strip-link.copied { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); text-align: center; }
@media (max-width: 600px) { .ref-strip-acts { margin-left: 0; flex-wrap: wrap; } }
/* light theme: the gold links and the link chip (here and on «Баланс») in the darker gold, as the mail strip's (≈ 4.6:1);
   the chip's hover tint lighter, so the text stays ≥ 4.5:1 on it */
:root[data-theme="light"] .ref-strip a, :root[data-theme="light"] .ref-link { color: color-mix(in srgb, var(--gold-2) 68%, #000); }
:root[data-theme="light"] .ref-strip a:hover { color: var(--text); }
:root[data-theme="light"] .ref-link:hover { background: color-mix(in srgb, var(--gold) 5%, var(--panel-2)); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .ref-strip a, :root:not([data-theme="dark"]) .ref-link { color: color-mix(in srgb, var(--gold-2) 68%, #000); }
  :root:not([data-theme="dark"]) .ref-strip a:hover { color: var(--text); }
  :root:not([data-theme="dark"]) .ref-link:hover { background: color-mix(in srgb, var(--gold) 5%, var(--panel-2)); }
}
/* 28.10 (user): over a page whose column is narrower than the window («Настройки» 940 px, «Безопасность» 820 px, «Справка»
   1128 px) the strips over the page stop at the column's right edge, their link and «×» on it, not out in the empty space:
   the page names its column on <main> (block main_attrs) and its CSS gives the width as --col-w */
.mail-nag, .ref-strip, main > .sale-stop, main > .demo-banner, main > #sale-alert, main > .svc-banner { max-width: var(--col-w, none); }
/* the strips' links land on a card under the phone's sticky menu bar, not behind it (--side-top: base.js; 112 px until it
   has measured) */
#ref, #mail-card { scroll-margin-top: 16px; }
@media (max-width: 900px) { #ref, #mail-card { scroll-margin-top: calc(var(--side-top, 112px) + 16px); } }
/* The panel in English (28.10, app/i18n): the words drawn by CSS above */
:root[lang="en"] details.card[open] > summary .add-btn::after { content: " — collapse"; }
:root[lang="en"] details.folder > summary .fold-hint::after { content: "expand"; }
:root[lang="en"] details.folder[open] > summary .fold-hint::after { content: "collapse"; }
:root[lang="en"] table.accounts tr.ghead .gh-hint::after { content: "collapse"; }
:root[lang="en"] table.accounts tr.ghead.folded .gh-hint::after { content: "expand"; }
:root[lang="en"] .drop-hi-page::after { content: "Drop the file — the preview opens"; }

/* Dragging rows into folders (base.js, 28.10): the rows taken go pale, every folder they may go to gets a thin gold
   dashed frame, the one under the pointer a solid frame and a gold tint; a chip with the name (or «3 ключа») follows
   the pointer. With no «Без папки» block on the page, a bar for it waits at the bottom. */
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; }
.drag-src { opacity: .4; }
.drag-gone { display: none; }
.folder.drop-can { outline: 1px dashed color-mix(in srgb, var(--gold) 55%, transparent); outline-offset: 3px; }
.folder.drop-on { outline: 2px solid var(--gold); outline-offset: 3px; background: color-mix(in srgb, var(--gold) 8%, var(--panel)); }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; display: flex; flex-direction: column;
  gap: 2px; max-width: 300px; padding: 7px 12px; border: 1px solid var(--gold); border-radius: 10px; background: var(--panel);
  color: var(--text); box-shadow: 0 10px 28px rgba(0, 0, 0, .35); font-size: 13px; line-height: 1.3; }
.drag-ghost b, .drag-ghost span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drag-ghost span { font-weight: 600; }
.drag-ghost span:empty { display: none; }
.drop-zone { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 999; display: flex; align-items: center;
  gap: 12px; max-width: calc(100vw - 32px); padding: 14px 24px; border: 2px dashed var(--gold); border-radius: 14px;
  background: var(--panel); color: var(--text); box-shadow: 0 10px 28px rgba(0, 0, 0, .35); font-size: 14px; }
.drop-zone span { color: var(--muted); }
.drop-zone.drop-on { border-style: solid; background: color-mix(in srgb, var(--gold) 14%, var(--panel)); }
/* folders a search hid come back for the drag: they are where the rows may go */
body.dragging [data-drop-url] [data-drop-folder][hidden] { display: block; }
body.dragging [data-drop-url] tr[data-drop-folder][hidden] { display: table-row; }  /* a group row of «Аккаунты» a filter hid: back as a row */
/* «Аккаунты» (28.10): a group row as the target — a faint gold tint on every group header the rows may go to, a stronger
   one on the one under the pointer; the frames around the whole group block are laid over the table (.drop-frame) */
table.accounts tr.ghead.drop-can > td { background-image: linear-gradient(color-mix(in srgb, var(--gold) 7%, transparent), color-mix(in srgb, var(--gold) 7%, transparent)); }
table.accounts tr.ghead.drop-on > td { background-image: linear-gradient(color-mix(in srgb, var(--gold) 18%, transparent), color-mix(in srgb, var(--gold) 18%, transparent)); }

/* ===== «Сегодня»: the sale (28.10, user's variant «D», the green outline). Under the day's numbers a state line that is
   always there, so the block keeps its height — green «● Продажа идёт» (the dot pulses), grey «○ Продажа остановлена»,
   yellow «● Ждёт пополнения баланса» (the sale is on but the balance is at its floor: a link to it) — and ONE sale button
   that flips like an account's: «▶ Продать на всех» while the viewer's sale is off, «⏸ Остановить все» while it runs,
   with «↻» for the balances beside it. .sale-on / .sale-wait on .side-mid (the server on load, then base.js). ===== */
.today-card .sa-state { display: flex; align-items: center; min-height: 16px; margin-top: 8px; padding-top: 9px;
  border-top: 1px solid var(--line); font-size: 11.5px; font-weight: 700; line-height: 1.2; }
.sa-st-on, .sa-st-off, .sa-st-wait { display: none; align-items: center; gap: 6px; }
.side-mid.sale-on:not(.sale-wait) .sa-st-on, .side-mid:not(.sale-on) .sa-st-off, .side-mid.sale-on.sale-wait .sa-st-wait { display: inline-flex; }
.sa-st-on { color: var(--good); }
.sa-st-off { color: var(--muted); }
/* .sale-never (15.11): never sold yet and the sale is off — grey «○ Продажа ещё не начата» stands in for «остановлена» */
.sa-st-never { display: none; align-items: center; gap: 6px; color: var(--muted); }
.side-mid.sale-never:not(.sale-on) .sa-st-off { display: none; }
.side-mid.sale-never:not(.sale-on) .sa-st-never { display: inline-flex; }
.sa-st-wait { color: var(--warn); text-decoration: none; }
.sa-st-wait:hover, .sa-st-wait:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.sa-live { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.sa-st-on .sa-live { animation: sa-pulse 1.6s ease-out infinite; }
@keyframes sa-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .sa-st-on .sa-live { animation: none; } }
.sa-off { width: 8px; height: 8px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
.today-card .side-acts { display: flex; gap: 6px; margin-top: 7px; }
.side-acts form { margin: 0; display: flex; min-width: 0; }
.side-acts .sa-go-f, .side-acts .sa-stop-f { flex: 1 1 auto; }
.side-mid.sale-on .sa-go-f, .side-mid:not(.sale-on) .sa-stop-f { display: none; }
.side-acts button { box-sizing: border-box; height: 36px; margin: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; font-family: inherit; cursor: pointer; }
.side-acts .sa-main { flex: 1 1 auto; min-width: 0; gap: 5px; padding: 0 6px; border: 0; font-size: 12px; font-weight: 800; white-space: nowrap; }
.side-acts .sa-main .ic { flex: none; }
/* a sidebar with its own scroll bar is 15 px narrower (220 px): there «Продать на всех» goes on two lines instead of «…» */
.side-acts .sa-main > span { overflow: hidden; white-space: normal; line-height: 1.25; text-align: center; }  /* 1.25: «у» of «всех» not clipped */
.side-acts .sa-go { background: color-mix(in srgb, var(--good) 10%, transparent); color: var(--good);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 60%, var(--line)); }
.side-acts .sa-go:hover:not(:disabled), .side-acts .sa-go:focus-visible { background: var(--good); color: #0e0e0f; box-shadow: none; }
.side-acts .sa-stop { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 55%, var(--line)); }
.side-acts .sa-stop:hover:not(:disabled), .side-acts .sa-stop:focus-visible { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.side-acts .sa-ico { width: 34px; flex: 0 0 34px; padding: 0; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.side-acts .sa-ico:hover:not(:disabled), .side-acts .sa-ico:focus-visible { color: var(--text); border-color: var(--muted); background: transparent; }
.side-acts button:disabled { opacity: .45; cursor: default; }
.side-acts button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* light theme: darker inks (plain --good / --warn / --bad on white are ≈ 3:1; the panel's 4.5:1 inks, accounts.css) */
:root[data-theme="light"] .sa-st-on, :root[data-theme="light"] .side-acts .sa-go:not(:hover):not(:focus-visible) { color: #0b6b34; }
:root[data-theme="light"] .sa-st-wait { color: #855300; }
:root[data-theme="light"] .side-acts .sa-stop { color: #b42222; }
:root[data-theme="light"] .sa-st-off, :root[data-theme="light"] .sa-st-never { color: #565652; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .sa-st-on, :root:not([data-theme="dark"]) .side-acts .sa-go:not(:hover):not(:focus-visible) { color: #0b6b34; }
  :root:not([data-theme="dark"]) .sa-st-wait { color: #855300; }
  :root:not([data-theme="dark"]) .side-acts .sa-stop { color: #b42222; }
  :root:not([data-theme="dark"]) .sa-st-off, :root:not([data-theme="dark"]) .sa-st-never { color: #565652; }
}
/* the frame over a group's whole block (base.js placeFrames: header + its rows), as a folder card's outline on «Ключи» /
   «Прокси»: dashed on every group the rows may go to, solid gold with a light tint on the one under the pointer */
.drop-frame { position: fixed; left: 0; top: 0; z-index: 998; pointer-events: none; box-sizing: border-box; border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--gold) 55%, transparent); }
.drop-frame.on { border: 2px solid var(--gold); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.drop-frame[hidden] { display: none; }

/* ===== bulk bar v2 (29.10, user: «сделай красивой полосу после галочек») — accounts, keys, proxies, clients =====
   One look: a chip «Отмечено: N ×» on the left, then groups by meaning (a thin line between them), the dangerous «Удалить» on
   its own at the right end. Every button one height with its icon (a mask in the text colour, data-ic="…"); the drop-downs are
   buttons with a ▾ (label.bb-sel around a select). A button that cannot work says why in its tooltip. Nothing is hidden in «⋯». */
:root {
  --ib-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.8v12.4a.8.8 0 0 0 1.2.7l9.9-6.2a.8.8 0 0 0 0-1.4L9.2 5.1a.8.8 0 0 0-1.2.7z'/%3E%3C/svg%3E");
  --ib-pause: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6.3' y='5' width='4' height='14' rx='1.3'/%3E%3Crect x='13.7' y='5' width='4' height='14' rx='1.3'/%3E%3C/svg%3E");
  --ib-refresh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.5 12a7.5 7.5 0 1 1-2.2-5.3'/%3E%3Cpath d='M19.8 4.2v4.6h-4.6'/%3E%3C/svg%3E");
  --ib-relist: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h12l-3-3'/%3E%3Cpath d='M20 16H8l3 3'/%3E%3C/svg%3E");
  --ib-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11'/%3E%3Cpath d='M7.5 11l4.5 4.5 4.5-4.5'/%3E%3Cpath d='M5 19.5h14'/%3E%3C/svg%3E");
  --ib-key: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='3.8'/%3E%3Cpath d='M10.8 12.2L20 3'/%3E%3Cpath d='M16.5 6.5l2.5 2.5'/%3E%3C/svg%3E");
  --ib-folder: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M3.5 7.5a2 2 0 0 1 2-2h4l2 2.5h7a2 2 0 0 1 2 2v7.5a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
  --ib-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E%3Cpath d='M5 15V6a2 2 0 0 1 2-2h8'/%3E%3C/svg%3E");
  --ib-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18'/%3E%3Cpath d='M12 3c2.6 2.6 3.9 5.6 3.9 9s-1.3 6.4-3.9 9c-2.6-2.6-3.9-5.6-3.9-9S9.4 5.6 12 3z'/%3E%3C/svg%3E");
  --ib-device: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='11' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E");
  --ib-trash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 7h15'/%3E%3Cpath d='M9.5 7V4.5h5V7'/%3E%3Cpath d='M6.5 7l.8 12.5h9.4L17.5 7'/%3E%3C/svg%3E");
  --ib-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.5 2.5L5 13.5h6l-1 8 8.5-11h-6z'/%3E%3C/svg%3E");
  --ib-undo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12a7.5 7.5 0 1 1 2.2 5.3'/%3E%3Cpath d='M4.2 19.8v-4.6h4.6'/%3E%3C/svg%3E");
  --ib-timer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4.5l3 1.5M9.5 2.5h5'/%3E%3C/svg%3E");
  --ib-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
  --ib-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8.5' r='3.6'/%3E%3Cpath d='M4.5 20c.8-4 3.8-6 7.5-6s6.7 2 7.5 6'/%3E%3C/svg%3E");
  --ib-percent: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round'%3E%3Cpath d='M19 5L5 19'/%3E%3Ccircle cx='7' cy='7' r='2.4'/%3E%3Ccircle cx='17' cy='17' r='2.4'/%3E%3C/svg%3E");
  --ib-plusminus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round'%3E%3Cpath d='M12 4v9M7.5 8.5h9M7.5 19h9'/%3E%3C/svg%3E");
}
form.bulk-bar.bb2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; }  /* one gap between every button (user 29.10: «ровно расстояния») */
form.bulk-bar.bb2 .bb-chip { display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 4px 0 12px; border-radius: 17px; flex: none;
  background: color-mix(in srgb, var(--gold) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); }
form.bulk-bar.bb2 .bb-chip .bb-n { margin: 0; font-size: 13px; font-weight: 700; white-space: nowrap; }
form.bulk-bar.bb2 .bb-chip .bb-x { margin: 0; width: 24px; height: 24px; font-size: 17px; line-height: 1; border-radius: 50%; color: var(--ink-muted, var(--muted)); }
form.bulk-bar.bb2 .bb-chip .bb-x:hover { background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); }
/* groups: spaced apart (no lines: a line would start a wrapped row); «Удалить» alone at the right end */
form.bulk-bar.bb2 .bb-grp { display: inline-flex; align-items: center; gap: 8px; }
form.bulk-bar.bb2 .bb-grp.bb-end { margin-left: auto; }
form.bulk-bar.bb2 .bb-btn, form.bulk-bar.bb2 .bb-sel select { box-sizing: border-box; height: 34px; margin: 0; padding: 0 12px; border: 1px solid color-mix(in srgb, var(--muted) 45%, var(--line)); border-radius: 9px;
  background: var(--panel); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; }
form.bulk-bar.bb2 .bb-btn { display: inline-flex; align-items: center; gap: 7px; }
form.bulk-bar.bb2 .bb-btn[data-ic]::before, form.bulk-bar.bb2 .bb-sel::before { content: ""; flex: none; width: 15px; height: 15px; background: currentColor;
  -webkit-mask: var(--ib) center / contain no-repeat; mask: var(--ib) center / contain no-repeat; }
form.bulk-bar.bb2 [data-ic="play"] { --ib: var(--ib-play); } form.bulk-bar.bb2 [data-ic="pause"] { --ib: var(--ib-pause); } form.bulk-bar.bb2 [data-ic="refresh"] { --ib: var(--ib-refresh); }
form.bulk-bar.bb2 [data-ic="relist"] { --ib: var(--ib-relist); } form.bulk-bar.bb2 [data-ic="download"] { --ib: var(--ib-download); } form.bulk-bar.bb2 [data-ic="key"] { --ib: var(--ib-key); }
form.bulk-bar.bb2 [data-ic="folder"] { --ib: var(--ib-folder); } form.bulk-bar.bb2 [data-ic="globe"] { --ib: var(--ib-globe); } form.bulk-bar.bb2 [data-ic="copy"] { --ib: var(--ib-copy); } form.bulk-bar.bb2 [data-ic="device"] { --ib: var(--ib-device); }
form.bulk-bar.bb2 [data-ic="trash"] { --ib: var(--ib-trash); } form.bulk-bar.bb2 [data-ic="bolt"] { --ib: var(--ib-bolt); } form.bulk-bar.bb2 [data-ic="undo"] { --ib: var(--ib-undo); }
form.bulk-bar.bb2 [data-ic="timer"] { --ib: var(--ib-timer); } form.bulk-bar.bb2 [data-ic="user"] { --ib: var(--ib-user); } form.bulk-bar.bb2 [data-ic="percent"] { --ib: var(--ib-percent); } form.bulk-bar.bb2 [data-ic="plusminus"] { --ib: var(--ib-plusminus); }
form.bulk-bar.bb2 .bb-btn:hover:not(:disabled), form.bulk-bar.bb2 .bb-sel:hover select { border-color: var(--muted); background: color-mix(in srgb, var(--text) 8%, var(--panel)); }
form.bulk-bar.bb2 .bb-btn:focus-visible, form.bulk-bar.bb2 .bb-sel select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
form.bulk-bar.bb2 .bb-btn.good { color: var(--ink-good, var(--good)); background: color-mix(in srgb, var(--good) 16%, var(--panel)); border-color: color-mix(in srgb, var(--good) 55%, var(--line)); }
form.bulk-bar.bb2 .bb-btn.good:hover:not(:disabled) { background: color-mix(in srgb, var(--good) 30%, var(--panel)); border-color: var(--good); }
form.bulk-bar.bb2 .bb-btn.bad { color: var(--ink-bad, var(--bad)); background: color-mix(in srgb, var(--bad) 9%, var(--panel)); border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
form.bulk-bar.bb2 .bb-btn.bad:hover:not(:disabled) { background: color-mix(in srgb, var(--bad) 20%, var(--panel)); border-color: var(--bad); }
/* off: dimmed with a dashed frame, the reason is in the tooltip (not just grey) */
form.bulk-bar.bb2 .bb-btn:disabled { opacity: .5; cursor: not-allowed; border-style: dashed; }
form.bulk-bar.bb2 .bb-btn[hidden] { display: none; }
/* a drop-down as a button: icon on the left, ▾ on the right */
form.bulk-bar.bb2 .bb-sel { position: relative; display: inline-flex; align-items: center; flex: none; }
form.bulk-bar.bb2 .bb-sel::before { position: absolute; left: 11px; pointer-events: none; color: var(--text); }
form.bulk-bar.bb2 .bb-sel::after { content: ""; position: absolute; right: 9px; width: 12px; height: 12px; pointer-events: none; background: var(--ink-muted, var(--muted));
  -webkit-mask: var(--ib-chevron) center / contain no-repeat; mask: var(--ib-chevron) center / contain no-repeat; }
form.bulk-bar.bb2 .bb-sel select { -webkit-appearance: none; appearance: none; width: auto; min-width: 0; width: 142px !important; max-width: 142px !important; min-width: 0 !important; padding: 0 28px 0 33px; text-overflow: ellipsis; }
form.bulk-bar.bb2 .bb-sel select option { font-weight: 500; }
form.bulk-bar.bb2 .group-pick { display: inline-flex; align-items: center; gap: 6px; }
form.bulk-bar.bb2 input.group-new, form.bulk-bar.bb2 input.bb-num { box-sizing: border-box; height: 34px; width: 120px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--muted) 45%, var(--line)); border-radius: 9px;
  background: var(--panel); color: var(--text); font: inherit; font-size: 13px; }
form.bulk-bar.bb2 input.bb-num { width: 58px; text-align: center; }
form.bulk-bar.bb2 input.group-new[hidden], form.bulk-bar.bb2 .group-apply[hidden] { display: none; }
/* nothing ticked: the same room, a hint in it (accounts.css / clients.css) — the groups are laid out but not seen */
form.bulk-bar.bb2[data-count="0"] > :not(.bb-hint) { visibility: hidden; }
form.bulk-bar.bb2[data-count="0"] button.bb-btn[hidden]:not(.group-apply) { display: inline-flex; }
@media (max-width: 760px) { form.bulk-bar.bb2 .bb-grp.bb-end { margin-left: 0; } }
form.bulk-bar.bb2 .bb-hint { display: none; }
form.bulk-bar.bb2[data-count="0"] .bb-hint { display: flex; align-items: center; gap: 14px; right: 14px; }
form.bulk-bar.bb2 .bb-hint .bb-hint-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
form.bulk-bar.bb2 .bb-hint .bb-link { all: unset; box-sizing: border-box; cursor: pointer; color: var(--gold); font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: underline dotted; text-underline-offset: 3px; }
form.bulk-bar.bb2 .bb-hint .bb-link:hover { text-decoration-style: solid; }
form.bulk-bar.bb2 .bb-hint .bb-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
form.bulk-bar.bb2 .bb-hint .bb-link[hidden], form.bulk-bar.bb2 .bb-hint .bb-newbox[hidden] { display: none; }
form.bulk-bar.bb2 .bb-hint .bb-newbox { display: inline-flex; align-items: center; gap: 6px; }
form.bulk-bar.bb2 .bb-hint .bb-newbox input { box-sizing: border-box; height: 30px; width: 160px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--muted) 45%, var(--line)); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; }
form.bulk-bar.bb2 .bb-hint .bb-newbox .bb-btn { height: 30px; }
:root[data-theme="light"] form.bulk-bar.bb2 .bb-hint .bb-link { color: #7a5800; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) form.bulk-bar.bb2 .bb-hint .bb-link { color: #7a5800; } }
/* 9.11: a phone. «Nothing moves on a tick» (user 26.10) — but the room the wide screen keeps for every button (--bar-h)
   was a ~200 px empty dashed box over the list here, its hint cut off. So on a phone:
   · nothing ticked: the bar is its hint only, whole (wrapped, one to three lines), in a small dashed frame;
   · something ticked: the bar FLOATS at the bottom of the screen (fixed, its own scroll past 45 % of the height) and an
     empty .bb-room of exactly the idle bar's height takes its place in the page (base.js), so the list does not move;
     the end of the page gets room under the floating bar (html.bb-pad) so the last rows scroll above it;
   · the paid strip (_paid_bar.html, shown while something is ticked) floats right above the bar, never in the page.
   The wide screen (> 700 px) keeps its reserve (accounts.js / list_page.js / menus.js reserveBar) unchanged. */
.bb-room { display: none; }
@media (max-width: 700px) {
  /* ticked: a group of three buttons (keys: «Платформа · Папка · …», accounts: «Скопировать · Экспорт · Сбросить») is wider
     than the bar — it ran out past the right edge, its last button cut off; the group wraps like the bar does */
  form.bulk-bar.bb2 .bb-grp { flex-wrap: wrap; max-width: 100%; }
  form.bulk-bar.bb2 { min-height: 0; }  /* no reserve for the buttons here: they float when shown */
  form.bulk-bar.bb2[data-count="0"] > :not(.bb-hint) { display: none !important; }
  form.bulk-bar.bb2[data-count="0"] .bb-hint { position: static; transform: none; flex-wrap: wrap; row-gap: 6px; column-gap: 14px; min-width: 0;
    padding: 1px 4px; white-space: normal; line-height: 1.35; }
  form.bulk-bar.bb2 .bb-hint .bb-hint-t { flex: 1 1 200px; overflow: visible; white-space: normal; text-overflow: clip; }
  form.bulk-bar.bb2:not([data-count="0"]) { position: fixed; z-index: 18; left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right));
    bottom: calc(10px + env(safe-area-inset-bottom)); box-sizing: border-box; max-height: calc(50vh - var(--bb-paid-h, 0px)); max-height: calc(50dvh - var(--bb-paid-h, 0px)); margin: 0; padding: 10px;
    overflow-y: auto; overscroll-behavior: contain; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: 14px;
    background: color-mix(in srgb, var(--gold) 6%, var(--panel)); box-shadow: 0 14px 36px -8px rgba(0, 0, 0, .6), 0 2px 8px rgba(0, 0, 0, .25); }
  form.bulk-bar.bb2:not([data-count="0"]) + .bb-room { display: block; flex: none; }  /* height and margins: base.js (the idle bar's) */
  /* floating, the buttons run on in one flow (no group starts a new line): fewer lines, more of the list in sight */
  form.bulk-bar.bb2:not([data-count="0"]) .bb-grp { display: contents; }
  html.bb-pad main { padding-bottom: var(--bb-pad, 40px); }
  /* the paid strip right above the floating bar (--bb-float-h: base.js), hidden while nothing is ticked */
  .paid-bar:has(+ form.bulk-bar.bb2[data-count="0"]) { display: none; }
  .paid-bar:has(+ form.bulk-bar.bb2:not([data-count="0"])) { position: fixed; z-index: 18; left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right));
    bottom: calc(18px + var(--bb-float-h, 0px) + env(safe-area-inset-bottom)); max-height: 22vh; overflow-y: auto; margin: 0; background: var(--panel);
    box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .55); }
  /* «Ключи API», «Прокси», «Клиенты»: the toolbar no longer sticks to the top while something is ticked — the bar is in sight at the bottom */
  html .k-tools:has(.k-bar:not([data-count="0"])), html .cl-tools:has(.k-bar:not([data-count="0"])) { position: static; box-shadow: none; }
}
@media (max-width: 700px) {
  :root[data-theme="light"] form.bulk-bar.bb2:not([data-count="0"]) { box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .28), 0 1px 4px rgba(0, 0, 0, .12); }
}
@media (max-width: 700px) and (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) form.bulk-bar.bb2:not([data-count="0"]) { box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .28), 0 1px 4px rgba(0, 0, 0, .12); }
}

/* 29.10: «Защитите кабинет: включите вход с кодом» — a strip like the mail and invite ones; the mail one goes first (while it shows,
   this one stays hidden: the sibling rule), «×» puts it away for a day (theme.js adds .twofa-nag-off). The yellow dot sits at the
   menu's «Вход с кодом (2FA)» while the code is off. */
.twofa-nag { display: flex; align-items: flex-start; gap: 10px 14px; margin: 0 0 16px; padding: 7px 8px 7px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--muted); font-size: 13px; max-width: var(--col-w, none); }
.twofa-nag-off .twofa-nag, :root:not(.mail-nag-off) .mail-nag ~ .twofa-nag { display: none; }
.twofa-nag-b { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; min-height: 24px; }
.twofa-nag-t { flex: 1 1 auto; min-width: 0; }
.twofa-nag a { margin-left: auto; color: var(--gold); font-weight: 700; white-space: nowrap; }
@media (max-width: 600px) { .twofa-nag a { margin-left: 0; } }
.twofa-nag-x { flex: none; padding: 0 8px; min-height: 0; height: 24px; line-height: 22px; font-size: 18px; background: none; border: 0; color: var(--muted); cursor: pointer; }
.twofa-nag-x:hover { color: var(--text); background: none; }
:root[data-theme="light"] .twofa-nag a { color: color-mix(in srgb, var(--gold-2) 68%, #000); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .twofa-nag a { color: color-mix(in srgb, var(--gold-2) 68%, #000); } }
.mi-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); flex: none; }

/* 29.10: a client's user block is a plain name (nothing left in the menu); the yellow dot (2FA off) on the nav's «Настройки» and
   on the tab «Безопасность» */
.side-um-plain .side-who { cursor: default; padding: 4px 8px 4px 4px; margin: -4px 0 -4px -4px; }
.side-um-plain .sw-txt { flex: 1 1 auto; min-width: 0; }
.side-um-plain .sw-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.nav-dot { margin-left: auto; margin-right: 4px; }
.tab .tab-dot { margin-left: 8px; width: 7px; height: 7px; box-shadow: none; vertical-align: middle; }

/* 2.11 (user): the name chip at the bottom of the sidebar is one link to «Безопасность» (clients land on the tab of «Настройки»), no menu */
a.side-um-link { display: block; text-decoration: none; color: inherit; border-radius: 10px; padding: 4px 8px 4px 4px; margin: -4px 0 -4px -4px; }
a.side-um-link:hover { background: var(--panel-2); }
a.side-um-link:focus-visible { outline: 2px solid var(--line); outline-offset: 1px; }
a.side-um-link .side-who { padding: 0; margin: 0; }
a.side-um-link .sw-txt { flex: 1 1 auto; min-width: 0; }
a.side-um-link .sw-txt b, a.side-um-link .sw-txt small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 2.11 (user): our own dialog in place of the browser's confirm() / prompt() / alert() — base.js askDialog */
.dlg-back { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, .55); }
.dlg { box-sizing: border-box; width: min(440px, 100%); padding: 20px 22px 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); color: var(--text); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
.dlg p { margin: 0 0 16px; font-size: 14px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.dlg p.dlg-warn { color: var(--bad); font-weight: 600; }  /* «Перевыпустить 2FA» (17.11) */
.dlg .dlg-tick { display: flex; gap: 8px; align-items: flex-start; margin: -4px 0 16px; font-size: 14px; cursor: pointer; }
.dlg .dlg-tick input { flex: none; margin-top: 3px; }
.dlg .dlg-ok:disabled { opacity: .45; cursor: not-allowed; }
.dlg .dlg-in { display: block; width: 100%; box-sizing: border-box; margin: -4px 0 16px; }
.dlg-acts { display: flex; justify-content: flex-end; gap: 10px; }
.dlg-acts button { min-width: 88px; }
.dlg-ok.bad { background: var(--bad, #d94b4b); border-color: var(--bad, #d94b4b); color: #fff; }
.dlg-ok.bad:hover { filter: brightness(1.08); background: var(--bad, #d94b4b); color: #fff; }

/* the import preview's 👁: all fields of a row under its e-mail */
table.preview .pv-eye { margin-left: 6px; padding: 2px 6px; vertical-align: baseline; }
table.preview .pv-eye.open { color: var(--gold); }
table.preview .pv-hint { color: var(--warn, var(--gold)); font-size: 12px; }  /* a guessed value to check (16.11) */
table.preview .pv-sec { margin-top: 6px; font-size: 12.5px; line-height: 1.5; font-weight: 400; }
table.preview .pv-sec .muted { display: inline-block; min-width: 130px; }
table.preview .pv-sec code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
/* copy feedback (2.11, the user's pick): the copied text dims for a second, the small copy sign beside it turns into a green tick.
   Rows that already carry a sign (.em-copy on Аккаунты) use it; elsewhere base.js makes a temporary one (.cp-temp). */
@keyframes cp-gray { 0%, 100% { opacity: 1; } 25%, 75% { opacity: .35; } }
.cp-gray { animation: cp-gray 1s ease-in-out; }
.em-copy.cp-temp { display: inline-block; width: 13px; height: 13px; margin-left: 5px; vertical-align: -2px; background: var(--muted); pointer-events: none;
  -webkit-mask: var(--i-copy) center / contain no-repeat; mask: var(--i-copy) center / contain no-repeat; }
.em-copy.cp-done { opacity: 1 !important; width: 15px; height: 15px; background: var(--good);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: reduce) { .cp-gray { animation: none; opacity: .5; } }
:root { --i-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E%3Cpath d='M5 15V6a2 2 0 0 1 2-2h8'/%3E%3C/svg%3E"); }
.totp-out .totp-left { margin-left: 1.1em; }  /* room between the digits (and the copy tick) and «живёт ещё N с» */

/* No menu «jump» between tabs (3.11): every tab is a new page load. The old page stays on screen until the new one can paint
   (cross-document view transition, Chromium), and the sidebar is its own layer that is not cross-faded, so it simply stays.
   The sidebar keeps its own scrollbar out of the layout on a short window (it shrank the items by 15px). */
@view-transition { navigation: auto; }
.side { view-transition-name: side; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
::view-transition-group(side), ::view-transition-old(side), ::view-transition-new(side) { animation: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .12s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

/* Reminder strips (mail / 2FA / invite a friend), tidied 4.11 (user: «криво, отступов нет», «стопкой — назойливо»): one look for all three —
   a tinted icon, the words, the action as a small pill pinned to the right, a round «×». One strip at a time. On a phone the pill goes under the words. */
.mail-nag, .twofa-nag, .ref-strip { align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 10px 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; }
.mail-nag-b, .twofa-nag-b, .ref-strip-b { align-items: center; gap: 8px 16px; min-height: 32px; }
.mail-nag-t, .twofa-nag-t, .ref-strip-t { display: flex; align-items: center; gap: 10px; color: var(--text); }
:is(.mail-nag, .twofa-nag, .ref-strip) .strip-ic { flex: none; margin: 0; vertical-align: baseline; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.mail-nag a, .twofa-nag a, .ref-strip a { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; font-size: 13px; text-decoration: none;
  background: color-mix(in srgb, var(--gold) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent); }
.mail-nag a:hover, .twofa-nag a:hover, .ref-strip a:hover { background: color-mix(in srgb, var(--gold) 24%, transparent); }
.mail-nag-x, .twofa-nag-x, .ref-strip-x { width: 28px; height: 28px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.mail-nag-x:hover, .twofa-nag-x:hover, .ref-strip-x:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
.ref-strip-link { height: 28px; }
/* one at a time (user 4.11: «не должно одно оповещение висеть под другим»): mail → 2FA → invite; the 2FA strip already waits behind the mail one (above),
   the invite waits behind either of them. «×» removes the current strip and the next one takes its place. */
:root:not(.mail-nag-off) .mail-nag ~ .ref-strip, :root:not(.twofa-nag-off) .twofa-nag ~ .ref-strip { display: none; }
@media (max-width: 600px) {
  .mail-nag, .twofa-nag, .ref-strip { align-items: flex-start; }
  .mail-nag a, .twofa-nag a, .ref-strip a { margin-left: 40px; }
  .ref-strip-acts { margin-left: 40px; }
  .ref-strip-acts a { margin-left: 0; }
}
:is(.mail-nag, .twofa-nag, .ref-strip) .strip-ic svg { width: 16px; height: 16px; }
@media (min-width: 601px) { .mail-nag-b, .twofa-nag-b, .ref-strip-b { flex-wrap: nowrap; } .mail-nag-t, .twofa-nag-t, .ref-strip-t { flex: 1 1 0; } }

/* «?» note on why more coins leave an account than are credited (5.11): a <details> popover by the header rate and by «Ваш итог за 7 дней» */
.spent-note { position: relative; display: inline-block; vertical-align: middle; }
.spent-note > summary { list-style: none; cursor: pointer; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; user-select: none; }
.spent-note > summary::-webkit-details-marker { display: none; }
.spent-note > summary:hover, .spent-note[open] > summary { border-color: var(--gold); color: var(--text); }
.spent-note .sn-body { position: absolute; z-index: 60; left: 26px; top: -8px; width: 340px; max-width: 80vw; padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.45); font-size: 13px; line-height: 1.45; font-weight: 400; color: var(--text); text-align: left; white-space: normal; }
.spent-note .sn-body b { display: block; margin-bottom: 6px; }
.spent-note .sn-body p { margin: 6px 0; }
.spent-note .sn-body ul { margin: 6px 0; padding-left: 18px; }
.rate-wrap { position: relative; }
.rate-wrap > .spent-note { position: absolute; top: 8px; right: 8px; }
.rate-wrap > .spent-note .sn-body { left: auto; right: -4px; top: 26px; }
@media (max-width: 760px) { .spent-note .sn-body { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-width: none; } .rate-wrap > .spent-note .sn-body { left: 16px; right: 16px; top: auto; } }
/* 9.11: up to 900 px the rate card is hidden (the side menu is a top bar), and its «?» was left alone, hanging under the
   logo of a client's top bar; the same note stays on «Баланс» by «Ваш итог за 7 дней» */
@media (max-width: 900px) { .rate-wrap { display: none; } }
/* 21.11 (user: «с телефона не видно курсов монет»): on the narrow top bar the rate is one compact line of its own under
   the icons — the head, PS / XBOX and PC side by side; the client's «?» note stays hidden (it lives on «Баланс») */
@media (max-width: 900px) {
  .side-foot { flex-wrap: wrap; justify-content: flex-end; }
  .side-foot > .rate-card, .side-foot > .rate-wrap { order: 99; flex-basis: 100%; }
  .side-foot > .rate-wrap { display: block; }
  .rate-wrap > .spent-note { display: none; }
  .side .rate-card { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 6px 12px; }
  .side .rate-card .rc-head { margin: 0; font-size: 11px; flex-basis: 100%; }
  .side .rate-card .rc-row { gap: 8px; }
}

/* the sidebar fits a short window without scrolling (5.11; user: the admin row was cut at ~880 px with a bookmarks bar): below 900 px of height the
   gaps and the nav rows tighten; below 780 once more. Wide screens only — the narrow top bar is another layout. */
@media (min-width: 901px) and (max-height: 900px) {
  .side { gap: 14px; padding: 16px 14px 12px; }
  .side nav.menu { gap: 1px; }
  .side nav.menu a { padding: 7px 12px; }
  .side-foot { gap: 8px; }
  .side-mid { gap: 6px; }
  .today-card { padding: 8px 12px 9px; }
  .rate-card { padding: 8px 12px; }
  .side-tools .ghost.icon, .side-tools .totp-pop > summary, .side-tools #theme-btn { height: 34px; }
}
@media (min-width: 901px) and (max-height: 830px) {
  .side { gap: 10px; padding: 12px 14px 10px; }
  .side nav.menu a { padding: 5px 12px; font-size: 13.5px; }
  .today-card .td-fee { margin-top: 4px; padding-top: 5px; }
  .td-bar { margin: 3px 0 2px; }
  .today-card .rc-head, .rate-card .rc-head { margin-bottom: 2px; }
}
@media (min-width: 901px) and (max-height: 740px) {
  .side nav.menu a { padding: 4px 12px; }
  .side-tools .ghost.icon, .side-tools .totp-pop > summary, .side-tools #theme-btn { height: 32px; }
}
@media (min-width: 901px) and (max-height: 770px) {
  .side { gap: 8px; padding: 10px 14px 6px; }
  .side .brand img { height: 28px; }
  .side-foot { gap: 6px; }
  .side-mid { gap: 5px; }
  .today-card { padding: 6px 12px 7px; }
  .rate-card { padding: 6px 12px; }
  .today-card .td-fee { margin-top: 3px; padding-top: 4px; }
}

/* still too tall (a long menu: a client with PSN / EA Reset / Outlook, 5.11 — the user's sidebar was cut at the bottom): base.js adds .fit2…fit4 to
   .side one by one while it overflows, the same steps as the height rules above */
@media (min-height: 901px) { :is(.side.fit1, .sf1 .side) { gap: 16px; } :is(.side.fit1, .sf1 .side) .side-foot { gap: 8px; } }  /* the gentle first step: a few px over (a font or a rate that came late) must not shrink the whole menu (only above the height rules: below them the next steps are already finer) */
:is(.side.fit2, .sf2 .side) { gap: 14px; padding: 16px 14px 12px; }
:is(.side.fit2, .sf2 .side) nav.menu { gap: 1px; }
:is(.side.fit2, .sf2 .side) nav.menu a { padding: 7px 12px; }
:is(.side.fit2, .sf2 .side) .side-foot { gap: 8px; }
:is(.side.fit2, .sf2 .side) .side-mid { gap: 6px; }
:is(.side.fit2, .sf2 .side) .today-card { padding: 8px 12px 9px; }
:is(.side.fit2, .sf2 .side) .rate-card { padding: 8px 12px; }
:is(.side.fit2, .sf2 .side) .side-tools :is(.ghost.icon, .totp-pop > summary, #theme-btn) { height: 34px; }
:is(.side.fit3, .sf3 .side) { gap: 10px; padding: 12px 14px 10px; }
:is(.side.fit3, .sf3 .side) nav.menu a { padding: 5px 12px; font-size: 13.5px; }
:is(.side.fit3, .sf3 .side) .today-card .td-fee { margin-top: 4px; padding-top: 5px; }
:is(.side.fit3, .sf3 .side) .td-bar { margin: 3px 0 2px; }
:is(.side.fit3, .sf3 .side) :is(.today-card, .rate-card) .rc-head { margin-bottom: 2px; }
:is(.side.fit4, .sf4 .side) { gap: 8px; padding: 10px 14px 6px; }
:is(.side.fit4, .sf4 .side) .brand img { height: 28px; }
:is(.side.fit4, .sf4 .side) .side-foot { gap: 6px; }
:is(.side.fit4, .sf4 .side) .side-mid { gap: 5px; }
:is(.side.fit4, .sf4 .side) .today-card { padding: 6px 12px 7px; }
:is(.side.fit4, .sf4 .side) .rate-card { padding: 6px 12px; }
:is(.side.fit4, .sf4 .side) .today-card .td-fee { margin-top: 3px; padding-top: 4px; }
:is(.side.fit5, .sf5 .side) nav.menu a { padding: 4px 12px; }
:is(.side.fit5, .sf5 .side) .side-tools :is(.ghost.icon, .totp-pop > summary, #theme-btn) { height: 32px; }

/* «Сервисы» (11.11, app/services.py): a part of the product switched off by the admin (red edge) or an automatic notice
   (amber edge) — one strip per part at the top of every page, in the viewer's language. */
.svc-banner { margin: 0 0 14px; padding: 9px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.45;
  border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line)); border-left-width: 4px;
  background: color-mix(in srgb, var(--warn) 10%, var(--panel)); color: var(--text); }
.svc-banner.svc-banner-off { border-color: color-mix(in srgb, var(--bad) 60%, var(--line)); background: color-mix(in srgb, var(--bad) 9%, var(--panel)); }
.svc-banner b { font-weight: 700; }
.svc-banner + .svc-banner { margin-top: -6px; }

/* «Ручной выкуп»: a card waits for the person — the strip manual_ping.js shows on every other page */
.mb-ping { position: fixed; right: 16px; bottom: 16px; z-index: 60; max-width: min(460px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 12px; background: var(--gold); color: var(--on-gold); font-weight: 700;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35); text-decoration: none; }
.mb-ping:hover { background: var(--gold-2); }

/* QA 14.11: a phone's top bar (390 px) kept the whole logo and all the buttons on ONE row — with a long balance or name the
   tools used to wrap under «FUT». The login next to the round initial hides (the initial is still the link to /security). */
@media (max-width: 520px) {
  .side { gap: 8px; padding: 8px 12px; }
  .side-foot { gap: 6px; min-width: 0; }
  .side-foot .side-tools { gap: 6px; }
  .side-foot .side-user { gap: 6px; }
  .side-foot .side-user .sw-txt { display: none; }
  .side-foot .side-user .side-who { gap: 0; }
}
.wd-low b { color: var(--bad); }
/* import preview (user 16.11): the 2FA warning for rows with EA backup codes — green and blinking */
.ea-consent-note { flex-basis: 100%; margin: 0; color: var(--good); font-weight: 700; animation: ea-note-blink 1.4s ease-in-out infinite; }
@keyframes ea-note-blink { 50% { opacity: .35; } }

/* Very wide windows (18.11, main's task): up to 2200 px NOTHING changes. From 2201 px the content column grows past 1480 px
   (to 1900), and since the window is then wider than menu + column (236 + 1900), the whole block is centred. */
@media (min-width: 2201px) {
  .shell { max-width: 2136px; margin-left: auto; margin-right: auto; }
  .shell > main { max-width: 1900px; }
  .side { border-left: 1px solid var(--line); }
  .side-tools .totp-panel { left: calc(50% - 820px); }  /* the fixed 🔢 panel follows the centred block (50% − 1068 + 248) */
}
form.bulk-bar .bb-btn[hidden] { display: none; }  /* «Облако»: only the button that changes something for the ticked rows (24.11) */
