/* Дока — общие стили. Светлая и тёмная тема, адаптивно до телефона. */
:root { --bg: #f4f5f7; --panel: #fff; --soft: #f8f9fb; --text: #1b1f24; --muted: #667085; --line: #e4e7ec; --line-strong: #c9ced6;
  --brand: #0f766e; --accent: #0e7490; --accent-soft: #e0f2f6; --bad: #c0362c; --bad-soft: #fdecea; --up: #2b8a3e; --up-soft: #ebf7f0;
  --warn: #b54708; --warn-soft: #fdf1e2; --kpi: #a16207; --kpi-soft: #fdf6dd; --shadow: 0 1px 2px rgba(16,24,40,.05); }
@media (prefers-color-scheme: dark) { :root { --bg: #0f1216; --panel: #181c22; --soft: #1d2229; --text: #e6e8eb; --muted: #98a2b3; --line: #29303a;
  --line-strong: #3a4350; --brand: #2dd4bf; --accent: #38bdf8; --accent-soft: #10303c; --bad: #f07a70; --bad-soft: #3d1f1d; --up: #5cc98f; --up-soft: #17301f;
  --warn: #f5a35c; --warn-soft: #3a2a14; --kpi: #e3b341; --kpi-soft: #2e2710; --shadow: none; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
header.top { padding: 10px 20px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand b { font-size: 20px; letter-spacing: .02em; } .brand b i { font-style: normal; color: var(--brand); }
.brand span { display: block; font-size: 11px; color: var(--muted); line-height: 1; margin-top: 2px; }
nav.main { display: flex; gap: 2px; flex-wrap: wrap; }
nav.main a { padding: 7px 11px; border-radius: 8px; color: var(--muted); font-weight: 500; }
nav.main a:hover { color: var(--text); background: var(--soft); text-decoration: none; }
nav.main a.on { color: var(--accent); background: var(--accent-soft); }
.who { margin-left: auto; font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.who b { color: var(--text); font-weight: 500; }
main { padding: 18px 20px 70px; max-width: 1400px; margin: 0 auto; }
h1 { font-size: 20px; margin: 0 0 4px; } h2 { font-size: 16px; margin: 0 0 6px; } h3 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.sub, .muted { color: var(--muted); } .sub { font-size: 13px; margin: 0 0 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.src { font-size: 10px; font-weight: 700; letter-spacing: .05em; padding: 1px 5px; border-radius: 4px; background: var(--kpi-soft); color: var(--kpi); vertical-align: 1px; white-space: nowrap; }
.src.edo { background: var(--accent-soft); color: var(--accent); } .src.ut { background: var(--up-soft); color: var(--up); } .src.ka { background: var(--warn-soft); color: var(--warn); }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 10px; height: 36px; min-width: 0; }
textarea { height: auto; min-height: 60px; width: 100%; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
button { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 14px; height: 36px; cursor: pointer; white-space: nowrap; }
button:hover { border-color: var(--accent); } button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.mini { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
button.danger { color: var(--bad); }
.filt { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld > span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 999px; }
.chips button.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.tile:hover { border-color: var(--accent); } .tile.on { border-color: var(--accent); background: var(--accent-soft); }
.tile .n { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile .s { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile .t { font-size: 12.5px; margin-top: 4px; }
.wrapx { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tab { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tab th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel); }
table.tab td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tab tr.clk { cursor: pointer; } table.tab tr.clk:hover td { background: var(--soft); }
table.tab tr.sel td { background: var(--accent-soft); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; white-space: nowrap; background: var(--line); color: var(--muted); }
.tag.ok { background: var(--up-soft); color: var(--up); } .tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.warn { background: var(--warn-soft); color: var(--warn); } .tag.acc { background: var(--accent-soft); color: var(--accent); }
.tag.st-new { background: var(--bad-soft); color: var(--bad); } .tag.st-work { background: var(--warn-soft); color: var(--warn); } .tag.st-edo { background: var(--accent-soft); color: var(--accent); }
.tag.st-explained, .tag.st-fixed, .tag.st-ka_error, .tag.st-auto_closed { background: var(--up-soft); color: var(--up); }
.detail { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 4px 0 8px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 13px; } .kv span:nth-child(odd) { color: var(--muted); }
.work { display: grid; gap: 8px; } .work .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } @media (max-width: 560px) { .work .row { grid-template-columns: 1fr; } }
.msg { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 10px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; max-width: 90vw; }
.msg.show { opacity: .95; } .msg.err { background: var(--bad); color: #fff; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.list { display: grid; gap: 6px; } .list .it { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; }
.list .it:hover { border-color: var(--accent); }
.dline { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.num { font-variant-numeric: tabular-nums; }
.stage { font-size: 12px; color: var(--muted); }
code { font-size: 12px; background: var(--soft); padding: 1px 5px; border-radius: 4px; }
.dropzone { border: 2px dashed var(--line-strong); border-radius: 12px; padding: 20px; text-align: center; color: var(--muted); }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 700px) { main { padding: 12px 12px 70px; } header.top { padding: 8px 12px; } .who .name { display: none; } table.tab th { top: 0; position: static; } }
