/* ============================================================================
   БИТ.AI Платформа — личный кабинет
   Aesthetic: light, minimal SaaS. Soft off-white canvas, white cards with quiet
   shadows, generous whitespace, refined type, magenta (#E50071) used sparingly
   as a precise accent. Monospace numerics for figures.
   ========================================================================== */

:root {
  --ink: #18181F;
  --ink-2: #54545F;
  --ink-3: #8B8B98;

  --canvas: #F6F6F9;
  --surface: #FFFFFF;
  --surface-2: #F2F2F6;
  --line: #E8E8EE;
  --line-2: #DCDCE4;

  --bit-primary: #E50071;
  --brand: #E50071;
  --brand-strong: #C9005F;
  --brand-soft: #FCE6F0;
  --brand-ring: rgba(229, 0, 113, 0.16);

  --success: #12A150;
  --bit-error: #D02E3F;
  --error: #D02E3F;
  --warning: #B45309;
  --warning-soft: #FFF7ED;
  --error-soft: #FEF2F2;
  --info-soft: #F2F2F6;

  --font-ui: 'Onest', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 20, 45, 0.05);
  --shadow: 0 1px 3px rgba(20, 20, 45, 0.06), 0 14px 30px -20px rgba(20, 20, 45, 0.18);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
.hidden { display: none !important; }

body {
  font-family: var(--font-ui);
  background: var(--canvas);
  color: var(--ink);
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
  max-width: 1080px;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brand-soft); color: var(--brand-strong); }

a { color: var(--brand-strong); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

@keyframes rise { from { opacity: 0; } to { opacity: 1; } }
header, main > section, main > p { animation: rise .5s cubic-bezier(.22,.61,.36,1) both; }
main > section:nth-of-type(1) { animation-delay: .05s; }
main > section:nth-of-type(2) { animation-delay: .1s; }
main > section:nth-of-type(3) { animation-delay: .15s; }
main > section:nth-of-type(4) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Header ───────────────────────────────────────────────────────── */
header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: 2.2rem 0 1.4rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
header h1 {
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 .15rem; color: var(--ink);
}
header h1::first-letter { color: var(--brand); }
.header-brand p {
  margin: 0; color: var(--ink-3);
  font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.22em;
}
.header-nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.header-btn {
  display: inline-flex; align-items: center;
  padding: .5rem 1rem; border-radius: 999px;
  font-size: .82rem; font-weight: 600; line-height: 1;
  border: 1px solid transparent; transition: background .18s, border-color .18s, color .18s;
}
.header-btn.ghost { border-color: var(--line-2); background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-sm); }
.header-btn.ghost:hover { border-color: var(--brand); color: var(--brand-strong); text-decoration: none; }
.header-btn:not(.ghost) { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.header-btn:not(.ghost):hover { background: var(--brand-strong); text-decoration: none; }
.status-link {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .9rem; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2); font-size: .82rem; font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s, color .18s, box-shadow .18s;
}
.status-link:hover { border-color: var(--brand); color: var(--brand-strong); text-decoration: none; }
.status-dot {
  width: .5rem; height: .5rem; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 3px rgba(18, 161, 80, 0.15);
}
.header-user {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .35rem .85rem .35rem .4rem;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-sm);
  max-width: 14rem; min-width: 0;
}
.header-avatar {
  flex: none; width: 1.65rem; height: 1.65rem; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-strong);
  font-size: .68rem; font-weight: 700; letter-spacing: .02em;
  display: inline-flex; align-items: center; justify-content: center;
}
.header-user-name {
  font-size: .82rem; font-weight: 600; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.logout-form { margin: 0; display: inline; }

/* ── Sections & headings ──────────────────────────────────────────── */
main > section { margin: 2.6rem 0; }
section > h2 {
  font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em;
  margin: 0 0 1.1rem; color: var(--ink);
}

/* ── Hero (CTA) ───────────────────────────────────────────────────── */
.cta {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 160% at 100% 0%, var(--brand-soft), transparent 52%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem 2.2rem;
  margin: 1.25rem 0 0;
  box-shadow: var(--shadow);
}
.cta h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.35rem);
  font-weight: 800; line-height: 1.12; letter-spacing: -0.03em;
  margin: 0 0 .7rem; max-width: 20ch; color: var(--ink);
}
.cta p { color: var(--ink-2); margin: 0 0 .4rem; max-width: 64ch; font-size: 1.05rem; }
.cta p strong { color: var(--ink); font-weight: 600; }
.cta p strong + * , .cta p:last-child { color: var(--ink-2); }
.cta-auth { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; }
.cta-auth .header-btn { text-decoration: none; }
.key-check-card { margin-top: 1.25rem; }

.hint { color: var(--ink-3); font-size: .92rem; margin: 0 0 .75rem; }
/* Тихая ссылка на текст Обязательства в строке-акцепте — приглушённая, не бренд-цвет */
.nda-doc-link { color: var(--ink-3); font-weight: 500; text-decoration: none; white-space: nowrap; }
.nda-doc-link:hover { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.error { color: var(--error); padding: .5rem 0; margin: 0; }

.alert {
  margin: 0 0 1rem; padding: .85rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2);
}
.alert-message { margin: 0; font-size: .95rem; line-height: 1.45; }
.alert-hint { margin: .45rem 0 0; font-size: .88rem; }
.alert-hint a { color: var(--brand-strong); font-weight: 600; text-decoration: none; }
.alert-hint a:hover { text-decoration: underline; }
.alert-error {
  border-color: rgba(208, 46, 63, 0.35); background: var(--error-soft); color: var(--error);
}
.alert-error .alert-message { color: var(--error); font-weight: 600; }
.alert-info {
  border-color: var(--line); background: var(--info-soft); color: var(--ink-2);
}
.alert-info .alert-message { color: var(--ink-2); }
.alert-warning {
  border-color: rgba(180, 83, 9, 0.35); background: var(--warning-soft); color: var(--warning);
}
.alert-warning .alert-message { color: var(--warning); font-weight: 600; }
.alert-success {
  border-color: rgba(18, 161, 80, 0.35); background: rgba(18, 161, 80, 0.08); color: var(--success);
}
.alert-success .alert-message { color: var(--success); font-weight: 600; }

/* ── Form system ──────────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.form-card > h2 { margin-top: 0; }
.auth-card {
  max-width: 480px;
  margin-inline: auto;
}

.form-stack {
  display: flex; flex-direction: column; gap: 1rem;
  margin: 0; max-width: 100%;
}
.form-row {
  display: flex; flex-wrap: wrap; gap: 1.1rem; margin-bottom: 1.2rem;
}
.form-row:last-child { margin-bottom: 0; }

label.form-field,
.form-field > span:first-child {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3);
}
.form-field {
  display: flex; flex-direction: column; gap: .45rem;
}
.form-field-wide { flex: 1 1 100%; }

.form-field input,
.form-field select,
.form-field textarea,
.prices-search {
  padding: .65rem .8rem;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font-family: var(--font-ui); font-size: .95rem; font-weight: 400;
  text-transform: none; letter-spacing: normal;
  transition: border-color .18s, box-shadow .18s;
}
.form-field input[type="number"] {
  width: 11rem; font-family: var(--font-mono); font-size: 1rem;
}
.form-field input::placeholder,
.prices-search::placeholder { color: var(--ink-3); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.prices-search:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring);
}
.form-field select {
  font-weight: 600; cursor: pointer; max-width: 100%;
  appearance: none; -webkit-appearance: none; padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23E50071' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center;
}

.btn-primary {
  align-self: flex-start;
  padding: .75rem 1.5rem; border: 0; border-radius: var(--radius-sm);
  background: var(--brand); color: #fff;
  font-family: var(--font-ui); font-weight: 600; font-size: .95rem; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .18s, transform .12s, box-shadow .18s;
}
.btn-primary:hover {
  background: var(--brand-strong); transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px var(--brand-ring);
}
.btn-primary:active { transform: translateY(0); }

.form-footer-links {
  margin: 1.1rem 0 0; font-size: .92rem; color: var(--ink-3);
}

/* ── Cost calculator ──────────────────────────────────────────────── */
.calc { /* extends .form-card */ }
.calc-out {
  margin-top: 1.5rem; padding: 1.25rem 1.3rem;
  background: var(--surface-2); border-radius: var(--radius-sm);
}
.calc-line {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line);
}
.calc-line:first-child { padding-top: 0; }
.calc-line span {
  color: var(--ink-3); flex-shrink: 0;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
}
.calc-line strong { font-family: var(--font-mono); font-weight: 600; }
.calc-line strong:first-of-type { color: var(--ink-3); font-size: .92rem; }
.calc-line strong:last-of-type { color: var(--brand-strong); font-size: 1.1rem; }
#calc-result .calc-line:nth-of-type(2) { padding: .9rem 0; }
#calc-result .calc-line:nth-of-type(2) strong:last-of-type { font-size: 1.55rem; letter-spacing: -0.01em; color: var(--brand); }

#calc-ctx {
  font-family: var(--font-mono); display: inline-block;
  padding: .2rem .7rem; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-strong);
  font-size: .82rem; font-weight: 600;
}
.calc-note { margin-top: .95rem; font-size: .76rem; color: var(--ink-3); font-family: var(--font-mono); }

/* ── Tables / price list ──────────────────────────────────────────── */
.mode-heading {
  margin: 1.4rem 0 .35rem; font-size: .7rem; font-weight: 700;
  color: var(--ink-3); text-transform: uppercase; letter-spacing: .12em;
}
table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
th { font-weight: 700; color: var(--ink-3); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--brand); }
th.sortable::after { content: "↕"; margin-left: .35em; opacity: .35; }
th.sortable.sort-asc::after { content: "↑"; opacity: 1; color: var(--brand); }
th.sortable.sort-desc::after { content: "↓"; opacity: 1; color: var(--brand); }
td { font-size: .92rem; color: var(--ink-2); }
td:first-child { color: var(--ink); font-weight: 500; }
td:nth-child(3), td:nth-child(4) { font-family: var(--font-mono); color: var(--ink); }
tbody tr { transition: background .12s; }
tbody tr[data-model] { cursor: pointer; }
tbody tr:hover { background: var(--brand-soft); }

.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .72rem; }
.badge.available { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }

.prices-search {
  width: 100%; max-width: 420px; margin: .6rem 0 1rem;
}
.prices-scroll {
  max-height: 70vh; overflow: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 1rem; background: var(--surface); box-shadow: var(--shadow-sm);
}
.prices-scroll td:first-child,
.prices-scroll td:nth-child(2) {
  max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prices-scroll th {
  position: sticky; top: 1.7rem; z-index: 1;  /* pin below the sticky mode heading so headers stay clickable when scrolled */
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.prices-scroll .mode-heading {
  position: sticky; top: 0; z-index: 2;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding-top: .55rem; margin-top: 0;
}
.prices-scroll table { margin: 0; }
.prices-scroll tr.hidden, .prices-scroll .mode-heading.hidden, .prices-scroll table.hidden { display: none; }
.prices-scroll::-webkit-scrollbar { width: 10px; }
.prices-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; border: 2px solid var(--surface); }
.prices-scroll::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ── My account / API key ─────────────────────────────────────────── */
.my-account .api-key-row { margin: 0 0 1.2rem; }
.api-key-display {
  display: flex; gap: .6rem; align-items: center; flex-wrap: wrap;
}
.api-key-field {
  display: flex; align-items: stretch; align-self: stretch; width: 100%;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface-2); overflow: hidden;
}
.api-key-value {
  flex: 1 1 auto; min-width: 0; margin: 0;
  word-break: break-all; padding: .55rem .65rem;
  font-size: .9rem; font-family: var(--font-mono);
  background: transparent; border: 0; border-radius: 0;
  color: var(--ink);
}
.api-key-display code {
  flex: 1 1 auto; word-break: break-all; padding: .55rem .75rem; font-size: .9rem;
}
.key-action-form { margin: 0; flex: 0 0 auto; display: flex; }
.key-rotate-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.65rem; flex: none; padding: 0;
  border: 0; border-left: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-3); cursor: pointer;
  transition: background .15s, color .15s;
}
.key-rotate-btn svg { width: 1.05rem; height: 1.05rem; }
.key-rotate-btn:hover { background: var(--brand-soft); color: var(--brand-strong); }
.key-rotate-btn:disabled { opacity: .45; cursor: not-allowed; }
.key-rotate-btn:disabled:hover { background: var(--surface); color: var(--ink-3); }
.copy-btn {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); border-radius: 8px; padding: .45rem .85rem; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.copy-btn:hover { background: var(--surface-2); border-color: var(--brand); }
.key-reveal-banner {
  margin: 0 0 1.2rem; padding: 1rem 1.1rem; border-radius: var(--radius);
  border: 1px solid var(--brand); background: var(--brand-soft);
  box-shadow: var(--shadow);
}
.key-reveal-title { margin: 0 0 .35rem; font-weight: 700; color: var(--brand-strong); }
.key-reveal-warning { margin: 0 0 .75rem; color: var(--ink-2); }

/* ── Balance cards ────────────────────────────────────────────────── */
.balance { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin: 0; }
.balance .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow); }
.balance .card h3 {
  margin: 0 0 .6rem; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.balance .card .card-subject { margin: 0 0 .5rem; font-size: .95rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.balance .card .spend { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 600; color: var(--ink); }
.balance .card .spend-period { margin: .15rem 0 .35rem; font-size: .8rem; color: var(--ink-3); }
.balance .card .spend-limit { margin: .35rem 0 .2rem; font-size: .85rem; color: var(--ink-2); }
.balance .card.error, .balance .card.error h3 { color: var(--error); }
.balance .card progress {
  width: 100%; height: 8px; margin-top: .8rem; border: 0; border-radius: 999px; overflow: hidden;
  appearance: none; -webkit-appearance: none; background: var(--surface-2);
}
.balance .card progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
.balance .card progress::-webkit-progress-value { background: var(--brand); border-radius: 999px; }
.balance .card progress::-moz-progress-bar { background: var(--brand); border-radius: 999px; }

/* ── Inline code & endpoint ───────────────────────────────────────── */
code {
  font-family: var(--font-mono); font-size: .88em;
  background: var(--surface-2); border: 1px solid var(--line);
  padding: .1rem .4rem; border-radius: 6px; color: var(--ink);
}
code.endpoint { color: var(--brand-strong); font-weight: 600; background: var(--brand-soft); border-color: transparent; }

/* ── Collapsibles (<details>) ─────────────────────────────────────── */
details > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: .55rem;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: ""; width: .62rem; height: .62rem; flex: none;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(-45deg); transition: transform .2s; margin-top: -.15rem;
}
details[open] > summary::before { transform: rotate(45deg); }

/* calculator section: summary carries the <h2> */
.collapsible > summary { margin: 0 0 1.1rem; }
.collapsible > summary h2 { margin: 0; }
.collapsible > summary:hover h2 { color: var(--brand-strong); }

/* Python snippets inside the hero */
.snippets { margin-top: 1.4rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.snippets > summary { font-weight: 600; color: var(--ink-2); font-size: .92rem; }
.snippets > summary:hover { color: var(--brand-strong); }
.snippets-body { margin-top: 1rem; }
.snippet-cap { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 1rem 0 .4rem; }
.snippet-cap:first-child { margin-top: 0; }
pre {
  margin: 0; padding: 1rem 1.1rem;
  background: #FBFBFD; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow-x: auto;
}
pre code {
  background: none; border: 0; padding: 0; font-size: .82rem; line-height: 1.6; color: var(--ink);
  white-space: pre;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 540px) {
  body { padding: 0 1rem 4rem; }
  .cta { padding: 1.8rem 1.4rem; }
  .form-field input[type="number"] { width: 100%; }
  .form-row .form-field { flex: 1 1 100%; }
  .header-user { max-width: 10rem; }
  .btn-primary { width: 100%; }
  #calc-result .calc-line:nth-of-type(2) strong:last-of-type { font-size: 1.3rem; }
}

/* Onboarding (/start) — uses cabinet tokens only */
.ob-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: .9rem; font-weight: 700;
  margin-right: .4rem;
}
.ob-os { font-size: .85rem; color: var(--ink-3); margin: .6rem 0 .2rem; }
.ob-cmd { display: flex; align-items: center; gap: .5rem; }
.ob-cmd pre { flex: 1; margin: 0; overflow: auto; }
.ob-examples { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .4rem; }
.ob-examples li { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .55rem .8rem; font-size: .95rem; }
.ob-cards { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.ob-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.ob-card-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ob-card-title { font-weight: 600; }
.ob-badge { font-size: .68rem; color: var(--brand-strong); border: 1px solid var(--brand); border-radius: 999px; padding: 0 .5rem; }
.ob-badge.beta { color: var(--warning); border-color: var(--warning); }
.ob-agent-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .ob-agent-tabs { grid-template-columns: 1fr; } }
.ob-agent-tab { display: flex; flex-direction: column; gap: .35rem; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; font: inherit; color: inherit; }
.ob-agent-tab:hover { border-color: var(--brand); }
.ob-agent-tab.active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.ob-ready { color: var(--success); font-size: .9rem; }
.ob-howto > summary { cursor: pointer; color: var(--brand-strong); font-size: .9rem; }
.ob-howto ol { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .9rem; color: var(--ink-2); }
.ob-cat-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 1rem 0 .5rem; }
.ob-cat-row { display: flex; gap: .8rem; padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.ob-cat-name { font-family: var(--font-mono); color: var(--brand-strong); min-width: 11rem; }
.ob-reveal-form { display: inline; }
.ob-back { margin: 0 0 .4rem; }
.ob-back a { color: var(--ink-2); font-size: .92rem; }
.ob-back a:hover { color: var(--brand-strong); }
.ob-faq-row { display: flex; flex-direction: column; gap: .15rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.ob-faq-row strong { color: var(--ink-2); }
.ob-faq-row .hint { margin: 0; }
.ob-faq-foot { font-size: .9rem; margin: .8rem 0 0; }
@media (max-width: 640px) { .ob-cat-row { flex-direction: column; gap: .2rem; } .ob-cat-name { min-width: 0; } }

/* ── Analytics (prototype) ───────────────────────────────────────── */
.analytics-page { margin-top: .5rem; }
.analytics-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.analytics-header h2 { margin: 0 0 .25rem; }
.analytics-role-switch { display: flex; gap: .4rem; flex-wrap: wrap; }
.analytics-role-switch .header-btn.active-role {
  background: var(--brand); color: #fff; border-color: transparent;
}
.analytics-prototype-banner { margin-bottom: .75rem; }
.analytics-controls { margin-bottom: .65rem; overflow: visible; }
.analytics-org-inline { margin: 0; }
.analytics-org-inline-label {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .82rem; color: var(--ink-2);
}
.analytics-org-inline-label span {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-3);
}
.analytics-toolbar { margin: 0; display: flex; flex-direction: column; gap: .45rem; overflow: visible; }
.analytics-toolbar-top {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: .45rem .55rem;
}
.analytics-toolbar-primary {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .55rem;
  flex: 1 1 auto; min-width: 0;
}
.analytics-toolbar-actions {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end;
  gap: .45rem; flex: 0 0 auto; margin-left: auto;
}
.analytics-toolbar-more { position: relative; flex: 0 0 auto; }
.analytics-toolbar-more-summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .42rem .75rem; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  font-size: .82rem; font-weight: 600; line-height: 1.2;
  transition: border-color .18s, color .18s;
}
.analytics-toolbar-more-summary::-webkit-details-marker { display: none; }
.analytics-toolbar-more-summary:hover {
  border-color: var(--brand); color: var(--brand-strong);
}
.analytics-toolbar-popover {
  position: absolute; right: 0; top: calc(100% + .35rem); z-index: 12;
  padding: .85rem .95rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.08));
}
.analytics-compare-popover { width: min(20rem, calc(100vw - 2rem)); }
.analytics-filters-popover { width: min(24rem, calc(100vw - 2rem)); }
.analytics-compare-hint {
  margin: 0 0 .65rem; font-size: .75rem; line-height: 1.45; color: var(--ink-3);
}
.analytics-compare-active {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .65rem;
  margin: .35rem 0 .85rem; padding: .45rem .65rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.analytics-compare-active-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-3);
}
.analytics-compare-chips { display: flex; flex-wrap: wrap; gap: .35rem; flex: 1 1 auto; }
.analytics-compare-chip {
  display: inline-flex; align-items: center; gap: .2rem;
  padding: .2rem .55rem; border-radius: 999px;
  border: 1px solid var(--brand-ring); background: var(--surface);
  color: var(--brand-strong); font-size: .78rem; font-weight: 600; text-decoration: none;
}
.analytics-compare-chip:hover { background: var(--brand-ring); }
.analytics-compare-chip.is-static { border-color: var(--line-2); color: var(--ink-2); }
.analytics-compare-clear {
  font-size: .78rem; font-weight: 600; color: var(--ink-3); text-decoration: none;
}
.analytics-compare-clear:hover { color: var(--brand-strong); }
.analytics-toolbar-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .55rem;
}
.analytics-toolbar-dates {
  display: inline-flex; align-items: center; gap: .35rem;
}
.analytics-toolbar-dash { color: var(--ink-3); font-size: .82rem; user-select: none; }
.analytics-input-compact,
.analytics-select-compact {
  padding: .42rem .65rem;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-family: var(--font-ui); font-size: .82rem; font-weight: 500;
  line-height: 1.2; transition: border-color .18s, box-shadow .18s;
}
.analytics-input-compact { font-family: var(--font-mono); font-size: .78rem; }
.analytics-input-compact:focus,
.analytics-select-compact:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring);
}
.analytics-select-compact {
  cursor: pointer; padding-right: 2rem;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238B8B98' stroke-width='2'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .65rem center;
}
.analytics-filter-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem;
  border-radius: 999px; background: var(--brand); color: #fff;
  font-size: .68rem; font-weight: 700; line-height: 1;
}
.analytics-filters-popover .analytics-filters-section + .analytics-filters-section {
  margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--line);
}
.analytics-filters-section-title {
  margin: 0 0 .55rem; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3);
}
.analytics-filters-section-grid {
  display: flex; flex-wrap: wrap; gap: .65rem 1rem; align-items: flex-end;
}
.analytics-field-compact {
  display: flex; flex-direction: column; gap: .3rem; min-width: 8rem;
}
.analytics-field-compact span {
  font-size: .68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-3);
}
.analytics-field-compact select,
.analytics-field-compact input {
  padding: .5rem .7rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font-family: var(--font-ui); font-size: .88rem;
}
.analytics-field-compact select:focus,
.analytics-field-compact input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring);
}
.analytics-field-grow { flex: 1 1 12rem; min-width: 10rem; }
.analytics-field-check {
  flex-direction: row; align-items: center; gap: .5rem; min-width: auto;
  padding-bottom: .45rem;
}
.analytics-field-check span {
  text-transform: none; letter-spacing: normal; font-size: .85rem;
  font-weight: 500; color: var(--ink-2);
}
.analytics-field-check input { width: 1rem; height: 1rem; accent-color: var(--brand); }
.analytics-multiselect-compact {
  min-height: 5.5rem; padding: .45rem .55rem;
}
.analytics-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow);
}
.analytics-summary {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: .75rem 1.5rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line);
}
.analytics-kpi-label {
  display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-3); margin-bottom: .2rem;
}
.analytics-kpi strong.mono {
  display: block; font-size: 1.6rem; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.analytics-kpi-rub {
  display: block; font-size: 1rem; color: var(--brand-strong); margin-top: .15rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.analytics-kpi-meta { font-size: .82rem; color: var(--ink-3); text-align: right; }
.analytics-fx-note { display: block; margin-top: .25rem; font-family: var(--font-mono); font-size: .74rem; }
.analytics-drill {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .65rem;
  margin-bottom: 1rem; padding: .55rem .75rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.analytics-drill-label {
  font-size: .72rem; color: var(--ink-3); font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; flex: none;
}
.analytics-drill-trail {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem;
  flex: 1 1 auto; min-width: 0;
}
.analytics-drill-actions {
  display: flex; align-items: center; gap: .35rem; flex: none; margin-left: auto;
}
.analytics-drill-sep { color: var(--ink-3); font-size: .75rem; user-select: none; line-height: 1; }
.analytics-crumb {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .3rem .7rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; line-height: 1.2;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  text-decoration: none; white-space: nowrap;
  max-width: 13rem; overflow: hidden; text-overflow: ellipsis;
  transition: background .15s, border-color .15s, color .15s;
}
.analytics-crumb.is-current {
  background: var(--brand-soft); border-color: rgba(229, 0, 113, 0.22); color: var(--brand-strong);
}
.analytics-crumb.is-link:hover {
  border-color: var(--brand); color: var(--brand-strong); text-decoration: none;
}
.analytics-crumb.is-muted {
  background: transparent; border-color: transparent; color: var(--ink-3); font-weight: 500;
}
.analytics-crumb.is-muted:hover {
  color: var(--ink-2); background: var(--surface); border-color: var(--line-2); text-decoration: none;
}
.analytics-subheading {
  margin: 0 0 .9rem; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3);
}
.analytics-chart { margin-bottom: 1.2rem; padding: 1rem 1.1rem; box-shadow: none; }
.analytics-bars { display: flex; flex-direction: column; gap: .65rem; }
.analytics-bar-row {
  display: grid; grid-template-columns: minmax(6rem, 9rem) 1fr auto;
  gap: .65rem; align-items: center;
}
.analytics-bar-label {
  font-size: .82rem; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.analytics-bar-track {
  height: .65rem; background: var(--surface-2); border-radius: 999px; overflow: hidden;
}
.analytics-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--brand), #ff4d9d);
  border-radius: 999px; min-width: 2%;
}
.analytics-bar-value { text-align: right; font-size: .78rem; line-height: 1.35; }
.analytics-bar-value .muted { display: block; color: var(--ink-3); font-size: .72rem; }
.analytics-table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.analytics-table { margin: 0; min-width: 720px; width: 100%; }
.analytics-table th, .analytics-table td { padding: .55rem .7rem; font-size: .86rem; vertical-align: top; }
.analytics-table .analytics-cell-label {
  min-width: 5.5rem; max-width: 14rem;
  white-space: normal; overflow-wrap: anywhere; word-break: break-word;
}
.analytics-table th.analytics-col-num,
.analytics-table td.analytics-cell-num {
  text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.analytics-table .badge {
  display: inline-block; white-space: normal; overflow-wrap: anywhere;
}
.analytics-table tbody tr.analytics-row-drill { cursor: pointer; }
.analytics-table tbody tr.analytics-row-drill:hover { background: var(--brand-soft); }
.analytics-empty { text-align: center; color: var(--ink-3); padding: 2rem !important; }
.analytics-fail { color: var(--error); }
.analytics-pagination {
  display: flex; align-items: center; gap: .65rem; margin-top: 1rem;
}
.analytics-page-indicator { font-size: .85rem; color: var(--ink-3); }
.analytics-export { display: flex; gap: .5rem; margin-top: 1rem; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-3); }

@media (max-width: 540px) {
  .analytics-header { flex-direction: column; align-items: flex-start; }
  .analytics-toolbar-actions { width: 100%; margin-left: 0; justify-content: stretch; }
  .analytics-toolbar-more { flex: 1 1 calc(50% - .25rem); }
  .analytics-toolbar-more-summary { width: 100%; justify-content: center; }
  .analytics-toolbar-popover {
    position: static; width: 100%; margin-top: .45rem; box-shadow: none;
  }
  .analytics-toolbar-dates { width: 100%; }
  .analytics-input-compact { flex: 1 1 auto; min-width: 0; }
}

/* -- Пикер моделей в заявке на доступ (локальные / внешние) ---------------- */
.model-group { margin: 2px 0 12px; }
.model-group-head {
  display: flex; align-items: baseline; gap: 8px;
  margin: 12px 0 8px;
}
.model-group-title {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-2);
}
.model-group-count {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3);
}
.model-group-hint { font-size: 12.5px; color: var(--ink-3); }
.model-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.model-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; font-size: 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  transition: border-color .12s ease, background .12s ease;
}
.model-pick:hover { border-color: var(--line-2); }
.model-pick:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft);
}
.model-pick input {
  accent-color: var(--brand); width: 16px; height: 16px; flex: none; margin: 0;
}
.model-pick-name { overflow-wrap: anywhere; }

/* Hover tooltip: price ($/1M) + context size, from data-tip. */
.model-pick[data-tip] { position: relative; }
.model-pick[data-tip]:hover::after,
.model-pick[data-tip]:focus-within::after {
  content: attr(data-tip);
  position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 20;
  max-width: 320px; white-space: normal;
  background: var(--ink); color: var(--surface);
  padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.35; font-weight: 400;
  box-shadow: var(--shadow); pointer-events: none;
}

/* Default-provided models: pre-checked, non-removable. Read as granted, not
   as an actionable choice. */
.model-group-default { margin-bottom: 18px; }
.model-pick-locked {
  cursor: default; border-color: var(--brand);
  background: var(--brand-soft); box-shadow: none;
}
.model-pick-locked:hover { border-color: var(--brand); }
.model-pick-locked input { cursor: default; opacity: .85; }
.model-pick-locked .model-pick-name { color: var(--ink); font-weight: 500; }

/* ── Consent page (НДА-гейт) ─────────────────────────────────────── */
.consent-card {
  max-width: 720px;
  margin-inline: auto;
  padding: 2rem 2.2rem;
}
.consent-card > h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  text-wrap: balance;
  margin-bottom: .6rem;
}
.consent-intro { color: var(--ink-2); margin: 0 0 1.2rem; }

.consent-summary {
  list-style: none;
  margin: 0 0 1.2rem; padding: 0;
  display: flex; flex-direction: column; gap: .55rem;
}
.consent-summary li {
  position: relative;
  padding-left: 1.7rem;
  line-height: 1.55;
}
.consent-summary li::before {
  content: "";
  position: absolute; left: 0; top: .32em;
  width: .95rem; height: .95rem;
  border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 10 10' fill='none' stroke='%23C9005F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 5.5l2.4 2.4 4.6-5.3'/%3E%3C/svg%3E") center / 9px no-repeat;
}

.consent-meta {
  display: flex; flex-wrap: wrap; gap: .4rem 1rem;
  align-items: baseline; justify-content: space-between;
  margin: 0 0 1.4rem;
}
.consent-meta .hint { margin: 0; }

.consent-accept {
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
  display: flex; flex-direction: column; gap: 1.1rem;
}
.consent-checkbox {
  display: flex; align-items: flex-start; gap: .7rem;
  cursor: pointer;
}
.consent-checkbox input[type="checkbox"] {
  flex: none;
  width: 1.15rem; height: 1.15rem;
  margin-top: .18em;
  accent-color: var(--brand);
  cursor: pointer;
}
.consent-checkbox span { line-height: 1.55; }

.consent-actions {
  display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
}
.btn-quiet {
  padding: .75rem .4rem;
  border: 0; background: none; cursor: pointer;
  font-family: var(--font-ui); font-size: .92rem; font-weight: 500;
  color: var(--ink-3);
  transition: color .18s;
}
.btn-quiet:hover { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.btn-primary:disabled {
  opacity: .45; cursor: not-allowed;
  transform: none; box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Оболочка с левой навигацией — шаг 1 редизайна.
   План: docs/plans/2026-08-31-cabinet-redesign-rollout.md
   Макет: docs/design/cabinet-2026-08-31/02 Кабинет сотрудника.dc.html

   Включается классом на body (шаблон base.html), поэтому старая шапка и новая
   оболочка не пересекаются ни одним правилом: пока раскатка идёт, живут оба.
   ========================================================================== */
body.has-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--canvas);
  /* 🔴 Гасим старую раскладку. У `body` выше стоят max-width: 1080px и
     margin: 0 auto — под шапку, когда весь кабинет был одной центрированной
     колонкой. С сеткой эти правила никуда не делись и сжимали В СУММЕ сайдбар
     и контент до 1080px: на широком мониторе оболочка выглядела узкой полосой
     посередине. Сетка занимает всё окно, ширину ограничивает только контент. */
  margin: 0;
  max-width: none;
  padding: 0;
}
/* min-width: 0 обязателен: без него колонка не сжимается и широкие таблицы
   аналитики выдавливают вёрстку вбок. */
body.has-shell > main {
  min-width: 0;
  /* В макете 1240px. Поднято до 1440: на рабочих мониторах 1240 оставляли
     справа мёртвое поле шире самого сайдбара. Аналитике и без того тесно. */
  max-width: 1440px;
  padding: 32px 40px 56px;
}

.sidebar {
  align-self: start;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  overflow-y: auto;
  padding: 26px 18px;
  position: sticky;
  top: 0;
}

.sidebar-brand { display: block; text-decoration: none; }
.sidebar-brand-name {
  color: var(--ink);
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.sidebar-brand-mark { color: var(--brand); }
.sidebar-brand-sub {
  color: var(--ink-3);
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  margin-top: 4px;
  text-transform: uppercase;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-item {
  border-radius: 10px;
  color: var(--ink-2);
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  padding: 10px 12px;
  text-decoration: none;
  transition: background .14s, color .14s;
}
.sidebar-item:hover { background: var(--surface-2); color: var(--ink); }
.sidebar-item.is-active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}

.sidebar-foot { display: flex; flex-direction: column; gap: 14px; margin-top: auto; }
.sidebar-status {
  align-items: center;
  color: var(--ink-2);
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
  text-decoration: none;
}
.sidebar-status:hover { color: var(--ink); }

.sidebar-user { align-items: center; display: flex; gap: 10px; min-width: 0; }
.sidebar-avatar {
  align-items: center;
  background: var(--brand-soft);
  border-radius: 999px;
  color: var(--brand-strong);
  display: flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.sidebar-user-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sidebar-user-name {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-logout { margin: 0; }
.sidebar-logout button {
  background: none;
  border: 0;
  color: var(--ink-3);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
}
.sidebar-logout button:hover { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.sidebar-status-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sidebar-status-sub { color: var(--ink-3); font-size: 12px; font-weight: 500; }
.sidebar-status.is-down { color: var(--error); }
.sidebar-status.is-down .status-dot { background: var(--error); box-shadow: 0 0 0 3px rgba(208, 46, 63, .15); }
/* Данных нет — точка серая. Зелёная означала бы «всё работает», а мы этого
   в этот момент не знаем. */
.sidebar-status.is-unknown .status-dot { background: var(--ink-3); box-shadow: none; }
.sidebar-status .status-dot { flex: 0 0 auto; }

/* ── «Обзор» (шаг 2) ───────────────────────────────────────────────────────
   Живёт только внутри новой оболочки, поэтому все селекторы вложены в
   .has-shell: боевой домен эти правила не видит. */
body.has-shell .ov-head {
  align-items: flex-start; display: flex; flex-wrap: wrap;
  gap: 16px; justify-content: space-between; margin-bottom: 26px;
}
body.has-shell .ov-title {
  font-size: 28px; font-weight: 800; letter-spacing: -0.025em; margin: 0;
}
body.has-shell .ov-sub { color: var(--ink-2); font-size: 14px; margin: 6px 0 0; }
body.has-shell .ov-btn {
  background: var(--brand); border-radius: 999px; color: #fff;
  font-size: 13.5px; font-weight: 600; padding: 9px 16px; text-decoration: none;
}
body.has-shell .ov-btn:hover { background: var(--brand-strong); }

body.has-shell .ov-kpis {
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 22px;
}
body.has-shell .ov-kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-sm); padding: 22px 24px;
}
body.has-shell .ov-kpi.is-error { border-color: var(--error); }
body.has-shell .ov-kpi-label {
  color: var(--ink-3); display: block; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
}
body.has-shell .ov-kpi-value {
  color: var(--ink); display: block; font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 26px; font-weight: 600; margin-top: 8px; white-space: nowrap;
}
body.has-shell .ov-kpi-meta { color: var(--ink-2); font-size: 13px; margin: 6px 0 0; }
body.has-shell .ov-bar {
  background: var(--surface-2); border-radius: 999px; height: 5px;
  margin-top: 12px; overflow: hidden;
}
body.has-shell .ov-bar > span { background: var(--brand); display: block; height: 100%; }

body.has-shell .ov-cols {
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
body.has-shell .ov-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-sm); margin-bottom: 14px; padding: 22px 24px;
}
body.has-shell .ov-card-title {
  font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 14px;
}
body.has-shell .ov-payer { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
body.has-shell .ov-endpoint { color: var(--ink-2); font-size: 13px; margin: 14px 0 0; }
/* Свёрнутые прайс и калькулятор под оболочкой — временно, до раздела
   «Модели и цены». Отделяем их от личных карточек. */
body.has-shell main > section { margin: 22px 0 0; }
