/*
 * Федя — общий вид сайта и личного кабинета. Один файл для всех: и для
 * статических страниц (index.html, tarify/…), и для SPA в kabinet/.
 *
 * Тёмная тема — основная (просьба владельца: «стильно, дорого, с
 * анимацией»); светлый вариант — через prefers-color-scheme: light,
 * не хуже тёмного по проработке. Системный шрифт — никаких внешних
 * подключений (Google Fonts и т. п. в проекте нет и не должно быть).
 */

:root {
  color-scheme: dark;
  --bg: #0a0f0c;
  --bg-elevated: #0e1512;
  --panel: #121a16;
  --panel-2: #172019;
  --line: #22322a;
  --line-soft: #1a2620;
  --ink: #eef4f0;
  --ink-dim: #9fb3a8;
  --ink-faint: #6c8377;
  --accent: #4fc095;
  --accent-strong: #63d6a8;
  --accent-ink: #06120d;
  --accent-glow: rgba(79, 192, 149, .35);
  --warn: #e2b455;
  --err: #ef8a76;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .55);
  --radius: 18px;
  --radius-sm: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --dur: .5s;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f6f9f7;
    --bg-elevated: #ffffff;
    --panel: #ffffff;
    --panel-2: #f0f4f1;
    --line: #dfe8e2;
    --line-soft: #e8eee9;
    --ink: #10201a;
    --ink-dim: #4d6459;
    --ink-faint: #7c9186;
    --accent: #17795a;
    --accent-strong: #106247;
    --accent-ink: #ffffff;
    --accent-glow: rgba(23, 121, 90, .18);
    --shadow: 0 20px 50px -24px rgba(16, 32, 26, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}
html { scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; flex: none; }
.brand-word { letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: 26px; margin-left: 12px; flex: 1; }
.nav-link { color: var(--ink-dim); font-size: 15px; padding: 6px 2px; position: relative; transition: color .2s; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); }
.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; padding: 10px; margin: -10px; }
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.mobile-nav {
  display: none; flex-direction: column; padding: 6px 16px 18px;
  border-top: 1px solid var(--line-soft);
}
.mobile-nav a { padding: 12px 4px; border-bottom: 1px solid var(--line-soft); color: var(--ink-dim); }
.mobile-nav a:last-child { border-bottom: none; }
.site-header.nav-open .mobile-nav { display: flex; }

@media (max-width: 860px) {
  .nav, .header-actions .btn-ghost { display: none; }
  .header-actions .btn-accent { padding: 9px 14px; font-size: 14px; }
  .nav-toggle { display: flex; }
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-accent { background: linear-gradient(135deg, var(--accent-strong), var(--accent)); color: var(--accent-ink); box-shadow: 0 10px 30px -10px var(--accent-glow); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn:active { transform: translateY(0); }

/* ---------- Секции ---------- */
.section { padding: 88px 0; }
.section-first { padding-top: 48px; }
.section-alt { background: var(--bg-elevated); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; }
h1 { font-size: clamp(34px, 5.4vw, 58px); line-height: 1.08; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; font-weight: 800; margin-bottom: 34px; letter-spacing: -.01em; }
.section h2:last-child, .legal h2 { margin-bottom: 16px; }
.lead { font-size: 19px; color: var(--ink-dim); max-width: 640px; margin: 18px 0 36px; }
.muted { color: var(--ink-dim); }

/* ---------- Плавное появление при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--dur) cubic-bezier(.2,.7,.2,1), transform var(--dur) cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.feature-grid .reveal:nth-child(2), .audience-grid .reveal:nth-child(2), .safety-grid .reveal:nth-child(2), .tariff-grid .reveal:nth-child(2) { transition-delay: .06s; }
.feature-grid .reveal:nth-child(3), .audience-grid .reveal:nth-child(3), .safety-grid .reveal:nth-child(3), .tariff-grid .reveal:nth-child(3) { transition-delay: .12s; }
.feature-grid .reveal:nth-child(4), .audience-grid .reveal:nth-child(4), .safety-grid .reveal:nth-child(4), .tariff-grid .reveal:nth-child(4) { transition-delay: .18s; }
.feature-grid .reveal:nth-child(5) { transition-delay: .24s; }
.feature-grid .reveal:nth-child(6) { transition-delay: .3s; }
.feature-grid .reveal:nth-child(7) { transition-delay: .36s; }
.feature-grid .reveal:nth-child(8) { transition-delay: .42s; }
.audience-grid .reveal:nth-child(5) { transition-delay: .24s; }
.audience-grid .reveal:nth-child(6) { transition-delay: .3s; }
.audience-grid .reveal:nth-child(7) { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * , *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Герой ---------- */
.hero { padding: 56px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 640px; z-index: -1;
  background: radial-gradient(60% 60% at 75% 20%, var(--accent-glow), transparent 70%);
  filter: blur(10px);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-sub { font-size: 19px; color: var(--ink-dim); margin: 18px 0 30px; max-width: 540px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; color: var(--ink-dim); font-size: 14px; }
.hero-version { margin-top: 4px; color: var(--ink-faint); font-size: 13px; }
.stat-row { display: flex; gap: 34px; margin-top: 40px; flex-wrap: wrap; }
.stat-num { display: block; font-size: 30px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-label { display: block; font-size: 13px; color: var(--ink-dim); max-width: 120px; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
}

/* ---------- Демо в шапке ---------- */
.demo { position: relative; }
.demo-window {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.demo-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); background: var(--panel-2); }
.demo-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.demo-bar-title { margin-left: 8px; font-size: 13px; color: var(--ink-faint); font-weight: 600; }
.demo-body { padding: 22px; min-height: 260px; display: flex; flex-direction: column; gap: 16px; justify-content: flex-end; }
.demo-row { display: flex; }
.demo-row-user { justify-content: flex-end; }
.demo-bubble {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent)); color: var(--accent-ink);
  padding: 12px 16px; border-radius: 16px 16px 4px 16px; font-size: 14.5px; font-weight: 600;
  max-width: 88%;
}
.demo-caret { display: inline-block; width: 2px; height: 14px; background: var(--accent-ink); margin-left: 2px; vertical-align: -2px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.demo-row-fedya { justify-content: flex-start; }
.demo-answer { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 4px 16px 16px 16px; padding: 14px 16px; max-width: 92%; }
.demo-answer-text { font-size: 14px; color: var(--ink-dim); margin-bottom: 10px; }
.demo-file { display: flex; align-items: center; gap: 10px; background: var(--bg-elevated); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px; }
.demo-file-ext { background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; padding: 4px 6px; border-radius: 6px; letter-spacing: .02em; }
.demo-file-name { font-size: 13.5px; font-weight: 600; flex: 1; }
.demo-file-action { font-size: 12px; color: var(--accent); font-weight: 600; }
.demo-chart { margin-top: 12px; }
.demo-chart-axis { stroke: var(--line); stroke-width: 1; }
.demo-bar-el { fill: var(--accent); transition: height 1s cubic-bezier(.2,.8,.2,1), y 1s cubic-bezier(.2,.8,.2,1); }
.demo-tag {
  position: absolute; top: -14px; left: 20px; background: var(--bg); border: 1px solid var(--line);
  color: var(--accent); font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
}

/* ---------- Возможности ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 24px; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); color: var(--accent); margin-bottom: 16px;
}
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { color: var(--ink-dim); font-size: 14.5px; }

@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Для кого ---------- */
.audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.audience-card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px; transition: border-color .2s; }
.audience-card:hover { border-color: var(--accent); }
.audience-card h3 { font-size: 16px; margin-bottom: 12px; color: var(--accent); }
.audience-card li { color: var(--ink-dim); font-size: 14px; padding: 6px 0; border-top: 1px solid var(--line-soft); }
.audience-card li:first-child { border-top: none; }

@media (max-width: 980px) { .audience-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .audience-grid { grid-template-columns: 1fr; } }

/* ---------- Шаги ---------- */
.steps { display: grid; gap: 18px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--accent); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.steps h3 { font-size: 16px; margin-bottom: 4px; }
.steps p { color: var(--ink-dim); font-size: 14.5px; }

/* ---------- Тарифы ---------- */
.tariff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.tariff-grid-compact { grid-template-columns: repeat(4, 1fr); }
.tariff-card {
  position: relative; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 26px 22px; display: flex; flex-direction: column; gap: 10px; transition: transform .25s, border-color .25s;
}
.tariff-card:hover { transform: translateY(-4px); }
.tariff-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.tariff-badge { position: absolute; top: -12px; right: 18px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.tariff-card h3 { font-size: 18px; }
.tariff-price { font-size: 30px; font-weight: 800; }
.tariff-period { font-size: 14px; color: var(--ink-dim); font-weight: 600; }
.tariff-included { color: var(--ink-dim); font-size: 13.5px; }
.tariff-extra { margin: 4px 0 6px; display: flex; flex-direction: column; gap: 6px; }
.tariff-extra li { font-size: 13.5px; color: var(--ink-dim); padding-left: 18px; position: relative; }
.tariff-extra li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.tariff-cta { margin-top: auto; }
.tariff-note { margin-top: 22px; color: var(--ink-faint); font-size: 13.5px; }

@media (max-width: 980px) { .tariff-grid, .tariff-grid-compact { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tariff-grid, .tariff-grid-compact { grid-template-columns: 1fr; } }

/* ---------- Сценарии ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); }
.scenarios-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.scenarios-table th, .scenarios-table td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.scenarios-table th { color: var(--ink-faint); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: var(--panel-2); }
.scenarios-table tr:last-child td { border-bottom: none; }
.scenarios-table .num { text-align: right; font-weight: 700; white-space: nowrap; }

/* ---------- Безопасно ---------- */
.safety-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.safety-card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; }
.safety-card h3 { font-size: 15.5px; margin-bottom: 8px; color: var(--accent); }
.safety-card p { font-size: 13.5px; color: var(--ink-dim); }

@media (max-width: 980px) { .safety-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .safety-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.faq-item { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 4px 20px; }
.faq-item summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; font-weight: 700; font-size: 15.5px; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 0; top: 14px; font-size: 20px; color: var(--accent);
  transition: transform .25s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--ink-dim); padding-bottom: 18px; font-size: 14.5px; }

/* ---------- CTA ---------- */
.cta-section { text-align: center; }
.cta-inner h2 { margin-bottom: 26px; }
.cta-inner .hero-actions { justify-content: center; }

/* ---------- Подвал ---------- */
.site-footer { border-top: 1px solid var(--line-soft); padding: 56px 0 0; background: var(--bg-elevated); }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: 32px; padding-bottom: 40px; }
.footer-brand .brand { margin-bottom: 10px; }
.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: var(--ink-dim); font-size: 14.5px; }
.footer-nav a:hover { color: var(--accent); }
.footer-requisites p { color: var(--ink-faint); font-size: 13.5px; margin: 4px 0; }
.footer-requisites a { color: var(--ink-faint); }
.footer-requisites a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line-soft); padding: 16px 0; font-size: 13px; color: var(--ink-faint); }

@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: 26px; } }

/* ---------- Юридические страницы ---------- */
.legal h2 { margin-top: 34px; font-size: 21px; }
.legal p, .legal li { color: var(--ink-dim); font-size: 15px; line-height: 1.7; }
.legal ul { display: flex; flex-direction: column; gap: 6px; padding-left: 20px; list-style: disc; margin: 10px 0; }
.legal b { color: var(--ink); }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.req-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14.5px; }
.req-table td { padding: 9px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-dim); }
.req-table td:first-child { color: var(--ink-faint); width: 40%; }
.req-table a { color: var(--accent); }

.breadcrumbs { display: flex; gap: 8px; font-size: 13.5px; color: var(--ink-faint); margin-bottom: 22px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--ink-faint); }
.breadcrumbs a:hover { color: var(--accent); }
.crumb-sep { color: var(--line); }

.contact-card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px; margin: 20px 0 30px; }
.contact-dl { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; margin: 0 0 14px; }
.contact-dl dt { color: var(--ink-faint); font-size: 13.5px; }
.contact-dl dd { margin: 0; font-size: 14.5px; }
.contact-dl a { color: var(--accent); }
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-list a { color: var(--accent); font-weight: 600; }

/* ---------- Скачать ---------- */
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.download-card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.download-card h2 { margin: 0; font-size: 19px; }
.download-meta { color: var(--ink-faint); font-size: 13px; }
@media (max-width: 900px) { .download-grid { grid-template-columns: 1fr; } }

/* =====================================================================
 *  ЛИЧНЫЙ КАБИНЕТ (kabinet/)
 * ===================================================================== */

.kab-root { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }

.kab-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.kab-login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 34px 28px; box-shadow: var(--shadow); }
.kab-login-card .brand { justify-content: center; margin-bottom: 6px; font-size: 20px; }
.kab-login-sub { text-align: center; color: var(--ink-dim); font-size: 14.5px; margin: 6px 0 26px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--ink-faint); }
.field input {
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  font-size: 15px; transition: border-color .2s;
}
.field input:focus { outline: none; border-color: var(--accent); }

.code-boxes { display: flex; gap: 8px; justify-content: center; margin: 6px 0 18px; }
.code-box {
  width: 42px; height: 52px; text-align: center; font-size: 20px; font-weight: 700;
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 10px; transition: border-color .2s;
}
.code-box:focus { outline: none; border-color: var(--accent); }

.kab-btn-row { display: flex; flex-direction: column; gap: 10px; }
.kab-link-btn { text-align: center; color: var(--ink-faint); font-size: 13.5px; padding: 8px; }
.kab-link-btn:hover { color: var(--accent); }
.kab-error { color: var(--err); font-size: 13.5px; margin: 10px 0 0; text-align: center; }

/* ---------- Оболочка после входа ---------- */
.kab-shell { display: flex; flex: 1; min-height: 100vh; }
.kab-sidebar {
  width: 236px; flex: none; background: var(--bg-elevated); border-right: 1px solid var(--line-soft);
  display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh;
}
.kab-sidebar .brand { padding: 6px 10px 22px; }
.kab-sidebar-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.kab-nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
  color: var(--ink-dim); font-size: 14.5px; font-weight: 600; transition: background .15s, color .15s;
}
.kab-nav-item svg { flex: none; opacity: .8; }
.kab-nav-item:hover { background: var(--panel-2); color: var(--ink); }
.kab-nav-item.active { background: var(--panel-2); color: var(--accent); }
.kab-sidebar-foot { border-top: 1px solid var(--line-soft); padding-top: 14px; margin-top: 10px; }
.kab-user-email { font-size: 12.5px; color: var(--ink-faint); padding: 0 12px 8px; word-break: break-all; }

.kab-topbar { display: none; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); background: var(--bg-elevated); position: sticky; top: 0; z-index: 20; }
.kab-content { flex: 1; min-width: 0; padding: 32px 32px 100px; }
.kab-page-title { font-size: 24px; font-weight: 800; margin-bottom: 22px; }

.kab-bottom-tabs { display: none; }

@media (max-width: 900px) {
  .kab-sidebar { display: none; }
  .kab-topbar { display: flex; }
  .kab-content { padding: 20px 16px 90px; }
  .kab-bottom-tabs {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: color-mix(in srgb, var(--bg-elevated) 92%, transparent); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line-soft); padding: 8px calc(4px + var(--safe-bottom)) calc(6px + var(--safe-bottom));
  }
  .kab-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: 10.5px; color: var(--ink-faint); }
  .kab-tab.active { color: var(--accent); }
}

/* ---------- Карточки кабинета ---------- */
.kab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.kab-card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 22px; }
.kab-card h3 { font-size: 14px; color: var(--ink-faint); font-weight: 600; margin-bottom: 10px; }
.kab-card-value { font-size: 30px; font-weight: 800; }
.kab-card-sub { color: var(--ink-dim); font-size: 13.5px; margin-top: 6px; }
.kab-card-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.kab-ring-wrap { display: flex; align-items: center; gap: 18px; }
.kab-ring { flex: none; }
.kab-ring circle { fill: none; stroke-width: 8; }
.kab-ring .track { stroke: var(--line-soft); }
.kab-ring .value { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.kab-ring-label { font-size: 12.5px; color: var(--ink-faint); }
.kab-ring-text { fill: var(--ink); font-size: 15px; font-weight: 800; }

/* ---------- Тарифы в кабинете ---------- */
.kab-plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kab-plan-card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.kab-plan-card.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.kab-plan-current-badge { font-size: 11px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 980px) { .kab-plan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .kab-plan-grid { grid-template-columns: 1fr; } }

/* ---------- Пополнение ---------- */
.amount-presets { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.amount-chip { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-dim); font-weight: 700; font-size: 14px; }
.amount-chip.active { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

.dropzone {
  border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 26px; text-align: center;
  color: var(--ink-dim); font-size: 14px; transition: border-color .2s, background .2s; cursor: pointer;
}
.dropzone.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); }
.dropzone input { display: none; }

.qr-box { background: #fff; padding: 10px; border-radius: 12px; display: inline-block; }
.qr-box img { border-radius: 4px; }
.payout-text { background: var(--bg-elevated); border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px 16px; font-size: 13.5px; white-space: pre-wrap; color: var(--ink-dim); }
.payment-code { font-size: 22px; font-weight: 800; letter-spacing: .04em; color: var(--accent); }

/* ---------- Таблица платежей ---------- */
.kab-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.kab-table th, .kab-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.kab-table th { color: var(--ink-faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-pending { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.badge-claimed { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.badge-approved { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.badge-rejected { background: color-mix(in srgb, var(--err) 18%, transparent); color: var(--err); }

/* ---------- Пусто / загрузка / уведомления ---------- */
.kab-empty { text-align: center; padding: 40px 20px; color: var(--ink-faint); }
.kab-empty svg { margin: 0 auto 14px; opacity: .6; }

.skeleton { position: relative; overflow: hidden; background: var(--panel-2); border-radius: 10px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 8%, transparent), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-card { height: 96px; }

.toast-stack { position: fixed; bottom: 20px; right: 20px; left: auto; z-index: 500; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
@media (max-width: 640px) { .toast-stack { left: 16px; right: 16px; bottom: 76px; max-width: none; } }
.toast {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px;
  font-size: 14px; box-shadow: var(--shadow); animation: toast-in .25s ease;
}
.toast-error { border-color: var(--err); }
.toast-success { border-color: var(--accent); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.kab-fade { animation: kab-fade .3s ease; }
@keyframes kab-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--ink) 25%, transparent); border-top-color: var(--accent); animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
