/* =========================================================
   AMarkets — Партнёрская программа для блогеров
   style.css — общий для index.html / register.html / dashboard.html
   Все значения взяты из design-system/tokens.css.
   ========================================================= */

:root {
  /* === COLORS === */
  --bg-primary: #080808;
  --bg-primary-light: #f9f9fa;
  --bg-elevated: #252a2e;
  --bg-elevated-light: #ffffff;
  --bg-modal: #ffffff;
  --bg-card-dark: #0e0e10;
  --bg-card-dark-to: #030303;

  --text-headline: #040404;
  --text-headline-dark: #ffffff;
  --text-primary: #e8e9eb;
  --text-secondary: #a5aaaf;
  --text-secondary-light: #777f86;
  --text-tertiary: #bbbfc3;
  --text-tertiary-light: #777f86;
  --text-inverted: #ffffff;
  --text-bold-accent: #383f46;

  --accent-primary: #fa6a1c;
  --accent-gradient-start: #ed5228;
  --accent-gradient-mid: #fe7539;
  --accent-gradient-end: #fe7539;
  --accent-link: #0b60d6;
  --accent-glow: rgba(240, 110, 45, 0.2);

  --stroke-primary: #e8e9eb;
  --stroke-primary-dark: #393f45;
  --stroke-card: #1d1d20;
  --stroke-secondary: #464646;
  --transparent-white-10: rgba(255, 255, 255, 0.1);
  --transparent-white-20: rgba(37, 42, 46, 0.2);
  --transparent-gray-20: rgba(29, 41, 54, 0.2);

  --control-primary: #fa6a1c;
  --absolute-white: #ffffff;
  --absolute-black: #000000;

  /* === TYPOGRAPHY === */
  --font-display: 'Inter Tight', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-caption: 'Roboto Flex', sans-serif;

  --text-display1: 78px;
  --text-h1: 62px;
  --text-h2: 48px;
  --text-h3: 40px;
  --text-h4: 32px;
  --text-h5: 28px;
  --text-h6: 24px;
  --text-h7: 20px;
  --text-base-lg: 18px;
  --text-base: 16px;
  --text-sm: 14px;
  --text-xs: 12px;

  --leading-display1: 94px;
  --leading-h1: 84px;
  --leading-h2: 60px;
  --leading-h3: 52px;
  --leading-h4: 44px;
  --leading-h5: 40px;
  --leading-h6: 36px;
  --leading-h7: 32px;
  --leading-base-lg: 28px;
  --leading-base: 24px;
  --leading-sm: 16px;
  --leading-xs: 18px;

  /* === SPACING === */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 42px;
  --space-2xl: 64px;
  --space-section: 100px;

  /* === LAYOUT === */
  --content-max-width: 1440px;
  --content-padding: 96px;

  /* === RADIUS === */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 38px;
  --radius-full: 9999px;

  /* === SHADOWS === */
  --shadow-card: 0px 30px 30px rgba(85, 105, 135, 0.05);
  --shadow-button: 0px 4px 4px rgba(240, 110, 45, 0.2);
  --shadow-modal: 0px 2px 4px rgba(0, 0, 0, 0.05), 0px 8px 32px 6px rgba(0, 0, 0, 0.4);

  /* === HEIGHTS === */
  --height-button: 48px;
  --height-button-lg: 60px;
  --height-button-xl: 72px;
  --height-input: 48px;

  /* Runtime-зависимые величины */
  --section-pad: 48px;
  --side-pad: 16px;
}

/* --- вне токенов, добавочное: статус-палитра (design-spec 1.2) --- */
:root {
  --status-approved: #2fbf6b;
  --status-approved-bg: rgba(47, 191, 107, 0.12);
  --status-approved-br: rgba(47, 191, 107, 0.32);
  --status-pending: #f2c230;
  --status-pending-bg: rgba(242, 194, 48, 0.12);
  --status-pending-br: rgba(242, 194, 48, 0.32);
  --status-rejected: #e5484d;
  --status-rejected-bg: rgba(229, 72, 77, 0.12);
  --status-rejected-br: rgba(229, 72, 77, 0.32);
}

/* =========================================================
   1. Reset / base
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
img { height: auto; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--text-headline-dark); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding-left: var(--side-pad);
  padding-right: var(--side-pad);
}

.section { padding-top: var(--section-pad); padding-bottom: var(--section-pad); }
.section--tight { padding-top: calc(var(--section-pad) * 0.64); padding-bottom: calc(var(--section-pad) * 0.64); }
.section--light { background: var(--bg-primary-light); color: var(--text-secondary-light); }
.section--light h2, .section--light h3 { color: var(--text-headline); }
.section--line { border-top: 1px solid var(--stroke-card); }

.section-head { max-width: 760px; margin: 0 auto; text-align: center; }
.section-head--left { margin: 0; text-align: left; }
.section-title { font-size: 28px; line-height: 38px; letter-spacing: -0.01em; }
.section-sub { margin-top: var(--space-sm); font-size: var(--text-base); line-height: var(--leading-base); color: var(--text-secondary); }
.section--light .section-sub { color: var(--text-secondary-light); }
.section-body { margin-top: var(--space-lg); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--text-sm); line-height: 20px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary);
}

.badge-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px;
  border-radius: var(--radius-pill);
  background: rgba(250, 106, 28, 0.12);
  border: 1px solid rgba(250, 106, 28, 0.32);
  color: var(--accent-primary);
  font-size: var(--text-sm); line-height: 20px; font-weight: 500;
}

.grad-text {
  background: linear-gradient(90deg, var(--accent-gradient-start), var(--accent-gradient-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.disclaimer {
  font-size: var(--text-xs); line-height: var(--leading-xs);
  color: var(--text-secondary);
}
.section--light .disclaimer { color: var(--text-secondary-light); }

/* Декоративные слои */
.dot-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 72%);
  pointer-events: none;
}
.glow {
  position: absolute; border-radius: var(--radius-full);
  background: radial-gradient(closest-side, rgba(240, 110, 45, 0.22), rgba(240, 110, 45, 0) 70%);
  filter: blur(40px);
  pointer-events: none;
}

/* Появление секций */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 320ms ease-out, transform 320ms ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   2. Кнопки
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--height-button); padding: 0 24px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-body); font-size: var(--text-base); line-height: var(--leading-base); font-weight: 700;
  text-align: center; white-space: nowrap;
  transition: background 180ms ease-out, border-color 180ms ease-out, color 180ms ease-out, box-shadow 180ms ease-out, transform 120ms ease-out;
}
.btn:disabled, .btn[aria-disabled="true"], .btn.is-disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
/* базовый размер иконки в кнопке: без него svg без width/height раздувается во flex */
.btn svg { flex: 0 0 16px; width: 16px; height: 16px; }

.btn-primary {
  background: var(--control-primary);
  color: var(--text-inverted);
  border-color: var(--transparent-white-10);
  box-shadow: var(--shadow-button);
}
.btn-primary:hover:not(:disabled):not(.is-disabled) { background: var(--accent-gradient-mid); box-shadow: 0 6px 16px var(--accent-glow); }
.btn-primary:active:not(:disabled):not(.is-disabled) { transform: translateY(1px); box-shadow: none; }

.btn-lg { height: var(--height-button-lg); min-width: 217px; padding: 0 32px; }

.btn-secondary {
  background: transparent;
  border-color: var(--stroke-primary-dark);
  color: var(--text-primary);
}
.btn-secondary:hover { background: var(--transparent-white-20); border-color: var(--stroke-secondary); }
.btn-secondary:active { background: rgba(255, 255, 255, 0.06); }

.btn-ghost {
  background: transparent; border-color: transparent;
  color: var(--text-secondary); font-weight: 500;
  height: 40px; padding: 0 12px;
}
.btn-ghost:hover { background: var(--transparent-white-20); color: var(--text-primary); }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border-radius: var(--radius-md);
  background: transparent; border: 1px solid transparent;
  color: var(--text-secondary);
  transition: background 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out;
}
.btn-icon:hover { background: var(--transparent-white-20); color: var(--text-primary); }

.btn-block { width: 100%; }

.btn-social {
  width: 100%; height: var(--height-button);
  background: var(--bg-elevated);
  border: 1px solid var(--stroke-primary-dark);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 500; gap: 12px;
}
.btn-social:hover { background: rgba(37, 42, 46, 0.75); border-color: var(--stroke-secondary); }

/* Спиннер в кнопке */
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 20px; height: 20px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--absolute-white);
  animation: spin 700ms linear infinite;
}
.btn-secondary.is-loading::after, .btn-social.is-loading::after { border-top-color: var(--accent-primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Пилюли-переключатели */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--transparent-white-10);
  color: var(--text-secondary);
  font-size: var(--text-sm); line-height: 20px; font-weight: 500;
  transition: background 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
}
.pill:hover { color: var(--text-primary); border-color: var(--stroke-secondary); }
.pill.is-active {
  background: rgba(250, 106, 28, 0.12);
  border-color: rgba(250, 106, 28, 0.4);
  color: var(--accent-primary);
}
.pill svg { width: 18px; height: 18px; }

.pill--light { border-color: var(--transparent-gray-20); color: var(--text-secondary-light); }
.pill--light:hover { color: var(--text-headline); border-color: var(--transparent-gray-20); }
.pill--light.is-active { background: rgba(250, 106, 28, 0.1); border-color: rgba(250, 106, 28, 0.4); color: var(--accent-primary); }

/* =========================================================
   3. Поля ввода (тёмная тема)
   ========================================================= */
.field { display: block; }
.field + .field { margin-top: var(--space-sm); }

.field-label {
  display: block; margin-bottom: 6px;
  font-family: var(--font-caption);
  font-size: var(--text-xs); line-height: var(--leading-xs); font-weight: 500;
  color: var(--text-secondary);
}

.input-wrap { position: relative; display: flex; align-items: center; }

.input, .select, textarea.input {
  width: 100%; height: var(--height-input);
  padding: 0 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--stroke-primary-dark);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body); font-size: var(--text-base); font-weight: 300;
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
.input::placeholder { color: var(--text-secondary); }
.input:hover, .select:hover { border-color: var(--stroke-secondary); }
.input:focus, .select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(250, 106, 28, 0.12);
}
.input:disabled { opacity: 0.5; }
.input--icon-right { padding-right: 44px; }
.input--prefix { padding-left: 28px; }

.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a5aaaf' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px 18px;
}
.select option { background: var(--bg-elevated); color: var(--text-primary); }

.input-affix {
  position: absolute; left: 12px;
  font-size: var(--text-base); color: var(--text-secondary); pointer-events: none;
}
.input-btn {
  position: absolute; right: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  background: transparent; border: 0; border-radius: var(--radius-sm);
  color: var(--text-secondary);
}
.input-btn:hover { color: var(--text-primary); }
.input-link {
  position: absolute; right: 10px;
  background: transparent; border: 0; padding: 4px 6px;
  color: var(--accent-primary); font-size: var(--text-sm); font-weight: 500;
}

.field-hint {
  margin-top: 6px;
  font-family: var(--font-caption);
  font-size: var(--text-xs); line-height: var(--leading-xs);
  color: var(--text-tertiary);
}
.field-error {
  display: none; margin-top: 6px;
  font-family: var(--font-caption);
  font-size: var(--text-xs); line-height: var(--leading-xs);
  color: var(--status-rejected);
}
.field.has-error .field-error { display: block; }
.field.has-error .input,
.field.has-error .select {
  border-color: var(--status-rejected);
  box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.12);
}

/* Чекбокс */
.check { position: relative; display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.check-box {
  flex: 0 0 auto; position: relative;
  width: 20px; height: 20px; margin-top: 1px;
  border: 1px solid var(--stroke-primary-dark);
  border-radius: var(--radius-sm);
  background: transparent;
  transition: background 160ms ease-out, border-color 160ms ease-out, box-shadow 160ms ease-out;
}
.check-box::after {
  content: ""; position: absolute; left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid var(--absolute-white); border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0.6); opacity: 0;
  transition: opacity 120ms ease-out, transform 120ms ease-out;
}
.check input:checked + .check-box { background: var(--control-primary); border-color: var(--transparent-white-10); }
.check input:checked + .check-box::after { opacity: 1; transform: rotate(45deg) scale(1); }
.check input:focus-visible + .check-box { box-shadow: 0 0 0 4px rgba(250, 106, 28, 0.12); }
.check-text {
  font-family: var(--font-caption);
  font-size: var(--text-xs); line-height: var(--leading-xs);
  color: var(--text-secondary);
}
.check-text a { color: var(--accent-primary); }
.check-text a:hover { text-decoration: underline; }
.check.has-error .check-box { border-color: var(--status-rejected); }

/* Переключатель (настройки кабинета) */
.switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.switch-input { position: absolute; opacity: 0; width: 44px; height: 24px; }
.switch-track {
  position: relative; flex: 0 0 auto;
  width: 44px; height: 24px; border-radius: var(--radius-full);
  background: var(--transparent-white-20);
  border: 1px solid var(--stroke-primary-dark);
  transition: background 160ms ease-out, border-color 160ms ease-out;
}
.switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: var(--radius-full);
  background: var(--text-secondary);
  transition: transform 160ms ease-out, background 160ms ease-out;
}
.switch-input:checked + .switch-track { background: rgba(250, 106, 28, 0.24); border-color: rgba(250, 106, 28, 0.4); }
.switch-input:checked + .switch-track::after { transform: translateX(20px); background: var(--accent-primary); }
.switch-input:focus-visible + .switch-track { box-shadow: 0 0 0 4px rgba(250, 106, 28, 0.12); }
.switch-label { font-size: var(--text-sm); color: var(--text-primary); }

/* =========================================================
   4. Карточки
   ========================================================= */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-card-dark), var(--bg-card-dark-to));
  border: 1px solid var(--stroke-card);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card--light {
  background: var(--bg-elevated-light);
  border: 1px solid var(--stroke-primary);
  box-shadow: var(--shadow-card);
  color: var(--text-secondary-light);
}

/* =========================================================
   5. Навигация лендинга
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 60;
  height: 64px;
  display: flex; align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 200ms ease-out, border-color 200ms ease-out, backdrop-filter 200ms ease-out;
}
.nav.is-scrolled {
  background: rgba(8, 8, 8, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--stroke-card);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 34px; width: auto; }
.nav-links { display: none; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 16px; border-radius: var(--radius-pill);
  font-size: var(--text-base); font-weight: 500; color: var(--text-primary);
  transition: background 160ms ease-out, color 160ms ease-out;
}
.nav-link:hover { background: var(--transparent-white-20); color: var(--text-headline-dark); }
.nav-actions { display: none; align-items: center; gap: 12px; }
.nav-burger { display: inline-flex; }

.nav-panel {
  position: fixed; inset: 0; z-index: 70;
  display: flex; flex-direction: column;
  background: var(--bg-primary);
  padding: 16px;
  transform: translateX(100%);
  transition: transform 220ms ease-out;
  visibility: hidden;
}
.nav-panel.is-open { transform: none; visibility: visible; }
.nav-panel-top { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.nav-panel-links { display: flex; flex-direction: column; gap: 4px; margin-top: 24px; }
.nav-panel-links a {
  padding: 14px 8px; font-size: var(--text-h7); line-height: var(--leading-h7); font-weight: 500;
  color: var(--text-primary); border-bottom: 1px solid var(--stroke-card);
}
.nav-panel-actions { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 16px; }

/* =========================================================
   6. Hero
   ========================================================= */
.hero { position: relative; overflow: hidden; padding-top: 32px; padding-bottom: var(--section-pad); }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg .glow-a { width: 520px; height: 520px; top: -120px; left: -140px; }
.hero-bg .glow-b { width: 520px; height: 520px; bottom: -200px; right: -160px; }
.hero-grid { position: relative; display: grid; gap: 24px; }
.hero-copy { display: contents; }
.hero-badge { order: 1; justify-self: start; }
.hero-title {
  order: 2; margin-top: 20px;
  font-size: 32px; line-height: 42px; letter-spacing: -0.02em;
}
.hero-sub {
  order: 3; max-width: 520px;
  font-size: var(--text-base-lg); line-height: 28px; font-weight: 300;
  color: var(--text-secondary);
}
.hero-visual-wrap { order: 4; position: relative; }
.hero-actions { order: 5; display: flex; flex-direction: column; gap: 12px; }
.hero-actions .btn { width: 100%; }
.hero-trust { order: 6; font-size: var(--text-sm); line-height: 20px; color: var(--text-secondary); }

.hero-visual {
  position: relative; overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--stroke-card);
  aspect-ratio: 4 / 3;
  background: var(--bg-card-dark);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-visual::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 55%;
  background-image: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.39) 28%, rgba(102, 102, 102, 0) 70%);
  pointer-events: none;
}
.hero-visual-glow {
  position: absolute; inset: 8%;
  border-radius: var(--radius-full);
  box-shadow: 0 0 160px 40px var(--accent-glow);
  z-index: -1;
}
.hero-note {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(14, 14, 16, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--transparent-white-10);
  border-radius: var(--radius-lg);
}
.hero-note-dot {
  width: 8px; height: 8px; border-radius: var(--radius-full);
  background: var(--status-approved);
  box-shadow: 0 0 0 4px rgba(47, 191, 107, 0.16);
}
.hero-note-label { display: block; font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary); }
.hero-note-value { display: block; font-size: var(--text-h7); line-height: 26px; font-weight: 700; color: var(--text-headline-dark); }

/* =========================================================
   7. Полоса цифр
   ========================================================= */
.stats { border-top: 1px solid var(--stroke-card); border-bottom: 1px solid var(--stroke-card); padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.stat { text-align: center; }
.stat-value {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-h4); line-height: var(--leading-h4); color: var(--accent-primary);
  min-width: 0;
}
.stat-label { margin-top: 8px; font-size: var(--text-sm); line-height: 20px; color: var(--text-secondary); }

/* =========================================================
   8. Как это работает
   ========================================================= */
.steps { display: grid; gap: 32px; }
.step { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: var(--radius-full);
  border: 1px solid var(--stroke-primary-dark);
  background: var(--bg-primary);
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-h7);
  color: var(--text-headline-dark);
  position: relative; z-index: 1;
}
.step.is-first .step-num {
  border-color: var(--accent-primary); color: var(--accent-primary);
  box-shadow: 0 0 0 6px rgba(250, 106, 28, 0.08);
}
.step-title { font-family: var(--font-body); font-size: var(--text-h7); line-height: var(--leading-h7); font-weight: 700; color: var(--text-headline-dark); }
.step-text { margin-top: 8px; font-size: var(--text-base); line-height: var(--leading-base); color: var(--text-secondary); max-width: 320px; }
.steps-cta { margin-top: 32px; display: flex; justify-content: center; }

/* =========================================================
   9. Калькулятор
   ========================================================= */
.calc-card {
  max-width: 960px; margin: 0 auto;
  background: var(--bg-elevated-light);
  border: 1px solid var(--stroke-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
.calc-grid { display: grid; gap: 24px; }
.calc-label { font-size: var(--text-sm); line-height: 20px; font-weight: 700; color: var(--text-headline); }
.calc-hint { margin-top: 6px; font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary-light); }
.calc-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.calc-slider-block { margin-top: 28px; }
.calc-views-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 12px; }
.calc-views-value { font-size: var(--text-h5); line-height: var(--leading-h5); font-weight: 700; color: var(--text-headline); font-family: var(--font-body); }

.range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 24px; margin: 8px 0 0; padding: 0;
  background: transparent; cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 6px; border-radius: var(--radius-full);
  background: linear-gradient(to right, var(--control-primary) var(--fill, 0%), var(--stroke-primary) var(--fill, 0%));
}
.range::-moz-range-track {
  height: 6px; border-radius: var(--radius-full);
  background: linear-gradient(to right, var(--control-primary) var(--fill, 0%), var(--stroke-primary) var(--fill, 0%));
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; margin-top: -9px;
  border-radius: var(--radius-full);
  background: var(--absolute-white);
  border: 2px solid var(--control-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.range::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: var(--radius-full);
  background: var(--absolute-white);
  border: 2px solid var(--control-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(250, 106, 28, 0.16); }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(250, 106, 28, 0.16); }
.range-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: var(--text-xs); color: var(--text-secondary-light); }

.calc-result {
  position: relative;
  background: linear-gradient(180deg, var(--bg-card-dark), var(--bg-card-dark-to));
  border: 1px solid var(--stroke-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--text-primary);
}
.calc-result-label { font-size: var(--text-sm); line-height: 20px; color: var(--text-secondary); }
.calc-result-value {
  margin-top: 8px;
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-h3); line-height: var(--leading-h3);
  color: var(--accent-primary);
  transition: color 200ms ease-out;
}
.calc-result-caption { margin-top: 8px; font-size: var(--text-sm); line-height: 20px; color: var(--text-secondary); }
.calc-rate-row {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--stroke-card);
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: var(--text-sm); color: var(--text-secondary);
}
.calc-rate-value { font-weight: 700; color: var(--text-headline-dark); }
.calc-result .btn { margin-top: 20px; }
.calc-footnote { max-width: 760px; margin: 20px auto 0; text-align: center; }

/* =========================================================
   10. Почему AMarkets
   ========================================================= */
.cards-grid { display: grid; gap: var(--space-md); }
.grid-3 { grid-template-columns: minmax(0, 1fr); }
.grid-4 { grid-template-columns: minmax(0, 1fr); }

.why-card { padding: 24px; min-height: 0; transition: border-color 200ms ease-out, transform 160ms ease-out; }
.why-card:hover { border-color: var(--stroke-secondary); transform: translateY(-2px); }
.why-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit;
  box-shadow: 0 0 60px 0 var(--accent-glow);
  opacity: 0; transition: opacity 200ms ease-out; pointer-events: none;
}
.why-card:hover::before { opacity: 1; }
.icon-box {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  border-radius: var(--radius-lg);
  background: rgba(250, 106, 28, 0.1);
  color: var(--accent-primary);
}
.icon-box svg { width: 32px; height: 32px; }
.why-title { margin-top: 20px; font-family: var(--font-body); font-size: var(--text-h7); line-height: var(--leading-h7); font-weight: 700; color: var(--text-headline-dark); }
.why-text { margin-top: 12px; font-size: var(--text-base); line-height: var(--leading-base); color: var(--text-secondary); }

/* =========================================================
   11. Площадки
   ========================================================= */
.platform-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 120px; padding: 20px 12px; text-align: center;
  background: var(--transparent-white-20);
  border: 1px solid var(--stroke-card);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  transition: border-color 180ms ease-out, color 180ms ease-out;
}
.platform-tile svg { width: 32px; height: 32px; }
.platform-tile:hover { color: var(--accent-primary); border-color: rgba(250, 106, 28, 0.32); }
.platform-name { font-size: var(--text-base); font-weight: 700; color: var(--text-primary); }
.platform-tile:hover .platform-name { color: var(--accent-primary); }
.platform-text { font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary); }

/* =========================================================
   12. Ставки
   ========================================================= */
.rate-card { position: relative; text-align: center; padding: 28px 20px; }
.rate-card.is-featured { border: 2px solid var(--accent-primary); margin-top: 16px; }
.rate-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--control-primary); color: var(--text-inverted);
  font-size: var(--text-xs); line-height: var(--leading-xs); font-weight: 700; white-space: nowrap;
}
.rate-icon { display: flex; justify-content: center; color: var(--text-headline); }
.rate-icon svg { width: 36px; height: 36px; }
.rate-platform { margin-top: 12px; font-size: var(--text-h7); line-height: var(--leading-h7); font-weight: 700; color: var(--text-headline); font-family: var(--font-body); }
.rate-value { margin-top: 8px; font-family: var(--font-display); font-weight: 700; font-size: var(--text-h3); line-height: var(--leading-h3); color: var(--accent-primary); }
.rate-unit { font-size: var(--text-sm); color: var(--text-secondary-light); }
.rate-divider { margin: 16px 0; border: 0; border-top: 1px solid var(--stroke-primary); }
.rate-note { font-size: var(--text-sm); line-height: 20px; color: var(--text-secondary-light); }
.rates-min {
  max-width: 760px; margin: 28px auto 0; text-align: center;
  font-size: var(--text-base); line-height: var(--leading-base); color: var(--text-secondary-light);
}
.rates-actions { margin-top: 20px; display: flex; justify-content: center; }
.rates-disclaimer { margin-top: 16px; text-align: center; }

/* =========================================================
   13. Отзывы
   ========================================================= */
.review-card { display: flex; flex-direction: column; padding: 24px; }
.stars { display: flex; gap: 4px; color: var(--accent-primary); }
.stars svg { width: 16px; height: 16px; }
.review-quote { margin-top: 16px; font-size: var(--text-base-lg); line-height: 28px; color: var(--text-primary); }
.review-foot { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--stroke-card); display: flex; align-items: center; gap: 12px; }
.review-avatar {
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: var(--radius-full); object-fit: cover; object-position: center top;
  border: 1px solid var(--transparent-white-10);
}
.review-name { font-size: var(--text-base); font-weight: 700; color: var(--text-headline-dark); }
.review-meta { font-size: var(--text-sm); line-height: 20px; color: var(--text-secondary); }
.reviews-note { margin-top: 24px; text-align: center; }

/* =========================================================
   14. FAQ
   ========================================================= */
.faq { max-width: 900px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--stroke-card); }
.faq-q {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 0; background: transparent; border: 0; text-align: left;
  font-family: var(--font-body); font-size: var(--text-base-lg); line-height: 28px; font-weight: 700;
  color: var(--text-headline-dark);
  transition: color 160ms ease-out;
}
.faq-q:hover { color: var(--accent-primary); }
.faq-chevron { flex: 0 0 24px; width: 24px; height: 24px; color: var(--text-secondary); transition: transform 200ms ease-out; }
.faq-q[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); color: var(--accent-primary); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 220ms ease-out; }
.faq-a-inner { padding-bottom: 20px; max-width: 760px; font-size: var(--text-base); line-height: var(--leading-base); color: var(--text-secondary); }

/* =========================================================
   15. Финальный CTA
   ========================================================= */
.final { position: relative; overflow: hidden; padding: 64px 0; text-align: center; }
.final-bg { position: absolute; inset: 0; pointer-events: none; }
.final-bg .glow-c { width: 760px; height: 480px; left: 50%; top: 50%; transform: translate(-50%, -50%); filter: blur(60px); }
.final-inner { position: relative; max-width: 760px; margin: 0 auto; }
.final-sub { margin-top: 16px; font-size: var(--text-base-lg); line-height: 28px; color: var(--text-secondary); }
.final-actions { margin-top: 28px; display: flex; justify-content: center; }
.final-micro { margin-top: 16px; font-size: var(--text-sm); line-height: 20px; color: var(--text-secondary); }

/* =========================================================
   16. Футер
   ========================================================= */
.footer { border-top: 1px solid var(--stroke-card); padding: 48px 0; }
.footer-top { display: grid; gap: 32px; }
.footer-about { margin-top: 16px; max-width: 420px; font-size: var(--text-sm); line-height: 22px; color: var(--text-secondary); }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.footer-col-title { font-size: var(--text-sm); font-weight: 700; color: var(--text-headline-dark); font-family: var(--font-body); }
.footer-col ul { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: var(--text-sm); line-height: 20px; color: var(--text-secondary); }
.footer-col a:hover { color: var(--accent-primary); }
.footer-social { display: flex; gap: 12px; margin-top: 16px; color: var(--text-secondary); }
.footer-social a { display: inline-flex; }
.footer-social svg { width: 20px; height: 20px; }
.footer-social a:hover { color: var(--accent-primary); }
.footer-divider { margin: 32px 0; border: 0; border-top: 1px solid var(--stroke-card); }
.footer-legal { display: flex; flex-direction: column; gap: 12px; max-width: 1040px; }
.footer-copy { margin-top: 16px; font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-tertiary); }

/* =========================================================
   17. register.html
   ========================================================= */
.auth {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column;
  padding: 24px 16px;
  overflow: hidden;
}
.auth-bg {
  position: absolute; inset: 0; z-index: 0;
  background-image: url("../img/bg-pattern.8e4d68a9a9a7.webp");
  background-size: cover; background-position: center;
  opacity: 0.35; mix-blend-mode: screen;
  pointer-events: none;
}
.auth-bg-dim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(8, 8, 8, 0.35) 0%, rgba(8, 8, 8, 0.92) 75%);
}
.auth-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 1040px; margin: auto;
  display: grid; gap: 32px; align-items: center;
  padding: 24px 0;
}
.auth-head { text-align: center; }
.auth-head .logo { justify-content: center; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: var(--text-sm); color: var(--text-secondary); }
.auth-back:hover { color: var(--accent-primary); }
.auth-side-title { font-family: var(--font-body); font-size: var(--text-h7); line-height: var(--leading-h7); font-weight: 700; color: var(--text-headline-dark); }
.auth-side-list { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.auth-side-list li { display: flex; gap: 12px; font-size: var(--text-base); line-height: var(--leading-base); color: var(--text-secondary); }
.auth-side-list svg { flex: 0 0 20px; width: 20px; height: 20px; color: var(--accent-primary); margin-top: 2px; }

.auth-card {
  width: 100%; max-width: 460px; margin: 0 auto;
  padding: 24px;
  background: linear-gradient(180deg, var(--bg-card-dark), var(--bg-card-dark-to));
  border: 1px solid var(--stroke-card);
  border-radius: var(--radius-xl);
  box-shadow: 0px 8px 32px 6px rgba(0, 0, 0, 0.45);
}
.auth-title { font-size: var(--text-h5); line-height: var(--leading-h5); text-align: center; }
.auth-sub { margin-top: 8px; text-align: center; font-size: var(--text-base); line-height: var(--leading-base); color: var(--text-secondary); }
.auth-socials { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--stroke-card); }
.auth-divider span { font-size: var(--text-xs); color: var(--text-secondary); }
.auth-consent { margin-top: 20px; }
.auth-card .btn-primary.btn-block { margin-top: 24px; }
.auth-login { margin-top: 24px; text-align: center; font-size: var(--text-sm); }
.auth-login a { color: var(--accent-primary); font-weight: 500; }
.auth-login a:hover { text-decoration: underline; }
.auth-foot { position: relative; z-index: 2; margin-top: 24px; text-align: center; display: flex; flex-direction: column; gap: 8px; }

.pw-strength { display: flex; gap: 6px; margin-top: 8px; }
.pw-strength span {
  flex: 1; height: 4px; border-radius: var(--radius-full);
  background: var(--transparent-white-20);
  transition: background 200ms ease-out;
}
.pw-strength[data-level="1"] span:nth-child(1) { background: var(--status-rejected); }
.pw-strength[data-level="2"] span:nth-child(-n+2) { background: var(--status-pending); }
.pw-strength[data-level="3"] span { background: var(--status-approved); }
.pw-strength-text { margin-top: 6px; font-family: var(--font-caption); font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary); }

/* =========================================================
   18. Тосты (общий элемент)
   ========================================================= */
.toast-stack {
  position: fixed; right: 24px; bottom: 24px; z-index: 200;
  display: flex; flex-direction: column; gap: 12px;
  max-width: calc(100vw - 32px);
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  min-width: 260px; max-width: 380px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--stroke-primary-dark);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  color: var(--text-primary);
  font-size: var(--text-sm); line-height: 20px;
  animation: toast-in 200ms ease-out;
}
.toast.is-leaving { animation: toast-out 200ms ease-in forwards; }
.toast svg { flex: 0 0 20px; width: 20px; height: 20px; }
.toast--success svg { color: var(--status-approved); }
.toast--error svg { color: var(--status-rejected); }
.toast--info svg { color: var(--accent-primary); }
.toast-close { margin-left: auto; background: transparent; border: 0; padding: 0; color: var(--text-secondary); }
.toast-close svg { width: 16px; height: 16px; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

/* =========================================================
   19. Адаптив лендинга
   ========================================================= */
@media (min-width: 480px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .stat-value { font-size: var(--text-h4); line-height: var(--leading-h4); }
}

@media (min-width: 768px) {
  :root { --side-pad: 32px; --section-pad: 64px; }
  .section-title { font-size: 32px; line-height: 44px; }
  .hero { padding-top: 40px; }
  .hero-title { font-size: 40px; line-height: 52px; }
  .hero-sub { font-size: var(--text-h7); line-height: var(--leading-h7); }
  .hero-actions { flex-direction: row; }
  .hero-actions .btn { width: auto; }
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .stat + .stat { border-left: 1px solid var(--stroke-card); }
  .stat-value { font-size: var(--text-h6); line-height: var(--leading-h6); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-card { padding: 32px; }
  .calc-result { padding: 32px; }
  .footer-top { grid-template-columns: 1.2fr 2fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .auth { padding: 32px 24px; }
  .auth-inner { grid-template-columns: 1fr; max-width: 480px; }
}

@media (min-width: 1024px) {
  :root { --side-pad: 48px; --section-pad: 80px; }
  .section-title { font-size: var(--text-h3); line-height: var(--leading-h3); }
  .nav { height: 84px; }
  .nav-links, .nav-actions { display: flex; }
  .nav-burger { display: none; }
  .logo img { height: 40px; }
  .hero { padding-top: 24px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; min-height: 640px; }
  .hero-copy { display: block; }
  .hero-title { font-size: var(--text-h2); line-height: var(--leading-h2); margin-top: 24px; }
  .hero-sub { margin-top: 20px; font-size: var(--text-h6); line-height: var(--leading-h6); }
  .hero-actions { margin-top: 32px; }
  .hero-trust { margin-top: 20px; }
  .hero-visual { aspect-ratio: 1 / 1; }
  .hero-note { left: -24px; bottom: 32px; }
  .stats { padding: 56px 0; }
  .stat-value { font-size: var(--text-h4); line-height: var(--leading-h4); }
  .stat-label { font-size: var(--text-base); }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
  .step { grid-template-columns: 1fr; gap: 0; }
  .step .step-num { margin-bottom: 20px; }
  .step::before {
    content: ""; position: absolute; top: 24px; left: 50%; width: 100%; height: 0;
    border-top: 1px dashed var(--stroke-primary-dark); z-index: 0;
  }
  .step:last-child::before { display: none; }
  .step-text { max-width: 260px; }
  .calc-grid { grid-template-columns: 1fr 0.8fr; gap: 40px; align-items: start; }
  .calc-card { padding: 40px; }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .why-card { padding: 32px; min-height: 260px; }
  .rate-card { padding: 32px 24px; }
  .review-card { padding: 32px; }
  .faq-q { font-size: var(--text-h6); line-height: var(--leading-h6); padding: 28px 0; }
  .faq-a-inner { font-size: var(--text-base-lg); line-height: 28px; }
  .final { padding: 96px 0; }
  .final-sub { font-size: var(--text-h7); line-height: var(--leading-h7); }
  .footer { padding: 64px 0; }
  .footer-top { grid-template-columns: 1.3fr 2fr; gap: 64px; }
  .auth-inner { grid-template-columns: 1fr 460px; gap: 64px; max-width: 1040px; }
  .auth-head { text-align: left; }
  .auth-head .logo { justify-content: flex-start; }
  .auth-card { margin: 0; padding: 40px; }
  .auth-title { font-size: var(--text-h4); line-height: var(--leading-h4); }
}

@media (min-width: 1440px) {
  :root { --side-pad: 96px; --section-pad: 100px; }
  .section-title { font-size: var(--text-h2); line-height: var(--leading-h2); }
  .hero-grid { gap: 64px; min-height: 720px; }
  .hero-title { font-size: var(--text-h1); line-height: var(--leading-h1); }
  .hero-sub { font-size: var(--text-h5); line-height: var(--leading-h5); }
  .why-title { font-size: var(--text-h7); }
}

@media (max-width: 767px) {
  /* бейдж не должен выступать за карточку и тянуть страницу вправо */
  .rate-badge { white-space: normal; max-width: calc(100% - 24px); }
  .toast-stack { right: 16px; left: 16px; bottom: 16px; }
  .toast { max-width: none; }
}

@media (max-width: 399px) {
  .stat-value { font-size: var(--text-h6); line-height: var(--leading-h6); }
}

@media (max-width: 479px) {
  .detail-kpis { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; }
}

/* =========================================================
   19b. Утилиты раскладки кабинета (вместо инлайн-стилей)
   ========================================================= */
.svg-sprite { position: absolute; }
.icon-muted { color: var(--text-secondary); }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-md { margin-top: var(--space-md); }
.mb-8 { margin-bottom: 8px; }
.ml-28 { margin-left: 28px; }
.text-base-lg { font-size: var(--text-base-lg); }
.text-sm-u { font-size: var(--text-sm); }

.dtable .col-video { min-width: 280px; }
.dtable .col-platform { width: 140px; }
.dtable .col-date { width: 130px; }
.dtable .col-status { width: 150px; }
.dtable .col-metric { width: 120px; }
.dtable .col-actions { width: 120px; }

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

/* =========================================================
   21. dashboard.html — каркас
   ========================================================= */
.dash { background: var(--bg-primary); }
.dash-shell { display: block; min-height: 100vh; }

.dash-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 90;
  width: 280px; max-width: 86vw;
  display: flex; flex-direction: column;
  background: var(--bg-card-dark);
  border-right: 1px solid var(--stroke-card);
  transform: translateX(-100%);
  transition: transform 220ms ease-out;
  overflow-y: auto;
}
.dash-sidebar.is-open { transform: none; }
.dash-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 16px; border-bottom: 1px solid var(--stroke-card); }
.dash-sidebar-head .logo img { height: 30px; }
.dash-nav { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.dash-nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%; height: 44px; padding: 0 16px;
  background: transparent; border: 0; border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-base); font-weight: 500; text-align: left;
  transition: background 160ms ease-out, color 160ms ease-out;
}
.dash-nav-item svg { flex: 0 0 20px; width: 20px; height: 20px; }
.dash-nav-item:hover { background: var(--transparent-white-20); color: var(--text-primary); }
.dash-nav-item.is-active {
  background: var(--control-primary); color: var(--text-inverted);
  box-shadow: var(--shadow-button);
}
.dash-nav-item.is-active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: var(--radius-full); background: var(--accent-gradient-start);
}
.dash-sidebar-foot { margin-top: auto; padding: 12px 16px 20px; }
.dash-balance {
  padding: 16px; border-radius: var(--radius-lg);
  background: var(--transparent-white-20);
  border: 1px solid var(--stroke-card);
}
.dash-balance-label { font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary); }
.dash-balance-value { margin: 6px 0 12px; font-size: var(--text-h6); line-height: var(--leading-h6); font-weight: 700; color: var(--accent-primary); }
.dash-balance .btn { height: 40px; width: 100%; font-size: var(--text-sm); padding: 0 12px; }
.dash-logout { margin-top: 12px; width: 100%; justify-content: flex-start; }

.dash-scrim {
  position: fixed; inset: 0; z-index: 85;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0; visibility: hidden;
  transition: opacity 200ms ease-out, visibility 200ms;
}
.dash-scrim.is-open { opacity: 1; visibility: visible; }

.dash-main { position: relative; min-width: 0; }
.dash-topbar {
  position: sticky; top: 0; z-index: 70;
  min-height: 64px;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: rgba(8, 8, 8, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stroke-card);
}
.dash-topbar-title { font-family: var(--font-body); font-size: var(--text-h7); line-height: 26px; font-weight: 700; color: var(--text-headline-dark); }
.dash-topbar-crumb { display: none; font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary); }
.dash-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.dash-topbar-sep { display: none; width: 1px; height: 24px; background: var(--stroke-card); }

.bell { position: relative; }
.bell-dot {
  position: absolute; top: 7px; right: 8px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: var(--accent-primary); color: var(--text-inverted);
  font-size: 10px; line-height: 1; font-weight: 700;
}

.profile { position: relative; }
.profile-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 6px; background: transparent; border: 1px solid transparent; border-radius: var(--radius-md);
  color: var(--text-primary);
}
.profile-btn:hover { background: var(--transparent-white-20); }
.profile-avatar { width: 32px; height: 32px; border-radius: var(--radius-full); object-fit: cover; border: 1px solid var(--transparent-white-10); }
.profile-meta { display: none; text-align: left; }
.profile-name { font-size: var(--text-sm); font-weight: 700; color: var(--text-headline-dark); }
.profile-nick { font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary); }
.profile-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 220px; padding: 6px;
  background: var(--bg-card-dark);
  border: 1px solid var(--stroke-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  display: none; z-index: 80;
}
.profile-menu.is-open { display: block; }
.profile-menu li > * {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 40px; padding: 0 12px;
  background: transparent; border: 0; border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: var(--text-sm); text-align: left;
}
.profile-menu li > *:hover { background: var(--transparent-white-20); }
.profile-menu svg { width: 16px; height: 16px; color: var(--text-secondary); }

.dash-content { position: relative; padding: 16px 16px 48px; max-width: 1180px; margin: 0 auto; }
.dash-content::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 320px; z-index: 0;
  background-image: url("../img/bg-pattern.8e4d68a9a9a7.webp");
  background-size: cover; background-position: top center;
  opacity: 0.18; mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
  mask-image: linear-gradient(to bottom, #000, transparent);
  pointer-events: none;
}
.dash-content > * { position: relative; z-index: 1; }

.dash-section { display: none; }
.dash-section.is-active { display: block; }

.dash-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin-bottom: 20px;
  border-radius: var(--radius-md);
  background: rgba(250, 106, 28, 0.08);
  border: 1px solid rgba(250, 106, 28, 0.24);
  font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary);
}
.dash-banner svg { flex: 0 0 16px; width: 16px; height: 16px; color: var(--accent-primary); }

.dash-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.dash-head-title { font-size: var(--text-h5); line-height: var(--leading-h5); }
.dash-head-sub { margin-top: 6px; font-size: var(--text-sm); line-height: 20px; color: var(--text-secondary); }
.dash-head-right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; width: 100%; }
.status-partner {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px; border-radius: var(--radius-pill);
  background: var(--transparent-white-20); border: 1px solid var(--stroke-secondary);
  color: var(--text-primary); font-size: var(--text-xs); font-weight: 700;
}
.status-partner svg { width: 14px; height: 14px; }

/* Индикатор трекера */
.tracker {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px; border-radius: var(--radius-pill);
  background: var(--transparent-white-20); border: 1px solid var(--stroke-card);
  font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary);
}
.tracker.is-busy { border-color: rgba(250, 106, 28, 0.32); }
.tracker-dot {
  width: 8px; height: 8px; flex: 0 0 8px; border-radius: var(--radius-full);
  background: var(--status-approved);
  box-shadow: 0 0 0 0 rgba(47, 191, 107, 0.5);
  animation: pulse 2.4s ease-out infinite;
}
.tracker.is-busy .tracker-dot {
  background: transparent; animation: spin 700ms linear infinite;
  border: 2px solid rgba(250, 106, 28, 0.3); border-top-color: var(--accent-primary);
  width: 12px; height: 12px; flex-basis: 12px; box-shadow: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 191, 107, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(47, 191, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 191, 107, 0); }
}
.tracker-next { font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary); }
.tracker-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.dash-topbar .tracker { display: none; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
.kpi-card { padding: 20px; transition: border-color 200ms ease-out, transform 160ms ease-out; }
.kpi-card:hover { border-color: var(--stroke-secondary); transform: translateY(-2px); }
.kpi-card.is-highlight { border-color: rgba(250, 106, 28, 0.32); box-shadow: inset 0 0 60px rgba(240, 110, 45, 0.06); }
.kpi-label { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); line-height: 20px; color: var(--text-secondary); }
.kpi-label svg { width: 16px; height: 16px; }
.kpi-value {
  margin-top: 10px;
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-h4); line-height: var(--leading-h4);
  color: var(--text-headline-dark);
  border-radius: var(--radius-sm);
  transition: background-color 600ms ease-out;
}
.kpi-value--money { color: var(--accent-primary); }
.kpi-delta { margin-top: 10px; display: flex; align-items: center; gap: 6px; font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--status-approved); }
.kpi-delta svg { width: 14px; height: 14px; }
.kpi-caption { margin-top: 6px; font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary); }
.flash { background-color: rgba(250, 106, 28, 0.18); }

/* Блоки кабинета */
.panel { margin-top: var(--space-md); padding: 20px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-title { font-family: var(--font-body); font-size: var(--text-h7); line-height: var(--leading-h7); font-weight: 700; color: var(--text-headline-dark); }
.panel-sub { margin-top: 4px; font-size: var(--text-sm); line-height: 20px; color: var(--text-secondary); }
.panel-actions { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.panel-link { font-size: var(--text-sm); font-weight: 500; color: var(--accent-primary); background: transparent; border: 0; padding: 0; }
.panel-link:hover { text-decoration: underline; }
.count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--transparent-white-20); border: 1px solid var(--stroke-card);
  font-size: var(--text-xs); font-weight: 700; color: var(--text-secondary);
}

.dash-cols { display: grid; gap: var(--space-md); }

/* График */
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 8px; font-size: var(--text-xs); color: var(--text-secondary); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--accent-primary); margin-right: 6px; }
.chart-wrap { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid-line { stroke: var(--stroke-card); stroke-width: 1; }
.chart-axis-label { fill: var(--text-secondary); font-size: 11px; font-family: var(--font-body); }
.chart-bar { fill: url(#barGrad); transition: fill 160ms ease-out; cursor: pointer; }
.chart-bar:hover, .chart-bar.is-active { fill: var(--accent-primary); }
.chart-line { fill: none; stroke: var(--accent-gradient-mid); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: url(#areaGrad); }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none;
  transform: translate(-50%, -115%);
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--stroke-primary-dark);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  white-space: nowrap; display: none;
}
.chart-tip.is-visible { display: block; }
.chart-tip-date { font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary); }
.chart-tip-value { font-size: var(--text-sm); line-height: 20px; font-weight: 700; color: var(--text-headline-dark); }
.chart-tip-money { font-size: var(--text-xs); line-height: var(--leading-xs); font-weight: 700; color: var(--accent-primary); }
.chart-empty { padding: 40px 0; text-align: center; font-size: var(--text-sm); color: var(--text-secondary); }

/* Разбивка по платформам */
.breakdown { display: flex; flex-direction: column; gap: 16px; }
.breakdown-row { display: block; }
.breakdown-top { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--text-primary); }
.breakdown-top svg { width: 20px; height: 20px; color: var(--text-secondary); }
.breakdown-value { margin-left: auto; font-weight: 700; color: var(--text-headline-dark); }
.progress { margin-top: 8px; height: 6px; border-radius: var(--radius-full); background: var(--transparent-white-20); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: var(--radius-full); background: rgba(250, 106, 28, 0.45); transition: width 400ms ease-out; }
.progress.is-leader > i { background: var(--accent-primary); }

/* Реферальная панель */
.ref-panel { border-color: rgba(250, 106, 28, 0.24); overflow: hidden; }
.ref-panel::after {
  content: ""; position: absolute; top: -60px; right: -60px; width: 220px; height: 220px;
  background: radial-gradient(closest-side, rgba(240, 110, 45, 0.1), rgba(240, 110, 45, 0));
  pointer-events: none;
}
.ref-field {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px; padding: 6px 6px 6px 12px;
  min-height: var(--height-input);
  background: var(--bg-elevated);
  border: 1px solid var(--stroke-primary-dark);
  border-radius: var(--radius-md);
}
.ref-input {
  flex: 1 1 auto; min-width: 0;
  background: transparent; border: 0; padding: 0;
  color: var(--text-primary); font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}
.ref-input:focus { outline: none; }
.ref-field .btn { height: 36px; padding: 0 14px; font-size: var(--text-sm); flex: 0 0 auto; }
.ref-field .btn.is-copied { background: var(--status-approved); box-shadow: none; }
.ref-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.ref-tag { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--text-secondary); }
.tag-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: var(--radius-sm);
  background: rgba(250, 106, 28, 0.1); border: 1px solid rgba(250, 106, 28, 0.32);
  color: var(--accent-primary); font-size: var(--text-sm); font-weight: 700;
}

/* Список правил */
.rules-list { display: flex; flex-direction: column; gap: 12px; }
.rules-list li { display: flex; gap: 12px; font-size: var(--text-sm); line-height: 22px; color: var(--text-secondary); }
.rules-list svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--accent-primary); margin-top: 2px; }
.rules-note { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--stroke-card); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }

/* =========================================================
   22. Таблицы кабинета
   ========================================================= */
.table-tools { display: grid; gap: 10px; margin-bottom: 16px; }
.table-tools .input, .table-tools .select { height: 40px; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-secondary); pointer-events: none; }
.search-wrap .input { padding-left: 38px; }

.table-scroll { overflow-x: auto; }
.dtable { width: 100%; border-collapse: collapse; }
.dtable thead th {
  position: sticky; top: 0; z-index: 2;
  height: 44px; padding: 0 12px; text-align: left; white-space: nowrap;
  background: var(--bg-card-dark);
  border-bottom: 1px solid var(--stroke-card);
  font-size: var(--text-xs); line-height: var(--leading-xs); font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary);
}
.dtable th.is-num, .dtable td.is-num { text-align: right; }
.th-sort { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0; padding: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; }
.th-sort svg { width: 14px; height: 14px; opacity: 0.4; transition: transform 160ms ease-out, opacity 160ms ease-out; }
.dtable th.is-sorted .th-sort { color: var(--text-primary); }
.dtable th.is-sorted .th-sort svg { opacity: 1; color: var(--accent-primary); }
.dtable th.is-sorted-asc .th-sort svg { transform: rotate(180deg); }
.dtable tbody tr { border-bottom: 1px solid var(--stroke-card); transition: background 160ms ease-out; cursor: pointer; }
.dtable tbody tr:last-child { border-bottom: 0; }
.dtable tbody tr:hover { background: var(--transparent-white-20); }
.dtable tbody tr.is-rejected { box-shadow: inset 2px 0 0 0 var(--status-rejected); }
.dtable td { padding: 12px; font-size: var(--text-sm); line-height: 20px; color: var(--text-primary); vertical-align: middle; }
.dtable td.is-num { font-weight: 700; color: var(--text-headline-dark); font-variant-numeric: tabular-nums; }
.dtable td.is-num.is-zero { color: var(--text-secondary); font-weight: 500; }
.row-flash { animation: row-flash 600ms ease-out; }
@keyframes row-flash { from { background-color: rgba(250, 106, 28, 0.18); } to { background-color: transparent; } }

.cell-label { display: none; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--text-secondary); text-transform: none; letter-spacing: 0; }

.vcell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vthumb {
  position: relative; flex: 0 0 64px;
  width: 64px; height: 40px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card-dark));
  border: 1px solid var(--stroke-card);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
}
.vthumb svg { width: 16px; height: 16px; }
.vthumb-dur {
  position: absolute; right: 2px; bottom: 2px;
  padding: 1px 4px; border-radius: 3px;
  background: rgba(0, 0, 0, 0.72);
  font-size: 10px; line-height: 12px; color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.vthumb--lg { flex-basis: 120px; width: 120px; height: 68px; }
.vthumb--lg svg { width: 24px; height: 24px; }
.vtitle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.pcell { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); }
.pcell svg { width: 16px; height: 16px; }

.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px 0 8px;
  border-radius: 6px; border: 1px solid transparent;
  font-size: var(--text-xs); line-height: var(--leading-xs); font-weight: 700; white-space: nowrap;
}
.status-badge svg { width: 14px; height: 14px; }
.status-badge--approved { color: var(--status-approved); background: var(--status-approved-bg); border-color: var(--status-approved-br); }
.status-badge--pending { color: var(--status-pending); background: var(--status-pending-bg); border-color: var(--status-pending-br); }
.status-badge--rejected { color: var(--status-rejected); background: var(--status-rejected-bg); border-color: var(--status-rejected-br); }
.status-cell { display: inline-flex; align-items: center; gap: 6px; }
.info-dot { display: inline-flex; color: var(--text-secondary); }
.info-dot svg { width: 14px; height: 14px; }

.empty-state { padding: 48px 16px; text-align: center; }
.empty-icon {
  width: 88px; height: 88px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: var(--transparent-white-20);
  color: var(--stroke-secondary);
}
.empty-icon svg { width: 40px; height: 40px; }
.empty-title { font-family: var(--font-body); font-size: var(--text-h7); line-height: var(--leading-h7); font-weight: 700; color: var(--text-headline-dark); }
.empty-text { margin: 8px auto 20px; max-width: 360px; font-size: var(--text-sm); line-height: 22px; color: var(--text-secondary); }

.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: var(--space-md); }
.mini-kpi { padding: 14px 16px; border-radius: var(--radius-lg); background: var(--transparent-white-20); border: 1px solid var(--stroke-card); }
.mini-kpi-label { font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary); }
.mini-kpi-value { margin-top: 4px; font-size: var(--text-h7); line-height: 26px; font-weight: 700; color: var(--text-headline-dark); font-variant-numeric: tabular-nums; }

/* Промо и настройки */
.promo-grid { display: grid; gap: var(--space-md); grid-template-columns: 1fr; }
.promo-card { padding: 20px; }
.promo-card .icon-box { width: 48px; height: 48px; border-radius: var(--radius-md); }
.promo-card .icon-box svg { width: 24px; height: 24px; }
.promo-card h3 { margin-top: 16px; font-family: var(--font-body); font-size: var(--text-base-lg); font-weight: 700; }
.promo-card p { margin-top: 8px; font-size: var(--text-sm); line-height: 22px; color: var(--text-secondary); }
.promo-card .btn { margin-top: 16px; }

.settings-grid { display: grid; gap: var(--space-md); grid-template-columns: 1fr; }
.settings-profile { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.settings-avatar { width: 72px; height: 72px; border-radius: var(--radius-full); object-fit: cover; border: 1px solid var(--transparent-white-10); }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--stroke-card); }
.settings-row:last-child { border-bottom: 0; }
.level-track { margin-top: 12px; height: 8px; border-radius: var(--radius-full); background: var(--transparent-white-20); overflow: hidden; }
.level-track > i { display: block; height: 100%; width: 62%; background: var(--accent-primary); border-radius: var(--radius-full); }

.dash-footer {
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--stroke-card);
  display: flex; flex-direction: column; gap: 10px;
}

/* =========================================================
   23. Модалки кабинета
   ========================================================= */
.modal {
  position: fixed; inset: 0; z-index: 150;
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.modal.is-open { display: flex; }
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.68);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal-window {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px;
  max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 20px;
  background: linear-gradient(180deg, var(--bg-card-dark), var(--bg-card-dark-to));
  border: 1px solid var(--stroke-card);
  border-radius: var(--radius-xl);
  box-shadow: 0px 8px 32px 6px rgba(0, 0, 0, 0.5);
  animation: modal-in 180ms ease-out;
}
.modal--wide .modal-window { max-width: 640px; }
.modal--narrow .modal-window { max-width: 480px; }
@keyframes modal-in { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.modal-title { font-family: var(--font-body); font-size: var(--text-h6); line-height: var(--leading-h6); font-weight: 700; color: var(--text-headline-dark); }
.modal-sub { margin-top: 6px; font-size: var(--text-sm); line-height: 20px; color: var(--text-secondary); }
.modal-close { margin-left: auto; flex: 0 0 40px; }
.modal-foot { margin-top: 24px; display: flex; flex-direction: column-reverse; gap: 12px; }
.modal-foot .btn { width: 100%; }

.note-box {
  display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--radius-md);
  background: rgba(250, 106, 28, 0.08); border: 1px solid rgba(250, 106, 28, 0.24);
  font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary);
}
.note-box svg { flex: 0 0 16px; width: 16px; height: 16px; color: var(--accent-primary); margin-top: 1px; }
.note-box--warn { background: var(--status-rejected-bg); border-color: var(--status-rejected-br); }
.note-box--warn svg { color: var(--status-rejected); }
.note-box--pending { background: var(--status-pending-bg); border-color: var(--status-pending-br); }
.note-box--pending svg { color: var(--status-pending); }
.note-box-title { font-size: var(--text-sm); font-weight: 700; margin-bottom: 4px; }
.note-box--warn .note-box-title { color: var(--status-rejected); }
.note-box--pending .note-box-title { color: var(--status-pending); }
.note-box-text { color: var(--text-primary); font-size: 13px; line-height: 19px; }

.balance-box {
  padding: 20px; border-radius: var(--radius-lg); text-align: center;
  background: var(--transparent-white-20); border: 1px solid var(--stroke-card);
  margin-bottom: 20px;
}
.balance-box-label { font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary); }
.balance-box-value { margin-top: 6px; font-family: var(--font-display); font-weight: 700; font-size: var(--text-h3); line-height: var(--leading-h3); color: var(--accent-primary); }

.radio-row {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 16px; cursor: pointer;
  border: 1px solid var(--stroke-primary-dark); border-radius: var(--radius-md);
  background: var(--bg-elevated);
  transition: border-color 160ms ease-out, background 160ms ease-out;
}
.radio-row + .radio-row { margin-top: 8px; }
.radio-row input { position: absolute; opacity: 0; }
.radio-mark {
  flex: 0 0 20px; width: 20px; height: 20px; border-radius: var(--radius-full);
  border: 1px solid var(--stroke-primary-dark); position: relative;
}
.radio-mark::after {
  content: ""; position: absolute; inset: 4px; border-radius: var(--radius-full);
  background: var(--control-primary); opacity: 0; transition: opacity 140ms ease-out;
}
.radio-row input:checked + .radio-mark { border-color: var(--accent-primary); }
.radio-row input:checked + .radio-mark::after { opacity: 1; }
.radio-row:has(input:checked) { border-color: var(--accent-primary); background: rgba(250, 106, 28, 0.08); }
.radio-row input:focus-visible + .radio-mark { box-shadow: 0 0 0 4px rgba(250, 106, 28, 0.12); }
.radio-text { font-size: var(--text-sm); color: var(--text-primary); }
.radio-term { margin-left: auto; font-size: var(--text-xs); color: var(--text-secondary); white-space: nowrap; }

.detail-head { display: flex; gap: 16px; align-items: flex-start; }
.detail-title { font-family: var(--font-body); font-size: var(--text-h7); line-height: 26px; font-weight: 700; color: var(--text-headline-dark); }
.detail-meta { margin-top: 6px; font-size: var(--text-sm); color: var(--text-secondary); }
.detail-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.detail-kpi { padding: 14px; border-radius: var(--radius-md); background: var(--transparent-white-20); }
.detail-kpi-label { font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--text-secondary); }
.detail-kpi-value { margin-top: 6px; font-size: var(--text-h7); line-height: 26px; font-weight: 700; color: var(--text-headline-dark); font-variant-numeric: tabular-nums; }
.detail-kpi-value.is-muted { color: var(--text-secondary); }
.detail-link { margin-top: 16px; display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--accent-link); word-break: break-all; }
.detail-link svg { flex: 0 0 16px; width: 16px; height: 16px; }

/* =========================================================
   24. Адаптив кабинета
   ========================================================= */
@media (min-width: 640px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .table-tools { grid-template-columns: 1fr 1fr; }
  .modal-foot { flex-direction: row; justify-content: flex-end; }
  .modal-foot .btn { width: auto; }
  .promo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .dash-content { padding: 24px 24px 56px; }
  .dash-topbar { padding: 12px 24px; min-height: 72px; }
  .dash-head-title { font-size: var(--text-h4); line-height: var(--leading-h4); }
  .dash-head-right { width: auto; margin-left: auto; }
  .profile-meta { display: block; }
  .profile-avatar { width: 40px; height: 40px; }
  .dash-topbar-sep { display: block; }
  .table-tools { grid-template-columns: minmax(200px, 1.4fr) 1fr 1fr 1fr; align-items: center; }
  .settings-grid { grid-template-columns: 1.4fr 1fr; }
  .modal-window { padding: 32px; }
}

@media (min-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-cols { grid-template-columns: 2fr 1fr; align-items: start; }
  .dash-cols .panel { margin-top: 0; }
  .promo-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); }
  .dash-sidebar { position: sticky; top: 0; height: 100vh; transform: none; max-width: none; }
  .dash-sidebar-close, .dash-burger { display: none; }
  .dash-scrim { display: none; }
  .dash-topbar-crumb { display: block; }
  .dash-topbar .tracker { display: inline-flex; }
  .tracker-row > .tracker { display: none; }
  .dash-content { padding: 32px 32px 64px; }
  .panel { padding: 24px; }
}

/* Карточный режим таблицы (< 1024px) */
@media (max-width: 1023px) {
  .table-scroll { overflow: visible; }
  .dtable, .dtable tbody, .dtable tr, .dtable td { display: block; width: 100%; }
  .dtable thead { display: none; }
  .dtable tbody tr {
    display: grid; grid-template-columns: repeat(6, 1fr);
    gap: 10px 8px; padding: 16px; margin-bottom: 12px;
    border: 1px solid var(--stroke-card); border-radius: var(--radius-lg);
    background: var(--transparent-white-20);
  }
  .dtable tbody tr:last-child { margin-bottom: 0; }
  .dtable td { padding: 0; }
  .dtable td[data-col="video"] { grid-column: 1 / 5; grid-row: 1; }
  .dtable td[data-col="status"] { grid-column: 5 / 7; grid-row: 1; justify-self: end; text-align: right; }
  .dtable td[data-col="platform"] { grid-column: 1 / 4; grid-row: 2; }
  .dtable td[data-col="published"] { grid-column: 4 / 7; grid-row: 2; justify-self: end; color: var(--text-secondary); }
  .dtable td[data-col="views"] { grid-column: 1 / 3; grid-row: 3; text-align: left; }
  .dtable td[data-col="counted"] { grid-column: 3 / 5; grid-row: 3; text-align: left; }
  .dtable td[data-col="earned"] { grid-column: 5 / 7; grid-row: 3; text-align: left; }
  .dtable td[data-col="actions"] { grid-column: 1 / 7; grid-row: 4; }
  .dtable .cell-label { display: block; margin-bottom: 2px; }
  .dtable .vtitle { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .dtable--payouts tbody tr { grid-template-columns: repeat(2, 1fr); }
  .dtable--payouts td[data-col] { grid-column: auto !important; grid-row: auto !important; justify-self: start !important; text-align: left !important; }
}
