/* Prodviger — набор компонентов панели поверх tokens.css.
   Значения — только из токенов (docs/DESIGN_SYSTEM.md); размеры раскладки — из макетов 1440×1024. */

*, *::before, *::after { box-sizing: border-box; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.pv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pv-num, .pv-table td.num, .pv-kpi-value { font-variant-numeric: tabular-nums; }
.pv-mono { font: var(--pv-text-mono); color: var(--pv-text-caption); }
.pv-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-caption { font: var(--pv-text-caption); color: var(--pv-text-caption); }
.pv-small { font: var(--pv-text-small); color: var(--pv-text-secondary); }
.pv-muted { color: var(--pv-text-caption); }
.pv-warn-text { color: var(--pv-warning-fg); }
.pv-crit-text { color: var(--pv-critical-fg); }
.pv-link { color: var(--pv-text-link); font: 600 13px/17px var(--pv-font-sans); text-decoration: none; cursor: pointer;
    background: none; border: none; padding: 0; }
.pv-link:hover { color: var(--pv-text-link-hover); }
.pv-icon { width: 16px; height: 16px; flex: none; }
.pv-icon-lime { color: var(--pv-lime); }

/* ---------- каркас ---------- */

.pv-shell { display: flex; min-height: 100vh; background: var(--pv-bg-canvas); }
.pv-sidebar { width: var(--pv-sidebar-width); flex: none; background: var(--pv-sidebar-bg); color: var(--pv-sidebar-text);
    display: flex; flex-direction: column; justify-content: space-between; padding: 20px 0; position: sticky; top: 0;
    height: 100vh; overflow: auto; }
.pv-sidebar-top { display: flex; flex-direction: column; gap: 18px; }
.pv-logo { display: flex; align-items: center; gap: 10px; padding: 0 22px; color: var(--pv-sidebar-text-strong); text-decoration: none; }
.pv-logo-word { font-family: var(--pv-font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.pv-project-switch { margin: 0 14px; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--pv-radius-lg);
    background: var(--pv-sidebar-surface); border: 1px solid var(--pv-sidebar-border); color: inherit; text-align: left; width: calc(100% - 28px); }
.pv-project-switch:hover { background: var(--pv-sidebar-elevated); }
.pv-project-tile { width: 32px; height: 32px; border-radius: var(--pv-radius-md); background: var(--pv-sidebar-elevated); color: var(--pv-lime);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.pv-project-switch .name { color: var(--pv-sidebar-text-strong); font-size: 14px; font-weight: 600; }
.pv-project-switch .meta { color: var(--pv-sidebar-icon); font-size: 12px; }
.pv-project-switch .text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pv-project-switch .text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-nav { display: flex; flex-direction: column; gap: 14px; padding: 0 14px; }
.pv-nav-group { display: flex; flex-direction: column; gap: 2px; }
.pv-nav-label { padding: 0 12px 6px; font: var(--pv-text-micro); letter-spacing: 0.08em; text-transform: uppercase; color: var(--pv-sidebar-group-label); }
.pv-nav-item { display: flex; align-items: center; gap: 12px; height: var(--pv-nav-item); padding: 0 12px; border-radius: var(--pv-radius-md);
    text-decoration: none; font-size: 14px; font-weight: 500; color: var(--pv-sidebar-text); background: transparent; }
.pv-nav-item svg { width: 18px; height: 18px; color: var(--pv-sidebar-icon); flex: none; }
.pv-nav-item:hover { background: var(--pv-sidebar-surface); color: var(--pv-sidebar-text-strong); }
.pv-nav-item.active { background: var(--pv-sidebar-active-bg); color: var(--pv-sidebar-active-text); }
.pv-nav-item.active svg { color: var(--pv-sidebar-active-text); }
.pv-nav-item.soon { opacity: .55; }
.pv-nav-item .label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-nav-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; background: var(--pv-sidebar-elevated); color: var(--pv-sidebar-text-strong); }
.pv-nav-badge.alert { background: var(--pv-alert-badge); }
.pv-nav-item.active .pv-nav-badge { background: var(--pv-ink); color: var(--pv-lime); }
.pv-nav-bottom { padding: 12px 14px 0; }
.pv-nav-bottom .pv-nav-group { padding-top: 12px; border-top: 1px solid var(--pv-sidebar-border); }

.pv-column { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pv-topbar { height: var(--pv-topbar-height); background: var(--pv-bg-surface); border-bottom: 1px solid var(--pv-border-default);
    display: flex; align-items: center; gap: 12px; padding: 0 32px; position: sticky; top: 0; z-index: 5; }
.pv-search { position: relative; }
.pv-search svg { position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; color: var(--pv-text-caption); pointer-events: none; }
.pv-search input { height: 40px; width: 100%; border: 1px solid var(--pv-border-control); border-radius: var(--pv-radius-lg);
    background: var(--pv-bg-surface); padding: 0 12px 0 40px; font-size: 14px; color: var(--pv-text-primary); }
.pv-search input::placeholder { color: var(--pv-text-caption); }
.pv-search.topbar { width: 440px; flex: 0 1 440px; min-width: 180px; }
.pv-search.topbar input { background: var(--pv-bg-subtle); border-color: var(--pv-border-default); padding-right: 64px; }
.pv-search .kbd { position: absolute; right: 10px; top: 10px; height: 20px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--pv-border-kbd);
    background: var(--pv-bg-surface); font-size: 11px; color: var(--pv-text-secondary); display: flex; align-items: center; }
.pv-search.sm input { height: 34px; }
.pv-topbar .grow, .grow { flex: 1; }
.pv-vsep { width: 1px; height: 28px; background: var(--pv-border-default); }
.pv-profile { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 4px; border: none; background: transparent; }
.pv-profile .name { font-size: 13px; font-weight: 600; }
.pv-profile .role { font-size: 12px; color: var(--pv-text-caption); }
.pv-profile .text { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.pv-avatar { width: 34px; height: 34px; border-radius: 17px; background: var(--pv-lime); color: var(--pv-ink); display: flex; align-items: center;
    justify-content: center; font-size: 13px; font-weight: 700; flex: none; background-size: cover; }
.pv-avatar.sm { width: 32px; height: 32px; font-size: 12px; background: var(--pv-neutral-bg); }
.pv-menu { position: absolute; right: 32px; top: 58px; z-index: 20; width: 280px; background: var(--pv-bg-surface); border: 1px solid var(--pv-border-default);
    border-radius: var(--pv-radius-xl); padding: 8px; box-shadow: 0 12px 32px rgba(20, 22, 27, .12); }
.pv-menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--pv-border-hairline); margin-bottom: 6px; }
.pv-menu .who b { display: block; font-size: 14px; }
.pv-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: none; background: none; border-radius: var(--pv-radius-md); font-size: 14px; }
.pv-menu button:hover { background: var(--pv-bg-subtle); }
/* Полоса работы в шапке сжимается первой: длинное название работы обрезается многоточием (полное — в подсказке),
   кнопки и индикатор не сжимаются, горизонтальной прокрутки нет. */
.pv-topbar > * { flex-shrink: 0; }
.pv-topbar > .grow { flex: 1 1 0; min-width: 0; }
.pv-jobs { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--pv-text-secondary); flex: 0 1 auto; min-width: 0; }
.pv-jobs > * { flex: none; }
.pv-jobs .txt { flex: 0 1 auto; min-width: 60px; max-width: 440px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-jobs .txt .pv-chip { white-space: nowrap; }
.pv-jobs .bar { width: 120px; height: 6px; background: var(--pv-bg-muted); border-radius: 3px; overflow: hidden; }
.pv-jobs .bar i { display: block; height: 100%; background: var(--pv-series-1); }

.pv-main { flex: 1; padding: var(--pv-page-padding); display: flex; flex-direction: column; gap: var(--pv-section-gap); min-width: 0; }
.pv-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pv-page-head h1 { margin: 0; font: var(--pv-text-h1); letter-spacing: -0.01em; }
.pv-page-head .sub { font-size: 14px; color: var(--pv-text-secondary); margin-top: 6px; }
.pv-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- кнопки и контролы ---------- */

.pv-btn { height: var(--pv-control-md); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px;
    border-radius: var(--pv-radius-lg); border: 1px solid var(--pv-border-control); background: var(--pv-bg-surface); color: var(--pv-text-primary);
    font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.pv-btn:hover:not(:disabled) { background: var(--pv-bg-subtle); }
.pv-btn:disabled { opacity: .5; cursor: default; }
.pv-btn.primary { background: var(--pv-ink); border-color: var(--pv-ink); color: var(--pv-text-inverse); padding: 0 16px; }
.pv-btn.primary:hover:not(:disabled) { background: #2A2D35; }
.pv-btn.primary svg { color: var(--pv-lime); }
.pv-btn.danger { color: var(--pv-critical-fg); }
.pv-btn.sm { height: var(--pv-control-sm); padding: 0 12px; font-size: 13px; border-radius: var(--pv-radius-md); }
.pv-btn.xs { height: var(--pv-control-xs); padding: 0 10px; font-size: 12px; border-radius: var(--pv-radius-md); }
.pv-btn svg { width: 16px; height: 16px; }
.pv-btn.icon { width: var(--pv-control-md); padding: 0; }
.pv-btn.icon.sm { width: var(--pv-control-sm); }
.pv-btn:focus-visible, .pv-nav-item:focus-visible { outline: 2px solid var(--pv-text-link); outline-offset: 2px; }

.pv-segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--pv-radius-lg); background: var(--pv-bg-segmented); }
.pv-segmented.card { background: var(--pv-bg-segmented-card); }
.pv-segmented button { height: 34px; padding: 0 12px; border: none; border-radius: var(--pv-radius-md); background: transparent; font-size: 13px;
    font-weight: 500; color: var(--pv-text-secondary); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pv-segmented button .cnt { font-size: 12px; font-weight: 500; color: var(--pv-text-caption); }
.pv-segmented button[aria-pressed="true"] { background: var(--pv-bg-surface); box-shadow: var(--pv-shadow-segment-active); font-weight: 600; color: var(--pv-text-primary); }
.pv-segmented.sm button { height: 28px; padding: 0 10px; }
.pv-segmented button:disabled { opacity: .45; cursor: default; }

.pv-select { height: var(--pv-control-md); display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: var(--pv-radius-lg);
    border: 1px solid var(--pv-border-control); background: var(--pv-bg-surface); font-size: 14px; position: relative; }
.pv-select .prefix { color: var(--pv-text-caption); }
.pv-select select { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.pv-select svg { width: 16px; height: 16px; color: var(--pv-text-caption); }
.pv-select.sm { height: 34px; font-size: 13px; }
.pv-input, .pv-textarea { height: var(--pv-control-md); border: 1px solid var(--pv-border-control); border-radius: var(--pv-radius-lg);
    background: var(--pv-bg-surface); padding: 0 12px; font-size: 14px; width: 100%; }
.pv-textarea { height: auto; padding: 10px 12px; min-height: 80px; resize: vertical; }
.pv-input::placeholder { color: var(--pv-text-caption); }
.pv-input:disabled { background: var(--pv-bg-subtle); color: var(--pv-text-caption); }
.pv-field { display: flex; flex-direction: column; gap: 6px; }
.pv-field > label { font-size: 12px; color: var(--pv-text-caption); }
.pv-field .hint { font-size: 12px; color: var(--pv-text-caption); }
.pv-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.pv-check input { width: 16px; height: 16px; accent-color: var(--pv-ink); margin: 0; }
.pv-form { display: flex; flex-direction: column; gap: 14px; }
.pv-form .actions { display: flex; gap: 10px; justify-content: flex-end; }

.pv-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--pv-border-default); padding: 0 20px; }
.pv-tab { height: 48px; display: inline-flex; align-items: center; gap: 8px; border: none; background: none; padding: 0; font-size: 14px; font-weight: 500;
    color: var(--pv-text-secondary); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pv-tab[aria-pressed="true"], .pv-tab.active { color: var(--pv-text-primary); font-weight: 600; border-bottom-color: var(--pv-ink); }
.pv-tab .cnt { padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--pv-neutral-bg); color: var(--pv-text-secondary); }
.pv-tab[aria-pressed="true"] .cnt { background: var(--pv-ink); color: var(--pv-text-inverse); }
.pv-settings-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--pv-border-default); }
.pv-settings-tabs a { padding-bottom: 12px; font-size: 14px; font-weight: 500; color: var(--pv-text-secondary); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pv-settings-tabs a.active { color: var(--pv-text-primary); font-weight: 600; border-bottom-color: var(--pv-ink); }
.pv-settings-tabs a.soon { opacity: .5; }

/* ---------- карточки и плитки ---------- */

.pv-card { background: var(--pv-bg-surface); border: 1px solid var(--pv-border-default); border-radius: var(--pv-radius-xl); padding: var(--pv-card-padding);
    display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* clip, а не hidden: hidden делает карточку контейнером прокрутки, и шапка таблицы липнет к ней,
   то есть никуда. С clip содержимое так же обрезается по скруглению, а липнуть шапке есть к чему. */
.pv-card.tight { padding: 0; overflow: clip; gap: 0; }
.pv-card.compact { padding: 16px; }
.pv-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pv-card-head h2 { margin: 0; font: var(--pv-text-h2); }
.pv-card-head .sub { font: var(--pv-text-small); color: var(--pv-text-caption); margin-top: 4px; }
.pv-card-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.pv-card-foot { margin-top: auto; border-top: 1px solid var(--pv-border-hairline); padding-top: 14px; display: flex; align-items: center;
    justify-content: space-between; gap: 10px; font-size: 13px; }
.pv-grid { display: grid; gap: 20px; }
.pv-grid > * { min-width: 0; }
.pv-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pv-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pv-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pv-span2 { grid-column: span 2; }
.pv-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.pv-kpis.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pv-kpis.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pv-kpi { background: var(--pv-bg-surface); border: 1px solid var(--pv-border-default); border-radius: var(--pv-radius-xl); padding: 18px;
    display: flex; flex-direction: column; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.pv-kpi.compact { padding: 14px 16px; gap: 8px; }
.pv-kpi.compact .pv-kpi-row { justify-content: space-between; }
.pv-kpi-label { font-size: 13px; color: var(--pv-text-secondary); }
.pv-kpi-value { font: var(--pv-text-kpi); letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.pv-kpi-value small { font: var(--pv-text-small); color: var(--pv-text-caption); font-weight: 400; }
.pv-kpi-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--pv-text-caption); min-height: 20px; flex-wrap: wrap; }
.pv-tile { background: var(--pv-bg-subtle); border-radius: var(--pv-radius-lg); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pv-tile .l { font-size: 12px; color: var(--pv-text-secondary); }
.pv-tile .v { font: 500 20px/26px var(--pv-font-display); letter-spacing: -0.02em; }
.pv-tile .v small { font: var(--pv-text-caption); color: var(--pv-text-caption); }
.pv-tile .d { font-size: 12px; font-weight: 600; }
.pv-mini-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pv-mini-kpi { background: var(--pv-bg-subtle); border-radius: var(--pv-radius-lg); padding: 10px 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.pv-mini-kpi .l { font-size: 12px; color: var(--pv-text-secondary); }
.pv-mini-kpi .v { font-size: 16px; font-weight: 600; }
.pv-mini-kpi .v small { font-size: 12px; color: var(--pv-text-caption); font-weight: 400; }
.pv-mini-kpi .d { font-size: 12px; font-weight: 600; }
.pv-stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--pv-border-hairline); border-radius: var(--pv-radius-lg); }
.pv-stat-strip > div { padding: 10px 12px; border-left: 1px solid var(--pv-border-hairline); }
.pv-stat-strip > div:first-child { border-left: none; }
.pv-stat-strip .l { font-size: 12px; color: var(--pv-text-caption); }
.pv-stat-strip .v { font-size: 14px; font-weight: 600; }

/* ---------- чипы, пилюли, дельты ---------- */

.pv-pill { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: var(--pv-radius-sm); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pv-pill.critical { background: var(--pv-critical-bg); color: var(--pv-critical-fg); }
.pv-pill.warning { background: var(--pv-warning-bg); color: var(--pv-warning-fg); }
.pv-pill.success { background: var(--pv-success-bg); color: var(--pv-success-fg); }
.pv-pill.info { background: var(--pv-info-bg); color: var(--pv-info-fg); }
.pv-pill.neutral { background: var(--pv-neutral-bg); color: var(--pv-neutral-fg); }
.pv-chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--pv-radius-sm); font-size: 12px; background: var(--pv-neutral-bg); color: var(--pv-neutral-fg); white-space: nowrap; }
.pv-delta { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: var(--pv-radius-sm); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pv-delta.good { background: var(--pv-success-bg); color: var(--pv-success-fg); }
.pv-delta.bad { background: var(--pv-critical-bg); color: var(--pv-critical-fg); }
.pv-delta.zero { background: var(--pv-neutral-bg); color: var(--pv-neutral-fg); }
.pv-delta.bare { background: none; padding: 0; }
.pv-delta.bare.good { color: var(--pv-success-fg); }
.pv-delta.bare.bad { color: var(--pv-critical-fg); }
.pv-delta.bare.zero { color: var(--pv-text-caption); }
.pv-letter { width: 32px; height: 32px; border-radius: var(--pv-radius-md); background: var(--pv-bg-muted); color: var(--pv-ink); display: flex;
    align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.pv-letter.lg { width: 40px; height: 40px; border-radius: var(--pv-radius-lg); font-size: 14px; }
.pv-letter.critical { background: var(--pv-critical-bg); color: var(--pv-critical-fg); }
.pv-letter.warning { background: var(--pv-warning-bg); color: var(--pv-warning-fg); }
.pv-letter.success { background: var(--pv-success-bg); color: var(--pv-success-fg); }
.pv-letter svg { width: 16px; height: 16px; }
.pv-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ---------- таблицы ---------- */

.pv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pv-table th { height: 36px; background: var(--pv-bg-table-header); text-align: left; font-size: 12px; font-weight: 500; color: var(--pv-text-caption);
    padding: 0 12px; border-bottom: 1px solid var(--pv-border-default); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.pv-table th.num, .pv-table td.num { text-align: right; }
.pv-table th.center, .pv-table td.center { text-align: center; }
.pv-table td { height: 44px; padding: 6px 12px; border-bottom: 1px solid var(--pv-border-hairline); vertical-align: middle; }
.pv-table tr:last-child td { border-bottom: none; }
.pv-table tr.selected td { background: var(--pv-bg-selected); }
.pv-table tr.clickable { cursor: pointer; }
.pv-table tr.clickable:hover td { background: var(--pv-bg-subtle); }
.pv-table tr.selected.clickable:hover td { background: var(--pv-bg-selected); }
.pv-table .title { font-weight: 500; }
.pv-table .title.strong { font-weight: 600; }
.pv-table .sub { font-size: 12px; color: var(--pv-text-caption); margin-top: 2px; }
.pv-table .url { font: var(--pv-text-mono); color: var(--pv-text-caption); }
.pv-table td.url { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-table .first { padding-left: 20px; }
.pv-table .last { padding-right: 20px; }
.pv-table td.pad, .pv-table th.pad { padding-left: 20px; }
.pv-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--pv-ink); margin: 0; display: block; }
/* На экране у таблицы нет своей полосы прокрутки: список тянется со страницей, и место в нём не
   теряется, а доскролл догружает следующие строки. В модалке таблица ограничена высотой окна. */
.pv-table-wrap { overflow: auto; }
/* На экране таблица не прокручивается внутри себя, поэтому шапка липнет к странице — под верхнюю
   панель. В модалке у таблицы своя прокрутка, и шапка липнет к ней. */
.pv-main .pv-table-wrap { overflow: clip; }
.pv-main .pv-table th { top: var(--pv-topbar-height); }
/* В модалках и узких карточках таблица не выходит за ширину: колонки фиксированы, длинное усекается. */
.pv-table.fixed { table-layout: fixed; }
.pv-table.fixed td, .pv-table.fixed th { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-table td.wrap { white-space: normal; word-break: break-word; }
.pv-table th.tight, .pv-table td.tight { padding-left: 4px; padding-right: 4px; text-align: center; }
.pv-table th.strong { color: var(--pv-text-primary); font-weight: 600; }
.pv-modal-body { overflow-x: hidden; }
.pv-modal-body .pv-table-wrap { overflow-x: hidden; max-height: 62vh; }
.pv-datatable .pv-table-foot { flex-wrap: wrap; row-gap: 8px; height: auto; min-height: 52px; padding: 8px 20px; }
.pv-expand td { background: var(--pv-bg-subtle); padding: 12px 20px 12px 20px; }
.pv-expand .pv-table td { background: var(--pv-bg-surface); }
.pv-expand-box { background: var(--pv-bg-surface); border: 1px solid var(--pv-border-default); border-radius: var(--pv-radius-lg); overflow: hidden; }
.pv-range-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
/* Фильтр-плашки (05.10): скруглённые «таблетки», выбранная — кольцо внутри заливки и жирный текст
   (обводка снаружи с отступом выглядела устаревшей); длинный текст — многоточием, целиком в подсказке. */
.pv-range-chips button { border: none; background: none; padding: 0; border-radius: var(--pv-radius-full); cursor: pointer; max-width: 100%; }
.pv-range-chips button .pv-chip { padding: 4px 12px; border-radius: var(--pv-radius-full); max-width: 320px; overflow: hidden; text-overflow: ellipsis;
    transition: box-shadow .15s, background .15s; }
.pv-range-chips button:hover .pv-chip { box-shadow: inset 0 0 0 1px var(--pv-border-strong); }
.pv-range-chips button[aria-pressed="true"] .pv-chip { box-shadow: inset 0 0 0 1.5px var(--pv-ink); font-weight: 600; color: var(--pv-text-primary); }
.pv-range-chips button:focus-visible { outline: 2px solid var(--pv-ink); outline-offset: 2px; }
.pv-table.dense td { height: 40px; padding: 4px 12px; }
/* Плотная таблица не должна отнимать у первой колонки отступ: иначе галочка в шапке стоит
   правее галочек в строках. */
.pv-table.dense td.pad { padding-left: 20px; }
.pv-table th input[type="checkbox"] { margin: 0; }
.pv-heat-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.pv-heat { height: 30px; min-width: 40px; border-radius: var(--pv-radius-sm); display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--pv-heat-out-fg); }
.pv-heat.top3 { background: var(--pv-heat-top3-bg); color: var(--pv-heat-top3-fg); }
.pv-heat.top10 { background: var(--pv-heat-top10-bg); color: var(--pv-heat-top10-fg); }
.pv-heat.top30 { background: var(--pv-heat-top30-bg); color: var(--pv-heat-top30-fg); }
.pv-heat.top100 { background: var(--pv-heat-top100-bg); color: var(--pv-heat-top100-fg); }
.pv-heat.legend { height: 24px; min-width: 0; padding: 0 8px; font-size: 12px; }
.pv-heat.out.legend { border: 1px solid var(--pv-border-default); }
.pv-heat.sm { height: 26px; min-width: 36px; font-size: 12px; }
.pv-heat.unchecked { color: var(--pv-border-strong); }
.pv-bulk { height: 52px; background: var(--pv-bg-selected); border-bottom: 1px solid var(--pv-border-default); display: flex; align-items: center;
    gap: 12px; padding: 0 20px; }
.pv-bulk .mark { width: 24px; height: 24px; border-radius: var(--pv-radius-sm); background: var(--pv-lime); display: flex; align-items: center; justify-content: center; }
.pv-bulk .mark svg { width: 14px; height: 14px; }
.pv-bulk b { font-size: 14px; }
.pv-table-foot { height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; border-top: 1px solid var(--pv-border-hairline);
    font-size: 13px; color: var(--pv-text-caption); }
.pv-pagination { display: flex; gap: 6px; align-items: center; }
.pv-pagination button { width: 32px; height: 32px; border-radius: var(--pv-radius-md); border: 1px solid var(--pv-border-control); background: var(--pv-bg-surface);
    font-size: 13px; display: inline-flex; align-items: center; justify-content: center; color: var(--pv-text-primary); }
.pv-pagination button[aria-current="page"] { background: var(--pv-ink); color: var(--pv-text-inverse); border-color: var(--pv-ink); font-weight: 600; }
.pv-pagination button:disabled { color: var(--pv-border-strong); cursor: default; }
.pv-pagination .dots { color: var(--pv-text-caption); padding: 0 4px; }
.pv-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-toolbar.inner { padding: 12px 20px; border-bottom: 1px solid var(--pv-border-hairline); }
.pv-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--pv-text-caption); }
.pv-legend .sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.pv-legend .line { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.pv-legend b { color: var(--pv-text-primary); }
.pv-legend .item { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; }

/* ---------- списки и бары ---------- */

.pv-list { display: flex; flex-direction: column; }
.pv-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--pv-border-hairline); text-decoration: none; color: inherit; }
.pv-row:last-child { border-bottom: none; }
.pv-row.top { align-items: flex-start; }
.pv-row .body { flex: 1; min-width: 0; }
.pv-row .t { font-size: 14px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.pv-row .t.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-row .s { font-size: 12px; color: var(--pv-text-caption); margin-top: 2px; }
.pv-row .v { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pv-row.clickable { cursor: pointer; }
.pv-row.clickable:hover .t { color: var(--pv-text-link); }
.pv-bars { display: flex; flex-direction: column; gap: 14px; }
.pv-bar { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.pv-bar .l { width: 58px; color: var(--pv-text-secondary); flex: none; }
.pv-bar .l.wide { width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-bar .track { flex: 1; height: 14px; background: var(--pv-bg-muted); border-radius: var(--pv-radius-xs); overflow: hidden; }
.pv-bar .track.thin { height: 8px; }
.pv-bar .track i { display: block; height: 100%; background: var(--pv-series-1); border-radius: var(--pv-radius-xs); }
.pv-bar .track i.own { background: var(--pv-ink); }
.pv-bar .n { width: 44px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.pv-stacked { display: flex; gap: 2px; height: 18px; border-radius: 5px; overflow: hidden; }
.pv-stacked i { display: block; height: 100%; min-width: 3px; }
.pv-stacked.thin { height: 8px; border-radius: 2px; }
.pv-progress { height: 6px; background: var(--pv-bg-muted); border-radius: 3px; overflow: hidden; }
.pv-progress i { display: block; height: 100%; background: var(--pv-series-1); border-radius: 3px; }
.pv-progress.lime i { background: var(--pv-lime); }
.pv-ring { position: relative; width: 92px; height: 92px; flex: none; }
.pv-ring .n { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pv-ring .n b { font: 500 24px/28px var(--pv-font-display); letter-spacing: -0.02em; }
.pv-ring .n small { font-size: 11px; color: var(--pv-text-caption); }
.pv-history { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--pv-border-hairline); padding-top: 10px; }
.pv-history .l { width: 50px; font-size: 12px; color: var(--pv-text-caption); }
.pv-history .cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; flex: 1; }
.pv-history .cell { text-align: center; padding: 4px 2px; border-radius: var(--pv-radius-sm); }
.pv-history .cell b { display: block; font-size: 13px; }
.pv-history .cell span { font-size: 11px; color: var(--pv-text-caption); }
.pv-history .cell.current { background: var(--pv-lime); }
.pv-history .cell.current span { color: var(--pv-ink); }
.pv-plate { background: var(--pv-bg-subtle); border-radius: var(--pv-radius-lg); padding: 10px 14px; display: flex; align-items: center; gap: 10px; font-size: 13px; min-height: 44px; }
.pv-plate .mono { font: var(--pv-text-mono); color: var(--pv-text-primary); }
.pv-plate .right { margin-left: auto; font-weight: 600; white-space: nowrap; }
.pv-chart { width: 100%; height: auto; display: block; font-family: var(--pv-font-sans); }
.pv-chart text { font-size: 11px; fill: var(--pv-chart-axis-text); }
.pv-chart .grid { stroke: var(--pv-chart-grid); }
.pv-chart .axis { stroke: var(--pv-chart-axis); }
.pv-chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pv-chart .last { font-size: 12px; font-weight: 600; fill: var(--pv-text-primary); }
.pv-chart .base { stroke: var(--pv-border-hairline); }
.pv-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 40px 20px; color: var(--pv-text-caption); }
.pv-empty .ic { width: 40px; height: 40px; border-radius: var(--pv-radius-lg); background: var(--pv-bg-muted); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.pv-empty .ic svg { width: 20px; height: 20px; color: var(--pv-text-secondary); }
.pv-empty h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--pv-text-primary); }
.pv-empty p { margin: 0; font-size: 13px; max-width: 360px; }
.pv-empty.compact { padding: 20px; }
.pv-empty .pv-btn { margin-top: 8px; }
.pv-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--pv-radius-lg); font-size: 13px; }
.pv-banner.warning { background: var(--pv-warning-bg); color: var(--pv-warning-fg); }
.pv-banner.info { background: var(--pv-info-bg); color: var(--pv-info-fg); }
.pv-banner.critical { background: var(--pv-critical-bg); color: var(--pv-critical-fg); }
.pv-banner .pv-link { margin-left: auto; }

/* ---------- проекты ---------- */

.pv-projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pv-project { display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: inherit; cursor: pointer; min-height: 380px; }
.pv-project:hover { border-color: var(--pv-border-control); }
.pv-project .head { display: flex; align-items: center; gap: 12px; }
.pv-project .head .name { font-size: 15px; font-weight: 600; }
.pv-project .head .region { font-size: 12px; color: var(--pv-text-caption); margin-top: 2px; }
.pv-project .head .pv-pill { margin-left: auto; }
.pv-project .vis { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--pv-text-secondary); }
.pv-project .vis .weeks { font-size: 12px; color: var(--pv-text-caption); }
.pv-project .big { display: flex; align-items: baseline; gap: 8px; }
.pv-project .big b { font: 500 26px/32px var(--pv-font-display); letter-spacing: -0.02em; }
.pv-project .big .unit { font-size: 15px; font-weight: 600; }
.pv-project .spark { height: 72px; border-bottom: 1px solid var(--pv-border-hairline); display: flex; align-items: center; color: var(--pv-text-caption); font-size: 12px; }
.pv-project .spark svg { width: 100%; height: 72px; display: block; }
.pv-project .foot { margin-top: auto; border-top: 1px solid var(--pv-border-hairline); padding-top: 14px; display: flex; justify-content: space-between; font-size: 13px; color: var(--pv-text-secondary); }
.pv-project.add { border: 1.5px dashed var(--pv-border-control); background: transparent; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.pv-project.add .plus { width: 44px; height: 44px; border-radius: 22px; background: var(--pv-lime); display: flex; align-items: center; justify-content: center; }
.pv-project.add .plus svg { width: 20px; height: 20px; }
.pv-project.add b { font-size: 15px; font-weight: 600; }
.pv-project.add p { margin: 0; font-size: 13px; color: var(--pv-text-secondary); max-width: 230px; }

/* ---------- кластеры ---------- */

.pv-master { display: flex; gap: 20px; flex: 1; min-height: 0; }
.pv-master .list { width: 436px; flex: none; }
.pv-master .detail { flex: 1; min-width: 0; }
.pv-cluster-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--pv-radius-lg); border: none; background: transparent;
    text-align: left; width: 100%; color: inherit; }
.pv-cluster-row:hover { background: var(--pv-bg-subtle); }
.pv-cluster-row[aria-current="true"] { background: var(--pv-bg-selected); }
.pv-cluster-row .body { flex: 1; min-width: 0; }
.pv-cluster-row .t { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-cluster-row .s { font-size: 12px; color: var(--pv-text-caption); margin-top: 2px; }
.pv-params { display: flex; align-items: flex-end; gap: 20px; padding: 14px 20px; flex-wrap: wrap; }
.pv-params .pv-field > label { font-size: 12px; }
.pv-params .stats { margin-left: auto; display: flex; gap: 24px; padding-left: 20px; border-left: 1px solid var(--pv-border-hairline); }
.pv-params .stats .l { font-size: 12px; color: var(--pv-text-caption); }
.pv-params .stats .v { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pv-params .stats .v.warn { color: var(--pv-warning-fg); }
.pv-detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-detail-head h2 { margin: 0; font-size: 18px; font-weight: 600; margin-right: 4px; }
.pv-detail-head .pv-link { margin-left: auto; }

/* ---------- интеграции ---------- */

.pv-integrations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pv-integration { padding: 16px; gap: 8px; min-height: 208px; }
.pv-integration.error { border-color: #F0C8C8; }
.pv-integration .head { display: flex; gap: 12px; align-items: center; }
.pv-integration .head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.pv-integration .purpose { font-size: 13px; line-height: 1.4; }
.pv-integration .meta { font-size: 12px; line-height: 1.4; color: var(--pv-text-caption); }
.pv-integration .meta.error { color: var(--pv-critical-fg); }
.pv-integration .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pv-sync { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 40px; border: 1px solid var(--pv-border-default); border-radius: 12px;
    background: var(--pv-bg-surface); font-size: 13px; color: var(--pv-text-secondary); }
.pv-sync .pv-link { margin-left: auto; }
.pv-connect-steps { display: flex; flex-direction: column; gap: 10px; }
.pv-step { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--pv-border-default); border-radius: 12px; }
.pv-step .num { width: 26px; height: 26px; border-radius: 13px; background: var(--pv-lime); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.pv-step .text { line-height: 1.45; font-size: 13px; padding-top: 3px; }
.pv-step .code { display: flex; gap: 8px; margin-top: 8px; }
.pv-step .code input { flex: 1; }

/* ---------- модалка, тост, вход ---------- */

.pv-modal-backdrop { position: fixed; inset: 0; background: rgba(20, 22, 27, .45); display: flex; align-items: center; justify-content: center; z-index: 30; }
.pv-modal { background: var(--pv-bg-surface); border-radius: var(--pv-radius-xl); width: min(680px, 92vw); max-height: 84vh; display: flex; flex-direction: column; }
.pv-modal.wide { width: min(920px, 94vw); }
.pv-modal.xwide { width: min(1160px, 96vw); }
.pv-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--pv-border-default); }
.pv-modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.pv-modal-body { padding: 20px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.pv-toast { position: fixed; right: 20px; bottom: 20px; background: var(--pv-chart-tooltip-bg); color: var(--pv-chart-tooltip-text); padding: 10px 14px;
    border-radius: var(--pv-radius-md); z-index: 40; max-width: 440px; font-size: 13px; }
.pv-toast.error { background: var(--pv-critical-fg); }
.pv-spinner { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--pv-border-default); border-top-color: var(--pv-text-secondary); animation: pv-spin .9s linear infinite; }
@keyframes pv-spin { to { transform: rotate(360deg); } }

body.auth-mode .pv-shell { display: none; }
.pv-auth { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 32px; background: var(--pv-bg-canvas); }
.pv-auth-card { width: min(440px, 100%); background: var(--pv-bg-surface); border: 1px solid var(--pv-border-default); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.pv-auth-card h1 { margin: 0; font: var(--pv-text-h1); }
.pv-auth-card .lead { margin: 0; color: var(--pv-text-secondary); font-size: 14px; }
.pv-auth-card .alert { border-radius: var(--pv-radius-lg); padding: 9px 12px; font-size: 13px; }
.pv-auth-card .alert.error { background: var(--pv-critical-bg); color: var(--pv-critical-fg); }
.pv-auth-card .alert.ok { background: var(--pv-success-bg); color: var(--pv-success-fg); }
.pv-auth-card .or { display: flex; align-items: center; gap: 10px; color: var(--pv-text-caption); font-size: 12px; }
.pv-auth-card .or::before, .pv-auth-card .or::after { content: ""; flex: 1; border-top: 1px solid var(--pv-border-default); }
.pv-auth-card .foot { text-align: center; font-size: 13px; color: var(--pv-text-secondary); }
.pv-btn.yandex { background: var(--pv-ink); border-color: var(--pv-ink); color: var(--pv-text-inverse); height: 44px; border-radius: 12px; }
.pv-btn.yandex .ya { width: 22px; height: 22px; border-radius: 11px; background: #fc3f1d; color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 700 14px/1 Arial, sans-serif; }
.pv-btn.yandex.disabled { opacity: .45; pointer-events: none; }
/* Чёрная кнопка под курсором темнеет, как primary, а не белеет по общему правилу .pv-btn:hover. */
.pv-btn.yandex:hover:not(.disabled) { background: #2A2D35; border-color: #2A2D35; color: var(--pv-text-inverse); }
.pv-btn.tall { height: 44px; border-radius: 12px; }

@media (max-width: 1280px) {
    .pv-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pv-projects, .pv-grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pv-integrations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pv-master { flex-direction: column; }
    .pv-master .list { width: auto; }
    .pv-search.topbar { width: 280px; }
}

/* Черновики и подбор страницы */
.pv-stat-strip.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pv-draft { border-color: var(--pv-ink); }
textarea.pv-textarea { height: auto; min-height: 160px; padding: 10px 12px; resize: vertical; font: var(--pv-text-body); line-height: 1.5; }
.pv-table td.wrap { white-space: normal; word-break: break-word; vertical-align: top; }
.pv-banner > span:first-of-type { line-height: 1.45; }
.pv-more { display: block; width: 100%; padding: 10px 20px; font-size: 12px; font-weight: 500; color: var(--pv-text-secondary);
    text-align: center; background: var(--pv-bg-subtle); border: none; border-top: 1px solid var(--pv-border-hairline); cursor: pointer; }
.pv-more:hover { background: var(--pv-bg-muted); color: var(--pv-text-primary); }
/* Галочка и кнопка держатся верха строки: когда под фразой появляется причина, они не уезжают. */
.pv-table td.steady { vertical-align: top; }
.pv-table td.steady input[type="checkbox"] { margin-top: 8px; }
.pv-table td.steady .pv-btn { margin-top: 2px; }
/* Действие в конце строки: крестик без рамки, краснеет при наведении. Ячейка не режет его
   многоточием, как обычный текст в таблице с фиксированными колонками. */
.pv-table td.actions { overflow: visible; text-overflow: clip; text-align: right; white-space: nowrap; }
.pv-icon-btn { width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid transparent; border-radius: var(--pv-radius-md); background: transparent; color: var(--pv-text-caption); cursor: pointer; }
.pv-icon-btn:hover { background: var(--pv-critical-bg); color: var(--pv-critical-fg); }
.pv-icon-btn:focus-visible { outline: 2px solid var(--pv-ink); outline-offset: 1px; }
/* Кнопки в шапке карточки стоят в один ряд и не переносятся по одной. */
.pv-card-head .pv-actions { flex-wrap: nowrap; justify-content: flex-end; }
.pv-card-head .sub { max-width: 68ch; }

/* Позиция Вебмастера стоит в той же ячейке, что наша, отделённая слешем: два числа читаются
   как одно значение «наша / Вебмастер», а не как две строки. */
.pv-table td .pv-slash { margin-left: 4px; color: var(--pv-text-secondary); font-size: 13px; white-space: nowrap; }
/* Подпись в шапке узкой колонки переносится, а не обрезается многоточием. */
.pv-table th .pv-caption { white-space: normal; line-height: 1.25; }

/* Поле даты живёт в той же плашке, что и выпадающие списки: своей рамки не рисует, ширину
   держит по содержимому, иначе браузер растягивает его на пол-экрана. */
.pv-select input[type="date"] { border: none; background: none; font: inherit; color: inherit; padding: 0; width: 118px; }
.pv-select input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .6; }

/* Чип легенды не растягивает карточку: длинное имя поисковика из Метрики обрезается. */
.pv-legend .pv-chip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Подсказка графика: дата и значения линий в точке под курсором. */
/* Графики на Chart.js (05.10): своя HTML-легенда — метка, название, итог; выключенная линия — бледно. */
.pv-linechart { width: 100%; min-width: 0; }
.pv-linechart .plot { position: relative; width: 100%; }
.pv-chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; }
.pv-legend-item { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 2px 0; border: 0; background: none;
    font: 500 12px/1.3 var(--pv-font-sans); color: var(--pv-text-secondary); cursor: pointer; transition: opacity .15s; }
.pv-legend-item .sw { width: 14px; height: 3px; border-radius: 2px; flex: none; }
.pv-legend-item .sw.dash { height: 0; border-top: 2px dashed; border-radius: 0; background: none; }
.pv-legend-item .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.pv-legend-item b { color: var(--pv-text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.pv-legend-item:hover .nm { color: var(--pv-text-primary); }
.pv-legend-item.off { opacity: .38; }
.pv-legend-item:focus-visible { outline: 2px solid var(--pv-focus-ring, var(--pv-series-1)); outline-offset: 2px; border-radius: 4px; }
.pv-chart-tip { position: fixed; z-index: 70; pointer-events: none; display: none; background: var(--pv-chart-tooltip-bg); color: var(--pv-chart-tooltip-text);
    padding: 8px 10px; border-radius: var(--pv-radius-sm); font-size: 12px; line-height: 1.45; min-width: 130px; max-width: 280px; }
.pv-chart-tip .d { font-weight: 600; margin-bottom: 4px; }
.pv-chart-tip .r { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.pv-chart-tip .r i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pv-chart-tip .r b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.pv-chart .guide { stroke: var(--pv-chart-axis); stroke-dasharray: 3 3; }
.pv-chart circle.pt { stroke: var(--pv-bg-surface); stroke-width: 2; }

/* Таблица со списком проблем шапку не прилепляет: внутри её строк раскрываются таблицы страниц
   с другими колонками, и чужая шапка над ними сбивала с толку. Вложенная таблица липнет сама. */
.pv-main .pv-table.nosticky > thead > tr > th { position: static; }
/* Таблица, раскрытая внутри строки, шапку тоже не прилепляет: прилипшая, она оказывалась
   посреди списка. */
.pv-expand-box .pv-table th { position: static; }
.pv-table td details summary { cursor: pointer; }

/* Группы дублей: чётные группы на подложке, нечётные на белом. */
.pv-table tr.pv-group-1 td { background: var(--pv-bg-subtle); }
.pv-table td.wrap { line-height: 1.4; }

/* Карточка релевантной страницы: две колонки секций, факты «подпись — значение». */
.pv-page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .pv-page-grid { grid-template-columns: 1fr; } }
.pv-page-section { border: 1px solid var(--pv-border-hairline); border-radius: var(--pv-radius-md); padding: 12px 14px; background: var(--pv-bg-surface); min-width: 0; }
.pv-page-section h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--pv-text-secondary); }
.pv-page-section .pv-table { margin-top: 8px; }
.pv-page-section .pv-list { margin: 8px 0 0; padding-left: 0; list-style: none; }
.pv-page-section .pv-list li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; line-height: 1.4; }
.pv-fact { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--pv-border-hairline); line-height: 1.4; }
.pv-fact:last-child { border-bottom: 0; }
.pv-fact > span:last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* «Панель обновилась»: полоска сверху по центру, пока страницу не перезагрузили. */
.pv-update-bar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; gap: 12px; align-items: center;
  padding: 10px 12px 10px 18px; background: var(--pv-ink); color: var(--pv-text-inverse); border-radius: var(--pv-radius-lg); font-size: 13px; }
/* Выбранные строки таблицы: счётчик и действия рядом с заголовком карточки. */
.pv-picked { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--pv-border-hairline); font-size: 13px; white-space: nowrap; }
.pv-table td.center input[type="checkbox"], .pv-table th.center input[type="checkbox"] { width: 16px; height: 16px; margin: 0; vertical-align: middle; cursor: pointer; }

/* Карточка кластера во всплывающем окне: блоки по сетке с одним шагом, причина — второй строкой плашки. */
.pv-cluster-card { display: flex; flex-direction: column; gap: 16px; }
.pv-cluster-card .pv-plate.wrap { flex-wrap: wrap; row-gap: 4px; }
.pv-cluster-card .pv-plate .note { flex-basis: 100%; padding-left: 26px; }
.pv-cluster-card .pv-card-foot { padding-top: 16px; }
.pv-cluster-card .pv-card-foot .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 04 · Структура сайта ---------- */
.pv-struct { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.pv-struct-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--pv-topbar-height) + 20px); }
@media (max-width: 1180px) { .pv-struct { grid-template-columns: minmax(0, 1fr); } .pv-struct-side { position: static; } }
.pv-tree { outline: none; }
.pv-tree:focus-visible { box-shadow: inset 0 0 0 2px var(--pv-ink); }
.pv-tree-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px 92px 110px 84px; gap: 10px; align-items: center; min-height: 44px;
    padding: 0 16px 0 20px; border-bottom: 1px solid var(--pv-border-hairline); font-size: 14px; cursor: pointer; }
.pv-tree-row:last-child { border-bottom: none; }
.pv-tree-row:hover { background: var(--pv-bg-subtle); }
.pv-tree-row.selected, .pv-tree-row.selected:hover { background: var(--pv-bg-selected); }
.pv-tree-row.head { min-height: 36px; background: var(--pv-bg-table-header); font-size: 12px; font-weight: 500; color: var(--pv-text-caption);
    border-top: 1px solid var(--pv-border-hairline); cursor: default; position: sticky; top: var(--pv-topbar-height); z-index: 2; }
.pv-tree-row.more { cursor: default; }
.pv-tree-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.pv-tree-row .num.strong { font-weight: 600; }
.pv-tree-row .name { display: flex; align-items: center; align-self: stretch; min-width: 0; }
.pv-tree-row .g { position: relative; width: 20px; align-self: stretch; flex: none; }
.pv-tree-row .g.pipe::before, .pv-tree-row .g.tee::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 1px; background: var(--pv-border-control); }
.pv-tree-row .g.end::before { content: ""; position: absolute; left: 10px; top: 0; height: 50%; width: 1px; background: var(--pv-border-control); }
.pv-tree-row .g.tee::after, .pv-tree-row .g.end::after { content: ""; position: absolute; left: 10px; top: 50%; width: 10px; height: 1px; background: var(--pv-border-control); }
.pv-tree-row .tw { width: 20px; height: 20px; padding: 0; border: none; border-radius: 5px; background: transparent; display: flex; align-items: center;
    justify-content: center; color: var(--pv-text-secondary); cursor: pointer; flex: none; }
.pv-tree-row .tw:hover { background: var(--pv-bg-muted); color: var(--pv-text-primary); }
.pv-tree-row .tw-space { width: 20px; flex: none; }
.pv-tree-row .ic { display: flex; margin-left: 4px; color: var(--pv-text-caption); flex: none; }
.pv-tree-row.selected .ic, .pv-tree-row.root .ic { color: var(--pv-text-primary); }
.pv-tree-row .txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; margin-left: 8px; padding: 5px 0; }
.pv-tree-row .nm { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 500; line-height: 18px; }
.pv-tree-row.root .nm, .pv-tree-row.selected .nm { font-weight: 600; }
.pv-tree-row .nm .pv-chip { flex: none; }
.pv-tree-row .nm .pv-link { font-size: 14px; }
.pv-tree-row .pth { font: var(--pv-text-mono); color: var(--pv-text-caption); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-struct-path { font: 500 15px/20px var(--pv-font-mono); }
.pv-struct-facts { display: flex; flex-direction: column; font-size: 13px; margin-top: 4px; }
.pv-struct-facts .pv-fact { padding: 8px 0; }
.pv-struct-facts .pv-fact > span:first-child { color: var(--pv-text-secondary); }
.pv-struct-facts .pv-fact b { font-size: 14px; font-weight: 600; text-align: right; }
.pv-struct-facts .pv-fact b .pv-link { font-size: 14px; }
.pv-fact.col { flex-direction: column; align-items: stretch; gap: 6px; }
.pv-fact.col .row { display: flex; justify-content: space-between; gap: 12px; }
.pv-fact.col .row > span { color: var(--pv-text-secondary); }
.pv-struct-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.pv-struct-orphans { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.pv-struct-orphans h2 { margin: 0 0 4px; font: var(--pv-text-h2); }
.pv-struct-orphans p { margin: 0; line-height: 18px; }
.pv-struct-warn, .pv-struct-ok { width: 32px; height: 32px; border-radius: var(--pv-radius-md); display: flex; align-items: center; justify-content: center; flex: none; }
.pv-struct-warn { background: var(--pv-warning-bg); color: var(--pv-warning-fg); }
.pv-struct-ok { background: var(--pv-success-bg); color: var(--pv-success-fg); }
/* Схема сайта: главная сверху, под ней колонки разделов с подразделами, линии — как в оргструктуре. */
.pv-sitemap { overflow-x: auto; padding: 8px 20px 24px; }
.pv-sitemap .sm-inner { display: inline-flex; flex-direction: column; align-items: center; min-width: 100%; }
.pv-sitemap .sm-root { position: relative; padding-bottom: 22px; }
.pv-sitemap .sm-root::after { content: ""; position: absolute; left: 50%; bottom: 0; height: 22px; border-left: 1px solid var(--pv-border-strong); }
.pv-sitemap .sm-cols { display: flex; align-items: flex-start; }
.pv-sitemap .sm-col { position: relative; width: 208px; padding: 22px 8px 0; flex: none; }
.pv-sitemap .sm-col::before { content: ""; position: absolute; top: 0; left: 50%; height: 22px; border-left: 1px solid var(--pv-border-strong); }
.pv-sitemap .sm-col::after { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 1px solid var(--pv-border-strong); }
.pv-sitemap .sm-col:first-child::after { left: 50%; }
.pv-sitemap .sm-col:last-child::after { right: 50%; }
.pv-sitemap .sm-col:only-child::after { display: none; }
.pv-sitemap .sm-box { display: flex; flex-direction: column; gap: 2px; width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--pv-border-control);
    border-radius: var(--pv-radius-md); background: var(--pv-bg-surface); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.pv-sitemap .sm-box b { font-size: 13px; font-weight: 600; line-height: 17px; }
.pv-sitemap .sm-box:hover { border-color: var(--pv-border-strong); }
.pv-sitemap .sm-box.root { width: 260px; align-items: center; text-align: center; border-color: var(--pv-ink); }
.pv-sitemap .sm-box.sub { padding: 7px 10px; }
.pv-sitemap .sm-box.static { cursor: default; background: var(--pv-bg-table-header); }
.pv-sitemap .sm-box.static:hover { border-color: var(--pv-border-control); }
.pv-sitemap .sm-box.selected, .pv-sitemap .sm-item.selected { background: var(--pv-bg-selected); border-color: var(--pv-ink); color: var(--pv-text-primary); }
.pv-sitemap ul { list-style: none; margin: 8px 0 0 12px; padding: 0 0 0 12px; border-left: 1px solid var(--pv-border-control); display: flex; flex-direction: column; gap: 4px; }
.pv-sitemap li { position: relative; min-width: 0; }
.pv-sitemap li::before { content: ""; position: absolute; left: -12px; top: 14px; width: 10px; border-top: 1px solid var(--pv-border-control); }
.pv-sitemap li.sub::before { top: 18px; }
.pv-sitemap li ul { margin-top: 6px; }
.pv-sitemap li.sm-rest { padding: 2px 6px; }
.pv-sitemap li.sm-rest::before { display: none; }
.pv-sitemap .sm-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-width: 0; padding: 4px 6px; border: 1px solid transparent;
    border-radius: var(--pv-radius-sm); background: transparent; font: inherit; font-size: 13px; color: var(--pv-text-secondary); text-align: left; cursor: pointer; }
.pv-sitemap .sm-item:hover { background: var(--pv-bg-muted); color: var(--pv-text-primary); }
.pv-sitemap .sm-item .pv-caption { flex: none; }

.pv-struct.wide { grid-template-columns: minmax(0, 1fr); }
.pv-struct.wide .pv-struct-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.pv-struct.wide #st-selected { display: none; }
.pv-struct-side .pv-bar .l, .pv-struct .pv-bar .l { width: 80px; }
.pv-struct-modal .pv-card-foot { padding-top: 14px; display: flex; gap: 10px; }

/* Страница, которую нашёл только Вебмастер: обход по ссылкам и sitemap.xml до неё не дошёл. */
.pv-chip.pv-wm { background: var(--pv-info-bg); color: var(--pv-info-fg); }
.pv-chip.pv-warn-chip { background: var(--pv-warning-bg); color: var(--pv-warning-fg); }
.pv-wm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pv-info-fg); margin-right: 6px; vertical-align: middle; }

.pv-tree.with-unfetched .pv-tree-row { grid-template-columns: minmax(0, 1fr) 64px 84px 100px 76px 92px; gap: 8px; }
/* Сайт конкурента: вместо поиска, визитов и кластеров — запросы ядра в ТОП-10 и их спрос. */
.pv-tree.competitor .pv-tree-row { grid-template-columns: minmax(0, 1fr) 72px 92px 100px; }
.pv-tree.competitor.with-unfetched .pv-tree-row { grid-template-columns: minmax(0, 1fr) 64px 84px 92px 92px; gap: 8px; }
.pv-struct.compare .pv-struct-side { display: none; }

.pv-tree-row .nm > .pv-ellipsis { min-width: 48px; }
.pv-tree-row .nm .pv-wm-dot { flex: none; margin-right: 0; }
/* Сравнение структур: блоки внутри одной карточки, разбор ИИ, факты трёх страниц кластера. */
.pv-cmp-block { padding: 0 20px 16px; }
.pv-cmp-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 0 10px; }
.pv-cmp-title h3 { margin: 0; font: var(--pv-text-h2); }
.pv-brief { max-width: 880px; font-size: 14px; line-height: 21px; }
.pv-brief h4 { margin: 12px 0 4px; font-size: 14px; }
.pv-brief p { margin: 4px 0; }
.pv-brief ul, .pv-brief ol { margin: 4px 0; padding-left: 20px; }
.pv-brief h4:first-child { margin-top: 0; }
.pv-brief code { font-family: var(--pv-font-mono); font-size: 12px; }
.pv-brief-table { overflow-x: auto; margin: 6px 0 12px; }
.pv-brief-table table { border-collapse: collapse; font-size: 13px; line-height: 18px; }
.pv-brief-table th, .pv-brief-table td { text-align: left; vertical-align: top; padding: 6px 16px 6px 0; border-bottom: 1px solid var(--pv-border-hairline); }
.pv-brief-table thead th { color: var(--pv-text-secondary); font-weight: 500; }
.pv-brief-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pv-brief-table td:last-child, .pv-brief-table th:last-child { padding-right: 0; }
.pv-cmp-facts { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 13px; table-layout: fixed; }
.pv-cmp-facts th, .pv-cmp-facts td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--pv-border-hairline); vertical-align: top; overflow: hidden; }
.pv-cmp-facts thead th { color: var(--pv-text-secondary); font-weight: 500; }
.pv-cmp-facts tbody th { color: var(--pv-text-secondary); font-weight: 400; width: 150px; }
.pv-brief-history { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--pv-border-hairline); }
/* Коммерческие факторы: статус пункта у нашей страницы, точки «у N из M», полосы «пунктов на странице». */
.pv-cf-status { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; border-radius: 50%; vertical-align: -5px; }
.pv-cf-status.yes { background: var(--pv-success-bg); color: var(--pv-success-fg); }
.pv-cf-status.no { background: var(--pv-critical-bg); color: var(--pv-critical-fg); }
.pv-cf-status.unknown { background: var(--pv-neutral-bg); color: var(--pv-neutral-fg); }
.pv-cf-dots { display: inline-flex; gap: 3px; }
.pv-cf-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--pv-border-default); }
.pv-cf-dots i.on { background: var(--pv-series-1); }
.pv-cf-list .row { display: flex; align-items: center; gap: 10px; min-height: 34px; border-bottom: 1px solid var(--pv-border-hairline); font-size: 13px; cursor: pointer; }
.pv-cf-list .row:last-child { border-bottom: none; }
.pv-cf-list .row .t { flex: 1; min-width: 0; }
.pv-cf-list .row .c { font-size: 12px; color: var(--pv-text-caption); white-space: nowrap; }
.pv-cf-bars { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.pv-cf-bars .row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 28px; align-items: center; gap: 10px; font-size: 13px; min-height: 20px; }
.pv-cf-bars .row b { text-align: right; font-weight: 500; }
.pv-cf-bars .row.own .nm, .pv-cf-bars .row.own b { font-weight: 700; }
.pv-cf-bars .track { position: relative; height: 8px; border-radius: 4px; background: var(--pv-bg-muted); }
.pv-cf-bars .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--pv-series-1); }
.pv-cf-bars .row.own .track i { background: var(--pv-ink); }
.pv-cf-bars .track em { position: absolute; top: -3px; width: 2px; height: 14px; margin-left: -1px; background: var(--pv-text-caption); }
.pv-cf-blocks { margin: 0; padding-left: 20px; font-size: 13px; line-height: 18px; }
.pv-cf-blocks li { margin-bottom: 6px; }
/* Окно страницы на «Коммерческих факторах»: скриншот целиком слева, пункты и блоки справа. */
.pv-cf-page { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pv-cf-page.with-shot { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); }
.pv-cf-shot { max-height: 70vh; overflow: auto; border: 1px solid var(--pv-border-hairline); border-radius: var(--pv-radius-md); }
.pv-cf-shot img { display: block; width: 100%; height: auto; }
/* Как пункт сделан у конкурентов: фрагмент скриншота по месту, которое отметил ИИ, в натуральную величину. */
.pv-cf-modal { display: flex; flex-direction: column; gap: 10px; }
.pv-cf-modal > .pv-cf-h + .pv-caption { margin-top: -6px; }
.pv-cf-h { margin: 0; font-size: 14px; font-weight: 600; }
.pv-cf-examples { display: flex; flex-direction: column; gap: 18px; }
.pv-cf-example .head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: 14px; }
.pv-cf-crop { display: block; max-width: 1000px; border: 1px solid var(--pv-border-hairline); border-radius: var(--pv-radius-md); overflow: hidden; }
.pv-cf-crop img { display: block; width: 100%; height: auto; }
.pv-cf-crop.none { padding: 12px 14px; color: var(--pv-text-secondary); font-size: 13px; background: var(--pv-bg-subtle); }
.pv-cf-example > .pv-caption { margin-top: 6px; max-width: 1000px; }
/* «Пунктов на странице»: сколько пунктов разные; блоки страниц колонками рядом. */
.pv-cf-diff { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--pv-border-hairline); display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 18px; }
.pv-cf-outline { display: grid; grid-template-columns: repeat(var(--cols), minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--pv-border-hairline); overflow-x: auto; }
.pv-cf-outline .col { padding: 14px 20px 18px; border-right: 1px solid var(--pv-border-hairline); min-width: 0; }
.pv-cf-outline .col:last-child { border-right: none; }
.pv-cf-outline .col.own { background: var(--pv-bg-subtle); }
.pv-cf-outline .head { margin-bottom: 8px; font-size: 13px; }
.pv-cf-outline ol { margin: 0; padding-left: 20px; font-size: 13px; line-height: 18px; }
.pv-cf-outline li { margin-bottom: 6px; }
/* Коммерческие факторы: три шага работы и ячейки сопоставления. */
.pv-cf-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pv-cf-step { display: flex; gap: 12px; align-items: flex-start; }
.pv-cf-step .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; background: var(--pv-neutral-bg); color: var(--pv-neutral-fg); }
.pv-cf-step.done .n { background: var(--pv-success-bg); color: var(--pv-success-fg); }
.pv-cf-step.part .n, .pv-cf-step.todo .n { background: var(--pv-warning-bg); color: var(--pv-warning-fg); }
.pv-cf-step .b { min-width: 0; font-size: 13px; line-height: 18px; }
.pv-cf-step .acts { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.pv-cf-cell { cursor: pointer; }


/* ---------- Задачи (13-tasks): доска, карточки, панель задачи ---------- */
.pv-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pv-board-col { display: flex; flex-direction: column; gap: 10px; border-radius: var(--pv-radius-xl); padding: 2px; min-height: 120px; }
.pv-board-col.drop { background: var(--pv-bg-segmented-card); }
.pv-board-col .head { height: 28px; display: flex; align-items: center; gap: 8px; padding-left: 4px; }
.pv-board-col .head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.pv-board-col .head .dot { width: 8px; height: 8px; border-radius: 4px; flex: none; }
.pv-board-col .head .sub { font-size: 12px; color: var(--pv-text-caption); }
.pv-board-col .head .spacer { flex: 1; }
.pv-board-col .head .add { width: 28px; height: 28px; border: 1px solid var(--pv-border-control); border-radius: var(--pv-radius-md); background: var(--pv-bg-surface);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--pv-text-secondary); }
.pv-board-col .list { display: flex; flex-direction: column; gap: 8px; }
.pv-board-col .empty { height: 96px; border: 1px dashed var(--pv-border-control); border-radius: var(--pv-radius-xl); display: flex; align-items: center;
  justify-content: center; font-size: 12px; color: var(--pv-text-caption); }
.pv-board-col .more { align-self: flex-start; height: 28px; }
.dot-new { background: var(--pv-sidebar-icon); } .dot-in_progress { background: var(--pv-series-1); }
.dot-review { background: var(--pv-series-3); } .dot-done { background: var(--pv-success-fg); }
.pv-task { background: var(--pv-bg-surface); border: 1px solid var(--pv-border-default); border-radius: 12px; padding: 12px; display: flex; flex-direction: column;
  gap: 8px; cursor: pointer; }
.pv-task:hover { border-color: var(--pv-border-control); }
.pv-task:focus-visible { outline: 2px solid var(--pv-text-link); outline-offset: 2px; }
.pv-task.dragging { opacity: .5; }
.pv-task .row1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pv-task .row1 .pv-chip { gap: 4px; font-weight: 600; }
.pv-task .row1 .pv-chip svg { width: 12px; height: 12px; }
.pv-task h3 { margin: 0; font-size: 14px; font-weight: 500; line-height: 19px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pv-task .obj { font-size: 12px; color: var(--pv-text-caption); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-task .obj.url { font: var(--pv-text-mono); color: var(--pv-text-secondary); }
.pv-task .auto { font-size: 12px; color: var(--pv-text-caption); display: flex; align-items: center; gap: 4px; }
.pv-task .foot { border-top: 1px solid var(--pv-border-hairline); padding-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500;
  color: var(--pv-text-secondary); }
.pv-task .foot .spacer { flex: 1; }
.pv-task .foot .due { display: inline-flex; align-items: center; gap: 4px; }
.pv-task .foot .due.over { color: var(--pv-critical-fg); font-weight: 600; }
.pv-task .foot svg { width: 14px; height: 14px; }
.pv-task.done { background: var(--pv-bg-subtle); gap: 10px; }
.pv-task.done h3 { color: var(--pv-text-caption); display: flex; gap: 8px; align-items: flex-start; }
.pv-task.done .tick { width: 18px; height: 18px; border-radius: 9px; background: var(--pv-success-bg); color: var(--pv-success-fg); flex: none;
  display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.pv-task.done .tick svg { width: 12px; height: 12px; }
.pv-prio { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--pv-text-secondary); }
.pv-prio i { display: inline-block; width: 3px; border-radius: 1px; background: var(--pv-border-control); margin-right: 1px; }
.pv-prio i:nth-child(1) { height: 5px; } .pv-prio i:nth-child(2) { height: 8px; } .pv-prio i:nth-child(3) { height: 11px; }
.pv-prio.high i { background: var(--pv-critical-fg); }
.pv-prio.medium i:nth-child(-n+2) { background: var(--pv-warning-fg); }
.pv-prio.low i:nth-child(1) { background: var(--pv-text-caption); }
.pv-avatar.xs { width: 22px; height: 22px; border-radius: 11px; font-size: 10px; font-weight: 700; background: var(--pv-neutral-bg); color: var(--pv-text-secondary); flex: none; }
.pv-avatar.xs.me { background: var(--pv-lime); color: var(--pv-ink); }
/* Панель задачи — справа поверх доски. */
.pv-drawer-backdrop { position: fixed; inset: 0; background: rgba(20, 22, 27, .24); z-index: 25; display: flex; justify-content: flex-end; }
.pv-drawer { width: min(480px, 100vw); height: 100%; background: var(--pv-bg-surface); display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(20, 22, 27, .12); }
.pv-drawer .dhead { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--pv-border-default); }
.pv-drawer .dhead .num { font: var(--pv-text-mono); color: var(--pv-text-caption); }
.pv-drawer .dhead .spacer { flex: 1; }
.pv-drawer .dbody { flex: 1; overflow: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; }
.pv-drawer .dfoot { padding: 12px 20px; border-top: 1px solid var(--pv-border-default); display: flex; gap: 8px; }
.pv-drawer .dfoot .spacer { flex: 1; }
.pv-drawer .ttl { font-size: 18px; font-weight: 600; line-height: 24px; border: 1px solid transparent; border-radius: var(--pv-radius-md); padding: 4px 6px; margin: -5px -7px;
  resize: none; width: calc(100% + 14px); font-family: inherit; background: transparent; }
.pv-drawer .ttl:hover, .pv-drawer .ttl:focus { border-color: var(--pv-border-control); outline: none; }
.pv-drawer .grid { display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px; align-items: center; font-size: 13px; }
.pv-drawer .grid .k { color: var(--pv-text-caption); }
.pv-drawer .grid select, .pv-drawer .grid input { height: var(--pv-control-sm); border: 1px solid var(--pv-border-control); border-radius: var(--pv-radius-md); padding: 0 8px;
  font: inherit; background: var(--pv-bg-surface); max-width: 240px; }
.pv-drawer h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.pv-drawer .pages { display: flex; flex-direction: column; gap: 4px; font: var(--pv-text-mono); }
.pv-drawer .pages a { color: var(--pv-text-secondary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-drawer .desc { font-size: 13px; line-height: 19px; }
.pv-drawer .desc h2 { font-size: 13px; margin: 10px 0 4px; }
.pv-drawer .check { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pv-drawer .check label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.pv-drawer .check label.done span { color: var(--pv-text-caption); text-decoration: line-through; }
.pv-drawer .log { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.pv-drawer .log .ev { display: flex; flex-direction: column; gap: 2px; }
.pv-drawer .log .ev .meta { font-size: 12px; color: var(--pv-text-caption); }
.pv-drawer .log .ev.comment .txt { background: var(--pv-bg-subtle); border-radius: var(--pv-radius-md); padding: 8px 10px; white-space: pre-wrap; }
@media (max-width: 1100px) { .pv-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Предварительные задачи: плашка на экранах аудита, структуры, коммерческих факторов, Вебмастера. */
.pv-backlog-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--pv-border-default); border-radius: var(--pv-radius-xl);
  background: var(--pv-bg-surface); }
.pv-backlog-bar.has { border-left: 4px solid var(--pv-lime); }
.pv-backlog-bar .ic { width: 36px; height: 36px; border-radius: var(--pv-radius-lg); background: var(--pv-bg-subtle); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pv-backlog-bar.has .ic { background: var(--pv-lime); color: var(--pv-ink); }
.pv-backlog-bar .txt { flex: 1; min-width: 0; }
.pv-backlog-bar .txt b { font-size: 14px; }
.pv-backlog-bar .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
#backlog-bar:empty { display: none; }

/* Расписание съёма позиций: два месяца рядом, расписанные дни — заливкой лайма */
.pv-sched .pv-segmented { flex-wrap: wrap; }
.pv-sched-row { display: flex; gap: var(--pv-space-6); flex-wrap: wrap; align-items: flex-end; }
.pv-sched-row .pv-input[type="time"] { width: 120px; }
.pv-cal { display: flex; gap: var(--pv-space-6); flex-wrap: wrap; margin-top: var(--pv-space-2); }
.pv-cal-month { flex: 1 1 260px; max-width: 320px; }
.pv-cal-title { font: var(--pv-text-small); font-weight: 600; color: var(--pv-text-primary); margin-bottom: var(--pv-space-2); }
.pv-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pv-cal-head, .pv-cal-day { display: flex; align-items: center; justify-content: center; height: 32px; border-radius: var(--pv-radius-sm);
    font: var(--pv-text-small); color: var(--pv-text-primary); background: none; border: 1px solid transparent; padding: 0; }
.pv-cal-head { font: var(--pv-text-micro); color: var(--pv-text-secondary); text-transform: uppercase; }
button.pv-cal-head, button.pv-cal-day { cursor: pointer; border-color: var(--pv-border-default); }
button.pv-cal-head:hover, button.pv-cal-day:hover { border-color: var(--pv-border-strong); }
.pv-cal-head.picked { background: var(--pv-ink); color: var(--pv-text-inverse); border-color: var(--pv-ink); }
.pv-cal-day.on { background: var(--pv-lime); color: var(--pv-ink); font-weight: 600; }
.pv-cal-day.picked { border-color: var(--pv-ink); }
.pv-cal-day.past { color: var(--pv-text-disabled); }
.pv-cal-day.today { box-shadow: inset 0 0 0 2px var(--pv-ink); }

/* Структура: адрес раздела — ссылка на страницу (в строке дерева и в шапке правой панели) */
.pv-tree-row a.pth { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; color: inherit; text-decoration: none; }
.pv-tree-row a.pth:hover { color: var(--pv-text-link-hover); text-decoration: underline; }
.pv-tree-row a.pth svg { flex: none; opacity: .55; }
.pv-tree-row a.pth .t, a.pv-struct-path .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.pv-struct-path { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: inherit; text-decoration: none; }
a.pv-struct-path:hover { color: var(--pv-text-link-hover); text-decoration: underline; }
a.pv-struct-path svg { flex: none; opacity: .6; }

/* Кнопки в ячейке таблицы — одной группой, не переносятся по одной */
.pv-btn-row { display: inline-flex; gap: 6px; flex-wrap: nowrap; margin-top: 2px; }

/* Загрузка экрана: три точки лаймом и сменяющиеся фразы (02.10) */
.pv-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 88px 16px;
    opacity: 0; animation: pv-loader-in .3s ease .35s forwards; }
.pv-loader.compact { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 14px 0 6px; }
.pv-loader-dots { display: flex; align-items: center; justify-content: center; gap: 5px; width: 52px; height: 30px; border-radius: 10px; background: var(--pv-lime); }
.pv-loader-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--pv-ink); animation: pv-loader-bounce 1.1s ease-in-out infinite; }
.pv-loader.compact .pv-loader-dots { width: 38px; height: 22px; border-radius: 7px; gap: 4px; }
.pv-loader.compact .pv-loader-dots i { width: 4px; height: 4px; }
.pv-loader-dots i:nth-child(2) { animation-delay: .15s; }
.pv-loader-dots i:nth-child(3) { animation-delay: .3s; }
.pv-loader-text { font: var(--pv-text-body); color: var(--pv-text-secondary); text-align: center; min-height: 22px; }
.pv-loader.compact .pv-loader-text { font: var(--pv-text-small); text-align: left; }
.pv-loader-phrase { display: inline-block; transition: opacity .22s ease, transform .22s ease; }
.pv-loader-phrase.out { opacity: 0; transform: translateY(-4px); }
.pv-loader-time { color: var(--pv-text-caption); font-variant-numeric: tabular-nums; }
@keyframes pv-loader-in { to { opacity: 1; } }
@keyframes pv-loader-bounce { 0%, 80%, 100% { transform: translateY(2px); opacity: .35; } 40% { transform: translateY(-3px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pv-loader-dots i { animation: none; opacity: .8; } .pv-loader-phrase { transition: none; } }

/* Метка «каркас с главной» у узла структуры — лайм заливкой */
.pv-chip.lime { background: var(--pv-lime); color: var(--pv-ink); }
