/* Общие компоненты рабочих пространств.
   Подключается в base.html. Используется в Инициативах, Кодексах и будущих пространствах.
   Источник: извлечено из initiatives/dashboard.html */

/* ---------------------------------------------------------------------------
   Таблицы (общее)
   --------------------------------------------------------------------------- */

.table-container th { white-space: nowrap; }
.table-container th a { white-space: nowrap; }
.table-container th .sort-hint { opacity: 0.35; font-size: 0.75em; }
.thead-sort-link { color: inherit; }
.thead-sort-link:hover { color: inherit; opacity: 0.85; }
.ext-link { color: #94a3b8; font-size: 0.7rem; margin-left: 0.25rem; }
.ext-link:hover { color: #3b82f6; }

/* ---------------------------------------------------------------------------
   Метрики (dash-card)
   --------------------------------------------------------------------------- */

.dash-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.dash-card {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color 0.15s, box-shadow 0.15s;
}
a.dash-card { cursor: pointer; }
a.dash-card:hover { border-color: #94a3b8; box-shadow: 0 1px 4px rgba(0,0,0,0.06); color: inherit; }
.dash-card.is-active { border-width: 2px; }

.dash-card .card-value {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.dash-card .card-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    font-weight: 600;
    margin-top: 0.15rem;
}

/* Цветовые акценты метрик */
.dash-card.card-default { border-left: 3px solid #64748b; }
.dash-card.card-default .card-value { color: #374151; }

.dash-card.card-success { border-left: 3px solid #22c55e; }
.dash-card.card-success .card-value { color: #16a34a; }

.dash-card.card-primary { border-left: 3px solid #3b82f6; }
.dash-card.card-primary .card-value { color: #2563eb; }

.dash-card.card-danger { border-left: 3px solid #dc2626; }
.dash-card.card-danger .card-value { color: #dc2626; }

.dash-card.card-warning { border-left: 3px solid #d97706; }
.dash-card.card-warning .card-value { color: #d97706; }

.dash-card.card-muted { border-left: 3px solid #9ca3af; }
.dash-card.card-muted .card-value { color: #9ca3af; }

/* Legacy aliases (initiatives) */
.dash-card.card-total { border-left: 3px solid #64748b; }
.dash-card.card-total .card-value { color: #374151; }
.dash-card.card-total.is-active { border-color: #64748b; }

.dash-card.card-new { border-left: 3px solid #22c55e; }
.dash-card.card-new .card-value { color: #16a34a; }
.dash-card.card-new.is-active { border-color: #22c55e; }

.dash-card.card-active { border-left: 3px solid #3b82f6; }
.dash-card.card-active .card-value { color: #2563eb; }
.dash-card.card-active.is-active { border-color: #3b82f6; }

/* ---------------------------------------------------------------------------
   Проблемы (dash-problem)
   --------------------------------------------------------------------------- */

.dash-problems {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.dash-problem {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: border-color 0.15s;
}
a.dash-problem { cursor: pointer; }
a.dash-problem:hover { border-color: #94a3b8; color: inherit; }
.dash-problem.is-active { border-width: 2px; }

.dash-problem .prob-value {
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 2.5rem;
    text-align: right;
}
.dash-problem .prob-label {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
}
.dash-problem .prob-label strong { color: #374151; }

.dash-problem.prob-danger .prob-value { color: #dc2626; }
.dash-problem.prob-danger.is-active { border-color: #dc2626; }
.dash-problem.prob-warning .prob-value { color: #d97706; }
.dash-problem.prob-warning.is-active { border-color: #d97706; }
.dash-problem.prob-muted .prob-value { color: #64748b; }
.dash-problem.prob-muted.is-active { border-color: #64748b; }

/* Legacy aliases (initiatives) */
.dash-problem.prob-no-timeline .prob-value { color: #dc2626; }
.dash-problem.prob-no-timeline.is-active { border-color: #dc2626; }
.dash-problem.prob-stale .prob-value { color: #d97706; }
.dash-problem.prob-stale.is-active { border-color: #d97706; }
.dash-problem.prob-stuck .prob-value { color: #64748b; }
.dash-problem.prob-stuck.is-active { border-color: #64748b; }

/* ---------------------------------------------------------------------------
   Табы (dash-tabs)
   --------------------------------------------------------------------------- */

.dash-tabs .nav-link {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    border: none;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}
.dash-tabs .nav-link:hover { color: #475569; }
.dash-tabs .nav-link.active {
    color: #1e293b;
    border-bottom-color: #3b82f6;
    background: none;
}
.dash-tabs .tab-count {
    font-size: 0.7rem;
    font-weight: 400;
    color: #94a3b8;
    margin-left: 0.25rem;
}

/* ---------------------------------------------------------------------------
   Движение / таймлайн (initiatives)
   --------------------------------------------------------------------------- */

.mv-stages { white-space: nowrap; }
.mv-stage {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    background: #e0f2fe;
    color: #0369a1;
}
.mv-arrow { color: #cbd5e1; margin: 0 0.15rem; font-size: 0.7rem; }
.mv-date { font-size: 0.65rem; color: #94a3b8; margin-left: 0.2rem; }
.mv-last-date {
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    color: #64748b;
    font-weight: 500;
}

/* ---------------------------------------------------------------------------
   Популярные (initiatives)
   --------------------------------------------------------------------------- */

.pop-visits {
    font-size: 0.85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #1e293b;
}
.pop-bar-track { height: 8px; border-radius: 4px; background: #f1f5f9; }
.pop-bar-fill { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.pop-meta { font-size: 0.7rem; color: #94a3b8; white-space: nowrap; }
.pop-dot-warn { color: #f59e0b; }
.pop-dot-danger { color: #ef4444; }

/* ---------------------------------------------------------------------------
   Скроллируемые списки проблем
   --------------------------------------------------------------------------- */

.dash-scroll-list {
    max-height: 350px;
    overflow-y: auto;
}

/* ---------------------------------------------------------------------------
   Текст статей кодексов (содержимое из КонсультантПлюс)
   --------------------------------------------------------------------------- */

.article-text {
    line-height: 1.6;
}
.article-text div {
    margin-bottom: 0.25rem;
}

/* ---------------------------------------------------------------------------
   Тип-бейджи (колонки)
   --------------------------------------------------------------------------- */

.tp-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.tp-columns { background: #dbeafe; color: #1d4ed8; }
.tp-digest { background: #fef3c7; color: #92400e; }
.tp-video { background: #ede9fe; color: #6d28d9; }
.tp-humor { background: #fce7f3; color: #be185d; }

/* ---------------------------------------------------------------------------
   Автор (колонки)
   --------------------------------------------------------------------------- */

.author-row { display: flex; align-items: center; gap: 0.5rem; }
.author-avatar {
    width: 28px; height: 28px; border-radius: 50%; background: #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 600; color: #64748b; flex-shrink: 0;
}
.author-name { font-size: 0.85rem; font-weight: 500; }

/* ---------------------------------------------------------------------------
   Информационный блок (деталь колонки, переиспользуемый)
   --------------------------------------------------------------------------- */

.info-block {
    background: #f8fafc; border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem; border-radius: 0.5rem;
}
.info-block-author { font-size: 1.1rem; font-weight: 600; color: #1e293b; }
.info-block-meta { font-size: 0.8rem; color: #64748b; }
.info-block-toolbar {
    font-size: 0.85rem;
    display: flex; gap: 1.25rem;
    margin-top: 0.5rem; padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}
.info-block-toolbar a { color: #64748b; text-decoration: none; }
.info-block-toolbar a:hover { color: #3b82f6; }

/* ---------------------------------------------------------------------------
   Consent/contract индикаторы
   --------------------------------------------------------------------------- */

.doc-ok { color: #16a34a; }
.doc-missing { color: #dc2626; }
.doc-na { color: #d1d5db; }
.doc-badge {
    font-size: 0.8rem; font-weight: 500;
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.2rem 0.5rem; border-radius: 0.25rem;
}
.doc-badge.doc-ok { background: #f0fdf4; }
.doc-badge.doc-missing { background: #fef2f2; }
.doc-badge-detail { font-weight: 400; font-size: 0.7rem; opacity: 0.8; }

/* ---------------------------------------------------------------------------
   Заголовки секций
   --------------------------------------------------------------------------- */

.section-label {
    font-size: 0.7rem; letter-spacing: 0.08em; font-weight: 600;
    text-transform: uppercase; color: #6b7280;
}

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .dash-metrics { grid-template-columns: repeat(2, 1fr); }
    .dash-problems { grid-template-columns: 1fr; }
    .mv-stages { white-space: normal; }
}

@media (max-width: 480px) {
    .dash-metrics { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   Stat cards (Метрика: страница статистики триггера)
   --------------------------------------------------------------------------- */

.stat-card {
    flex: 1 1 120px;
    text-align: center;
    padding: 0.75rem 0.5rem;
    border-radius: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.stat-card { user-select: none; }
.stat-card:hover { background: #f1f5f9; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.stat-card:active { background: #e2e8f0; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-card .stat-unit { font-size: 0.7rem; font-weight: 400; color: #78716c; }
.stat-card .stat-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: #78716c; font-weight: 600; }
.stat-card .stat-label .icon-logo { vertical-align: -1px; }
.stat-card .stat-label .bi { font-size: 0.7rem; }
.stat-card .stat-avg { font-size: 0.75rem; color: #78716c; margin-top: 0.15rem; }
.stat-card.stat-pageviews { border-left: 3px solid #d97706; }
.stat-card.stat-pageviews .stat-value { color: #b45309; }
.stat-card.stat-total { border-left: 3px solid #a8a29e; }
.stat-card.stat-total .stat-value { color: #57534e; }
.stat-card.stat-yandex { border-left: 3px solid #ef4444; }
.stat-card.stat-yandex .stat-value { color: #dc2626; }
.stat-card.stat-google { border-left: 3px solid #3b82f6; }
.stat-card.stat-google .stat-value { color: #2563eb; }
.stat-card.stat-bounce { border-left: 3px solid #a8a29e; }
.stat-card.stat-bounce .stat-value { color: #57534e; }
.stat-card.stat-duration { border-left: 3px solid #a8a29e; }
.stat-card.stat-duration .stat-value { color: #57534e; }

/* ---------------------------------------------------------------------------
   Stage filter chips (WW-051)
   --------------------------------------------------------------------------- */

.stage-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}
.stage-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8125rem;
    text-decoration: none;
    color: #6c757d;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    transition: background-color 0.15s, border-color 0.15s;
}
.stage-filter-chip:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #ced4da;
}
.stage-filter-chip.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}
.stage-filter-chip.active .badge {
    background: rgba(255,255,255,0.25) !important;
    color: #fff;
}

/* ---------------------------------------------------------------------------
   Report header (тёмная плашка-шапка отчёта)

   Используется: reports/metrika_report.html, triggers/search_metrika.html.
   Цвет фона: site-1 (ppt, синий), site-2 (clubtk, зелёный),
   .gradient (универсальный градиент для отчётов вне привязки к сайту).
   --------------------------------------------------------------------------- */

.report-header {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: #fff;
}
.report-header.site-1 { background: #2563eb; }
.report-header.site-2 { background: #5AB342; }
.report-header.gradient { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); }
/* :not(.btn) — кнопки-ссылки (переключатель отчётов Метрика/Семантика/Точки
   роста) сохраняют свой стиль Bootstrap; эти правила — только для текстовых
   ссылок в шапке, иначе текст кнопки белеет на белом ховер-фоне. WW-147. */
.report-header a:not(.btn) { color: rgba(255,255,255,0.85); text-decoration: none; }
.report-header a:not(.btn):hover { color: #fff; }
.report-header .header-title { color: #f8fafc; font-size: 1.1rem; font-weight: 600; }

/* ---------------------------------------------------------------------------
   Сравнение периодов (WW-078)

   Используется: metrika/stats.html, triggers/search_metrika.html.
   Тогглер `vs предыдущий <период>` + парные карточки «Сейчас / Прошлый
   период» + плашка дельты.
   --------------------------------------------------------------------------- */

/* Тогглер сравнения периодов — иконка-кнопка (текст в title/aria-label) */
.period-btn-compare-icon {
    width: 1.85rem;
    height: 1.85rem;
    border: 1px dashed #94a3b8;
    background: #fff;
    color: #64748b;
    border-radius: 0.35rem;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.period-btn-compare-icon:hover {
    background: #f8fafc;
    color: #1e293b;
    border-color: #64748b;
}
.period-btn-compare-icon.active {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #78350f;
    border-style: solid;
}
.period-btn-compare-icon i { font-size: 1rem; }

/* Пара карточек «Сейчас / Прошлый период» */
.stat-pair {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    flex: 1 1 220px;
    min-width: 220px;
    background: #fff;
}
.stat-pair.line-hidden { opacity: 0.35; }
.line-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: pointer;
    vertical-align: 0px;
    margin-right: 3px;
    transition: background-color 0.15s, transform 0.1s;
}
.line-dot:hover { transform: scale(1.4); }
.dash-card.line-hidden { opacity: 0.35; }
.dash-card.line-hidden .line-dot { background-color: #d1d5db !important; }
/* Курсор grab только когда родительский контейнер явно draggable
   (через класс .sortable-cards). На остальных страницах с .stat-pair
   курсор обычный. */
.sortable-cards .stat-pair,
.sortable-cards .dash-card { cursor: grab; }
.sortable-cards .stat-pair:active,
.sortable-cards .dash-card:active { cursor: grabbing; }
.stat-pair .pair-header {
    padding: 0.5rem 0.85rem 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}
.stat-pair .pair-header .bi-question-circle { font-size: 0.7rem; opacity: 0.6; cursor: help; }
.stat-pair .pair-body { display: flex; flex: 1; }
.stat-pair .now {
    padding: 0.5rem 0.85rem 0.45rem;
    flex: 1 1 50%;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}
.stat-pair .prev {
    padding: 0.5rem 0.85rem 0.45rem;
    flex: 1 1 50%;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
}
.stat-pair .cell-footer {
    margin-top: auto;
    padding-top: 0.3rem;
    display: flex;
    justify-content: flex-end;
    min-height: 1.2rem;
}
.stat-pair .cmp-icon {
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: help;
}
.stat-pair .cmp-icon:hover { color: #475569; }
.stat-pair .stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.15;
}
.stat-pair .stat-value.text-muted { color: #64748b; font-weight: 600; }
.stat-pair .stat-avg {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.1rem;
}

/* Дельта-плашка (используется в .stat-pair и потенциально других местах) */
.delta {
    display: inline-flex;
    align-items: center;
    gap: 0.05rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.05rem 0.35rem;
    border-radius: 0.25rem;
}
.delta.up { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.delta.down { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.delta.flat { background: rgba(100, 116, 139, 0.12); color: #475569; }

/* Breadcrumb-ссылки на дашбордах workspace часто играют роль переключателя
   между сестринскими разделами (Сравнение ↔ Статистика в docprof). Bootstrap
   по дефолту убирает подчёркивание — возвращаем точечное, чтобы пользователь
   видел, что элемент кликабелен. Active не подчёркнут — он не ссылка. */
.breadcrumb-item:not(.active) a { text-decoration: underline; text-decoration-style: dotted; }

/* Плашка активного фильтра выборки — /search/metrika, /search/semantics,
   /search/growth. inline-flex + gap обязательны: иначе поле, оператор и
   значение слипаются в одно слово (WW-147). */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .6rem;
    border-radius: 2rem;
    font-size: .75rem;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}
.filter-chip .filter-key { color: #6366f1; }

/* ── WW-170: стрелка движения позиции к предыдущим 7 дням ────────── */
.position-delta {
    display: inline-flex;
    align-items: baseline;
    gap: 0.1rem;
    font-size: 0.78rem;
    font-weight: 600;
    margin-left: 0.3rem;
}
.position-delta.up    { color: #16a34a; }
.position-delta.down  { color: #dc2626; }
.position-delta.flat,
.position-delta.empty { color: #94a3b8; font-weight: 400; }
.position-delta i     { font-size: 0.95rem; line-height: 1; }

/* ── WW-164: SEO landing — Здоровье / Движение / Потери ───────────── */
.seo-site-tabs { display: flex; gap: 0; border-bottom: 1px solid #e2e8f0; margin-top: 0.25rem; }
.seo-site-tab {
    padding: 0.6rem 1.1rem; color: #64748b; font-weight: 500;
    text-decoration: none; border-bottom: 2px solid transparent;
}
.seo-site-tab:hover { color: #2563eb; }
.seo-site-tab.active { color: #0f172a; border-bottom-color: #2563eb; }
.seo-site-host { font-size: 0.95rem; }
.seo-site-meta { font-size: 0.75rem; color: #94a3b8; margin-left: 0.4rem; }

.seo-period-bar { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 1rem 0 0.5rem; }
.seo-period-pill {
    padding: 0.35rem 0.85rem; border-radius: 999px; border: 1px solid #e2e8f0;
    background: #fff; color: #475569; font-size: 0.85rem; text-decoration: none;
}
.seo-period-pill:hover { border-color: #cbd5e1; color: #2563eb; }
.seo-period-pill.active { background: #0f172a; color: #fff; border-color: #0f172a; }
.seo-period-pill.disabled {
    color: #cbd5e1; background: #f8fafc; cursor: not-allowed; pointer-events: none;
}

.seo-source-line { font-size: 0.8rem; color: #64748b; margin: 0 0 1.5rem; }
.seo-source-line i { color: #94a3b8; margin-right: 0.25rem; }
.seo-source-date { color: #475569; }

/* ── WW-168: плашка устаревшего snapshot (>24 ч с последнего refresh) ─ */
.seo-source-stale {
    background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
    padding: 0.5rem 0.85rem; border-radius: 7px;
    font-size: 0.82rem; margin: 0.75rem 0;
    display: flex; align-items: center; gap: 0.5rem;
}
.seo-source-stale i { color: #c2410c; font-size: 1rem; }

.seo-section-label {
    font-size: 0.78rem; font-weight: 600; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.6rem;
}

.seo-health-block {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 1.25rem 1.5rem; margin-bottom: 1.75rem;
}
.seo-health-huge {
    font-size: 2.6rem; font-weight: 700; color: #0f172a;
    line-height: 1; letter-spacing: -0.02em;
}
.seo-health-label { font-size: 0.85rem; color: #64748b; margin-top: 0.4rem; }
.seo-health-delta {
    margin-top: 0.7rem; display: inline-flex; align-items: baseline; gap: 0.35rem;
    font-size: 0.95rem; font-weight: 600;
}
.seo-health-delta.up { color: #16a34a; }
.seo-health-delta.down { color: #dc2626; }
.seo-health-delta-empty { margin-top: 0.7rem; color: #94a3b8; font-size: 0.95rem; }
.seo-health-delta-sub {
    display: block; font-size: 0.75rem; color: #94a3b8;
    font-weight: 400; margin-top: 0.15rem;
}
.seo-health-chart-box { position: relative; height: 140px; }

.seo-move-cards {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem; margin-bottom: 1.75rem;
}
.seo-move-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 1rem 1.15rem; display: flex; flex-direction: column; gap: 0.55rem;
    text-decoration: none; color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.seo-move-card:hover {
    border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(15,23,42,0.06);
    transform: translateY(-1px); color: inherit;
}
.seo-move-card.up { border-left: 3px solid #16a34a; }
.seo-move-card.down { border-left: 3px solid #dc2626; }
.seo-move-card-header { display: flex; align-items: center; gap: 0.5rem; }
.seo-move-card-icon { font-size: 1.3rem; }
.seo-move-card.up .seo-move-card-icon { color: #16a34a; }
.seo-move-card.down .seo-move-card-icon { color: #dc2626; }
.seo-move-card-count { font-size: 1.5rem; font-weight: 700; color: #0f172a; line-height: 1; }
.seo-move-card-title { font-size: 0.95rem; font-weight: 600; color: #0f172a; }
.seo-move-card-desc { font-size: 0.82rem; color: #64748b; line-height: 1.35; }
.seo-move-card-meta {
    display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
    margin-top: auto; padding-top: 0.4rem; border-top: 1px solid #f1f5f9;
    font-size: 0.8rem; color: #94a3b8;
}
.seo-move-card-meta strong { color: #0f172a; }
.seo-move-card-cta { color: #1d4ed8; font-weight: 500; }
.seo-move-card:hover .seo-move-card-cta { text-decoration: underline; }

.seo-cat-cards {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem; margin-bottom: 1rem;
}
.seo-cat-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 1rem 1.15rem; display: flex; flex-direction: column; gap: 0.55rem;
    text-decoration: none; color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
a.seo-cat-card:hover {
    border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(15,23,42,0.06);
    transform: translateY(-1px);
}
.seo-cat-card.active {
    border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}
.seo-cat-card.active .seo-cat-card-title { color: #1d4ed8; }
.seo-cat-card.is-disabled { background: #fafbfc; cursor: default; }
.seo-cat-card.is-disabled .seo-cat-card-title,
.seo-cat-card.is-disabled .seo-cat-card-desc { color: #94a3b8; }
.seo-cat-card-title { font-size: 1rem; font-weight: 600; color: #0f172a; }
.seo-cat-card-desc { font-size: 0.82rem; color: #64748b; line-height: 1.35; }
.seo-cat-card-meta {
    display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
    margin-top: auto; padding-top: 0.4rem; border-top: 1px solid #f1f5f9;
}
.seo-cat-card-meta .vol { font-size: 0.82rem; font-weight: 600; color: #0f172a; }
.seo-cat-card-meta .vol-sub { font-size: 0.72rem; color: #94a3b8; }
.seo-cat-card-meta .pot { font-size: 0.82rem; color: #2563eb; font-weight: 500; }
.seo-cat-card-actions { display: flex; justify-content: flex-end; margin-top: 0.5rem; }
.seo-cat-card-cta {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.45rem 0.95rem; border-radius: 7px; background: #fff;
    color: #1d4ed8; font-size: 0.9rem; font-weight: 500;
    border: 1px solid #bfdbfe; transition: all 0.15s;
}
a.seo-cat-card:hover .seo-cat-card-cta { background: #eff6ff; border-color: #93c5fd; }
.seo-soon-badge {
    background: #f1f5f9; color: #94a3b8; font-size: 0.75rem;
    padding: 0.2rem 0.55rem; border-radius: 4px;
    text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
}
.seo-cards-note { font-size: 0.8rem; color: #64748b; margin-bottom: 2rem; }
.seo-cards-note i { color: #94a3b8; margin-right: 0.25rem; }

.seo-empty {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 2rem; text-align: center; color: #64748b;
}
.seo-empty i { font-size: 2rem; color: #cbd5e1; display: block; margin-bottom: 0.75rem; }

/* ── План публикаций (WW-186) ── */
.plan-table { font-size: 0.85rem; }
.plan-table thead th { vertical-align: middle; font-size: 0.78rem; line-height: 1.15; }
.plan-table td, .plan-table th { padding: 0.3rem 0.45rem; }

/* Drill-down + подсветка провисаний (WW-193) */
.plan-cell-link { text-decoration: none; }
.plan-cell-link:hover { text-decoration: underline; }
/* Светофор «успеваем ли до плана» */
.plan-led { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.plan-led--green { background: #2faa54; }
.plan-led--amber { background: #e8a92b; }
.plan-led--red { background: #d6453d; }
/* Прогноз против плана: дотянул / не дотянул / провал */
.plan-fc--green { background: #e3f5e9; }
.plan-fc--amber { background: #fdf3dc; }
.plan-fc--red { background: #fbe3e1; }
/* Тонкие стадии-топливо: тонко (фон) / перебор (фон + «!») */
.thin-stage { background: #fbe3e1; }
.crit-stage { background: #f6c2bd; }
.crit-stage::after { content: " !"; font-weight: 700; color: #b02a1f; }
