/* ============================================================
   Клиентский онлайн-отчёт — шаблон. Дизайн-система.
   Светлая тема, акцент — фирменный синий, направления:
   PR — синий, SEO — зелёный, GEO — фиолетовый.
   ============================================================ */

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e4e8ef;
  --border-2: #d5dbe5;

  --text: #181d27;
  --text-2: #4a5568;
  --text-3: #8792a3;

  --accent: #2f5fe0;
  --accent-strong: #1f47b8;
  --accent-weak: #eaf0ff;

  --pr: #2f5fe0;
  --pr-weak: #eaf0ff;
  --seo: #0c9d6c;
  --seo-weak: #e6f7f0;
  --geo: #7a3fe4;
  --geo-weak: #f1eaff;

  --ok: #0c9d6c;
  --warn: #d97706;
  --bad: #d64545;
  --neutral: #8792a3;

  --demo-bg: #fff7e6;
  --demo-border: #f2ddb0;
  --demo-text: #92600a;

  --sidebar: #101623;
  --sidebar-2: #171f31;
  --sidebar-text: #a7b2c7;
  --sidebar-active: #ffffff;

  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-pop: 0 12px 32px -8px rgba(15, 23, 42, .22);

  --font: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ribbon-h: 36px;
  --sidebar-w: 280px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  padding-top: var(--ribbon-h);
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; }
b { font-weight: 650; }

::selection { background: var(--accent-weak); }

/* ---------- Верхняя лента демо-режима ---------- */
.ribbon {
  position: fixed; top: 0; left: 0; right: 0; height: var(--ribbon-h);
  background: repeating-linear-gradient(-45deg, #b45309, #b45309 12px, #92400e 12px, #92400e 24px);
  color: #fff7e6; font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  z-index: 60; padding: 0 12px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ribbon .ribbon-ico { font-size: 14px; }
.ribbon b { color: #ffe9c2; }

/* ---------- Каркас ---------- */
.shell { display: block; }

.sidebar {
  position: fixed; z-index: 50;
  top: var(--ribbon-h); left: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.side-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  background: linear-gradient(135deg, #2f5fe0, #7a3fe4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 12.5px; letter-spacing: .02em;
}
.brand-name { color: #fff; font-weight: 700; font-size: 13.5px; letter-spacing: .02em; line-height: 1.3; }
.brand-sub { font-size: 12px; color: var(--sidebar-text); }

.side-client {
  margin: 14px 16px 6px; padding: 12px 14px;
  background: var(--sidebar-2); border-radius: 12px;
  display: flex; gap: 11px; align-items: center;
}
.client-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  background: #fff; color: #101623; font-weight: 800; font-size: 11.5px;
  display: flex; align-items: center; justify-content: center;
}
.client-name { color: #fff; font-weight: 650; font-size: 14px; }
.client-sub { font-size: 12px; }

.side-nav { flex: 1; overflow-y: auto; padding: 8px 12px 18px; scrollbar-width: thin; scrollbar-color: #2a3450 transparent; }
.side-nav::-webkit-scrollbar { width: 8px; }
.side-nav::-webkit-scrollbar-thumb { background: #232c40; border-radius: 4px; }

.nav-overview {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 4px 12px; padding: 10px 12px; border-radius: 10px;
  color: #fff; font-weight: 650; font-size: 14px;
}
.nav-overview:hover { background: rgba(255,255,255,.06); }
.nav-overview.active { background: var(--accent); color: #fff; }

.nav-month { margin: 4px 0; }
.nav-month-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 9px 12px; border: 0; border-radius: 10px;
  background: transparent; color: #cdd5e4; font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-align: left;
}
.nav-month-btn:hover { background: rgba(255,255,255,.05); }
.nav-month-btn .chev { transition: transform .18s; font-size: 11px; color: #6b7690; }
.nav-month.open .nav-month-btn .chev { transform: rotate(90deg); }
.nav-month.open .nav-month-btn.current { color: #fff; background: rgba(255,255,255,.07); }
.nav-month-links { display: none; padding: 2px 0 6px; }
.nav-month.open .nav-month-links { display: block; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px 7px 22px; border-radius: 9px;
  color: var(--sidebar-text); font-size: 13.5px;
}
.nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-link.active { background: rgba(255,255,255,.09); color: #fff; font-weight: 600; }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.nav-dot.pr { background: #6d93ff; }
.nav-dot.seo { background: #2fd39a; }
.nav-dot.geo { background: #b48aff; }

.side-foot { padding: 12px 20px 16px; border-top: 1px solid rgba(255,255,255,.07); font-size: 11.5px; color: #6b7690; }

.main { margin-left: var(--sidebar-w); min-height: calc(100vh - var(--ribbon-h)); }
.container { max-width: 1220px; margin: 0 auto; padding: 26px 30px 60px; }

/* ---------- Мобильная шапка ---------- */
.topbar {
  display: none;
  position: sticky; top: var(--ribbon-h); z-index: 40;
  background: var(--sidebar); color: #fff;
  align-items: center; gap: 10px; padding: 10px 14px;
}
.burger {
  width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.08); color: #fff; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.topbar-title { font-weight: 700; font-size: 14.5px; flex: 1; min-width: 0; }
.topbar-title span { display: block; font-weight: 500; font-size: 11.5px; color: var(--sidebar-text); }
.topbar-demo {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  background: #b45309; color: #fff; border-radius: 6px; padding: 3px 7px;
}

.drawer-overlay {
  display: none; position: fixed; inset: 0; z-index: 55;
  background: rgba(9, 13, 22, .55); backdrop-filter: blur(2px);
}
body.drawer-open .drawer-overlay { display: block; }
@media (max-width: 1080px) {
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; width: 300px; }
  body.drawer-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-pop); }
  .main { margin-left: 0; }
  .topbar { display: flex; }
  .container { padding: 18px 14px 48px; }
}

/* ---------- Заголовок страницы ---------- */
.page-head { margin-bottom: 18px; }
.page-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 6px;
}
.page-title { font-size: 25px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-title .badge-demo { font-size: 11px; }
.page-sub { color: var(--text-2); margin-top: 6px; font-size: 14.5px; }

.badge-demo {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--demo-bg); border: 1px solid var(--demo-border); color: var(--demo-text);
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px; letter-spacing: .02em;
  white-space: nowrap;
}

/* ---------- Шапка месяца ---------- */
.month-head { margin: 2px 0 18px; display: flex; flex-direction: column; gap: 12px; }
.month-head-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-select {
  appearance: none; -webkit-appearance: none;
  font: 600 14.5px var(--font); color: var(--text);
  background: var(--surface) url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238792a3' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border-2); border-radius: 10px;
  padding: 9px 32px 9px 14px; cursor: pointer; min-width: 180px;
}
.month-select:hover { border-color: var(--accent); }
.month-arrow {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text-2); font-size: 18px; cursor: pointer;
}
.month-arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.month-arrow:disabled { opacity: .35; cursor: default; }

.dir-tabs { display: flex; gap: 8px; background: #e9edf4; border-radius: 12px; padding: 4px; }
.dir-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 9px; color: var(--text-2);
  font-weight: 650; font-size: 14px; border: 0; background: transparent;
}
.dir-tab .dir-sub { font-weight: 500; font-size: 11.5px; color: var(--text-3); }
.dir-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.dir-dot { width: 8px; height: 8px; border-radius: 50%; }
.dir-pr .dir-dot { background: var(--pr); }
.dir-seo .dir-dot { background: var(--seo); }
.dir-geo .dir-dot { background: var(--geo); }

/* ---------- Карточки ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 18px; overflow: visible;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px 0; flex-wrap: wrap;
}
.card-title { font-size: 16.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-body { padding: 14px 20px 20px; }
.card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- KPI-карточки ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .kpi-grid, .kpi-grid.cols-3, .kpi-grid.cols-5 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-grid > .stat-wide { grid-column: span 2; }
}

.stat {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; box-shadow: var(--shadow); min-height: 108px;
}
.stat.is-link { color: inherit; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; padding-bottom: 30px; }
.stat.is-link:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-pop); }
.stat-go {
  position: absolute; right: 16px; bottom: 12px;
  font-size: 12px; font-weight: 650; color: var(--accent); opacity: .85;
}
.stat-label { font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.stat-value { font-size: 26px; font-weight: 750; letter-spacing: -.01em; line-height: 1.2; margin-top: 2px; }
.stat-sub { font-size: 12.5px; color: var(--text-3); }
.stat-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.stat-foot-note { font-size: 12px; color: var(--text-3); }
.stat.tone-pr { border-top: 3px solid var(--pr); }
.stat.tone-seo { border-top: 3px solid var(--seo); }
.stat.tone-geo { border-top: 3px solid var(--geo); }
.stat.tone-neutral { border-top: 3px solid var(--border-2); }

.nd { color: var(--text-3); font-weight: 500; font-size: 18px; }

/* ---------- Дельты ---------- */
.delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 3px 9px;
  white-space: nowrap;
}
.delta.up { background: var(--seo-weak); color: #087a54; }
.delta.down { background: #fdeaea; color: #b03636; }
.delta.flat { background: #eef1f5; color: var(--text-3); }

/* ---------- Шкала план/факт ---------- */
.planscale { display: flex; flex-direction: column; gap: 12px; }
.planscale-bar { height: 14px; border-radius: 999px; background: #edf0f5; overflow: hidden; }
.planscale-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6d93ff, var(--accent)); transition: width .4s ease; }
.planscale-fill.over { background: linear-gradient(90deg, #2fd39a, var(--ok)); }
.planscale-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-2); }
.planscale-legend b { color: var(--text); }
.planscale-pct { margin-left: auto; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.dot-fact { background: var(--accent); }
.dot-rest { background: #edf0f5; box-shadow: inset 0 0 0 1px var(--border-2); }
.dot-plan { background: var(--border-2); }

/* ---------- Вкладки-сегменты ---------- */
.seg { display: inline-flex; gap: 4px; background: #e9edf4; border-radius: 11px; padding: 4px; flex-wrap: wrap; }
.seg-btn {
  border: 0; background: transparent; border-radius: 8px; cursor: pointer;
  font: 600 13px var(--font); color: var(--text-2); padding: 7px 14px;
}
.seg-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15,23,42,.14); }

/* ---------- Режимы просмотров PR ---------- */
.viewmode-note {
  background: var(--accent-weak); border: 1px solid #d8e2fb; color: #274a9f;
  border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px;
}
.viewmode-note b { display: block; margin-bottom: 2px; }

/* ---------- Подсказки (методика) ---------- */
.tip { position: relative; display: inline-flex; vertical-align: middle; }
.tip-ico {
  width: 15px; height: 15px; border-radius: 50%; flex: 0 0 auto;
  background: #d7dee9; color: #55617a; font-size: 10px; font-weight: 800; font-style: normal;
  display: inline-flex; align-items: center; justify-content: center; cursor: help;
  font-family: Georgia, serif;
}
.tip-pop {
  position: absolute; bottom: calc(100% + 8px); left: -10px; z-index: 30;
  width: 280px; background: #12161f; color: #dde3ec;
  font-size: 12.5px; font-weight: 450; line-height: 1.45;
  border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: .15s;
  pointer-events: none;
}
.tip-pop::after {
  content: ''; position: absolute; top: 100%; left: 14px;
  border: 6px solid transparent; border-top-color: #12161f;
}
.tip:hover .tip-pop, .tip:focus .tip-pop, .tip.open .tip-pop { opacity: 1; visibility: visible; transform: translateY(0); }
.tip-wide .tip-pop { width: 320px; left: auto; right: -10px; }
.tip-wide .tip-pop::after { left: auto; right: 14px; }
@media (max-width: 560px) {
  .tip-pop { position: fixed; bottom: auto; left: 12px !important; right: 12px !important; width: auto; top: calc(var(--ribbon-h) + 54px); }
  .tip-pop::after { display: none; }
}

/* ---------- Графики ---------- */
.chart-box { position: relative; height: 280px; }
.chart-box.tall { height: 320px; }
.chart-box.short { height: 220px; }
@media (max-width: 560px) { .chart-box, .chart-box.tall { height: 240px; } }
.period-note { font-size: 12.5px; color: var(--text-3); margin-top: 10px; }
.chart-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 980px) { .chart-grid-2 { grid-template-columns: 1fr; } }

/* ---------- Таблицы ---------- */
.tbl { margin-bottom: 6px; }
.tbl-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tbl-search {
  flex: 1 1 220px; max-width: 320px;
  border: 1px solid var(--border-2); border-radius: 10px;
  font: 400 14px var(--font); padding: 9px 12px; background: var(--surface);
}
.tbl-search:focus { outline: 2px solid var(--accent-weak); border-color: var(--accent); }
.tbl-select {
  border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface);
  font: 500 13.5px var(--font); color: var(--text-2); padding: 9px 10px; cursor: pointer; max-width: 100%;
}
.tbl-info { font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; scrollbar-width: thin; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.table th {
  position: sticky; top: 0; z-index: 2;
  text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--text-3); background: var(--surface-2);
  padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--accent); }
.table th.sorted { color: var(--accent); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr.row-current { background: var(--accent-weak); }
.table tbody tr.row-current td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.table .ta-r { text-align: right; }
.tbl-dense .table td, .tbl-dense .table th { padding: 8px 12px; }
.tbl-empty { text-align: center; color: var(--text-3); padding: 28px 14px !important; }
.tbl-pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.pg-info { font-size: 13px; color: var(--text-2); }
.pg-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text-2); font-size: 16px; cursor: pointer;
}
.pg-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pg-btn:disabled { opacity: .35; cursor: default; }
.tbl-footnote { font-size: 12.5px; color: var(--text-3); margin-top: 10px; }

.scroll-hint {
  display: none; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-3);
  margin: 0 0 8px;
}
@media (max-width: 700px) {
  .scroll-hint { display: inline-flex; }
  .table-scroll {
    background: linear-gradient(90deg, var(--bg) 30%, rgba(244,246,249,0)) left/32px 100% no-repeat,
                linear-gradient(-90deg, var(--bg) 30%, rgba(244,246,249,0)) right/32px 100% no-repeat;
  }
}

/* ---------- Бейджи статусов ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 650; border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-ok { background: var(--seo-weak); color: #087a54; }
.st-work { background: #fff3e0; color: #b45309; }
.st-plan { background: #eef1f5; color: #5a6577; }
.st-nodata { background: #f4f4f5; color: #9aa1ad; }

.cell-title { font-weight: 550; color: var(--text); }
.cell-source { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.views-col { font-variant-numeric: tabular-nums; }

/* ---------- ТОП-3 публикаций ---------- */
.top-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 980px) { .top-grid { grid-template-columns: 1fr; } }
.top-card {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: 14px; padding: 16px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}
.top-rank {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #fff;
}
.top-rank.gold { background: linear-gradient(135deg, #f0b429, #d97706); }
.top-rank.silver { background: linear-gradient(135deg, #a8b4c4, #7c8aa0); }
.top-rank.bronze { background: linear-gradient(135deg, #d29b6e, #a9683a); }
.top-main { flex: 1; min-width: 0; }
.top-title { font-size: 14.5px; font-weight: 650; margin-bottom: 6px; }
.top-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 12.5px; color: var(--text-3); }
.top-source { font-weight: 600; color: var(--text-2); }
.top-views { color: var(--accent); font-weight: 700; }
.top-side { flex: 0 0 auto; }

/* ---------- Контент-план ---------- */
.week-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.week-tab {
  border: 1px solid var(--border-2); background: var(--surface); border-radius: 10px;
  padding: 7px 13px; cursor: pointer; font: 600 13px var(--font); color: var(--text-2);
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 128px;
}
.week-tab .week-tab-range { font-weight: 500; font-size: 11.5px; color: var(--text-3); }
.week-tab.active { border-color: var(--accent); background: var(--accent-weak); color: var(--accent-strong); }
.week-tab.active .week-tab-range { color: #5b79c9; }
.week-day { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.week-day:last-child { border-bottom: 0; }
.week-day-date {
  flex: 0 0 92px; font-size: 12.5px; color: var(--text-3);
  display: flex; flex-direction: column; line-height: 1.3; padding-top: 2px;
}
.week-day-date b { font-size: 13.5px; color: var(--text); }
.week-day-items { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.week-task {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; flex-wrap: wrap;
}
.week-task-main { flex: 1; min-width: 220px; }
.week-task-topic { font-size: 13.5px; font-weight: 550; }
.week-task-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.week-task-side { display: flex; align-items: center; gap: 10px; }
.week-task-link { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
@media (max-width: 560px) {
  .week-day { flex-direction: column; gap: 6px; }
  .week-day-date { flex-direction: row; gap: 6px; align-items: baseline; }
  .week-task-side { width: 100%; justify-content: space-between; }
}

/* ---------- Методика ---------- */
.methodology {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 0 16px; margin-top: 16px; font-size: 13.5px;
}
.methodology summary {
  cursor: pointer; font-weight: 650; color: var(--text-2); padding: 12px 0; list-style: none;
  display: flex; align-items: center; gap: 8px;
}
.methodology summary::before { content: '▸'; color: var(--text-3); transition: transform .15s; }
.methodology[open] summary::before { transform: rotate(90deg); }
.methodology summary::-webkit-details-marker { display: none; }
.methodology ul { margin: 0; padding: 2px 0 14px 18px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }

/* ---------- Обзор: герой ---------- */
.hero {
  display: flex; gap: 20px; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #131a2b 0%, #1b2540 55%, #232f56 100%);
  border-radius: 20px; color: #fff; padding: 26px 28px; margin-bottom: 20px;
  flex-wrap: wrap;
}
.hero-id { display: flex; gap: 16px; align-items: center; min-width: 260px; }
.hero-avatar {
  width: 62px; height: 62px; border-radius: 18px; flex: 0 0 auto;
  background: #fff; color: #131a2b; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px;
}
.hero-name { font-size: 22px; font-weight: 750; }
.hero-industry { color: #aab6d3; font-size: 13.5px; margin-top: 2px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hero-chip {
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; color: #dbe2f2;
}
.hero-chip b { color: #fff; }
.hero-ring { display: flex; align-items: center; gap: 18px; }
.ring-bg { stroke: rgba(255,255,255,.14); }
.ring-fg { stroke: #5b8cff; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring-wrap { position: relative; width: 108px; height: 108px; flex: 0 0 auto; }
.ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.ring-center b { font-size: 21px; }
.ring-center span { font-size: 10.5px; color: #aab6d3; }
.hero-ring-label { max-width: 230px; font-size: 13px; color: #aab6d3; }
.hero-ring-label b { color: #fff; display: block; margin-bottom: 3px; font-size: 14.5px; }

/* ---------- Обзор: карточки направлений ---------- */
.dir-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
@media (max-width: 980px) { .dir-grid { grid-template-columns: 1fr; } }
.dir-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
  color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; position: relative;
}
.dir-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.dir-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dir-card-title { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 750; }
.dir-card-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px;
}
.dir-card.pr .dir-card-badge { background: var(--pr-weak); color: var(--pr); }
.dir-card.pr:hover { border-color: var(--pr); }
.dir-card.seo .dir-card-badge { background: var(--seo-weak); color: var(--seo); }
.dir-card.seo:hover { border-color: var(--seo); }
.dir-card.geo .dir-card-badge { background: var(--geo-weak); color: var(--geo); }
.dir-card.geo:hover { border-color: var(--geo); }
.dir-card-metrics { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dir-metric { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.dir-metric b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.dir-metric .nd-sm { color: var(--text-3); font-weight: 500; font-size: 13px; }
.dir-card-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed var(--border); padding-top: 10px; font-size: 13px; color: var(--text-3); }
.dir-card-go { font-weight: 650; color: var(--accent); }

/* ---------- План продвижения (таблица на обзоре) ---------- */
.plan-table td, .plan-table th { text-align: center; }
.plan-table td:first-child, .plan-table th:first-child { text-align: left; font-weight: 600; }
.plan-cell {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  border-radius: 9px; padding: 6px 14px; min-width: 74px; cursor: pointer;
  border: 1px solid transparent; transition: .14s; font-variant-numeric: tabular-nums;
}
.plan-cell:hover { border-color: var(--accent); background: var(--accent-weak); }
.plan-cell .pc-val { font-weight: 700; font-size: 15px; }
.plan-cell .pc-sub { font-size: 10.5px; color: var(--text-3); font-weight: 500; }
.plan-cell.done .pc-val { color: var(--ok); }
.plan-cell.current { border-color: var(--accent); background: var(--accent-weak); }
.plan-cell.geo .pc-val { font-size: 13px; }

/* ---------- Сделано за месяц / планы ---------- */
.done-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 980px) { .done-grid { grid-template-columns: 1fr; } }
.done-col h4 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; margin-bottom: 10px; }
.done-col h4 .nav-dot { width: 9px; height: 9px; }
.done-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.done-list li { display: flex; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.done-list li::before { content: '✓'; color: var(--ok); font-weight: 700; flex: 0 0 auto; }
.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.plan-list li { display: flex; gap: 9px; font-size: 13.5px; color: var(--text-2); align-items: baseline; flex-wrap: wrap; }
.plan-list .pl-date { flex: 0 0 74px; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.plan-tag {
  font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 1px 6px; letter-spacing: .03em;
}
.plan-tag.pr { background: var(--pr-weak); color: var(--pr); }
.plan-tag.seo { background: var(--seo-weak); color: var(--seo); }
.plan-tag.geo { background: var(--geo-weak); color: var(--geo); }

/* ---------- Совокупный замер GEO ---------- */
.stackbar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; }
.stackbar-seg {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11.5px; font-weight: 700; min-width: 4px;
  transition: width .4s ease;
}
.geo-legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; margin-top: 14px; }
@media (max-width: 560px) { .geo-legend { grid-template-columns: 1fr; } }
.geo-legend-item { display: flex; gap: 9px; align-items: baseline; font-size: 13.5px; color: var(--text-2); }
.geo-legend-item i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; align-self: center; }
.geo-legend-item b { color: var(--text); }

/* ---------- Кольцо/индексация ---------- */
.index-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 700px) { .index-grid { grid-template-columns: 1fr; } }
.index-col { border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.index-col h4 { font-size: 14.5px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.index-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-2); padding: 5px 0; border-bottom: 1px dashed var(--border); }
.index-row:last-child { border-bottom: 0; }
.index-row b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Донат ---------- */
.donut-wrap { position: relative; max-width: 300px; margin: 0 auto; }
.donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; text-align: center; padding-bottom: 42px;
}
.donut-center b { font-size: 20px; }
.donut-center span { font-size: 11px; color: var(--text-3); }

/* ---------- Пустые состояния ---------- */
.chart-empty {
  height: 100%; min-height: 180px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--text-3); font-size: 14px; padding: 20px;
  background: var(--surface-2); border: 1px dashed var(--border-2); border-radius: 12px;
}
.planscale-empty {
  color: var(--text-3); font-size: 14px;
  background: var(--surface-2); border: 1px dashed var(--border-2);
  border-radius: 12px; padding: 16px 18px;
}
.empty-list { color: var(--text-3); font-size: 14px; padding: 8px 0; }

.side-mode { padding: 10px 16px 0; }
.side-mode-label { font-size: 11px; color: #6b7690; margin-bottom: 6px; letter-spacing: .04em; text-transform: uppercase; }
.side-mode .seg { background: #1b2334; width: 100%; }
.side-mode .seg-btn { flex: 1; color: var(--sidebar-text); }
.side-mode .seg-btn.active { background: #2c3850; color: #fff; }

/* ---------- Разное ---------- */
.section-gap { height: 6px; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.mt-0 { margin-top: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface);
  color: var(--text); font: 600 13.5px var(--font); padding: 9px 14px; cursor: pointer;
  transition: .14s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--accent); }
.btn-ghost:hover { background: var(--accent-weak); border-color: var(--accent); }

.link-demo { color: var(--accent); font-weight: 600; }
.link-demo:hover { text-decoration: underline; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px);
  background: #12161f; color: #e8edf5; font-size: 13.5px; font-weight: 550;
  border-radius: 12px; padding: 11px 18px; box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transition: .22s; z-index: 100; max-width: min(92vw, 480px); text-align: center;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.footer-note { color: var(--text-3); font-size: 12.5px; text-align: center; padding: 26px 0 0; }

/* Печать не предусмотрена на этом этапе, но сохраним читаемость */
@media print {
  .sidebar, .ribbon, .topbar, .tbl-controls, .tbl-pager { display: none !important; }
  .main { margin: 0; }
}

/* Уважаем настройку «уменьшить анимации» */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Кольца выполнения плана (обзор) ---------- */
.rings-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ring-item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ring-item .ring-name { font-weight: 700; font-size: 15px; }
.ring-item .ring-sub { font-size: 12.5px; color: var(--text-3); }
@media (max-width: 980px) { .rings-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .rings-grid { grid-template-columns: 1fr; } }

/* Норматив просмотров на статью в таблице «Жизнь статей» */
.per-ok { color: var(--ok); font-weight: 700; }
.per-low { color: var(--warn); font-weight: 700; }

/* ---------- Вписывающиеся таблицы (без горизонтальной прокрутки) ---------- */
.table-fit { min-width: 0 !important; width: 100%; table-layout: auto; }
.table-fit th { white-space: normal; }
.table-fit td, .table-fit th { padding: 10px 10px; }
.table-fit .views-col, .table-fit .nd, .table-fit b { white-space: nowrap; }
.table-fit .cell-title { display: inline-block; }

/* ---------- Воронка «Путь статьи» ---------- */
.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: minmax(220px, 1fr) 220px 64px; gap: 14px; align-items: center; }
.funnel-track { background: #edf0f5; border-radius: 999px; height: 16px; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6d93ff, var(--accent)); transition: width .4s ease; }
.funnel-count { text-align: right; font-weight: 750; font-size: 16px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .funnel-row { grid-template-columns: 1fr; gap: 4px; } .funnel-count { text-align: left; } }

/* ---------- Статьи в поиске (объединённый отчёт) ---------- */
.seog { display: flex; flex-direction: column; gap: 10px; }
.seog-group { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; }
.seog-group > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 0; font-weight: 700; }
.seog-group > summary::-webkit-details-marker { display: none; }
.seog-count { margin-left: auto; background: var(--accent-weak); color: var(--accent-strong); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.seog-art { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin: 8px 0; }
.seog-art > summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: minmax(220px, 1fr) repeat(5, 86px) 104px; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; }
.seog-art > summary::-webkit-details-marker { display: none; }
.seog-art > summary:hover { background: var(--surface-2); }
.seog-art[open] > summary { background: var(--accent-weak); }
.sa-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.sa-cell { display: flex; flex-direction: column; line-height: 1.25; text-align: right; }
.sa-cell b { font-variant-numeric: tabular-nums; }
.sa-cap { font-size: 10.5px; color: var(--text-3); }
.sa-qcount { font-size: 12.5px; color: var(--accent-strong); font-weight: 650; }
.sa-queries { padding: 4px 12px 12px; }
.sa-queries-title { font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.sa-queries .table { min-width: 0; }
@media (max-width: 900px) {
  .seog-art > summary { grid-template-columns: minmax(180px, 1fr) 70px 90px; }
  .sa-cell:nth-child(5), .sa-cell:nth-child(6) { display: none; }
  .sa-qcount { grid-column: span 3; text-align: right; }
}
