:root {
  color-scheme: light;
  --bg: #f4f5f2;
  --surface: #ffffff;
  --surface-2: #f8f9f6;
  --surface-3: #eef0eb;
  --line: #e3e5de;
  --line-strong: #cfd2c8;
  --ink: #111511;
  --ink-2: #4b524b;
  --muted: #858b84;
  --accent: #128a3e;
  --accent-ink: #ffffff;
  --accent-soft: #e3f3e8;
  --accent-text: #0b6e30;
  --side: #0f1f16;
  --side-ink: #c9d6cd;
  --side-active: #1d3a28;
  --good: #0ca30c; --good-text: #006300; --good-soft: #e3f4e3;
  --warn: #fab219; --warn-text: #8a5a00; --warn-soft: #fff3d6;
  --crit: #d03b3b; --crit-text: #b02626; --crit-soft: #fbe5e5;
  --none: #a7aaa3; --none-soft: #eeefeb;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --grid: #e1e0d9; --axis: #c3c2b7;
  --shadow: 0 1px 2px rgba(16, 24, 16, .05), 0 4px 16px rgba(16, 24, 16, .05);
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0f0d; --surface: #171a17; --surface-2: #1c201c; --surface-3: #242924;
    --line: #2a2f2a; --line-strong: #3a403a; --ink: #eef0ec; --ink-2: #b9c0b8; --muted: #858b84;
    --accent: #1fa653; --accent-soft: #163222; --accent-text: #5fd28a;
    --side: #0a120d; --side-ink: #a9b9ad; --side-active: #173322;
    --good-text: #3ccf3c; --good-soft: #15301a; --warn-text: #f4c057; --warn-soft: #33290f;
    --crit-text: #f07a7a; --crit-soft: #3a1b1b; --none-soft: #252825;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --grid: #2c2c2a; --axis: #383835;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0f0d; --surface: #171a17; --surface-2: #1c201c; --surface-3: #242924;
  --line: #2a2f2a; --line-strong: #3a403a; --ink: #eef0ec; --ink-2: #b9c0b8; --muted: #858b84;
  --accent: #1fa653; --accent-soft: #163222; --accent-text: #5fd28a;
  --side: #0a120d; --side-ink: #a9b9ad; --side-active: #173322;
  --good-text: #3ccf3c; --good-soft: #15301a; --warn-text: #f4c057; --warn-soft: #33290f;
  --crit-text: #f07a7a; --crit-soft: #3a1b1b; --none-soft: #252825;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --grid: #2c2c2a; --axis: #383835;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
/* единый вид полей и списков; более точные правила ниже (формы, фильтры, поиск) их уточняют */
input[type=search], input[type=text], input[type=number], input[type=date], input[type=month], input[type=email], input[type=tel], input[type=password], select, textarea {
  font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; }
input[type=search], input[type=text], input[type=number], input[type=date], input[type=month], input[type=email], input[type=tel], input[type=password], select { height: 36px; padding: 0 10px; }
textarea { padding: 8px 10px; }
select { padding-right: 28px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.num, td.num, .tnum { font-variant-numeric: tabular-nums; }

.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

/* ---- sidebar ---- */
.sidebar { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 22px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(140deg, #21a038, #0e6b35); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: .5px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { color: #fff; font-size: 14px; }
.brand-text span { font-size: 11.5px; opacity: .7; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button { display: flex; gap: 12px; align-items: center; background: none; border: 0; color: var(--side-ink); padding: 10px 12px; border-radius: 10px; text-align: left; font-size: 14px; }
.nav button:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav button.active { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 #2bc25a; }
.sidebar-foot { margin-top: auto; font-size: 11.5px; opacity: .6; padding: 8px 12px; }

/* ---- topbar ---- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 18px 28px 10px; }
.topbar-title { flex: 1; min-width: 0; }
.topbar h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.snapshot-line { color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.snap-select { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 4px 0 12px; height: 38px; font-size: 13px; color: var(--muted); }
.snap-select select { border: 0; background: transparent; height: 36px; font-weight: 600; color: var(--ink); padding-right: 6px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 550; white-space: nowrap; }
.btn:hover { border-color: var(--line-strong); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { color: var(--crit-text); }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.icon-btn:hover { border-color: var(--line-strong); }
.menu-btn { display: none; }

/* ---- filters ---- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 28px 14px; align-items: center; position: sticky; top: 0; z-index: 5; background: var(--bg); }
.filters.hidden { display: none; }
.filters select, .search { height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 10px; min-width: 0; }
.filters select { flex: 0 1 190px; max-width: 220px; }
.search { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 180px; color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--ink); }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 600; }

/* ---- content ---- */
.content { padding: 4px 28px 40px; display: flex; flex-direction: column; gap: 16px; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.cols-2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.cols-2e { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; flex-wrap: wrap; }
.card-head h3 { font-size: 15px; font-weight: 620; flex: 1; }
.card-head .sub { color: var(--muted); font-size: 12.5px; width: 100%; margin-top: -4px; }
.card-body { padding: 10px 18px 18px; }
.chart-box { position: relative; height: 260px; }

.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi .label { color: var(--ink-2); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.kpi .value { white-space: nowrap; font-size: 25px; font-weight: 680; letter-spacing: -.02em; line-height: 1.15; }
.kpi .foot { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.delta { font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--good-text); } .delta.down { color: var(--crit-text); } .delta.flat { color: var(--muted); }
.kpi .bar { margin-top: 8px; }

/* статус */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 560; padding: 2px 9px 2px 7px; border-radius: 999px; white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status.active { background: var(--good-soft); color: var(--good-text); } .status.active i { background: var(--good); }
.status.stale { background: var(--warn-soft); color: var(--warn-text); } .status.stale i { background: var(--warn); }
.status.inactive { background: var(--crit-soft); color: var(--crit-text); } .status.inactive i { background: var(--crit); }
.status.unknown { background: var(--none-soft); color: var(--ink-2); } .status.unknown i { background: var(--none); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* полоса состава статусов */
.sbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--surface-3); min-width: 80px; }
.sbar span { display: block; height: 100%; }
.sbar .a { background: var(--good); } .sbar .s { background: var(--warn); } .sbar .i { background: var(--crit); } .sbar .u { background: var(--none); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }

.kind { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.kind .dot.evotor { background: var(--s1); } .kind .dot.atol { background: var(--s2); } .kind .dot.bank { background: var(--s3); }

/* ---- tables ---- */
.table-wrap { overflow: auto; max-height: 70vh; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.t th { position: sticky; top: 0; background: var(--surface); text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
.t th.sortable { cursor: pointer; user-select: none; }
.t th.sortable:hover { color: var(--ink); }
.t th .arr { opacity: .7; }
.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t td.num, .t th.num { text-align: right; white-space: nowrap; }
.t td.main-cell { min-width: 200px; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover td { background: var(--surface-2); }
.t .main-cell b { font-weight: 600; }
.t .main-cell small { display: block; color: var(--muted); font-size: 12px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }

/* дерево */
.tree td:first-child { white-space: nowrap; }
.tree .lvl { display: inline-flex; align-items: center; gap: 8px; }
.tree .chev { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 6px; color: var(--muted); transition: transform .15s; }
.tree tr.open .chev { transform: rotate(90deg); }
.tree tr.l1 td { background: var(--surface-2); font-weight: 620; }
.tree tr.l2 td:first-child { padding-left: 34px; }
.tree tr.l3 td:first-child { padding-left: 58px; }
.tree tr.l4 td:first-child { padding-left: 86px; white-space: normal; }
.tree tr.grp { cursor: pointer; }
.tree tr.grp:hover td { background: var(--surface-3); }
.count-pill { background: var(--surface-3); color: var(--ink-2); border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 550; }

/* chips */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); }
.chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.chip .n { color: var(--muted); font-variant-numeric: tabular-nums; }

/* list «внимание» */
.alist { display: flex; flex-direction: column; }
.aitem { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.aitem:last-child { border-bottom: 0; }
.aitem:hover .t1 { color: var(--accent-text); }
.aitem .t1 { font-weight: 560; }
.aitem .t2 { font-size: 12px; color: var(--muted); }

/* hbars */
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar .track { height: 10px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; }
.hbar .v { font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 40px; text-align: right; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* uploads */
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 28px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; background: var(--surface); transition: .15s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.dropzone .dz-icon svg { width: 26px; height: 26px; }
.dropzone .dz-text { flex: 1; min-width: 220px; }
.dropzone .dz-text b { font-size: 15px; }
.dropzone .dz-text p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.dz-controls { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.field input { height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--surface); }
.warn-list { margin-top: 6px; font-size: 12px; color: var(--warn-text); list-style: none; }

/* drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(5, 12, 8, .38); opacity: 0; pointer-events: none; transition: .2s; z-index: 40; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--bg); z-index: 41; transform: translateX(100%); transition: transform .22s ease; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0,0,0,.15); }
.drawer.open { transform: none; }
.drawer-head { display: flex; gap: 12px; align-items: flex-start; padding: 20px 22px 12px; }
.drawer-head > div { flex: 1; min-width: 0; }
.drawer-head h2 { font-size: 18px; font-weight: 650; }
.drawer-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.drawer-body { overflow: auto; padding: 4px 22px 28px; display: flex; flex-direction: column; gap: 14px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; padding: 14px 18px; }
.kv div { display: flex; flex-direction: column; min-width: 0; }
.kv .k { font-size: 12px; color: var(--muted); }
.kv .v { font-weight: 550; overflow-wrap: anywhere; }
.kv .wide { grid-column: 1 / -1; }
.timeline { display: flex; gap: 3px; align-items: center; }
.timeline span { width: 14px; height: 14px; border-radius: 4px; }
.timeline .a { background: var(--good); } .timeline .s { background: var(--warn); } .timeline .i { background: var(--crit); } .timeline .u { background: var(--none); } .timeline .x { background: transparent; border: 1px dashed var(--line-strong); }

.empty-state { text-align: center; color: var(--muted); padding: 60px 20px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-state b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.empty-state .btn { margin-top: 14px; }

.tooltip { position: fixed; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12px; padding: 6px 9px; border-radius: 8px; z-index: 60; opacity: 0; transition: opacity .1s; max-width: 280px; }
.tooltip.show { opacity: 1; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; opacity: 0; transition: .2s; z-index: 70; font-size: 13.5px; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--crit); color: #fff; }

@media (max-width: 1100px) { .cols-2, .cols-2e { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .menu-btn { display: grid; }
  .topbar { padding: 14px 16px 8px; flex-wrap: wrap; }
  .topbar-actions { width: 100%; }
  .snap-select { flex: 1; } .snap-select select { flex: 1; }
  .btn.primary span { display: none; }
  .filters { padding: 6px 16px 12px; }
  .filters select { max-width: none; flex: 1 1 140px; }
  .content { padding: 4px 16px 32px; }
  .kv { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 100px 1fr auto; }
}

/* ---- бейджи типов ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.badge.registry { background: var(--accent-soft); color: var(--accent-text); }
.kind .dot.evotor, .dot.evotor { background: var(--s1); } .kind .dot.atol, .dot.atol { background: var(--s2); } .kind .dot.bank, .dot.bank { background: var(--s3); }

/* ---- связка оборудования ---- */
.eqmap { display: flex; flex-direction: column; gap: 10px; }
.eq-pos { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.eq-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 14px; cursor: pointer; }
.eq-row:hover { background: var(--surface-2); }
.eq-row .t { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.eq-row .m { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.eq-bank { position: relative; margin-left: 26px; border-top: 1px dashed var(--line); }
.eq-bank::before { content: ''; position: absolute; left: -14px; top: 0; bottom: 50%; border-left: 2px solid var(--line-strong); border-bottom: 2px solid var(--line-strong); width: 10px; border-bottom-left-radius: 6px; }
.eq-none { margin-left: 26px; padding: 8px 14px; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); }
.eq-hl { box-shadow: inset 3px 0 0 var(--accent); background: var(--accent-soft); }
.eq-hl:hover { background: var(--accent-soft); }
.eq-group-title { font-size: 12px; color: var(--muted); margin: 4px 2px -2px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
.crumbs a { color: var(--accent-text); cursor: pointer; text-decoration: none; font-weight: 550; }
.crumbs a:hover { text-decoration: underline; }
.crumbs b { color: var(--ink); font-weight: 600; }

/* ---- цели ---- */
.goal-card .card-head h3 { font-size: 16px; }
.goal-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
.bignum { font-size: 40px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.bignum small { font-size: 16px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.goal-meta { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-2); }
.pbar { position: relative; height: 10px; border-radius: 4px; background: var(--surface-3); overflow: visible; min-width: 90px; }
.pbar .f { height: 100%; border-radius: 4px; background: var(--s1); }
.pbar .f.atol { background: var(--s2); } .pbar .f.evotor { background: var(--s1); } .pbar .f.bank { background: var(--s3); } .pbar .f.total { background: var(--ink-2); }
.pbar .tg { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 1px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin-top: 2px; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); }
.tag b { color: var(--ink); font-weight: 600; }
.verdict { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.verdict.ok { background: var(--good-soft); color: var(--good-text); } .verdict.no { background: var(--warn-soft); color: var(--warn-text); } .verdict.na { background: var(--none-soft); color: var(--ink-2); }

/* ---- формы ---- */
.form { display: flex; flex-direction: column; gap: 14px; }
.fgroup { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.fgroup h4 { font-size: 13px; font-weight: 650; }
.frow { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; font-size: 13.5px; }
.frow label.lbl { color: var(--ink-2); }
.form input[type=text], .form input[type=number], .form input[type=date], .form input[type=month], .form select, .confirm select, .confirm input {
  height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: var(--surface); min-width: 0; }
.form input[type=text].wide { flex: 1; min-width: 200px; }
.form input[type=number] { width: 110px; } .form input.ver { width: 100px; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 550; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.fgroup.off .frow:not(:first-of-type) { opacity: .45; }
.preview { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.form-actions { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; position: sticky; bottom: -28px; background: var(--bg); padding: 12px 0; }

/* ---- подтверждение загрузки ---- */
.confirm { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; margin-top: 14px; }
.confirm .field select, .confirm .field input { width: 100%; }
.note { font-size: 12.5px; color: var(--muted); }
.note.warn { color: var(--warn-text); }
.matrix { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.matrix td { padding: 0; } .matrix td.l { padding-right: 8px; white-space: nowrap; color: var(--ink-2); }
.matrix span { display: block; width: 16px; height: 16px; border-radius: 4px; }
@media (max-width: 1200px) { .goal-grid { grid-template-columns: 1fr 1fr; } .goal-grid > :last-child { grid-column: 1 / -1; } }
@media (max-width: 820px) { .goal-grid { grid-template-columns: 1fr; } .bignum { font-size: 34px; } }

/* ---- цели: таблица по датам ---- */
.goal-top { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; align-items: center; margin-bottom: 14px; }
.goal-meta .grow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gtable-wrap { max-height: none; border: 1px solid var(--line); border-radius: 12px; }
.gtable { font-size: 12.5px; }
.gtable th, .gtable td { padding: 7px 10px; }
.gtable th:first-child, .gtable td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 2; min-width: 120px; box-shadow: 1px 0 0 var(--line); }
.gtable th:nth-child(2), .gtable td:nth-child(2) { box-shadow: 1px 0 0 var(--line); }
.gtable th .sub2 { font-weight: 400; font-size: 11px; color: var(--muted); white-space: nowrap; }
.gtable tr.sec td { background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; padding: 6px 10px; }
.gtable tr.sec td:first-child { background: var(--surface-2); }
.gtable tr.tot td { font-weight: 650; background: var(--surface-2); }
.gtable tr.tot td:first-child { background: var(--surface-2); }
.gtable td.gcell { line-height: 1.25; min-width: 64px; }
.gtable .cur { background: var(--accent-soft); }
.gtable tr.tot td.cur { background: var(--accent-soft); }
.gd { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gd.up { color: var(--good-text); } .gd.down { color: var(--crit-text); } .gd.flat { color: var(--muted); font-weight: 500; }
.gd.inline { display: inline; font-size: 13px; }
.gd.big { font-size: 13px; }
.gp-from { height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: var(--surface); }
.confirm-t select, .confirm-t input { height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: var(--surface); max-width: 260px; }
.confirm-t td { vertical-align: top; }
.warn-details summary { cursor: pointer; font-size: 12px; color: var(--warn-text); margin-top: 4px; }
.sidebar-foot a { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.3); line-height: 1.6; }
.sidebar-foot a:hover { color: #fff; }
@media (max-width: 900px) { .goal-top { grid-template-columns: 1fr; } }

/* ---- вход ---- */
body.locked .app, body.locked .drawer, body.locked .drawer-backdrop { display: none; }
#login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 20% -10%, var(--accent-soft), transparent), var(--bg); }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.login-card h2 { font-size: 20px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card .field input { height: 42px; width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--surface); font-size: 15px; }
.login-brand { display: flex; gap: 12px; align-items: center; }
.login-brand img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; }
.login-brand b { display: block; } .login-brand span { font-size: 12.5px; color: var(--muted); }
.login-err { color: var(--crit-text); font-size: 13px; min-height: 18px; }
.code { background: var(--surface-3); border-radius: 10px; padding: 10px 14px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.brand-mark.has-logo { background: #fff; padding: 3px; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; }
.user-btn span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
/* ---- настройки ---- */
.settabs { flex-wrap: wrap; align-self: flex-start; }
.logo-prev { width: 96px; height: 96px; border: 1px dashed var(--line-strong); border-radius: 14px; display: grid; place-items: center; overflow: hidden; background: var(--surface-2); flex: none; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
tr.row-hidden td { opacity: .55; }
@media (max-width: 820px) { .user-btn span { display: none; } }

/* ---- фильтры по значениям в заголовках ---- */
.dir-t th.fth { white-space: nowrap; }
.dir-t th .fl { cursor: pointer; user-select: none; }
.dir-t th .fl:hover { color: var(--ink); }
.fbtn { border: 0; background: transparent; width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; vertical-align: middle; margin-left: 2px; color: var(--muted); opacity: .55; }
.fbtn svg { width: 13px; height: 13px; }
.fbtn:hover { background: var(--surface-3); opacity: 1; }
.fbtn.on { opacity: 1; color: var(--accent-ink); background: var(--accent); }
.cf-active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; font-size: 13px; color: var(--ink-2); }
.cf-active .chip { cursor: pointer; }
.cf-active .x { border: 0; background: transparent; color: inherit; margin-left: 2px; padding: 0 2px; font-size: 12px; opacity: .7; }
.cf-active .x:hover { opacity: 1; }
#colf { position: fixed; z-index: 80; width: 300px; max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
#colf .cf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
#colf .cf-q { height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: var(--surface); }
#colf .cf-all { font-size: 13px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
#colf .cf-list { max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
#colf .cf-list .check { font-weight: 400; font-size: 13px; padding: 3px 2px; border-radius: 6px; }
#colf .cf-list .check:hover { background: var(--surface-2); }
#colf .cf-list .check span:first-of-type { flex: 1; overflow-wrap: anywhere; }
#colf .cf-list .n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
#colf .cf-btns { display: flex; justify-content: space-between; gap: 8px; }

/* ---- обзвон школ ---- */
.crit-text { color: var(--crit-text); } .warn-text { color: var(--warn-text); }
.cl-tabs { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.cl-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cl-bar .snap-select select, .cl-bar input[type=date] { height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: var(--surface); }
.cl-progress { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.pbar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pbar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.cl-list { display: flex; flex-direction: column; gap: 8px; }
.cl-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 150px 120px 210px; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; cursor: pointer; }
.cl-row.has-check { grid-template-columns: auto 54px minmax(0, 1fr) 150px 120px 210px; }
.cl-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.cl-row .t1 { font-weight: 620; } .cl-row .t2 { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.cl-row .tags { margin-top: 6px; } .cl-row .tag { font-size: 11.5px; padding: 2px 8px; }
.cl-eq, .cl-buf, .cl-last { font-size: 12.5px; line-height: 1.7; } .cl-buf { font-variant-numeric: tabular-nums; }
.cl-last .muted { font-size: 12px; line-height: 1.4; margin-top: 3px; }
.cl-check input { width: 17px; height: 17px; accent-color: var(--accent); }
.cl-score { position: relative; text-align: center; font-size: 17px; padding-bottom: 8px; }
.cl-score i { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.cl-score i span { display: block; height: 100%; background: var(--accent); }
.ltime { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 6px; font-variant-numeric: tabular-nums; margin-right: 4px; }
.ltime.ok { background: var(--good-soft); color: var(--good-text); } .ltime.off { background: var(--surface-3); color: var(--muted); }
.ltime small { font-weight: 500; opacity: .8; }
.cl-bulk { position: sticky; top: 0; z-index: 5; display: none; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; }
.cl-bulk.on { display: flex; }
.cl-bulk select, .cl-bulk input { height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: var(--surface); }
th.today { color: var(--accent-text); }
.wrap-pills .status { white-space: normal; } .wrap-pills td { vertical-align: middle; }
tr.grp td { background: var(--surface-2); }
.guide-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.guide-row:first-child { border-top: 0; }
.scn-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.scn ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.scn .who { display: inline-block; font-size: 11px; font-weight: 650; padding: 0 6px; border-radius: 5px; background: var(--surface-3); color: var(--ink-2); margin-right: 4px; }
.scn .alt { font-size: 12px; color: var(--muted); }

.drawer.wide { width: min(1320px, 100vw); }
.cw { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; align-items: start; }
.cw-info, .cw-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cw-why { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cw-park { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.cw-park-form { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; display: grid; gap: 8px; }
.cw-sber { display: grid; gap: 6px; margin-top: 6px; }
.cw-sber textarea { width: 100%; }
.cw-acts { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; display: grid; gap: 6px; font-size: 13px; }
.cw-off { background: var(--none-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cw-buf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cw-buf div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.cw-buf .k { font-size: 11.5px; color: var(--muted); }
.cw-task { background: var(--warn-soft); color: var(--warn-text); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }
.cw-note { display: flex; gap: 8px; margin-bottom: 12px; align-items: flex-start; }
.cw-note textarea, .cw-form textarea { flex: 1; width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); font: inherit; resize: vertical; }
.cw-kshp { font-size: 13px; line-height: 1.8; } .cw-kshp a { cursor: pointer; color: var(--accent-text); font-weight: 550; }
a.tel { color: var(--accent-text); font-weight: 600; white-space: nowrap; }
.tl { display: flex; flex-direction: column; gap: 10px; }
.tl-item { border-left: 3px solid var(--line-strong); padding: 2px 0 2px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.tl-call { border-color: var(--good); } .tl-noanswer { border-color: var(--warn); } .tl-comment { border-color: var(--s1); } .tl-assign { border-color: var(--none); opacity: .85; }
.tl-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--ink-2); font-size: 12.5px; }
.tl-edit { height: 24px; padding: 0 8px; font-size: 12px; margin-left: auto; }
.tl-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-ans { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; margin-top: 4px; } .tl-ans .k { color: var(--muted); }
.tl details summary { cursor: pointer; font-size: 12.5px; color: var(--accent-text); }
.cw-mode { align-self: flex-start; } .cw-mode button { padding: 8px 18px; font-size: 14px; }
.cw-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 10px; }
.cw-sec > summary { cursor: pointer; font-weight: 650; font-size: 13.5px; padding: 8px 0; }
.cw-q { padding: 7px 0; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; }
.cw-q:first-of-type { border-top: 0; }
.cw-ql { font-size: 13px; font-weight: 550; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cw-q .chip { padding: 4px 11px; }
.cw-q input[type=text] { height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--surface); width: 100%; }
.cw-q input.cw-qnote { height: 28px; font-size: 12.5px; border-style: dashed; }
.cw-form input[type=text] { flex: none; } .cw-form .fgroup > input[type=text] { height: 36px; }
.cw-hint { font-size: 12px; color: var(--muted); text-decoration: underline dotted; cursor: pointer; align-self: flex-start; }
.cw-prev { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.cw-prev a { color: var(--accent-text); font-weight: 600; }
.cw-og { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.chip.oc-work.active { border-color: var(--good); background: var(--good-soft); color: var(--good-text); }
.chip.oc-stop.active { border-color: var(--crit); background: var(--crit-soft); color: var(--crit-text); }
.chip.oc-recall.active { border-color: var(--warn); background: var(--warn-soft); color: var(--warn-text); }
.cw-scn summary { cursor: pointer; font-size: 13px; color: var(--accent-text); font-weight: 600; margin: 6px 0; }
.cw-actions { z-index: 2; }
@media (max-width: 1100px) {
  .cw { grid-template-columns: 1fr; }
  .cl-row, .cl-row.has-check { grid-template-columns: 54px minmax(0, 1fr); }
  .cl-row.has-check .cl-check { display: none; }
  .cl-eq, .cl-buf, .cl-last { grid-column: 2; }
  .guide-row { grid-template-columns: 1fr; } .cw-buf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.scn-card { padding: 12px 0; border-top: 1px solid var(--line); } .scn-card:first-child { border-top: 0; padding-top: 0; }
.scn-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.sc-step textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--surface); font: inherit; resize: vertical; }
.sc-step input[name=alt] { width: 100%; }
.sc-step .btn.ghost { height: 30px; padding: 0 10px; }
.rb-t td, .rb-t th { padding-top: 6px; padding-bottom: 6px; } .rb-t input { width: 17px; height: 17px; accent-color: var(--accent); }
.sc-step input[type=number] { width: 80px; }

/* ---- подсказки и инструкция обзвона ---- */
.hint { display: flex; gap: 12px; align-items: flex-start; background: var(--accent-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px 10px 14px; margin-bottom: 14px; font-size: 13px; line-height: 1.55; color: var(--ink); }
.hint > div { flex: 1; }
.hint-i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; margin-top: 1px; }
.hint .btn { height: 30px; padding: 0 10px; font-size: 12.5px; }
.hint-off { margin: -6px 0 10px; font-size: 12.5px; } .hint-off a { color: var(--muted); }
.cw-form > .hint { margin-bottom: 0; } .cw-form > .hint-off { margin: 0; }
.welcome { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: 12px; padding: 14px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.welcome ol { margin: 8px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 1.6; }
.welcome-b { display: flex; gap: 8px; flex-wrap: wrap; }
.howto { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.howto .note { margin-top: 2px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.faq details { border-top: 1px solid var(--line); padding: 8px 0; } .faq details:first-child { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 13.5px; } .faq p { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.faq a { color: var(--accent-text); font-weight: 600; }
.cw-form input[type=text].wide, .cw-form .cw-q input[type=text] { flex: none; }

/* ---- готовность оборудования ---- */
.upd { display: inline-block; font-family: system-ui, sans-serif; font-size: 11px; font-weight: 650; padding: 0 6px; border-radius: 5px; background: var(--crit-soft); color: var(--crit-text); vertical-align: 1px; }
.upd.ok { background: var(--good-soft); color: var(--good-text); }
.rd-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 16px; }
.rd-act { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; } .rd-act .btn { height: 30px; padding: 0 10px; font-size: 12.5px; }
.rd-list { display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow: auto; }
.rd-list .check { font-weight: 450; font-size: 13px; padding: 3px 4px; border-radius: 6px; }
.rd-list .check:hover { background: var(--surface-2); }
.rd-list .check .mono { flex: 1; } .rd-list .n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; margin-left: auto; }
.rd-models { flex-direction: row; flex-wrap: wrap; gap: 4px 18px; max-height: none; }

.xls-btn svg { width: 18px; height: 18px; fill: #1d7044; }
:root[data-theme="dark"] .xls-btn svg { fill: #5fd28a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .xls-btn svg { fill: #5fd28a; } }
@media (max-width: 820px) { .xls-btn span { display: none; } }

/* ---- история покупок: период, графики, календарь ---- */
.perbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 12px; }
.perbar .per-range { font-size: 12.5px; }
.perbar .per-opts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.perbar select, .perbar input[type=date] { height: 32px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: var(--surface); }
.perbar .seg button { padding: 5px 10px; }
.dk { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 10px; }
.dk div { display: flex; flex-direction: column; } .dk .k { font-size: 12px; color: var(--muted); } .dk b { font-size: 20px; font-weight: 650; } .dk span:last-child { font-size: 12px; }
.wide-card { margin-bottom: 16px; }
.sec-title { font-size: 16px; font-weight: 650; margin: 22px 0 10px; color: var(--ink-2); }
.cal { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.cal-wd, .cal-w { display: flex; flex-direction: column; gap: 3px; }
.cal-wd span { height: 14px; font-size: 10px; color: var(--muted); line-height: 14px; padding-right: 4px; }
.cal-w span { width: 14px; height: 14px; border-radius: 3px; background: rgba(18, 138, 62, var(--a)); outline: 1px solid var(--line); outline-offset: -1px; }
.cal-w span.z { background: var(--surface-3); } .cal-w span.e { background: transparent; outline: none; }
.pager { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.pager .btn { height: 32px; padding: 0 10px; min-width: 34px; justify-content: center; }

/* ---- запись звонка ---- */
.cw-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rec-card .card-body { display: flex; flex-direction: column; gap: 10px; }
.rec-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--crit); flex: none; animation: recblink 1s infinite; }
@keyframes recblink { 50% { opacity: .25; } }
.rec-lv { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 6px 10px; align-items: center; font-size: 12px; color: var(--muted); }
.rec-lv i { height: 6px; background: var(--surface-3); border-radius: 4px; overflow: hidden; display: block; }
.rec-lv b { display: block; height: 100%; width: 0; background: var(--accent); transition: width .08s; }
.rec-list { display: flex; flex-direction: column; }
.rec-item { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px; padding: 6px 0; border-top: 1px dashed var(--line); }
.rec-item audio { height: 30px; max-width: 260px; }
.rec-pend { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn.danger-solid { background: var(--crit); color: #fff; border-color: transparent; }
#recFloat { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--crit);
  border-radius: 12px; padding: 8px 12px; box-shadow: 0 8px 30px rgba(0,0,0,.18); font-size: 13px; max-width: calc(100vw - 32px); }
#recFloat span:nth-of-type(3) { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rec-res { width: 100%; } .rec-res summary { cursor: pointer; color: var(--accent-text); font-weight: 600; font-size: 12.5px; margin-top: 4px; }
.rec-res-b { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.rec-tr { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.rec-u { font-size: 12.5px; line-height: 1.45; } .rec-operator b { color: var(--s1); } .rec-client b { color: var(--s2); }
.rec-aib { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.rec-sum { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.rec-ai td { font-size: 12.5px; vertical-align: top; } .rec-ai td:first-child { color: var(--ink-2); width: 45%; }

.tl-rec { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.tl-rec audio { height: 30px; max-width: 240px; }

/* ---------- справка ---------- */
.nav button.has-new::after, .nav-new { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2bc25a; margin-left: auto; }
.nav-new { margin-left: 4px; vertical-align: middle; }
.hq { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong);
  color: var(--muted); font-size: 11.5px; font-weight: 650; text-decoration: none; margin-left: 6px; vertical-align: middle; flex: none; cursor: pointer; }
.hq:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.help-link { font-weight: 550; color: var(--accent-text); white-space: nowrap; }
.help { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.help-toc { position: sticky; top: 76px; padding: 12px; max-height: calc(100vh - 96px); overflow: auto; }
.help-toc .search { margin-bottom: 10px; }
.help-toc .search input { width: 100%; }
.help-toc-doc > a { display: block; padding: 7px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 550; font-size: 14px; }
.help-toc-doc > a:hover { background: var(--surface-2); }
.help-toc-doc.on > a { background: var(--accent-soft); color: var(--accent-text); }
.help-toc-sub { display: grid; padding: 2px 0 8px 12px; }
.help-toc-sub a { padding: 4px 8px; font-size: 13px; color: var(--ink-2); text-decoration: none; border-radius: 6px; }
.help-toc-sub a:hover { background: var(--surface-2); color: var(--ink); }
.help-doc .card-body { padding: 22px 28px; max-width: 920px; line-height: 1.6; font-size: 14.5px; }
.help-doc h1 { font-size: 24px; margin: 0 0 12px; }
.help-doc h2 { font-size: 19px; margin: 28px 0 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.help-doc h3 { font-size: 16px; margin: 20px 0 6px; }
.help-doc h2, .help-doc h3 { scroll-margin-top: 80px; border-radius: 6px; transition: background .6s; }
.help-doc p { margin: 6px 0 10px; }
.help-doc ul, .help-doc ol { margin: 6px 0 12px; padding-left: 22px; }
.help-doc li { margin: 4px 0; }
.help-doc code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.help-doc a { color: var(--accent-text); }
.help-doc .table-wrap { margin: 8px 0 14px; }
.help-note { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 8px; margin: 10px 0 14px; }
.help-flash { background: var(--warn-soft); }
.help-hit { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); margin-bottom: 8px; }
.help-hit:hover { border-color: var(--accent); }
.help-hit div { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.help-hit mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 2px; }
@media (max-width: 900px) { .help { grid-template-columns: 1fr; } .help-toc { position: static; max-height: none; } .help-doc .card-body { padding: 16px; } }

/* контакты Сбера в карточке школы */
.sber-c { padding: 6px 0; border-bottom: 1px solid var(--line); }
.sber-c:last-child { border-bottom: 0; }

/* план действий по школе */
.pw { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink); white-space: nowrap; }
.pw-l1 { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.pw-l2 { background: color-mix(in srgb, #8b5cf6 20%, transparent); }
.pw-rn { background: color-mix(in srgb, #16a34a 20%, transparent); }
.pw-sbs { background: color-mix(in srgb, #f59e0b 25%, transparent); }
.plan-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.plan-cause, .plan-step { margin: 4px 0; line-height: 1.45; }
.plan-check ul { margin: 4px 0 6px 18px; padding: 0; }
.plan-group, .plan-rn { margin-top: 6px; font-size: 13px; }
.plan-line { margin-top: 6px; font-size: 13px; line-height: 1.4; }
.tag.good { background: color-mix(in srgb, #16a34a 18%, transparent); }
.tag.warn { background: color-mix(in srgb, #f59e0b 22%, transparent); }
label.chk { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.kshp-add { margin-top: 8px; } .kshp-add summary { cursor: pointer; color: var(--accent-text); font-size: 13px; }
.kshp-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; margin-top: 8px; }
.kshp-form button { justify-self: start; }
.kshp-mini { font-size: 13px; line-height: 1.6; margin-bottom: 8px; padding: 6px 8px; border-radius: 8px; background: var(--surface-3); }

/* мероприятия */
.act-it { padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.act-it:last-child { border-bottom: 0; }
.act-it a[data-cs] { cursor: pointer; color: var(--accent-text); font-weight: 550; }
.act-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.act-sum { font-size: 13.5px; }
.warn-box { padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, #f59e0b 16%, transparent); margin: 6px 0; }

/* уведомления */
.bell-btn { position: relative; }
.bell-btn .bell-n { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; font-size: 10.5px; line-height: 16px; font-weight: 700;
  background: #dc2626; color: #fff; display: none; }
.bell-btn.has .bell-n { display: inline-block; }
.nt-it { padding: 10px 8px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 6px; }
.nt-it:hover { background: var(--surface-3); }
.nt-it.unread { background: var(--accent-soft); }
.nt-h { display: flex; gap: 8px; align-items: baseline; }
.nt-b { margin: 4px 0 0 26px; font-size: 13px; line-height: 1.45; }
.nt-t { margin: 4px 0 0 26px; font-size: 12px; }

/* база знаний */
.kb-wrap { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .kb-wrap { grid-template-columns: 1fr; } }
.kb-left input#kbQ { width: 100%; margin-bottom: 8px; }
.kb-list { max-height: calc(100vh - 260px); overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.kb-doc { border-bottom: 1px solid var(--line); }
.kb-dh { display: block; padding: 9px 10px; cursor: pointer; }
.kb-it { display: block; padding: 7px 12px 7px 20px; cursor: pointer; font-size: 13.5px; line-height: 1.4; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.kb-it:hover { background: var(--surface-3); }
.kb-it.on { background: var(--accent-soft); }
.kb-it.kb-hidden { opacity: .55; }
.kb-right { min-width: 0; }
.kb-art { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.kb-body { line-height: 1.6; }
.kb-body p { margin: 8px 0; }
.kb-l { margin: 6px 0 10px 20px; padding: 0; }
.kb-l li { margin: 3px 0; }
.kb-fig { margin: 12px 0; }
.kb-fig img { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.kb-fig figcaption { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- дорожная карта: дерево + Гант ---------- */
.rm-wrap { padding: 0; overflow-x: auto; }
.rm-head, .rm-row { display: grid; grid-template-columns: minmax(260px, 2.2fr) 70px 140px minmax(170px, 1.4fr) 80px minmax(260px, 2.4fr); gap: 10px; align-items: center; padding: 8px 12px; min-width: 1040px; }
.rm-head { position: sticky; top: 0; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); font-weight: 600; z-index: 1; }
.rm-row { border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rm-row:hover { background: var(--surface-2); }
.rm-row.lvl0 { background: var(--surface-2); }
.rm-row.lvl1 .rm-c1 { padding-left: 18px; }
.rm-row.lvl2 .rm-c1 { padding-left: 38px; }
.rm-row.lvl3 .rm-c1 { padding-left: 60px; }
.rm-row.lvl3 { cursor: pointer; }
.rm-row.is-late { box-shadow: inset 3px 0 0 var(--crit); }
.rm-c1 a { color: var(--ink); text-decoration: none; }
.rm-c1 a[data-rmt] { color: var(--muted); display: inline-block; width: 16px; }
.rm-ns { margin-top: 4px; font-size: 12px; }
.rm-prog { display: inline-block; width: 80px; height: 8px; border-radius: 4px; background: var(--surface-3); vertical-align: middle; margin-right: 6px; overflow: hidden; }
.rm-prog i { display: block; height: 100%; background: var(--accent); }
.rm-g { position: relative; height: 22px; }
.rm-head .rm-g { height: 16px; }
.rm-m { position: absolute; top: 0; transform: translateX(-2px); font-size: 11px; color: var(--muted); border-left: 1px solid var(--line-strong); padding-left: 3px; }
.rm-today { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed var(--s1); opacity: .6; }
.rm-bar { position: absolute; top: 6px; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.rm-bar.late { outline: 1px solid var(--crit); }
.rm-fill { height: 100%; background: var(--accent); opacity: .85; }
.rm-dia { position: absolute; top: 5px; width: 11px; height: 11px; margin-left: -5px; background: var(--ink-2); transform: rotate(45deg); }
.rm-dia.late { background: var(--crit); }
.rm-dot { position: absolute; top: 6px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--line-strong); box-sizing: border-box; }
.rm-dot.good { background: var(--good); border-color: var(--good); }
.rm-dot.info { background: var(--s1); border-color: var(--s1); }
.rm-dot.bad { background: var(--crit); border-color: var(--crit); }
.rm-dot.warn { background: var(--warn); border-color: var(--warn); }
.rm-st { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.rm-st.good { background: var(--good-soft); color: var(--good-text); }
.rm-st.info { background: color-mix(in srgb, var(--s1) 16%, transparent); color: var(--s1); }
.rm-st.bad { background: var(--crit-soft); color: var(--crit-text); }
.rm-st.warn { background: var(--warn-soft); color: var(--warn-text); }
.rm-own { color: var(--muted); font-size: 12px; }
tr.is-late td:first-child { box-shadow: inset 3px 0 0 var(--crit); }

.switch-mini { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; white-space: nowrap; }
.switch-mini input { accent-color: var(--accent); }
.rt-d { border-bottom: 1px solid var(--line); padding: 8px 0; }
.rt-d summary { cursor: pointer; }
.rt-r { padding: 8px 0 6px 18px; border-top: 1px dashed var(--line); margin-top: 6px; }
.rt-p { padding: 2px 0 0 14px; font-size: 13px; }
.brand-mark .brand-ico { width: 22px; height: 22px; color: #fff; filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); }
.login-brand .brand-mark .brand-ico { width: 26px; height: 26px; }
.tk-log { font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.tk-log-t { display: inline-block; min-width: 118px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tk-hist summary { cursor: pointer; padding: 4px 0; }
.tk-file { margin-top: 6px; }
.tk-attach { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

/* статус работы, оповещения, заметный колокольчик */
.ws-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; margin-right: 6px; }
.ws-btn i, .ws-menu i, .ws-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.ws-ready i { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); } .ws-busy i { background: var(--s1); } .ws-break i, .ws-lunch i, .ws-meeting i { background: var(--warn); }
.ws-menu { position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; min-width: 260px; }
.ws-menu .ws-h { font-size: 12px; color: var(--muted); padding: 6px 10px; }
.ws-menu button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; color: var(--ink); font: inherit; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ws-menu button:hover, .ws-menu button.on { background: var(--surface-3); }
.ws-menu small { display: block; color: var(--muted); font-size: 11.5px; }
.ws-team { margin: 8px 0; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ws-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: var(--surface-3); }
.bell-btn.has { color: var(--accent); }
.bell-btn.has .bell-n { background: var(--crit); color: #fff; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; top: 0; right: 0; box-shadow: 0 0 0 2px var(--surface); }
.bell-btn.ring svg { animation: al-ring 0.9s ease-in-out 2; transform-origin: 50% 10%; }
@keyframes al-ring { 0%,100% { transform: rotate(0); } 20% { transform: rotate(16deg); } 40% { transform: rotate(-14deg); } 60% { transform: rotate(9deg); } 80% { transform: rotate(-5deg); } }
.al-stack { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.al-pop { display: flex; gap: 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-left: 5px solid var(--s1); border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 32px rgba(0,0,0,.2); animation: al-in .25s ease-out; }
.al-pop.al-incoming { border-left-color: var(--accent); } .al-pop.al-urgent { border-left-color: var(--crit); } .al-pop.al-internal { border-left-color: var(--s1); } .al-pop.al-partner { border-left-color: var(--s4); } .al-pop.al-good { border-left-color: var(--good); } .al-pop.al-info { border-left-color: var(--line-strong); }
.al-ico { font-size: 22px; line-height: 1; }
.al-t { font-weight: 700; } .al-b { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.al-a { display: flex; gap: 8px; margin-top: 8px; } .al-a button { border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.al-a .al-open { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.al-out { opacity: 0; transform: translateX(20px); transition: all .25s; }
@keyframes al-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .ws-btn span { display: none; } }
/* «требует внимания» */
.att-n { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--s1); color: #fff; font-size: 11px; line-height: 18px; font-weight: 700; text-align: center; vertical-align: middle; }
.att-n.hot { background: var(--crit); animation: att-pulse 2s ease-in-out infinite; }
.nav button .att-n { margin-left: auto; }
@keyframes att-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(208,59,59,.5); } 50% { box-shadow: 0 0 0 5px rgba(208,59,59,0); } }
/* «Главная» */
.hm-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.hm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hm-card.wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .hm-grid { grid-template-columns: 1fr; } }
.hm-card .card-head { display: flex; align-items: center; gap: 8px; }
.hm-card .card-head h3 { flex: 1; }
.hm-more { font-size: 13px; white-space: nowrap; }
.hm-tools button { border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); border-radius: 6px; padding: 2px 8px; margin-left: 3px; cursor: pointer; }
.hm-add { margin-bottom: 14px; }
.hm-att { display: flex; justify-content: space-between; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.hm-att:hover { background: var(--surface-2); }
.hm-ok { padding: 14px 0; color: var(--good-text); font-weight: 600; }
.hm-goal { display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.hm-big { font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.hm-progress { height: 8px; border-radius: 4px; background: var(--surface-3); margin: 8px 0 4px; overflow: hidden; width: 220px; max-width: 100%; }
.hm-progress i { display: block; height: 100%; background: var(--accent); }
.hm-sp { color: var(--accent); width: 160px; flex: none; }
.hm-spark { width: 160px; height: 40px; }
.hm-row { margin-bottom: 8px; }
.hm-dist { display: grid; grid-template-columns: minmax(150px, 1.4fr) 150px 50px 1fr; gap: 10px; align-items: center; padding: 4px 0; font-size: 13.5px; }
.hm-pin.on { color: var(--accent); border-color: var(--accent); }
.good-text { color: var(--good-text); }
.tk-stars { color: #e0a800; white-space: nowrap; letter-spacing: 1px; } .tk-stars.low { color: var(--crit); }
.tk-rbars div { display: grid; grid-template-columns: 70px 1fr 40px; gap: 8px; align-items: center; padding: 3px 0; }
.tk-rbars span { color: #e0a800; } .tk-rbars i { display: block; height: 10px; border-radius: 5px; background: #e0a800; min-width: 2px; } .tk-rbars b { text-align: right; }

/* ТЗ 03.11: доля рядом с количеством и метка источника данных */
.np { color: var(--muted); font-weight: 400; }
.kpi .value small { font-size: 55%; color: var(--muted); font-weight: 500; }
.src { display: inline-block; font-size: 11px; color: var(--muted); margin-top: 4px; white-space: nowrap; cursor: help; }
.kpi .src { display: block; }
.sub .src { margin-left: 6px; }

.cw-why-h { width: 100%; margin-bottom: 4px; font-size: 13px; }
.cw-why .tag b { margin-left: 4px; }
.cw-today { background: var(--warn-soft); color: var(--warn-text); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }

/* «Главная»: плитки как в «Обзоре», мини-цифры дорожной карты, перетаскивание */
.hm-kpis { margin: 0; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.hm-kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hm-kpis .kpi { box-shadow: none; background: var(--surface-2); }
.hm-big small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.hm-line { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.hm-progress { position: relative; overflow: visible; width: 100%; max-width: 360px; }
.hm-progress i { border-radius: 4px; }
.hm-progress b { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ink); margin-left: -1px; }
.hm-sp { text-align: right; }
.hm-sp-l { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.hm-minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.hm-mini { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.hm-mini span { font-size: 12px; color: var(--muted); }
.hm-mini b { font-size: 20px; font-weight: 700; }
.hm-mini small { font-size: 11.5px; color: var(--muted); }
.hm-mini.good b { color: var(--good-text); } .hm-mini.bad b { color: var(--crit-text); } .hm-mini.warn b { color: var(--warn-text); }
.hm-dists { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); column-gap: 28px; }
.hm-dist { grid-template-columns: minmax(140px, 1fr) minmax(80px, 1.2fr) 48px 120px; }
.hm-dist .rm-prog { width: auto; }
.hm-dist .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-drag { cursor: grab; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 2px; user-select: none; opacity: .45; }
.hm-card:hover .hm-drag { opacity: 1; }
.hm-dragging { opacity: .45; }
.hm-over { outline: 2px dashed var(--accent); outline-offset: 3px; }
/* календарь оборота — на всю ширину карточки */
.cal { gap: 4px; }
.cal-w { flex: 1 1 0; min-width: 14px; max-width: 46px; }
.cal-w span { height: auto; }
.cal-w span { width: 100%; aspect-ratio: 1; border-radius: 4px; }
.cal-wd span { flex: 1 1 0; height: auto; display: flex; align-items: center; }
.cal-wd, .cal-w { gap: 4px; }
.cal-w span { display: flex; align-items: center; justify-content: center; font-size: 10.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cal-w span.dk { color: #fff; } .cal-w span.z { color: var(--muted); }
.tk-search { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.tk-search input { flex: 1; min-width: 240px; max-width: 520px; height: 36px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; }
.tk-search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.chip .n.hot { background: var(--crit); color: #fff; }

/* цели: источник оборота и показ */
.gp-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 0 18px 14px !important; }
.gp-row #gpDays { width: 48px; height: 22px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 4px; font: inherit; font-size: 12.5px; background: var(--surface); color: var(--ink); }
.gp-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

/* дорожная карта: темп и легенда шкалы, фильтры */
.rm-pace { font-size: 11.5px; margin-top: 2px; white-space: nowrap; }
.rm-fill.behind { background: var(--warn); }
.rm-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 16px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.rm-legend i { display: inline-block; vertical-align: middle; margin-right: 4px; }
.rm-legend .lg-bar { width: 22px; height: 8px; border-radius: 4px; background: var(--surface-3); }
.rm-legend .lg-fill { width: 22px; height: 8px; border-radius: 4px; background: var(--accent); }
.rm-legend .lg-today { width: 0; height: 12px; border-left: 2px dashed var(--s1); }
.rm-filters { padding: 12px 16px; }
.rm-filters select { flex: 0 1 210px; }
.rm-filters input[type=search] { flex: 1 1 240px; max-width: 360px; }
.rm-row.rm-total { background: var(--surface-2); font-weight: 600; }

/* ширина столбцов мышью (colresize.js) */
.t th { position: sticky; }
.t th .cr-h { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 2; }
.t th .cr-h:hover, .cr-dragging .t th .cr-h { background: linear-gradient(to right, transparent 2px, var(--accent) 2px, var(--accent) 4px, transparent 4px); }
table.t.cr-fixed { table-layout: fixed; }
table.t.cr-fixed td, table.t.cr-fixed th { overflow: hidden; text-overflow: ellipsis; }
.cr-dragging, .cr-dragging * { cursor: col-resize !important; user-select: none !important; }
.t.tree td.main-cell, .t.tree th:first-child { width: 34%; }
.more-card { padding: 16px 18px; margin-top: 12px; }
.more-l { margin: 8px 0; padding-left: 20px; font-size: 13px; }
/* стрелка у всех выпадающих списков (правила выше задают background целиком и стирают её) */
select, .filters select, .form select, .confirm select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; -webkit-appearance: none; appearance: none; }

/* общий период в шапке */
.per-pick { position: relative; }
.per-btn { cursor: pointer; padding-right: 12px; }
.per-btn b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.per-pop { position: absolute; right: 0; top: 44px; z-index: 50; width: min(560px, 92vw); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px; }
