/* ===========================================================================
   Trends Creators — дизайн-система кабинета креатора
   Чистая светлая SaaS-эстетика для финансового кабинета.
   Токены → утилиты → компоненты (кнопки, карточки, бейджи, таблицы, формы,
   навигация, тосты). Mobile-first, 390px → 1440px.
   =========================================================================== */

:root {
  /* --- Палитра ---------------------------------------------------------- */
  --bg: #f4f5f8;
  --bg-grad: radial-gradient(1100px 520px at 78% -8%, #eef0fe 0%, rgba(238,240,254,0) 60%);
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #f1f3f7;
  --border: #e7e9ef;
  --border-strong: #d7dae3;

  --text: #131722;
  --text-muted: #5d6473;
  --text-faint: #9097a6;

  /* Фирстиль Trendsee — CTA Red */
  --accent: #e11d2a;
  --accent-ink: #c1141f;
  --accent-deep: #9f1019;
  --accent-soft: #fdeaec;
  --accent-soft-2: #fef4f5;

  /* Cinema Dark — тёмная боковая панель / экраны входа */
  --side-bg: #15161c;
  --side-bg-2: #1c1e26;
  --side-border: #2a2d38;
  --side-text: #b9bdca;
  --side-text-dim: #7e8392;
  --side-active-bg: rgba(225,29,42,.16);
  --side-active-text: #ff6b73;
  --ink-night: #0d0e12;

  --success: #15924c;
  --success-soft: #e4f5ea;
  --success-ink: #0f6e39;
  --warn: #b5790a;
  --warn-soft: #fbf1d9;
  --warn-ink: #8a5d08;
  --danger: #d63333;
  --danger-soft: #fce9e9;
  --danger-ink: #a82121;
  --info: #2563eb;
  --info-soft: #e6effe;
  --info-ink: #1a4bb8;

  /* --- Форма ------------------------------------------------------------ */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --radius-pill: 999px;
  --shadow-xs: 0 1px 2px rgba(19,23,34,.05);
  --shadow: 0 1px 2px rgba(19,23,34,.04), 0 6px 18px rgba(19,23,34,.05);
  --shadow-md: 0 4px 14px rgba(19,23,34,.07), 0 12px 34px rgba(19,23,34,.07);
  --shadow-lg: 0 18px 50px rgba(28,30,60,.16);
  --ring: 0 0 0 3px var(--accent-soft);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --z-topbar: 30;
  --z-subnav: 25;
  --z-toast: 60;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 15px;
  font-feature-settings: "cv05", "ss01";
}
a { color: var(--accent-ink); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-deep); }
h1, h2, h3 { letter-spacing: -.02em; }

/* --- SVG-иконки -------------------------------------------------------- */
.ic { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none;
      stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }

/* ===========================================================================
   Каркас приложения
   =========================================================================== */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 252px; flex-shrink: 0;
  background: var(--side-bg);
  border-right: 1px solid var(--side-border);
  padding: 20px 14px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  font-weight: 750; font-size: 16.5px; letter-spacing: -.02em;
  color: var(--text); padding: 6px 8px 20px;
}
.sidebar .brand { color: #fff; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(140deg, var(--accent) 0%, #ff5a52 100%);
  display: grid; place-items: center; color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(225,29,42,.45);
}
.brand .logo .ic { width: 19px; height: 19px; stroke-width: 2.4; }

/* --- Real Trendsee wordmark (CSS mask → recolours via currentColor) + handwritten sublabel --- */
.brand.brand-stack { flex-direction: column; align-items: flex-start; gap: 1px; }
.brand-logo {
  display: block; width: 130px; height: 22px; background-color: currentColor;
  -webkit-mask: url("trendsee-logo.svg") no-repeat left center / contain;
  mask: url("trendsee-logo.svg") no-repeat left center / contain;
}
.brand-sub {
  font-family: 'Caveat', cursive; font-weight: 700; line-height: 1;
  font-size: 19px; color: var(--accent);
  margin-left: 30px; margin-top: -1px;
  transform: rotate(-4deg); transform-origin: left center;
}
.sidebar .brand-sub { color: #ff5a52; }
.topbar .brand-logo { width: 108px; height: 18px; }
.topbar .brand-sub { font-size: 16px; margin-left: 25px; }
.auth-card .brand-logo { width: 156px; height: 27px; }
.auth-card .brand-sub { font-size: 22px; margin-left: 36px; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--side-text-dim); padding: 14px 11px 6px;
}
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  color: var(--side-text); font-weight: 550; font-size: 14.5px;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: var(--side-bg-2); color: #fff; }
.nav a.active { background: var(--side-active-bg); color: var(--side-active-text); font-weight: 600; }
.nav a.active .ic { color: var(--accent); }
.nav a .ic { color: var(--side-text-dim); transition: color .15s ease; }
.nav a:hover .ic { color: var(--side-text); }

.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--side-border); }
.sidebar-foot .who { display: flex; align-items: center; gap: 9px; padding: 8px; }
.sidebar-foot .avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: var(--side-active-bg); color: var(--side-active-text);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; text-transform: uppercase;
}
.sidebar-foot .who-mail { font-size: 12.5px; color: var(--side-text-dim); word-break: break-all; line-height: 1.3; }
.sidebar-foot .logout {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--side-text); padding: 9px 8px 2px; border-radius: var(--radius-sm);
}
.sidebar-foot .logout:hover { color: var(--accent); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: none; align-items: center; justify-content: space-between;
  padding: 11px 16px; background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: var(--z-topbar);
}
.content { padding: 30px 36px 64px; max-width: 1140px; width: 100%; margin: 0 auto; }

.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 24px; margin: 0 0 5px; font-weight: 720; }
.page-head p { margin: 0; color: var(--text-muted); font-size: 14.5px; }

/* ===========================================================================
   Сетки и карточки
   =========================================================================== */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card.pad { padding: 22px; }
.card-h {
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  font-weight: 650; font-size: 15px; display: flex; align-items: center; gap: 9px;
}
.card-h .ic { color: var(--text-faint); }
.card-b { padding: 22px; }

/* --- KPI-карточки ------------------------------------------------------ */
.stat {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  transition: box-shadow .18s ease, transform .18s ease;
}
.stat:hover { box-shadow: var(--shadow-md); }
.stat .stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.stat .label { color: var(--text-muted); font-size: 13px; font-weight: 550; }
.stat .stat-ic {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--surface-3); color: var(--text-muted);
}
.stat .stat-ic.is-accent { background: var(--accent-soft); color: var(--accent-ink); }
.stat .stat-ic.is-success { background: var(--success-soft); color: var(--success-ink); }
.stat .stat-ic.is-info { background: var(--info-soft); color: var(--info-ink); }
.stat .stat-ic.is-warn { background: var(--warn-soft); color: var(--warn-ink); }
.stat .value { font-size: 26px; font-weight: 750; letter-spacing: -.025em; line-height: 1.1;
               font-variant-numeric: tabular-nums; }
.stat .value.accent { color: var(--text); }
.stat .value.success { color: var(--success-ink); }
.stat .sub { color: var(--text-faint); font-size: 12.5px; margin-top: 5px; }

/* ===========================================================================
   Таблицы
   =========================================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; font-weight: 600; color: var(--text-faint); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 12px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2);
}
table.data th:first-child { border-top-left-radius: var(--radius); }
table.data th:last-child { border-top-right-radius: var(--radius); }
table.data td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .12s ease; }
table.data tbody tr:hover td { background: var(--surface-2); }
.num { font-variant-numeric: tabular-nums; }
.money { font-variant-numeric: tabular-nums; font-weight: 650; }
.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv td { padding: 10px 0; border-bottom: 1px solid var(--border); }
.kv tr:last-child td { border-bottom: none; }
.kv td:first-child { color: var(--text-muted); }
.kv td:last-child { text-align: right; font-weight: 550; }

/* --- Ссылка-видео в таблице ------------------------------------------- */
.vlink { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.vlink .ic { color: var(--text-faint); }
.vlink:hover .ic { color: var(--accent); }

/* ===========================================================================
   Бейджи статусов
   =========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.added, .badge.approved   { background: var(--info-soft); color: var(--info-ink); }
.badge.moderation, .badge.created, .badge.review { background: var(--warn-soft); color: var(--warn-ink); }
.badge.active, .badge.paid  { background: var(--success-soft); color: var(--success-ink); }
.badge.expired { background: var(--surface-3); color: var(--text-muted); }
.badge.rejected, .badge.deleted { background: var(--danger-soft); color: var(--danger-ink); }

.rank-badge {
  width: 26px; height: 26px; flex-shrink: 0; display: inline-grid; place-items: center;
  border-radius: 8px; background: var(--surface-3); color: var(--text-muted);
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.rank-badge.top1 { background: linear-gradient(135deg,#fde68a,#f59e0b); color: #6b3f05; }
.rank-badge.top2 { background: linear-gradient(135deg,#e7eaf0,#c2c8d4); color: #41475a; }
.rank-badge.top3 { background: linear-gradient(135deg,#f6d9bd,#d99a63); color: #5e3413; }

/* ===========================================================================
   Кнопки
   =========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 9.5px 17px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; line-height: 1.1;
  font-family: var(--font); transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn .ic { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(54,42,160,.25); }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-primary:active { background: var(--accent-deep); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text-faint); color: var(--text); }
.btn-soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn-soft:hover { background: #e2dffb; color: var(--accent-deep); }
.btn-danger-ghost { background: var(--surface); color: var(--danger-ink); border-color: var(--border-strong); }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: #f0c4c4; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 13.5px; }
.btn-lg { padding: 12px 22px; font-size: 15.5px; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }

/* ===========================================================================
   Формы
   =========================================================================== */
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 7px; color: var(--text); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 14.5px; font-family: var(--font); background: var(--surface); color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--text-faint); }
.form-row input:hover, .form-row select:hover, .form-row textarea:hover { border-color: var(--text-faint); }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--ring);
}
.form-row textarea { min-height: 90px; resize: vertical; }
.form-row .help { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }
.form-row .errlist { color: var(--danger-ink); font-size: 13px; margin: 7px 0 0; padding: 0; list-style: none; }
.form-row .errlist li { display: flex; gap: 6px; align-items: flex-start; }
.form-row.has-error input, .form-row.has-error select, .form-row.has-error textarea { border-color: var(--danger); }

/* ===========================================================================
   Сообщения / тосты
   =========================================================================== */
.messages { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.messages li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 15px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid transparent; box-shadow: var(--shadow-xs);
}
.messages li .ic { margin-top: 1px; flex-shrink: 0; }
.messages li.success { background: var(--success-soft); color: var(--success-ink); border-color: #c2e6d0; }
.messages li.error, .messages li.danger { background: var(--danger-soft); color: var(--danger-ink); border-color: #f1cccc; }
.messages li.info { background: var(--info-soft); color: var(--info-ink); border-color: #cbdcfb; }
.messages li.warning { background: var(--warn-soft); color: var(--warn-ink); border-color: #ecd9a8; }

/* --- Информ-блок (callout) -------------------------------------------- */
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 15px 17px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2);
  font-size: 13.5px; color: var(--text-muted);
}
.callout .ic { color: var(--text-faint); margin-top: 1px; flex-shrink: 0; }
.callout.warn { background: var(--warn-soft); border-color: #ecd9a8; color: var(--warn-ink); }
.callout.warn .ic { color: var(--warn); }
.callout strong { color: var(--text); }
.callout.warn strong { color: var(--warn-ink); }

/* ===========================================================================
   Прочее
   =========================================================================== */
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.empty { text-align: center; padding: 52px 22px; color: var(--text-muted); }
.empty .empty-ic {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px;
  display: grid; place-items: center; background: var(--surface-3); color: var(--text-faint);
}
.empty .empty-ic .ic { width: 26px; height: 26px; }
.empty p { margin: 0 0 4px; }
.empty .empty-sub { font-size: 13.5px; color: var(--text-faint); }
.row-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong);
  background: var(--surface); font-size: 13.5px; font-weight: 550; color: var(--text-muted);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
a.chip:hover { border-color: var(--text-faint); color: var(--text); }
.chip.active { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; font-weight: 600; }

.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stack-gap { display: flex; flex-direction: column; gap: 18px; }
hr.sep { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.ref-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.ref-thumb {
  position: relative; display: block; aspect-ratio: 4 / 3; background: var(--ink-night);
  overflow: hidden; border-bottom: 1px solid var(--border);
}
.ref-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.ref-card:hover .ref-thumb img { transform: scale(1.04); }
.ref-thumb-empty {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(135deg, #1c1e26, #2a2d38); color: var(--side-text-dim);
}
.ref-thumb-empty .ic { width: 30px; height: 30px; }
.ref-play {
  position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(225,29,42,.92); color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.4); transition: transform .18s ease, background .18s ease;
}
.ref-play .ic { width: 24px; height: 24px; fill: #fff; stroke: none; margin-left: 2px; }
.ref-thumb:hover .ref-play { transform: scale(1.08); background: var(--accent); }
.ref-fmt {
  position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(13,14,18,.72); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(4px);
}
.ref-dur {
  position: absolute; bottom: 10px; right: 10px; padding: 3px 8px; border-radius: 6px;
  background: rgba(13,14,18,.78); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.ref-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 0; }
.ref-card .ref-title { font-weight: 650; font-size: 14.5px; line-height: 1.35; }
.ref-card .ref-author { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--accent-ink); margin-top: 4px; font-weight: 550; }
.ref-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ref-tags .ref-tag { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: var(--radius-pill); }
.ref-tags .ref-tag.fmt { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.ref-tags .ref-tag.feat { background: var(--accent-soft); color: var(--accent-ink); }
.ref-metrics {
  display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 11px; padding-top: 11px;
  border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted);
}
.ref-metrics span { display: inline-flex; align-items: center; gap: 5px; }
.ref-metrics .ic { width: 15px; height: 15px; color: var(--text-faint); }
.ref-metrics .num { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.ref-card .ref-note { color: var(--text-muted); font-size: 13px; margin: 11px 0 0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ref-card .ref-actions { margin-top: 13px; }
.ref-card .ref-domain { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-faint); margin-top: 5px; }

/* --- Уроки ------------------------------------------------------------ */
a.lesson-card { text-decoration: none; color: inherit; transition: transform .16s ease, box-shadow .16s ease; }
a.lesson-card:hover { transform: translateY(-3px); }
.lesson-card .ref-actions .btn { pointer-events: none; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-muted); text-decoration: none; font-weight: 550; }
.back-link:hover { color: var(--accent-ink); }
.badge-fmt { display: inline-block; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.lesson-player { padding: 0; overflow: hidden; background: var(--ink-night); }
.lesson-player video, .lesson-player img { width: 100%; max-height: 70vh; display: block; background: #000; aspect-ratio: 16 / 9; object-fit: contain; }
.lesson-novideo { aspect-ratio: 16 / 9; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--side-text-dim);
  background: linear-gradient(135deg, #1c1e26, #2a2d38); }
.lesson-novideo .ic { width: 38px; height: 38px; }
.lesson-text { margin-top: 18px; }
.lesson-text-head { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 680; margin: 0 0 12px; }
.lesson-body { color: var(--text); font-size: 14.5px; line-height: 1.6; }
.lesson-body p { margin: 0 0 12px; }
.lesson-body p:last-child { margin-bottom: 0; }

/* --- Список статусов (дашборд) ---------------------------------------- */
.status-list { display: flex; flex-direction: column; }
.status-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--border);
}
.status-row:last-child { border-bottom: none; }
.status-row .s-name { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.status-row .s-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--text-faint); }
.status-row .s-dot.added, .status-row .s-dot.approved { background: var(--info); }
.status-row .s-dot.moderation { background: var(--warn); }
.status-row .s-dot.active { background: var(--success); }
.status-row .s-dot.expired { background: var(--text-faint); }
.status-row .s-dot.rejected, .status-row .s-dot.deleted { background: var(--danger); }
.status-row .s-count { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }

/* ===========================================================================
   Страницы входа / инвайта
   =========================================================================== */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(60% 50% at 50% -8%, rgba(225,29,42,.28) 0%, rgba(225,29,42,0) 60%),
    radial-gradient(120% 120% at 50% 120%, #1c1e26 0%, var(--ink-night) 60%);
}
.auth-card .brand { color: var(--text); }
.auth-card {
  width: 100%; max-width: 410px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-lg); padding: 34px 32px;
}
.auth-card .brand { justify-content: center; padding: 0 0 6px; font-size: 18px; }
.auth-card h1 { font-size: 21px; text-align: center; margin: 8px 0 4px; font-weight: 720; }
.auth-card .sub { text-align: center; color: var(--text-muted); font-size: 14px; margin: 0 0 24px; }
.auth-card .auth-foot { text-align: center; color: var(--text-faint); font-size: 13px; margin: 16px 0 0; line-height: 1.5; }
.auth-icon {
  width: 56px; height: 56px; margin: 4px auto 6px; border-radius: 16px; display: grid; place-items: center;
  background: var(--danger-soft); color: var(--danger);
}
.auth-icon .ic { width: 28px; height: 28px; }

/* ===========================================================================
   Мобайл — верхняя навигация и карточки вместо широких таблиц
   =========================================================================== */
.mobile-nav {
  display: none; gap: 7px; overflow-x: auto; padding: 10px 16px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); position: sticky; top: 54px; z-index: var(--z-subnav);
  scrollbar-width: none;
}
.mobile-nav::-webkit-scrollbar { display: none; }
.mobile-nav a {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 7px 13px; border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 550;
  color: var(--text-muted); background: var(--surface-2);
}
.mobile-nav a .ic { width: 15px; height: 15px; }
.mobile-nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

.m-cards { display: none; flex-direction: column; gap: 11px; padding: 13px; }
.m-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; background: var(--surface); }
.m-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.m-card-top a, .m-card-top strong { font-weight: 650; font-size: 14.5px; display: inline-flex; align-items: center; gap: 7px; }
.m-card-earn {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 10px 12px; background: var(--success-soft); border-radius: var(--radius-sm); margin-bottom: 11px;
}
.m-card-earn-label { font-size: 12.5px; color: var(--success-ink); font-weight: 600; }
.m-card-earn-val { font-size: 22px; font-weight: 750; color: var(--success-ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; }
.m-card-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; font-size: 13px; color: var(--text-muted); }
.m-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.m-card-meta .ic { width: 15px; height: 15px; color: var(--text-faint); }
.m-card-meta .num { font-variant-numeric: tabular-nums; color: var(--text); }

/* --- Адаптив: медиа-запрос ДОЛЖЕН быть последним ---------------------- */
@media (max-width: 860px) {
  .sidebar { display: none; }
  .topbar { display: flex; }
  .content { padding: 18px 16px 56px; }
  .page-head { margin-bottom: 18px; }
  .page-head h1 { font-size: 21px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .grid.cols-4, .grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .mobile-nav { display: flex; }
  .m-cards { display: flex; }
  .hide-mobile { display: none !important; }
  .stat .value { font-size: 25px; }
}
@media (max-width: 460px) {
  .grid.cols-4, .grid.cols-3 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Видимый фокус для клавиатурной навигации */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, .chip:focus-visible { outline-offset: 3px; }

/* ===========================================================================
   P1 — командные экраны: панель модерации + консоль выплат
   =========================================================================== */

/* --- Очередь модерации ------------------------------------------------- */
.mod-queue { display: flex; flex-direction: column; gap: 16px; }
.mod-card {
  display: grid; grid-template-columns: 340px 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.mod-preview { position: relative; background: var(--ink-night); min-height: 600px; }
.mod-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mod-preview .ig-embed { width: 100%; height: 100%; min-height: 600px; border: 0; display: block; background: #fff; }
.mod-preview-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: #6a6f7e; background: linear-gradient(150deg, #1c1e26, #0d0e12);
}
.mod-preview-ph span { font-size: 12.5px; font-weight: 600; letter-spacing: .01em; color: #8b90a0; }
.mod-preview-ph .ic-lg { width: 34px; height: 34px; color: var(--accent); }

.mod-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.mod-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mod-sub { color: var(--text-faint); font-size: 12.5px; margin-top: 4px; }
.mod-refresh { margin: 0; }

.mod-metrics { display: flex; flex-wrap: wrap; gap: 10px; }
.mod-metric {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 11px; font-size: 13px;
}
.mod-metric .ic { color: var(--text-faint); }
.mod-metric b { font-variant-numeric: tabular-nums; font-weight: 700; }
.mod-metric i { color: var(--text-faint); font-style: normal; font-size: 12px; }

.mod-fc { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.mod-fc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.mult-field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.mult-select {
  font: inherit; font-weight: 700; font-size: 15px; color: var(--text);
  padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; min-width: 110px;
}
.mult-select:focus { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.fc-rate { font-size: 13px; color: var(--text); }
.fc-rate b { font-variant-numeric: tabular-nums; }

.fc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fc-cell {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xs);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 3px;
}
.fc-th { font-size: 11.5px; color: var(--text-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.fc-amount { font-size: 16px; font-weight: 750; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.fc-note { font-size: 12px; margin-top: 10px; }

.mod-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mod-reason {
  flex: 1; min-width: 180px; font: inherit; font-size: 14px;
  padding: 10px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface);
}
.mod-reason:focus { outline: none; box-shadow: var(--ring); border-color: var(--accent); }

/* --- Консоль выплат ---------------------------------------------------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 4px; gap: 2px; }
.seg-btn { padding: 7px 16px; border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 600; color: var(--text-muted); }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--accent); color: #fff; }
.seg-btn.active:hover { color: #fff; }

.cb { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.payout-table tr.row-muted td { opacity: .62; }
.payout-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface-2);
}

/* --- Прогноз заработка в кабинете креатора ----------------------------- */
.fc-line {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding: 9px 12px; background: var(--accent-soft-2);
  border: 1px solid var(--accent-soft); border-radius: var(--radius-sm); font-size: 13px;
}
.fc-line .ic { color: var(--accent-ink); }
.fc-line b { color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.fc-pill {
  display: inline-flex; align-items: center; gap: 6px; background: var(--surface);
  border: 1px solid var(--accent-soft); border-radius: var(--radius-pill); padding: 3px 10px; font-size: 12.5px;
}
.fc-pill b { font-weight: 700; }

@media (max-width: 720px) {
  .mod-card { grid-template-columns: 1fr; }
  .mod-preview { min-height: 560px; }
  .mod-preview .ig-embed { min-height: 560px; }
  .fc-grid { grid-template-columns: 1fr 1fr; }
  .payout-foot { flex-direction: column; align-items: stretch; }
  .payout-foot .btn { width: 100%; }
}

/* ===========================================================================
   P9 — геймифицированный дашборд креатора
   =========================================================================== */

/* --- Герой: заработано за всё время --------------------------------------- */
.hero {
  display: flex; align-items: stretch; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background:
    radial-gradient(120% 140% at 88% -20%, rgba(225,29,42,.20) 0%, rgba(225,29,42,0) 55%),
    linear-gradient(150deg, #1c1e26 0%, var(--ink-night) 100%);
  border: 1px solid #2a2d38; border-radius: var(--radius);
  padding: 24px 26px; box-shadow: var(--shadow-md); color: #fff;
}
.hero-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.hero-coin {
  width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(140deg, #fde68a 0%, #f59e0b 100%); color: #6b3f05;
  box-shadow: 0 8px 22px rgba(245,158,11,.4);
}
.hero-coin .ic { width: 28px; height: 28px; stroke-width: 2.1; }
.hero-label { color: var(--side-text-dim); font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.hero-value {
  font-size: 33px; font-weight: 800; letter-spacing: -.03em; line-height: 1.08; margin-top: 2px;
  font-variant-numeric: tabular-nums; color: #fff;
}
.hero-value span { font-size: 20px; font-weight: 700; color: var(--side-text); }
.hero-grow {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  padding: 4px 11px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 650;
  background: var(--success-soft); color: var(--success-ink);
}
.hero-rank {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 6px 22px; flex-shrink: 0;
  border-left: 1px solid #2a2d38;
}
.hero-rank .rank-num { font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.hero-rank .rank-cap {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 2px;
  font-size: 12.5px; font-weight: 700; color: var(--side-active-text); text-transform: uppercase; letter-spacing: .03em;
}
.hero-rank .rank-cap .ic { color: #f59e0b; }
.hero-rank .rank-sub { font-size: 12px; color: var(--side-text-dim); margin-top: 4px; }

/* --- Достижения ----------------------------------------------------------- */
.ach-count { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ach-progress { height: 8px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; margin-bottom: 18px; }
.ach-progress-bar {
  height: 100%; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent) 0%, #ff7a52 100%);
  transition: width .4s ease;
}
.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ach {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 18px 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); opacity: .72;
}
.ach.is-on {
  opacity: 1; background: linear-gradient(165deg, var(--accent-soft-2), var(--surface));
  border-color: var(--accent-soft);
}
.ach-ic {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface-3); color: var(--text-faint);
}
.ach-ic .ic { width: 24px; height: 24px; }
.ach.is-on .ach-ic {
  background: linear-gradient(140deg, var(--accent) 0%, #ff6b52 100%); color: #fff;
  box-shadow: 0 6px 16px rgba(225,29,42,.32);
}
.ach-title { font-size: 13.5px; font-weight: 700; color: var(--text); line-height: 1.25; }
.ach.is-on .ach-title { color: var(--accent-ink); }
.ach-meta { font-size: 11.5px; color: var(--text-faint); line-height: 1.35; display: flex; align-items: center; gap: 4px; justify-content: center; }
.ach.is-on .ach-meta { color: var(--success-ink); font-weight: 650; }
.ach-meta .ic { width: 13px; height: 13px; }
.ach-bar { width: 100%; height: 5px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; margin-top: 2px; }
.ach-bar-fill { height: 100%; background: var(--text-faint); border-radius: var(--radius-pill); }

/* --- Топ-ролик ------------------------------------------------------------ */
.topv { display: flex; gap: 14px; align-items: flex-start; }
.topv-rank {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(140deg, #fde68a, #f59e0b); color: #7a4906;
}
.topv-rank .ic { width: 24px; height: 24px; }
.topv-body { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.topv-metrics { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--text-muted); }
.topv-metrics span { display: inline-flex; align-items: center; gap: 6px; }
.topv-metrics .ic { color: var(--text-faint); }
.topv-metrics b { color: var(--text); font-weight: 700; }
.topv-body .badge { align-self: flex-start; }

/* --- Мой аккаунт ---------------------------------------------------------- */
.acct { display: flex; align-items: center; gap: 13px; }
.acct-av {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: 19px;
}
.acct-name { font-weight: 700; font-size: 16px; }
.acct-handle { font-size: 13px; color: var(--accent-ink); font-weight: 600; }

/* --- Как устроена оплата -------------------------------------------------- */
.pay-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.pay-row + .pay-row { border-top: 1px solid var(--border); }
.pay-row b { font-size: 15px; }
.pay-ic {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink);
}
.pay-ic .ic { width: 18px; height: 18px; }

@media (max-width: 860px) {
  .ach-grid { grid-template-columns: repeat(2, 1fr); }
  /* Keep the rank compact ON THE RIGHT (incl. Mini App), not stacked below. */
  .hero { padding: 18px; gap: 12px; flex-wrap: nowrap; }
  .hero-main { gap: 12px; }
  .hero-coin { width: 46px; height: 46px; border-radius: 13px; }
  .hero-coin .ic { width: 23px; height: 23px; }
  .hero-value { font-size: 25px; }
  .hero-value span { font-size: 16px; }
  .hero-rank { padding: 4px 0 4px 14px; flex-shrink: 0; }
  .hero-rank .rank-num { font-size: 26px; }
  .hero-rank .rank-cap { font-size: 10.5px; }
  .hero-rank .rank-sub { font-size: 11px; }
}
@media (max-width: 460px) {
  .ach-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Повышенный коэффициент (буст формата/фичи) --------------------------- */
.boost-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #fde68a, #fb923c); color: #6b3f05;
  font-size: 12px; font-weight: 750; white-space: nowrap;
}
.boost-chip .ic { width: 13px; height: 13px; color: #b4530a; }

.boost-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 18px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft) 0%, #fff4e6 100%);
  border: 1px solid #f6d9bd;
}
.boost-banner .boost-ic {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent) 0%, #fb923c 100%); color: #fff;
}
.boost-banner .boost-head { font-weight: 750; font-size: 14.5px; color: var(--accent-deep); }
.boost-banner .boost-sub { font-size: 12.5px; color: var(--text-muted); }
.boost-list { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.boost-item {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid #f0c98f; font-size: 13px; font-weight: 600;
}
.boost-item b { color: var(--accent-ink); font-weight: 800; }
.boost-item .kind { font-size: 11px; color: var(--text-faint); font-weight: 600; text-transform: uppercase; }

/* --- Референсы: вертикальное видео (9:16) --------------------------------- */
.ref-thumb.vertical { aspect-ratio: 9 / 16; }
.ref-video {
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; background: var(--ink-night);
  border-bottom: 1px solid var(--border); overflow: hidden;
}
.ref-video video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.ref-video .ref-fmt { z-index: 2; }

/* ===========================================================================
   P10 — заявка на вывод: договор + документы (пошаговый флоу)
   =========================================================================== */

/* --- Степпер статусов ----------------------------------------------------- */
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 4px; }
.step {
  flex: 1; min-width: 110px; display: flex; flex-direction: column; gap: 6px;
  padding: 11px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.step .step-top { display: flex; align-items: center; gap: 8px; }
.step .step-dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-faint); font-size: 12px; font-weight: 800;
}
.step .step-dot .ic { width: 13px; height: 13px; }
.step .step-name { font-size: 12.5px; font-weight: 650; color: var(--text-muted); line-height: 1.2; }
.step.done { background: var(--success-soft); border-color: #c2e6d0; }
.step.done .step-dot { background: var(--success); color: #fff; }
.step.done .step-name { color: var(--success-ink); }
.step.current { background: var(--accent-soft-2); border-color: var(--accent-soft); box-shadow: var(--ring); }
.step.current .step-dot { background: var(--accent); color: #fff; }
.step.current .step-name { color: var(--accent-ink); }

/* --- Инструкция «для самых неподготовленных» ------------------------------ */
.instr { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 0; padding: 0; list-style: none; }
.instr li { display: flex; gap: 13px; align-items: flex-start; }
.instr .instr-n {
  width: 27px; height: 27px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: 13.5px;
}
.instr .instr-b { font-size: 14px; line-height: 1.5; }
.instr .instr-b b { color: var(--text); }
.instr .instr-b .hint { color: var(--text-muted); font-size: 13px; display: block; margin-top: 2px; }

.instr-tabs { display: flex; gap: 8px; margin-bottom: 14px; }

/* --- Слоты загрузки документов -------------------------------------------- */
.doc-slot {
  display: flex; align-items: center; gap: 13px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  margin-bottom: 12px;
}
.doc-slot.filled { border-color: #c2e6d0; background: var(--success-soft); }
.doc-ic {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-faint);
}
.doc-slot.filled .doc-ic { background: var(--success); color: #fff; }
.doc-main { flex: 1; min-width: 0; }
.doc-name { font-weight: 650; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.doc-sub { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
.doc-slot input[type=file] { font-size: 12.5px; margin-top: 7px; max-width: 100%; }
.doc-have { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--success-ink); font-weight: 650; }
.doc-have a { color: var(--success-ink); text-decoration: underline; }

.contract-status {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); margin-bottom: 18px;
}
.contract-status .cs-ic { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; }
.contract-status .cs-ic .ic { width: 22px; height: 22px; }
.cs-none .cs-ic { background: var(--surface-3); color: var(--text-faint); }
.cs-on_review .cs-ic { background: var(--warn-soft); color: var(--warn-ink); }
.cs-confirmed .cs-ic { background: var(--success-soft); color: var(--success-ink); }
.cs-rejected .cs-ic { background: var(--danger-soft); color: var(--danger-ink); }
.contract-status .cs-head { font-weight: 700; font-size: 15.5px; }
.contract-status .cs-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.doc-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 3px 9px; border-radius: var(--radius-pill); background: var(--surface-3); color: var(--text-muted); font-weight: 600; }
.doc-pill.ok { background: var(--success-soft); color: var(--success-ink); }

.badge.draft { background: var(--surface-3); color: var(--text-muted); }
.badge.review { background: var(--warn-soft); color: var(--warn-ink); }

@media (max-width: 720px) {
  .steps { flex-direction: column; }
  .step { min-width: 0; flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ===========================================================================
   P11 — уровни + партнёрка (дашборд)
   =========================================================================== */

/* --- Карточка уровня ------------------------------------------------------ */
.level-card .card-b { padding: 18px 20px; }
.level-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.level-badge {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent) 0%, #ff7a52 100%); color: #fff;
  box-shadow: 0 6px 16px rgba(225,29,42,.3);
}
.level-badge .ic { width: 24px; height: 24px; }
.level-name { font-weight: 750; font-size: 16px; letter-spacing: -.01em; }
.level-perk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--success-ink); font-weight: 600; margin-top: 2px; }
.level-perk .ic { color: var(--success); }
.level-next { text-align: right; font-size: 12px; color: var(--text-faint); display: flex; flex-direction: column; line-height: 1.3; }
.level-next b { font-size: 17px; font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.level-bar { height: 10px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.level-bar-fill { height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--accent), #ff7a52); transition: width .4s ease; }
.level-scale { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--text-faint); margin-top: 6px; font-variant-numeric: tabular-nums; }
.level-scale span:nth-child(2) { color: var(--text-muted); font-weight: 600; }

/* --- Партнёрка ------------------------------------------------------------ */
.partner-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; text-align: center; }
.partner-stat .ps-val { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.partner-stat .ps-lbl { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.partner-stat.accent { background: var(--accent-soft-2); border-color: var(--accent-soft); }
.partner-stat.accent .ps-val { color: var(--accent-ink); }
.ref-link { display: flex; gap: 8px; margin-top: 6px; }
.ref-link input {
  flex: 1; min-width: 0; padding: 10px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: 13.5px; background: var(--surface-2); color: var(--text); font-family: var(--font);
}
.ref-link input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.ref-link .btn { flex-shrink: 0; }

@media (max-width: 720px) {
  .level-top { flex-wrap: wrap; }
  .level-next { text-align: left; flex-direction: row; align-items: baseline; gap: 6px; width: 100%; }
}

/* ===========================================================================
   P15 — большой плеер видео (Instagram embed): модалка в «Мои видео»
   =========================================================================== */
button.vlink { background: none; border: 0; cursor: pointer; font: inherit; color: var(--accent-ink); padding: 0; }
button.vlink:hover { color: var(--accent-deep); }
button.vlink .ic { color: var(--accent); }

.vmodal { position: fixed; inset: 0; z-index: var(--z-toast); display: grid; place-items: center; padding: 24px; }
.vmodal[hidden] { display: none; }
.vmodal-backdrop { position: absolute; inset: 0; background: rgba(13,14,18,.72); backdrop-filter: blur(4px); }
.vmodal-body {
  position: relative; width: 100%; max-width: 400px; background: var(--surface);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px; display: flex; flex-direction: column;
}
.vmodal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.vmodal-head strong { font-size: 15px; }
.vmodal-x {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2);
  display: grid; place-items: center; cursor: pointer; color: var(--text-muted);
}
.vmodal-x:hover { background: var(--surface-3); color: var(--text); }
.vmodal-player { background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
.vmodal-player iframe { width: 100%; height: 580px; border: 0; display: block; background: #fff; }

@media (max-width: 460px) {
  .vmodal { padding: 10px; }
  .vmodal-player iframe { height: 70vh; }
}
