/* Кабинет DREAMVIBE — «Размерная сетка»: монохром бирки (чернила по белому картону, тонкие линейки),
   чернильная колонка слева, один шрифт Golos Text с табличными цифрами. Цвет только со смыслом:
   янтарь — мало, штриховка — ноль, красный — минус и проблемы; WB — маджента, Ozon — синий, фабрика — крафт, только квадратным маркером в метке.
   Углы: клетки 0, метки 3px, поля и кнопки 5–6px, панели 8px; панели плоские — волосяная линия вместо тени. */

@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('/web/golos-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('/web/golos-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --font-ui: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --ground: #eef0f3;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #eceef1;
  --ink: #121316;
  --ink-2: #474b54;
  --ink-3: #646973;
  --line: #e0e3e8;
  --line-2: #c8ccd3;
  --rule: #121316;

  --rail: #121316;
  --rail-2: #1d1f24;
  --rail-3: #2b2e35;
  --rail-ink: #f2f3f5;
  --rail-ink-2: #a9adb6;

  --btn: #121316;
  --btn-ink: #ffffff;
  --btn-hover: #2a2c32;
  --focus: #121316;
  --select: rgba(18, 19, 22, 0.12);

  --low: #f0a020;
  --low-ink: #8c5200;
  --hatch: rgba(18, 19, 22, 0.42);
  --neg: #d92d20;
  --neg-bg: #fdeceb;
  --neg-ink: #b42318;
  --ok: #1d8a4b;
  --ok-bg: #e6f4ec;
  --info-bg: #edf1f7;

  --wb: #cb11ab;
  --oz: #005bff;
  --factory: #7a6650;

  --r: 6px;
  --r-l: 8px;
  --shadow-1: 0 1px 2px rgba(18, 19, 22, 0.06), 0 1px 3px rgba(18, 19, 22, 0.04);
  --shadow-pop: 0 10px 28px rgba(18, 19, 22, 0.16), 0 2px 6px rgba(18, 19, 22, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Цвета и размеры, которые ждёт дашборд (dash/src) от рамки */
  --font-anthropic-sans: var(--font-ui);
  --color-bg: var(--ground); --color-panel: var(--surface); --color-fg: var(--ink); --color-fg-muted: var(--ink-2);
  --color-border-line: var(--line); --color-bad: var(--neg); --color-warn: #b25e00; --color-ok: var(--ok);
  --cds-chart-reference: #8f949c; --cds-chart-grid: #eceef1; --cds-chart-axis: #b9bdc4; --cds-border: var(--line);
  --cds-surface-popover: var(--surface); --cds-text-secondary: var(--ink-2); --cds-shadow-popover: var(--shadow-pop);
  --cds-font-size-caption: 12px; --cds-font-size-body: 14px; --cds-font-size-heading: 16px; --cds-font-weight-medium: 500;
  --cds-gap-sm: 8px; --cds-gap-md: 16px; --cds-gap-lg: 24px;
  --cds-pad-xs: 4px; --cds-pad-sm: 8px; --cds-pad-md: 12px; --cds-pad-lg: 16px;
  --cds-radius: 10px; --cds-dur-slow: 0.2s; --cds-ease-out: var(--ease);
  color-scheme: light;
}

/* Тёмная: по системе (data-theme ставит shell.js) или выбором Авто / Светлая / Тёмная (data-mode, ключ dv-theme — общий с дашбордом) */
html[data-theme="dark"]:not([data-mode="light"]), html[data-mode="dark"] {
  --ground: #0e0f11;
  --surface: #17181b;
  --surface-2: #1d1f23;
  --surface-3: #25272c;
  --ink: #eceef1;
  --ink-2: #b3b7bf;
  --ink-3: #8f949d;
  --line: #2b2e34;
  --line-2: #3b3f47;
  --rule: #eceef1;
  --rail: #08090a;
  --rail-2: #131417;
  --rail-3: #222429;
  --btn: #eceef1;
  --btn-ink: #121316;
  --btn-hover: #ffffff;
  --focus: #eceef1;
  --select: rgba(236, 238, 241, 0.16);
  --low: #f2b23a;
  --low-ink: #f6c66a;
  --hatch: rgba(236, 238, 241, 0.4);
  --neg: #f97066;
  --neg-bg: #3d1513;
  --neg-ink: #fda29b;
  --ok: #47cd89;
  --ok-bg: #0f2e1d;
  --info-bg: #1c222c;
  --wb: #e15ad2;
  --oz: #5b93ff;
  --factory: #b9a58c;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
  --color-warn: #f2b23a;
  --cds-chart-reference: #7d828b; --cds-chart-grid: #26282d; --cds-chart-axis: #4a4e56;
  color-scheme: dark;
}

/* ── Основа: тот же набор сброса стилей, под который сделан дашборд ── */
*, ::before, ::after { box-sizing: border-box; border: 0 solid currentColor; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; font-family: var(--font-ui); }
body { margin: 0; line-height: inherit; background: var(--ground); color: var(--ink); font-size: 15px; font-feature-settings: 'kern'; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
b, strong { font-weight: 600; }
small { font-size: 80%; }
table { text-indent: 0; border-color: inherit; border-collapse: collapse; }
button, input, optgroup, select, textarea { font-family: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; color: inherit; margin: 0; padding: 0; }
button, select { text-transform: none; }
button, [type="button"], [type="submit"] { -webkit-appearance: button; background-color: transparent; background-image: none; }
blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre { margin: 0; }
ol, ul, menu { list-style: none; margin: 0; padding: 0; }
summary { display: list-item; }
details > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details > summary::-webkit-details-marker { display: none; }
details > summary svg { width: 14px; height: 14px; flex: none; transition: transform 0.2s var(--ease); }
details[open] > summary svg { transform: rotate(90deg); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { opacity: 1; color: var(--ink-3); }
button, [role="button"], summary, label[for] { cursor: pointer; }
:disabled { cursor: default; }
img, svg, video, canvas { display: block; vertical-align: middle; }
img, video { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
::selection { background: var(--select); color: var(--ink); }
input, textarea { caret-color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { transition-duration: 1ms !important; animation-duration: 1ms !important; } }

/* Пока данных нет — серые плашки вместо цифр (как у типа «Dashboard» в Claude) */
.dash-skeleton { -webkit-text-fill-color: transparent; border-radius: 6px; min-height: 1.2em;
  background: color-mix(in srgb, var(--ink) 7%, transparent); animation: cab-pulse 1.4s ease-in-out infinite; }
@keyframes cab-pulse { 50% { opacity: 0.55; } }

/* ── Каркас: колонка слева, работа справа; на телефоне — верхняя полоса и нижние вкладки ── */
.cab { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 18px 12px 14px;
  background: var(--rail); color: var(--rail-ink); overflow-y: auto; }
.brand { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px 18px; }
.brand-word { font-weight: 700; font-size: 15px; letter-spacing: 0.22em; line-height: 1.1; }
.brand-dots { display: inline-flex; gap: 4px; margin-left: 2px; vertical-align: 2px; }
.brand-dots i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.brand-dots i:first-child { background: #cb11ab; }
.brand-dots i:last-child { background: #005bff; }
.brand-sub { font-size: 12px; color: var(--rail-ink-2); letter-spacing: 0.02em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 10px; border-radius: 6px; color: var(--rail-ink-2); font-size: 14px; font-weight: 500;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.nav a:hover { background: var(--rail-2); color: var(--rail-ink); }
.nav a[aria-current="page"] { background: var(--rail-3); color: var(--rail-ink); }
.nav a[aria-current="page"] svg { color: var(--rail-ink); }
.nav svg { width: 20px; height: 20px; flex: none; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--rail-ink); color: var(--rail);
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--rail-3); }
.who { display: flex; flex-direction: column; font-size: 13px; line-height: 1.35; }
.who b { color: var(--rail-ink); font-weight: 600; }
.who span { color: var(--rail-ink-2); }
.rail-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 6px; color: var(--rail-ink-2); font-size: 13px; }
.rail-btn:hover { background: var(--rail-2); color: var(--rail-ink); }
.rail-btn svg { width: 16px; height: 16px; }
.theme { display: inline-flex; padding: 2px; border-radius: 6px; background: var(--rail-2); }
.theme button { width: 30px; height: 26px; border-radius: 4px; color: var(--rail-ink-2); display: grid; place-items: center; }
.theme button svg { width: 15px; height: 15px; }
.theme button[aria-pressed="true"] { background: var(--rail-3); color: var(--rail-ink); }
.data-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--rail-ink-2); line-height: 1.3; }
.data-chip i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ok); }
.data-chip[data-state="snapshot"] i { background: var(--rail-ink-2); }
.data-chip[data-state="error"] i { background: var(--neg); }
.main { min-width: 0; }
.page { max-width: 1480px; margin: 0 auto; padding: 28px 32px 56px; }
.page-narrow { max-width: 920px; }

.topbar, .bottombar { display: none; }
@media (max-width: 1100px) {
  .cab { grid-template-columns: 72px minmax(0, 1fr); }
  .rail { padding: 16px 10px; align-items: center; }
  .brand { padding: 0 0 14px; align-items: center; }
  .rail .brand-word, .rail .brand-sub, .rail .nav a span, .rail .who, .rail .rail-btn span, .rail .data-chip span { display: none; }
  .brand-mono { display: grid !important; }
  .nav a { width: 48px; justify-content: center; padding: 0; }
  .nav-badge { position: absolute; margin: -22px 0 0 26px; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; }
  .nav a { position: relative; }
  .rail-foot { padding: 12px 0 0; align-items: center; }
  .rail-row { flex-direction: column; }
  .theme { flex-direction: column; }
  .page { padding: 24px 24px 48px; }
}
.rail-dash .brand-word, .rail-dash .brand-sub { display: none; }
.rail-dash .brand-mono { display: grid !important; }
.brand-mono { display: none; width: 36px; height: 36px; place-items: center; border-radius: 6px; background: var(--rail-3); font-weight: 700; letter-spacing: 0.04em; font-size: 14px; }
@media (max-width: 760px) {
  .cab { display: block; }
  .rail { display: none; }
  .topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 16px;
    background: var(--rail); color: var(--rail-ink); }
  .topbar .brand-word { font-size: 14px; }
  .topbar .data-chip { color: var(--rail-ink-2); }
  .bottombar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--rail); border-top: 1px solid var(--rail-3); }
  .bottombar a, .bottombar button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px; justify-content: center; border-radius: 6px;
    color: var(--rail-ink-2); font-size: 11px; font-weight: 500; position: relative; }
  .bottombar a[aria-current="page"] { color: var(--rail-ink); background: var(--rail-3); }
  .bottombar svg { width: 22px; height: 22px; }
  .bottombar .nav-badge { position: absolute; top: 2px; right: calc(50% - 22px); margin: 0; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .page { padding: 18px 16px 32px; }
}

/* ── Шапка страницы и вкладки ── */
.pg-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.pg-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.pg-sub { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.pg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sync-note { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin-right: 4px; }
@media (max-width: 520px) { .pg-actions { gap: 8px; } .pg-actions .sync-note { flex-basis: 100%; } .pg-actions .btn { height: 34px; padding: 0 12px; font-size: 13px; } }
.sync-note i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.sync-note[data-state="off"] i { background: var(--ink-3); }
.sync-note[data-state="error"] i { background: var(--neg); }
.sync-note[data-state="busy"] i { background: var(--ink-3); animation: cab-pulse 1s infinite; }
.tabs { display: flex; gap: 4px; margin: 0 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; color: var(--ink-2); font-weight: 500; font-size: 15px; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.15s var(--ease), border-color 0.15s var(--ease); }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--rule); }
.tab-count { font-size: 12px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .tabs { gap: 0; } .tabs a { padding: 0 9px; font-size: 14px; gap: 5px; } .tabs a:first-child { padding-left: 4px; } }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }
.crumb:hover { color: var(--ink); }
.crumb svg { width: 16px; height: 16px; }

/* ── Кнопки, поля, выбор ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r);
  background: var(--btn); color: var(--btn-ink); font-weight: 600; font-size: 14px; white-space: nowrap; border: 1px solid var(--btn);
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), opacity 0.15s; }
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn svg { width: 16px; height: 16px; }
.btn-2 { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-2:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn-3 { background: transparent; color: var(--ink); border-color: transparent; padding: 0 10px; }
.btn-3:hover { background: var(--surface-3); border-color: transparent; }
.btn-s { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 5px; }
.btn-danger { color: var(--neg-ink); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"]::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: cab-spin 0.8s linear infinite; }
@keyframes cab-spin { to { transform: rotate(360deg); } }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-color: var(--ink); }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 6px; color: var(--ink-3); }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 500; min-width: 0; }
.field-hint { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.input, .select { width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-size: 15px; font-weight: 400; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.input:hover, .select:hover { border-color: var(--ink-3); }
.input:focus, .select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--select); }
.input[aria-invalid="true"] { border-color: var(--neg); }
.input-s { height: 32px; font-size: 14px; padding: 0 8px; border-radius: 5px; }
.select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.select.input-s { padding-right: 28px; background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; }
.check { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); font-weight: 400; }
.check input { width: 18px; height: 18px; accent-color: var(--btn); }
.err { color: var(--neg-ink); font-size: 13px; font-weight: 500; min-height: 1em; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 34px; }
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 3px; gap: 2px; border-radius: 7px; background: var(--surface-3); }
.seg::-webkit-scrollbar { display: none; }
.seg button { height: 32px; padding: 0 14px; border-radius: 5px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
@media (max-width: 520px) { .seg { flex-wrap: wrap; overflow: visible; } .seg button { padding: 0 10px; } }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 7px; border-radius: 3px; font-size: 12px; font-weight: 600;
  background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip-dot, .chip-wb, .chip-oz, .chip-factory, .chip-low, .chip-neg, .chip-ok { --mark: var(--ink-3); }
.chip-dot::before, .chip-wb::before, .chip-oz::before, .chip-factory::before, .chip-low::before, .chip-neg::before, .chip-ok::before {
  content: ''; width: 7px; height: 7px; flex: none; background: var(--mark); }
.chip-wb { --mark: var(--wb); }
.chip-oz { --mark: var(--oz); }
.chip-factory { --mark: var(--factory); }
.chip-low { --mark: var(--low); color: var(--low-ink); }
.chip-neg { --mark: var(--neg); color: var(--neg-ink); }
.chip-ok { --mark: var(--ok); }

/* ── Панели, таблицы, пустые состояния ── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.panel-pad { padding: 20px 22px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 16px; font-weight: 650; }
.section { margin-top: 28px; }
.section > h2, .h2 { font-size: 17px; font-weight: 650; margin-bottom: 12px; }
.lead { color: var(--ink-2); font-size: 14px; max-width: 72ch; }
.scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; font-size: 14px; }
.table th.num { text-align: right; }
.table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: var(--surface); position: sticky; top: 0; z-index: 1; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .row-strong td { font-weight: 600; }
.table-compact td { padding: 8px 12px; }
.empty { padding: 36px 24px; text-align: center; color: var(--ink-2); }
.empty h3 { color: var(--ink); font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.empty p { max-width: 52ch; margin: 0 auto; font-size: 14px; }
.empty .btn { margin-top: 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: 14px; }
.kv dt { color: var(--ink-2); }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r); margin-bottom: 16px; font-size: 14px; background: var(--info-bg); color: var(--ink); }
.flash svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.flash-ok { background: var(--ok-bg); }
.flash-bad { background: var(--neg-bg); color: var(--neg-ink); }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translate(-50%, 12px); opacity: 0; max-width: min(560px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: var(--r-l); background: var(--ink); color: var(--surface); font-size: 14px; box-shadow: var(--shadow-pop);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast-bad { background: var(--neg); color: #fff; }
@media (max-width: 760px) { .toast { bottom: calc(80px + env(safe-area-inset-bottom)); } }

/* ── Вход ── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: min(400px, 100%); padding: 32px 28px; }
.auth-brand { display: flex; align-items: baseline; gap: 10px; margin-bottom: 22px; }
.auth-brand .brand-word { color: var(--ink); }
.auth-brand .brand-sub { color: var(--ink-3); font-size: 13px; }
.auth h1 { font-size: 21px; font-weight: 700; margin-bottom: 6px; }
.auth .lead { margin-bottom: 20px; }
.form { display: grid; gap: 14px; }
.form .btn { width: 100%; height: 42px; margin-top: 4px; }
.auth-foot { margin-top: 16px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* ── Настройки кабинета ── */
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.steps-plain { display: grid; gap: 8px; counter-reset: s; font-size: 14px; color: var(--ink-2); }
/* номер — сбоку, а не ячейкой сетки: в шаге бывают ссылки, и сетка разносила текст до и после ссылки по разным ячейкам */
.steps-plain li { counter-increment: s; position: relative; padding-left: 32px; }
.steps-plain li::before { content: counter(s); position: absolute; left: 0; top: 0; font-weight: 700; color: var(--ink); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.copy { display: flex; gap: 8px; }
.copy .input { flex: 1; font-size: 13px; }

/* Обновление данных: по вкладке строка — метка состояния, когда обновлялось, как часто; ниже — что догружается и ошибки словами */
.st-row { padding: 12px 20px; border-bottom: 1px solid var(--line); }
.st-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.st-name { min-width: 84px; font-size: 15px; font-weight: 650; }
.st-when { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.st-every { font-size: 12px; }
.st-line { margin: 6px 0 0 96px; max-width: 76ch; font-size: 13px; color: var(--ink-2); }
.st-bad { color: var(--neg-ink); }
.st-at { font-size: 12px; font-variant-numeric: tabular-nums; }
#status .st-more { margin: 0; padding: 10px 20px 14px; }
.st-err-load { padding: 0 20px; }
.st-err-load:empty { display: none; }
@media (max-width: 760px) { .st-row { padding: 12px 16px; } .st-line { margin-left: 0; } #status .st-more { padding: 10px 16px 14px; } }

/* Ключи WB и Ozon: по площадке — строка с состоянием и метками вкладок, форма, инструкция */
.keys-mps { display: grid; gap: 0; margin: 4px 0 6px; }
.keys-mp { padding: 12px 0; border-bottom: 1px solid var(--line); }
.keys-mp-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.keys-mp-info { font-size: 13px; margin-top: 2px; }
.keys-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.keys-why { margin-top: 6px; font-size: 13px; color: var(--neg-ink); }
.keys-form { margin-top: 16px; }
.keys-wide { grid-column: 1 / -1; }
.keys-msg { margin-top: 12px; display: grid; gap: 4px; font-size: 14px; }
.keys-done { color: var(--ink-2); }
.keys-warn { color: var(--neg-ink); }
.keys-bad { color: var(--neg-ink); }
.keys-guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px 28px; margin-top: 12px; }
.keys-guide h3, .keys-h3 { font-size: 14px; font-weight: 650; color: var(--ink); margin: 6px 0 8px; }
.keys-h3 { margin-top: 18px; }
.keys-guide .steps-plain { font-size: 13px; }
.keys-guide .faint { margin-top: 8px; }
.keys-list { list-style: disc; padding-left: 18px; margin-top: 4px; display: grid; gap: 2px; }
/* вложенный список внутри шагов: без номеров и сетки шагов */
.steps-plain .keys-list li { display: list-item; counter-increment: none; padding-left: 0; }
.steps-plain .keys-list li::before { content: none; }
.keys-table td { vertical-align: top; }

/* Вход с кодом: ключ и запасные коды — крупно, знаки одной ширины, удобно переписать */
.tf-key { font-variant-numeric: tabular-nums; letter-spacing: 0.06em; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 14px; margin: 12px 0 14px;
  font-size: 16px; font-weight: 600; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }

#dash-root { padding: 20px 24px 40px; }
@media (max-width: 760px) { #dash-root { padding: 14px 12px 24px; } }
