/* Рейтинг ЛДГ — визуальная система. Светлый холст, глубокий синий акцент, крупные цифры. */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope.946beb949095.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #f2f4f9;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --sunken: #eef1f7;
  --ink: #101c36;
  --ink-2: #334058;
  --ink-3: #5d6a82;
  --ink-4: #8a94a8;
  --line: #e3e7ef;
  --line-2: #eef1f6;
  --accent: #2a5bd7;
  --accent-2: #1f47b0;
  --accent-soft: #eaf0ff;
  --accent-ink: #1e3f9a;
  --navy: #0e1a3a;
  --navy-2: #1a2b5e;
  --good: #11865b;
  --good-soft: #e5f5ee;
  --mid: #b7791f;
  --mid-soft: #fbf2df;
  --bad: #c63d3d;
  --bad-soft: #fcebeb;
  --violet: #6a4fd8;
  --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5; --seq-5: #256abf; --seq-6: #184f95;
  --r-card: 18px;
  --r-ctl: 11px;
  --shadow: 0 1px 2px rgba(16, 28, 54, .04), 0 6px 24px rgba(16, 28, 54, .05);
  --shadow-lg: 0 18px 50px rgba(14, 26, 58, .18);
  --side: 252px;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 750; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 8px; }
.muted { color: var(--ink-3); }
.faint { color: var(--ink-4); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 750; }
.nowrap { white-space: nowrap; }
.icon { flex: none; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid rgba(42, 91, 215, .4); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- каркас ---------- */
.layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 14px 18px;
  background: var(--navy); color: #c8d1e8; display: flex; flex-direction: column;
  background-image: radial-gradient(120% 60% at 0% 0%, rgba(74, 110, 230, .35), transparent 60%);
}
.brand { display: flex; gap: 12px; align-items: center; padding: 2px 8px 22px; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, #5b84ff, #2a5bd7 55%, #6a4fd8); box-shadow: 0 6px 18px rgba(42, 91, 215, .45);
}
.brand-name { font-weight: 800; font-size: 18px; line-height: 1.1; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: #93a0c3; line-height: 1.25; }
.nav-group { font-size: 11px; font-weight: 700; letter-spacing: .09em; color: #7482a8; text-transform: uppercase; padding: 16px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; color: #c8d1e8;
  font-weight: 600; font-size: 14.5px; margin: 1px 0;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.on { background: rgba(255, 255, 255, .11); color: #fff; box-shadow: inset 3px 0 0 #7aa0ff; }
.nav .badge { margin-left: auto; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 750; border-radius: 99px; padding: 1px 8px; }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.me { display: flex; align-items: center; gap: 10px; color: #fff; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, #8aa6ff, #6a4fd8); color: #fff; font-weight: 750; font-size: 13px;
}
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.ghost { background: var(--sunken); color: var(--ink-4); border: 1px dashed var(--line); }
.me-role { font-size: 12px; color: #93a0c3; }
.logout { background: none; border: 0; color: #93a0c3; cursor: pointer; padding: 6px; border-radius: 8px; margin-left: auto; }
.logout:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.main { min-width: 0; padding: 26px 34px 60px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--accent); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mobile-bar { display: none; }

/* ---------- карточки и сетки ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .hint { font-size: 12.5px; color: var(--ink-3); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-wide { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 340px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.mt { margin-top: 18px; }
.mt-s { margin-top: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 28px 30px; color: #fff;
  background: linear-gradient(125deg, #0e1a3a 0%, #1a2f6e 55%, #3b3a9e 100%); box-shadow: var(--shadow-lg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.hero::after {
  content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(122, 160, 255, .45), transparent 65%); pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.hero h1 { color: #fff; font-size: 26px; }
.hero .sub { color: #b6c2e6; font-size: 14px; margin-top: 4px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); gap: 34px; margin-top: 26px; align-items: end; }
.hs-label { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #9fb0dd; margin-bottom: 6px; }
.hs-value { font-size: 54px; font-weight: 800; line-height: .95; letter-spacing: -.035em; }
.hs-value small { font-size: 22px; font-weight: 700; color: #b6c2e6; letter-spacing: 0; }
.hs-delta { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.hs-delta.up { background: rgba(44, 199, 129, .18); color: #7ff0bd; }
.hs-delta.down { background: rgba(255, 107, 107, .18); color: #ffb4b4; }
.hs-delta.flat { background: rgba(255, 255, 255, .1); color: #d6def5; }
.zone-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; font-weight: 750; font-size: 13.5px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.zone-dot { width: 9px; height: 9px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 4px rgba(61, 220, 151, .2); }
.zone-dot.yellow { background: #ffcc4d; box-shadow: 0 0 0 4px rgba(255, 204, 77, .2); }
.zone-dot.red { background: #ff6b6b; box-shadow: 0 0 0 4px rgba(255, 107, 107, .2); }
.hero-goal {
  margin-top: 24px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-radius: 16px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(4px);
}
.hero-goal b { color: #fff; }
.hero-goal .muted { color: #b6c2e6; }
.hero-goal a { color: #c9d6ff; font-weight: 700; margin-left: auto; }
.hero-goal a:hover { color: #fff; }
.thresholds { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.th { font-size: 12.5px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: #d6def5; }
.th.ok::before { content: "✓ "; color: #7ff0bd; font-weight: 800; }
.th.no::before { content: "✕ "; color: #ffb4b4; font-weight: 800; }

/* ---------- KPI ---------- */
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.kpi-value { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.kpi-value small { font-size: 16px; color: var(--ink-3); font-weight: 650; letter-spacing: 0; }
.kpi-foot { font-size: 13px; color: var(--ink-3); }
.kpi.bad .kpi-value { color: var(--bad); }
.kpi.good .kpi-value { color: var(--good); }
.kpi-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.kpi.bad .kpi-ico { background: var(--bad-soft); color: var(--bad); }
.kpi.good .kpi-ico { background: var(--good-soft); color: var(--good); }
.progress { height: 8px; border-radius: 99px; background: var(--sunken); overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--violet)); }
.progress.good > span { background: var(--good); }

/* ---------- кнопки и формы ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 650; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); color: var(--ink); border-color: #d2d8e4; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(42, 91, 215, .28); }
.btn.primary:hover { background: var(--accent-2); }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.sm { min-height: 32px; padding: 4px 11px; font-size: 13px; border-radius: 9px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--sunken); }
.seg { display: inline-flex; background: var(--sunken); border-radius: 11px; padding: 3px; gap: 2px; }
.seg a { padding: 6px 12px; border-radius: 9px; color: var(--ink-3); font-weight: 650; font-size: 13.5px; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 28, 54, .1); }

label { font-size: 13px; font-weight: 650; color: var(--ink-2); display: block; margin-bottom: 5px; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=date], input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--ink); background: var(--surface); border: 1px solid #d5dbe6;
  border-radius: var(--r-ctl); padding: 9px 12px; min-height: 40px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(42, 91, 215, .15); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); vertical-align: middle; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=file] { font: inherit; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field .help { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.field .err { font-size: 12.5px; color: var(--bad); margin-top: 4px; }
.field.check label { display: flex; align-items: center; gap: 8px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters select, .filters input { width: auto; min-width: 150px; min-height: 38px; padding: 7px 10px; font-size: 14px; }
.filters input[type=search] { min-width: 220px; }

/* ---------- чипы ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; background: var(--sunken); color: var(--ink-2); }
.chip.ok, .st-done, .t-ok { background: var(--good-soft); color: var(--good); }
.chip.mid, .t-mid { background: var(--mid-soft); color: var(--mid); }
.chip.no, .st-overdue, .t-no { background: var(--bad-soft); color: var(--bad); }
.st-in_progress { background: var(--accent-soft); color: var(--accent-ink); }
.st-planned { background: var(--sunken); color: var(--ink-2); }
.st-cancelled { background: var(--sunken); color: var(--ink-4); text-decoration: line-through; }
.code { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 7px; border-radius: 7px; font-weight: 800; font-size: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.code.process { background: #f0ecff; color: #4b34b8; }
.chip.plan-planned { background: var(--accent-soft); color: var(--accent-ink); }
.chip.plan-finished { background: var(--good-soft); color: var(--good); }
.chip.plan-consider { background: var(--mid-soft); color: var(--mid); }
.chip.listed { background: #f0ecff; color: #4b34b8; }
.prio-high { color: var(--bad); font-weight: 800; }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t th a { color: var(--ink-3); }
.t th a.on { color: var(--accent); }
.t td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t tr.ours td:not(.h) { background: #f3f6ff; }
.t tr.ours td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.t tbody tr:hover td:not(.h) { background: var(--surface-2); }
.t .num { text-align: right; white-space: nowrap; }
.t .c { text-align: center; }
.t td.title { min-width: 260px; }
.t td.title a { color: var(--ink); font-weight: 650; }
.t td.wrap-cell { min-width: 140px; max-width: 220px; }
.t td.title a:hover { color: var(--accent); }
.val-ok { color: var(--good); font-weight: 750; }
.val-mid { color: var(--mid); font-weight: 750; }
.val-no { color: var(--bad); font-weight: 750; }

/* теплокарта округа */
.heat td.h { text-align: center; font-weight: 700; font-size: 12.5px; padding: 8px 4px; min-width: 46px; border-radius: 0; }
.heat .h-0 { background: #f4f7fd; color: var(--ink-3); }
.heat .h-1 { background: var(--seq-1); color: var(--ink); }
.heat .h-2 { background: var(--seq-2); color: var(--ink); }
.heat .h-3 { background: var(--seq-3); color: #fff; }
.heat .h-4 { background: var(--seq-4); color: #fff; }
.heat .h-5 { background: var(--seq-6); color: #fff; }
.heat .h-na { background: #fafafa; color: var(--ink-4); }
.heat tr.ours td.name { font-weight: 800; color: var(--accent-ink); }
.heat tr.ours td.h { box-shadow: inset 0 2px 0 var(--navy), inset 0 -2px 0 var(--navy); }
.heat-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.heat-legend span { width: 26px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- списки ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.li:last-child { border-bottom: 0; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-weight: 650; color: var(--ink); display: block; }
a.li-title:hover { color: var(--accent); }
.li-meta { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.date-badge { flex: none; width: 46px; text-align: center; border-radius: 11px; background: var(--sunken); padding: 5px 0; line-height: 1.05; }
.date-badge b { display: block; font-size: 18px; font-weight: 800; }
.date-badge span { font-size: 10.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; }
.date-badge.late { background: var(--bad-soft); color: var(--bad); }
.date-badge.late span { color: var(--bad); }
.empty { text-align: center; padding: 26px 10px; color: var(--ink-3); font-size: 14px; }
.empty .icon { color: var(--ink-4); margin-bottom: 6px; }

/* ---------- блоки (карточки) ---------- */
.blocks-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.bcard { display: flex; flex-direction: column; gap: 12px; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.bcard:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(16, 28, 54, .1); color: var(--ink); }
.bcard-top { display: flex; align-items: center; gap: 10px; }
.bcard-name { font-weight: 750; font-size: 15px; line-height: 1.25; }
.bcard-mid { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.bcard-pct { font-size: 40px; font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.bcard-pct small { font-size: 16px; color: var(--ink-3); font-weight: 650; letter-spacing: 0; }
.minibar { position: relative; height: 10px; border-radius: 99px; background: var(--sunken); }
.minibar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--accent); }
.minibar > b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 2px; }
.minibar > em { position: absolute; top: -5px; width: 9px; height: 9px; margin-left: -4px; transform: rotate(45deg) translateY(4px); background: var(--violet); border: 2px solid #fff; }
.bcard-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--ink-3); gap: 8px; flex-wrap: wrap; }
.lost { color: var(--bad); font-weight: 750; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); align-items: center; }
.legend i { display: inline-block; vertical-align: middle; margin-right: 6px; }
.lg-bar { width: 18px; height: 10px; border-radius: 3px; background: var(--accent); }
.lg-lost { width: 18px; height: 10px; border-radius: 3px; background: repeating-linear-gradient(135deg, #f6caca 0 3px, #fdeeee 3px 6px); }
.lg-reg { width: 2px; height: 14px; background: var(--ink); }
.lg-dist { width: 9px; height: 9px; transform: rotate(45deg); background: var(--violet); }

/* ---------- SVG-графики ---------- */
svg.chart { width: 100%; height: auto; display: block; overflow: visible; font-family: inherit; }
.cv-grid { stroke: var(--line); stroke-width: 1; }
.cv-axis { fill: var(--ink-3); font-size: 12px; font-weight: 600; }
.cv-sub { fill: var(--ink-4); font-size: 11px; font-weight: 600; }
.cv-label { fill: var(--ink-2); font-size: 13px; font-weight: 600; }
.cv-code { fill: var(--accent-ink); font-weight: 800; }
.cv-strong { fill: var(--accent-ink); font-weight: 800; }
.cv-right { fill: var(--ink); font-size: 13px; font-weight: 750; }
.cv-val { fill: var(--ink-2); font-size: 12.5px; font-weight: 750; }
.cv-val-strong { fill: var(--accent-ink); font-size: 14px; font-weight: 800; }
.cv-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.cv-area { fill: url(#g-area); opacity: .9; }
.cv-dot { fill: #fff; stroke: var(--accent); stroke-width: 2.5; }
.cv-dot-last { fill: var(--accent); stroke: #fff; stroke-width: 3; }
.cv-track { fill: var(--sunken); }
.cv-got { fill: var(--accent); }
.cv-lost { fill: url(#p-lost); }
.cv-inbar { fill: #fff; font-size: 11.5px; font-weight: 750; }
.cv-neg-strong { fill: var(--bad); }
.cv-neg { fill: #d0703a; }
.cv-ok { fill: var(--good); }
.cv-bar-good { fill: var(--good); }
.cv-bar-mid { fill: #d39b2a; }
.cv-bar-bad { fill: var(--bad); }
.cv-region { stroke: var(--ink); stroke-width: 2; }
.cv-district { fill: var(--violet); stroke: #fff; stroke-width: 1.5; }
.cv-rank { fill: #b9c6e3; }
.cv-rank-ours { fill: var(--accent); }
.cv-spark { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.cv-spark-dot { fill: var(--accent); }
.cv-donut-track { fill: none; stroke: var(--sunken); }
.cv-d-done, .cv-d-progress, .cv-d-planned, .cv-d-overdue { fill: none; }
.cv-d-done { stroke: var(--good); }
.cv-d-progress { stroke: var(--accent); }
.cv-d-planned { stroke: #c3cbe0; }
.cv-d-overdue { stroke: var(--bad); }
svg.chart rect:hover, svg.chart path.cv-district:hover { filter: brightness(1.08); }
.chart-history { max-height: 240px; }
svg.chart.chart-donut { width: 132px; flex: none; }
svg.chart.chart-spark { width: 120px; flex: none; }
.donut-wrap { display: flex; gap: 22px; align-items: center; }
.donut-center { position: relative; }
.donut-center .dc { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.05; }
.donut-center .dc b { font-size: 26px; font-weight: 800; display: block; }
.donut-center .dc span { font-size: 11px; color: var(--ink-3); font-weight: 700; }
.dleg { display: grid; gap: 7px; font-size: 13.5px; }
.dleg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 8px; }

/* ---------- прогноз ---------- */
.scen-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.scen { border-radius: 18px; padding: 18px; border: 1px solid var(--line); background: var(--surface); position: relative; }
.scen.main { background: linear-gradient(150deg, #13235a, #2a3f9b); color: #fff; border-color: transparent; box-shadow: var(--shadow-lg); }
.scen.main .muted, .scen.main .kpi-label { color: #b6c2e6; }
.scen-place { font-size: 46px; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 10px 0 6px; }
.scen-meta { font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; }
.scen-bar { height: 6px; border-radius: 99px; background: rgba(127, 140, 170, .2); margin-top: 12px; overflow: hidden; }
.scen-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.scen.main .scen-bar span { background: #8fb0ff; }
.price { font-weight: 800; color: var(--accent-ink); white-space: nowrap; }
.prob { display: inline-block; width: 64px; height: 6px; border-radius: 99px; background: var(--sunken); vertical-align: middle; overflow: hidden; margin-right: 6px; }
.prob span { display: block; height: 100%; background: var(--violet); border-radius: 99px; }
.ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rung { border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); padding: 12px 14px; }
.rung b { font-size: 22px; font-weight: 800; }
.callout { border-radius: 14px; padding: 13px 16px; background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; }
.callout.warn { background: var(--mid-soft); color: #7a4e0d; }
.callout.bad { background: var(--bad-soft); color: #8f2626; }

/* ---------- симулятор ---------- */
.sim-row { display: grid; grid-template-columns: 210px minmax(0, 1fr) 70px 78px; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.sim-row:last-child { border-bottom: 0; }
.sim-name { font-weight: 650; font-size: 14px; line-height: 1.25; }
.sim-name .faint { font-size: 12px; display: block; font-weight: 600; }
.sim-val { text-align: right; font-weight: 800; font-size: 16px; }
.sim-pts { text-align: right; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.sim-pts.up { color: var(--good); }
.sim-marks { position: relative; height: 0; }
.sim-sticky { position: sticky; top: 18px; }
.sim-big { font-size: 64px; font-weight: 800; letter-spacing: -.045em; line-height: .95; }

/* ---------- детали ---------- */
.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; font-size: 14px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; font-weight: 600; }
.prose { white-space: pre-wrap; font-size: 14.5px; }
.comment { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); margin-bottom: 10px; }
.files a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line); color: var(--ink); margin-bottom: 8px; }
.files a:hover { border-color: var(--accent); color: var(--accent); }
.crit { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.crit:last-child { border-bottom: 0; }
.crit-top { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; }
.crit-scale { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.messages { position: fixed; right: 22px; top: 18px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.msg { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600; animation: msg-in .25s ease, msg-out .4s ease 5s forwards; }
.msg.error { background: var(--bad); }
@keyframes msg-in { from { transform: translateY(-8px); opacity: 0; } }
@keyframes msg-out { to { opacity: 0; transform: translateY(-8px); visibility: hidden; } }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { background: var(--sunken); border-radius: 18px; padding: 12px; }
.col-head { display: flex; justify-content: space-between; font-weight: 750; padding: 4px 6px 10px; }
.tcard { display: block; background: var(--surface); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--line); color: var(--ink); }
.tcard:hover { border-color: #c4cee3; color: var(--ink); }
.tcard.late { border-left: 3px solid var(--bad); }
.month-head { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; }
.month-head h2 { font-size: 17px; }
.month-head .now { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 99px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }

/* ---------- вход ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); }
.login-art {
  position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, #0b1533 0%, #182c6b 50%, #3b3a9e 100%);
}
.login-art svg.art { position: absolute; right: -40px; bottom: -10px; width: 92%; opacity: .95; }
.login-art h1 { color: #fff; font-size: 44px; max-width: 520px; line-height: 1.08; letter-spacing: -.03em; }
.login-art p { color: #b6c2e6; max-width: 460px; font-size: 16px; margin-top: 14px; }
.login-form { display: grid; place-items: center; padding: 40px; background: var(--surface); }
.login-box { width: 100%; max-width: 360px; }
.login-box h2 { font-size: 26px; margin-bottom: 6px; }
.login-box .field { margin-top: 16px; }
.login-box .btn { width: 100%; margin-top: 22px; min-height: 46px; font-size: 15px; }

/* ---------- адаптивность ---------- */
@media (max-width: 1280px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, auto)); gap: 22px 40px; }
  .scen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .g-wide, .g-side, .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .sim-sticky { position: static; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s ease; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; }
  .mobile-bar button { background: none; border: 0; color: #fff; padding: 6px; }
  .main { padding: 18px 16px 50px; }
  .hs-value { font-size: 42px; }
  .board { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 260px; padding: 28px; }
  .login-art h1 { font-size: 30px; }
  .sim-row { grid-template-columns: 1fr 60px 66px; }
  .sim-row .sim-name { grid-column: 1 / -1; }
  .ladder, .scen-grid, .g4 { grid-template-columns: 1fr 1fr; }
  .dl { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
}
@media print {
  .side, .mobile-bar, .actions, .filters, .btn { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; }
  .card, .hero { box-shadow: none; break-inside: avoid; }
}
