/* ПАК OS — общий стиль панели.
   Мир: ночное небо за стеклом. Серебряные цифры, холодное белое свечение там, где есть «заряд».
   Раскладка: постоянная боковая панель + рабочая область; на узком экране панель выезжает по кнопке меню.
   Кирпичи для страниц: .panel/.panel-head, .grid/.g3/.g4, .metric-*, .chip, .dot, .tube, .rows,
   .due, .btn, .input/.field/.seg, .note, .muted/.footnote, .visually-hidden. */

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

:root {
  color-scheme: dark;
  --ground: #080b16;
  --rail: rgba(12, 15, 28, 0.82);
  --panel-top: rgba(38, 43, 64, 0.70);
  --panel-bot: rgba(20, 23, 37, 0.74);
  --line: rgba(196, 206, 238, 0.10);
  --line-strong: rgba(196, 206, 238, 0.18);
  --ink: #eef1f8;
  --ink-2: #aab1c6;
  --ink-3: #8a92a8;
  --silver-hi: #f4f6fb;
  --glow: #e3eaff;
  --glow-blue: #8aa0ff;
  --haze: rgba(120, 104, 210, 0.22);
  --ok: #4fd896;
  --warn: #f3bb52;
  --bad: #ff6f82;
  --font: "Onest", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 9px;
  --rail-w: 252px;
  --tap: 44px;
  --pad: 28px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}
::selection { background: rgba(138, 160, 255, 0.35); color: var(--silver-hi); }
:focus-visible { outline: 2px solid var(--glow-blue); outline-offset: 2px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: rgba(196, 206, 238, 0.18) transparent; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 60; display: inline-flex; align-items: center; min-height: var(--tap); padding: 10px 14px; border-radius: var(--r-md);
  background: var(--silver-hi); color: #121626; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* --- Небо -------------------------------------------------------------- */
.sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.sky-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(260px 220px at 78% 2%, rgba(235, 240, 255, 0.30), transparent 70%),
    radial-gradient(520px 380px at 74% -6%, rgba(140, 160, 255, 0.16), transparent 72%),
    radial-gradient(700px 420px at 42% -12%, var(--haze), transparent 70%),
    radial-gradient(900px 600px at 100% 100%, rgba(70, 60, 150, 0.14), transparent 70%); }

/* --- Каркас ------------------------------------------------------------ */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100vh; min-height: 100dvh; }

.drawer {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 18px;
  padding: 20px 16px; padding-left: max(16px, env(safe-area-inset-left, 0px));
  background: var(--rail);
  border-right: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  overflow-y: auto;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.btn.drawer-close { display: none; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px; border-radius: var(--r-md); }
/* Знак: монограмма DP (серебро и холодное свечение) на тёмном стекле. */
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: linear-gradient(160deg, rgba(52, 58, 86, 0.95), rgba(14, 17, 30, 0.95));
  border: 1px solid var(--line-strong);
  box-shadow: 0 6px 18px -6px rgba(138, 160, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.brand-mark img { display: block; width: 20px; height: 23px; filter: drop-shadow(0 0 4px rgba(170, 190, 255, 0.45)); }
.brand-name { display: block; font-weight: 600; font-size: 18px; line-height: 1.2; letter-spacing: 0.01em; }
.brand-sub { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }

.health { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); font-size: 13px; color: var(--ink-2); }

.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { margin: 0 0 6px; padding: 0 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3); }
.drawer-link { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 8px 12px;
  border-radius: var(--r-md); color: var(--ink-2); border: 1px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s; }
.drawer-link:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.drawer-link.is-active { color: var(--ink); font-weight: 600;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03));
  border-color: var(--line-strong); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 20px -14px rgba(0, 0, 0, 0.8); }
.drawer .ext { margin-left: auto; width: 14px; height: 14px; color: var(--ink-3); }
.drawer .nav-state { margin-left: auto; }

.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.rail-card { padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bot)); }
.rail-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 8px;
  margin: 0 0 6px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.rail-card p.num { font-size: 13px; color: var(--ink-2); }
.rail-card p.num:empty { display: none; }
.drawer-logout { margin: 0; }

.scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 14px; min-height: 68px;
  padding-block: 12px; padding-top: max(12px, env(safe-area-inset-top, 0px));
  padding-left: max(var(--pad), env(safe-area-inset-left, 0px)); padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 11, 22, 0.80), rgba(8, 11, 22, 0.55));
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.topbar h1 { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
/* Надпись над заголовком раздела («ПЛАНЫ» у доски задач) */
.page-head { min-width: 0; }
.page-head .eyebrow { margin: 0 0 2px; }
.menu-btn { min-height: var(--tap); }
.btn.menu-btn { display: none; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.live .dot { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.45; box-shadow: 0 0 2px currentColor; } }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-block: 12px;
  padding-left: max(var(--pad), env(safe-area-inset-left, 0px)); padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--line); }

.content { display: flex; flex-direction: column; gap: 20px;
  padding-block: 24px 48px; padding-bottom: max(48px, env(safe-area-inset-bottom, 0px));
  padding-left: max(var(--pad), env(safe-area-inset-left, 0px)); padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
  max-width: 1360px; width: 100%; }
.content:focus { outline: none; }
.view { display: flex; flex-direction: column; gap: 20px; }

/* --- Панель-стекло ------------------------------------------------------ */
.panel {
  position: relative; min-width: 0; padding: 18px 20px;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bot));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 24px 40px -28px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(14px) saturate(120%); backdrop-filter: blur(14px) saturate(120%);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.panel-head p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.panel--flush { padding: 0; }
.panel--flush > .panel-head { padding: 18px 20px 14px; margin: 0; }
.panel h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }

.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Плитка показателя */
.metric-label { margin: 0; font-size: 13px; color: var(--ink-2); display: flex; align-items: center;
  justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.metric-value { margin: 8px 0 14px; font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em;
  color: var(--silver-hi); text-shadow: 0 0 22px rgba(200, 212, 255, 0.18); }
.metric-value small { font-size: 15px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin: 0 2px; }
.metric-note { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); }
.metric-value + .metric-note { margin-top: -4px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 7px; font-size: 12px; font-weight: 600;
  line-height: 1.5; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); color: var(--ink-2); white-space: nowrap; }
.chip--ok::before, .chip--bad::before, .chip--warn::before, .chip--muted::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; flex: none; }
.chip--muted::before { box-shadow: none; }
.chip--ok { color: var(--ok); border-color: rgba(79, 216, 150, 0.30); background: rgba(79, 216, 150, 0.08); }
.chip--warn { color: var(--warn); border-color: rgba(243, 187, 82, 0.32); background: rgba(243, 187, 82, 0.08); }
.chip--bad { color: var(--bad); border-color: rgba(255, 111, 130, 0.34); background: rgba(255, 111, 130, 0.09); }
.chip--muted { color: var(--ink-3); }
.chip--accent { color: var(--glow); border-color: rgba(225, 233, 255, 0.35); background: rgba(225, 233, 255, 0.07); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; flex: none; }
.dot--ok { color: var(--ok); }
.dot--warn { color: var(--warn); }
.dot--bad { color: var(--bad); }
.dot--muted { color: var(--ink-3); box-shadow: none; }

/* Полоса: светящаяся трубка. Заряд горит холодным белым, на конце яркий колпачок. Ширина: --v из data-v. */
.tube { position: relative; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5); }
.tube > i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--v, 0%); border-radius: inherit;
  background: linear-gradient(90deg, rgba(138, 160, 255, 0.10), rgba(170, 186, 255, 0.55) 60%, var(--glow));
  box-shadow: 0 0 14px rgba(170, 190, 255, 0.45); transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.tube > i::after { content: ""; position: absolute; right: 0; top: -2px; bottom: -2px; width: 5px; border-radius: 99px; background: #fff;
  box-shadow: 0 0 10px 2px rgba(225, 233, 255, 0.95), 0 0 26px 6px rgba(140, 160, 255, 0.45); }
.tube > i[data-v="0"]::after { display: none; }
.tube--warn > i { background: linear-gradient(90deg, rgba(243, 187, 82, 0.10), rgba(243, 187, 82, 0.6) 70%, #ffe2a8); box-shadow: 0 0 14px rgba(243, 187, 82, 0.35); }
.tube--warn > i::after { box-shadow: 0 0 10px 2px rgba(255, 226, 168, 0.9), 0 0 24px 6px rgba(243, 187, 82, 0.4); }
.tube--bad > i { background: linear-gradient(90deg, rgba(255, 111, 130, 0.10), rgba(255, 111, 130, 0.65) 70%, #ffc4cd); box-shadow: 0 0 14px rgba(255, 111, 130, 0.35); }
.tube--bad > i::after { box-shadow: 0 0 10px 2px rgba(255, 196, 205, 0.9), 0 0 24px 6px rgba(255, 111, 130, 0.4); }
.tube--muted > i { background: rgba(170, 184, 230, 0.25); box-shadow: none; }
.tube--muted > i::after { display: none; }
.tube--thin { height: 6px; }

/* Строки «название — значение» */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); min-width: 0; }
.rows li:first-child { border-top: 0; }
.rows .k { flex: 1; min-width: 0; color: var(--ink); }
.rows .k small { display: block; color: var(--ink-3); font-size: 12.5px; }
.rows .v { color: var(--ink-2); font-size: 14px; text-align: right; }

/* Плашка срока: число сверху, единица снизу («7 / дней», «11 / мес») */
.due { width: 48px; height: 48px; flex: none; border-radius: 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1.05; text-align: center;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.due-num { font-size: 16px; font-weight: 600; }
.due-num--word { font-size: 10.5px; }
.due-unit { font-size: 11px; color: var(--ink-3); }
.due--soon { border-color: rgba(225, 233, 255, 0.55); background: rgba(225, 233, 255, 0.08); box-shadow: 0 0 18px -4px rgba(190, 205, 255, 0.55); }
.due--today { border-color: rgba(255, 255, 255, 0.9); background: rgba(225, 233, 255, 0.16);
  box-shadow: 0 0 22px -2px rgba(210, 222, 255, 0.75); }
.amount, .row-amount { font-weight: 600; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Плашка «На проверке: N» на главной: ссылка на колонку доски задач */
.review-tile { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding-block: 12px;
  color: var(--ink); transition: border-color 0.18s, background 0.18s; }
.review-tile:hover { border-color: var(--line-strong); }
.review-tile > svg.i { color: var(--glow); }
.review-label { font-weight: 600; }
.review-label b { color: var(--silver-hi); text-shadow: 0 0 18px rgba(200, 212, 255, 0.35); }
.review-go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.review-go svg.i { width: 14px; height: 14px; }
/* «На проверке: 0» — тихо: ничего не ждёт, плашка не тянет взгляд */
.review-tile--quiet > svg.i { color: var(--ink-3); }
.review-tile--quiet .review-label { font-weight: 500; color: var(--ink-2); }
.review-tile--quiet .review-label b { color: var(--ink-2); text-shadow: none; }

/* --- Кнопки ------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); min-width: var(--tap); padding: 8px 14px;
  border-radius: var(--r-md); border: 1px solid var(--line-strong); cursor: pointer; white-space: nowrap;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)); color: var(--ink);
  font-size: 14px; font-weight: 500; line-height: 1.2; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent; }
.btn:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)); border-color: rgba(196, 206, 238, 0.28); }
.btn:active { transform: translateY(1px); }
.btn--primary { color: #121626; font-weight: 600; border-color: transparent;
  background: linear-gradient(180deg, #f6f8fc, #c3cadd); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(255, 255, 255, 0.15), 0 6px 24px -6px rgba(200, 212, 255, 0.55); }
.btn--primary:hover { background: linear-gradient(180deg, #ffffff, #d2d8e8); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(255, 255, 255, 0.2), 0 8px 30px -6px rgba(200, 212, 255, 0.75); }
.btn--icon { width: var(--tap); padding: 0; }
.btn--quiet, .btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn--quiet:hover, .btn--ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); border-color: transparent; }
.btn--quiet.danger:hover { color: var(--bad); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.inline-form { display: inline; margin: 0; }

/* --- Формы -------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 13px; color: var(--ink-2); }
.input, .field input:not([type="radio"]):not([type="checkbox"]), .field select, .field textarea {
  width: 100%; min-height: var(--tap); padding: 8px 12px; border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: rgba(4, 6, 14, 0.45); color: var(--ink); font-size: 16px; caret-color: var(--glow);
  transition: border-color 0.18s, box-shadow 0.18s; }
.input::placeholder, .field input::placeholder { color: var(--ink-3); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: rgba(170, 186, 255, 0.6); box-shadow: 0 0 0 3px rgba(138, 160, 255, 0.25); }
select.input, .field select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select option { background: #141826; color: var(--ink); }
.field input[aria-invalid="true"], .input[aria-invalid="true"] { border-color: var(--bad); }
.field-error { margin: 0; font-size: 13px; color: var(--bad); }
.field-hint { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.input-wrap { position: relative; flex: 1; min-width: 0; }
.input-wrap svg.i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 16px; height: 16px; pointer-events: none; }
.input-wrap .input { padding-left: 36px; }

/* Переключатель вариантов на радио-кнопках: <div class="seg"><label><input type="radio">…<span>₽</span></label>…</div> */
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); }
.seg label { flex: 1; position: relative; min-width: 0; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 6px 12px;
  border-radius: 9px; color: var(--ink-2); font-size: 14px; font-weight: 500; text-align: center; }
.seg input:checked + span { color: var(--ink); background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px var(--line-strong); }
.seg input:focus-visible + span { outline: 2px solid var(--glow-blue); }

/* --- Сообщения и текст -------------------------------------------------- */
.note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-md); font-size: 13.5px;
  color: var(--ink); border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.content > .note { margin: 0; }
.note--bad, .note[data-field="note"] { color: #ffd0d7; border-color: rgba(255, 111, 130, 0.30); background: rgba(255, 111, 130, 0.08); }
.note--warn { color: #ffe2a8; border-color: rgba(243, 187, 82, 0.35); background: rgba(243, 187, 82, 0.08); }
.note--ok { color: #c9f5de; border-color: rgba(79, 216, 150, 0.32); background: rgba(79, 216, 150, 0.08); }
.note code { word-break: break-all; }

.muted { color: var(--ink-2); }
.footnote { margin: 0; font-size: 13px; color: var(--ink-3); }
.footnote a { color: var(--ink-2); text-decoration: underline; }
.eyebrow { margin: 0 0 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-block: 12px; }
.src { font-size: 12px; color: var(--ink-3); }

/* --- Вход ---------------------------------------------------------------- */
.auth { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding-block: 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.auth-card { width: 100%; max-width: 400px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.25; }
.auth-card h1 + p { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.brand--auth { padding: 0; }
.code { font-size: 26px; letter-spacing: 0.4em; text-align: center; min-height: 56px; font-variant-numeric: tabular-nums; }
.field input.code { font-size: 26px; min-height: 56px; }
.auth-steps { display: flex; gap: 6px; }
.auth-steps i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); }
.auth-steps i.on { background: var(--glow); box-shadow: 0 0 10px rgba(225, 233, 255, 0.7); }
.auth-foot { font-size: 12.5px; color: var(--ink-3); text-align: center; }
.auth-foot a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 8px; color: var(--ink-2); text-decoration: underline; }
.enroll-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); font-size: 14px; }
.qr-step { list-style: none; margin-left: -20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr { width: min(100%, 240px); border-radius: 14px; overflow: hidden; background: #fff; line-height: 0; }
.qr svg { display: block; width: 100%; height: auto; }
.secret { display: block; padding: 8px 12px; border-radius: 10px; background: rgba(4, 6, 14, 0.5); color: var(--ink);
  font-size: 15px; letter-spacing: 0.06em; text-align: center; user-select: all; }

/* --- Адаптив ------------------------------------------------------------ */
@media (max-width: 1080px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .drawer { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: min(290px, 86vw);
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    transform: translateX(-104%); visibility: hidden; background: rgba(12, 15, 28, 0.96);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.24s; }
  .menu-open .drawer { transform: none; visibility: visible; transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1); }
  .btn.drawer-close { display: inline-flex; }
  .scrim { position: fixed; inset: 0; z-index: 35; background: rgba(3, 4, 10, 0.55); }
  .menu-open .scrim { display: block; }
  .menu-open { overflow: hidden; }
  .btn.menu-btn { display: inline-flex; flex: none; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --pad: 16px; }
  .g3 { grid-template-columns: minmax(0, 1fr); }
  .metric-value { font-size: 24px; }
  .topbar { gap: 10px; min-height: 60px; }
  .topbar h1 { font-size: 19px; }
  .live .lbl { display: none; }
}
@media (max-width: 480px) {
  .g4 { gap: 10px; }
  .g4 .panel { padding: 14px; }
  .g4 .metric-value { font-size: 19px; margin: 6px 0 12px; }
  .panel { padding: 16px; }
  .panel--flush { padding: 0; }
  .panel--flush > .panel-head { padding: 16px 16px 12px; }
  .auth-card { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
