/* PTS v2 · деловой ops-дашборд (редизайн 10.2026: токены, Inter, точка+слово, плотные таблицы, ⌘K).
   Тёмная тема по умолчанию; ноутбук — сайдбар, липкий топбар и таблицы, телефон — таб-бар и карточки. */
/* Inter Variable — локально (web/v2/fonts, OFL), без CDN: латиница, кириллица, cyrillic-ext (ә ғ қ ң ө ұ ү һ і) */
@font-face { font-family: "InterV"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/v2/fonts/inter-cyrillic-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "InterV"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/v2/fonts/inter-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "InterV"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/v2/fonts/inter-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "InterV"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/v2/fonts/inter-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* поверхности: 3 уровня (фон → панель → приподнятое), различаются только яркостью; линии — волосяные */
  --bg: #0a0b0d; --panel: #111316; --panel-2: #16191d; --hover: #1b1f24; --line: #1f2329; --line-2: #1a1d22; --line-strong: #2a2f37;
  --text: #e8eaee; --text-2: #b4bac6; --muted: #858c99; --faint: #5a616d;
  --accent: #7281ff; --accent-bg: rgba(114, 129, 255, .12); --on-accent: #fff;
  --ok: #3fb984; --ok-bg: rgba(63, 185, 132, .12); --warn: #e5a03a; --warn-bg: rgba(229, 160, 58, .12); --bad: #ec6a5e; --bad-bg: rgba(236, 106, 94, .12);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r-sm: 6px; --r: 8px; --radius: 10px; --r-xl: 14px; --gap: 16px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-pop: 0 12px 32px rgba(0, 0, 0, .45), 0 0 0 1px var(--line-strong);
  --ctl: 32px; --top-h: 52px; --side-w: 232px;
  --font: "InterV", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f7f8fa; --panel: #ffffff; --panel-2: #f3f4f6; --hover: #eef0f3; --line: #e3e6eb; --line-2: #eef0f3; --line-strong: #d3d8df;
  --text: #14161a; --text-2: #3b414d; --muted: #646b78; --faint: #99a0ac;
  --accent: #4f5bd5; --accent-bg: rgba(79, 91, 213, .09);
  --ok: #1a8f5a; --ok-bg: rgba(26, 143, 90, .1); --warn: #b0701a; --warn-bg: rgba(176, 112, 26, .1); --bad: #cf3f3f; --bad-bg: rgba(207, 63, 63, .08);
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .06); --shadow-pop: 0 12px 32px rgba(16, 24, 40, .14), 0 0 0 1px var(--line-strong);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { color: var(--text); font: 400 13.5px/1.45 var(--font); font-feature-settings: "cv11"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 20px; } h2 { font-size: 13px; } h3 { font-size: 13px; }
/* цифры — табличные везде, где они стоят в колонках */
.num, td, .tbl, .ctr-v, .kpi-v, .count, .seg-n, time { font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "cv11"; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.hidden { display: none !important; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, summary:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.cmdk-in:focus-visible { box-shadow: none; }
kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; font: 500 11px/1 var(--font); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; background: var(--panel-2); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* статус = точка + слово (цвет никогда не единственный носитель смысла) */
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.st .dot { transform: none; flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.acc { background: var(--accent); } .dot.none { background: var(--faint); }

/* ---------- поля: единая высота, без системного вида (Safari) ---------- */
.input, .select, textarea.input {
  -webkit-appearance: none; appearance: none; height: var(--ctl); width: 100%; padding: 0 12px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-strong); outline: none; font-size: 13.5px; line-height: normal; transition: border-color .12s, box-shadow .12s;
}
.input::placeholder { color: var(--faint); }
input[type=date].input { min-height: var(--ctl); }
input[type=search].input::-webkit-search-decoration { -webkit-appearance: none; }
textarea.input { height: auto; min-height: 84px; padding: 9px 12px; resize: vertical; line-height: 1.45; }
.select { padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.btn { -webkit-appearance: none; appearance: none; height: var(--ctl); padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text);
  cursor: pointer; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; transition: background .12s, border-color .12s; }
@media (hover: hover) { .btn:hover { background: var(--hover); } .btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); } .btn.ghost:hover { color: var(--text); background: var(--hover); } }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.icon { width: var(--ctl); padding: 0; }
.btn.ok { color: var(--ok); } .btn.bad { color: var(--bad); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn kbd { margin-left: 2px; background: transparent; }
.btn.primary kbd { color: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .35); }
.btn svg { width: 15px; height: 15px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
label.f { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }

/* ---------- вход ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 500px at 50% -10%, var(--accent-bg), transparent 70%); }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px; display: grid; gap: 12px; box-shadow: var(--shadow-1); }
.login-card .brand { margin-bottom: 8px; padding: 0; }
.login-err { color: var(--bad); font-size: 13px; min-height: 18px; }
.login-card .btn, .login-card .input { height: 40px; }
.login-card .muted { margin: 0; font-size: 13px; }

/* ---------- оболочка ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; padding: 14px 10px; gap: 12px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.brand-mark { width: 24px; height: 24px; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; flex: none; }
.brand-name { font-weight: 600; font-size: 13.5px; } .brand-sub { color: var(--faint); font-size: 11.5px; }
.cmdk-btn { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); background: var(--panel); cursor: pointer; font-size: 13px; text-align: left; width: 100%; }
.cmdk-btn span { flex: 1; } .cmdk-btn svg { width: 15px; height: 15px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; }
@media (hover: hover) { .cmdk-btn:hover { border-color: var(--line-strong); color: var(--text-2); } }
.nav { display: grid; gap: 1px; }
.nav-t { font-size: 11.5px; color: var(--faint); padding: 12px 8px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 8px; border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; font-size: 13.5px; }
@media (hover: hover) { .nav a:hover { background: var(--hover); color: var(--text); } }
.nav a.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.nav svg, .tabbar svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav .count { margin-left: auto; font-size: 12px; color: var(--muted); }
.nav a.on .count { color: var(--accent); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; padding: 8px 2px 0 8px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.side-foot .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.ava { width: 22px; height: 22px; border-radius: 50%; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text-2); font-size: 10.5px; font-weight: 600; display: grid; place-items: center; flex: none; }
.main { min-width: 0; padding: var(--s5) var(--s6) 64px; max-width: 1440px; }
.head { display: none; }
.tabbar { display: none; }
.topbar { display: flex; position: sticky; top: 0; z-index: 10; align-items: center; gap: 12px; height: var(--top-h); padding: 0 var(--s6);
  background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 15px; white-space: nowrap; }
.topbar .meta { color: var(--muted); font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .sp { flex: 1; }
.topbar .cmdk-m { display: none; }

/* ---------- блоки ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 44px; padding: 6px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-h h2 { min-width: 0; font-size: 13px; }
.panel-h .right { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.panel-b { padding: 4px 16px 12px; }
.section-t { display: flex; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 600; color: var(--text); margin: 28px 0 10px; }
.section-t .m { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.section-t .r { margin-left: auto; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.section-t:first-child { margin-top: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.empty { color: var(--faint); padding: 14px 0; font-size: 13px; }

/* Передано ГП */
.handed { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 16px; }
.handed .hx { flex: 1; min-width: 0; }
.handed .t { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.handed .m { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl td.sel, .tbl th.sel { width: 200px; }
.tbl td.act { width: 150px; }
.rolesel { display: inline-block; width: 200px; }
.addrule { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 10px; margin-top: 14px; }
.check { width: 18px; height: 18px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-size: 11px; flex: none; }

/* счётчик X/N */
.ctr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none; }
.ctr:last-child { border-bottom: 0; }
a.ctr:hover .ctr-l { color: var(--accent); }
.ctr-r { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ctr-l { font-size: 13px; color: var(--text); }
.ctr-v { font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ctr-v .of { color: var(--faint); font-size: 14px; font-weight: 500; }
.bar { height: 6px; border-radius: 3px; background: var(--line-strong); overflow: hidden; margin: 8px 0 7px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bar.ok i { background: var(--ok); } .bar.warn i { background: var(--warn); } .bar.bad i { background: var(--bad); }
.ctr-m { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 17px; }
.ctr-m .w { color: var(--warn); }
/* питание: подзаголовок в карточке и компактные счётчики */
.sub-t { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 0; padding: 12px 0 2px; border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.sub-t .faint { font-weight: 400; font-size: 12px; }
.ctr.sm { padding: 8px 0; }
.ctr.sm .ctr-v { font-size: 15px; }
.ctr.sm .ctr-v .of { font-size: 12px; }
.ctr.sm .bar { height: 3px; margin: 6px 0 5px; }
.tbl.pw td, .tbl.pw th { height: 32px; padding: 0 8px; }
.tbl.pw td:first-child, .tbl.pw th:first-child { padding-left: 0; }
.tbl.pw td.r:last-child, .tbl.pw th.r:last-child { padding-right: 0; }
.tbl.pw .of { color: var(--faint); font-size: 11.5px; }
.tbl.pw td.w { color: var(--warn); } .tbl.pw td.w .of { color: var(--warn); opacity: .7; }
/* питание: цепочка шагов в карточке объекта */
.steps { display: grid; padding: 4px 0; }
.step { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 9px 0; position: relative; }
.step::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--line-2); }
.step:first-child::before { top: 50%; } .step:last-child::before { bottom: 50%; }
.step .sd { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel); position: relative; z-index: 1; grid-row: 1 / span 2; }
.step.ready .sd { background: var(--ok); border-color: var(--ok); }
.step.wip .sd { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.step.cur .sd { border-color: var(--warn); }
.step.na .sd, .step.if_kl .sd { border-style: dashed; }
.step .st { font-size: 13.5px; } .step.na .st, .step.if_kl .st { color: var(--faint); }
.step .sm { grid-column: 2; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step .sr { grid-row: 1 / span 2; grid-column: 3; }

/* дорожка */
.track { padding: 18px 16px 16px; }
.tl { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: relative; }
.tl::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--line); }
.tl-i { position: relative; padding-right: 10px; min-width: 0; }
.tl-d { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel); position: relative; z-index: 1; }
.tl-i.done .tl-d { background: var(--ok); border-color: var(--ok); }
.tl-i.wip .tl-d { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.tl-i.alarm .tl-d { border-color: var(--bad); }
.tl-date { margin-top: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-i.alarm .tl-date { color: var(--bad); }
.tl-n { margin-top: 2px; font-size: 12.5px; line-height: 1.35; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.track-risk { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 12.5px; color: var(--bad); }

/* районы, риски */
.rows { display: grid; }
.row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 52px; align-items: center; gap: 12px; height: 34px; font-size: 13px; }
.row .v { text-align: right; font-variant-numeric: tabular-nums; }
.row .bar { margin: 0; }
.risk { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.risk:last-child { border-bottom: 0; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); transform: translateY(-1px); }
.dot.high { background: var(--bad); } .dot.medium { background: var(--warn); } .dot.low { background: var(--muted); }

/* списки задач / предложений */
.list { display: grid; }
.li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.li:last-child { border-bottom: 0; }
a.li { color: inherit; text-decoration: none; } a.li:hover .li-t { color: var(--accent); }
.li-t { font-size: 13.5px; min-width: 0; }
.li-m { grid-column: 1; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-r { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 500; background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong); white-space: nowrap; }
.tag.bad { background: var(--bad-bg); color: var(--bad); box-shadow: none; } .tag.warn { background: var(--warn-bg); color: var(--warn); box-shadow: none; } .tag.ok { background: var(--ok-bg); color: var(--ok); box-shadow: none; } .tag.accent { background: var(--accent-bg); color: var(--accent); box-shadow: none; }
.q { color: var(--warn); }

.morning { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.morning .wide { grid-column: span 3; }

/* предложения */
.group { margin-bottom: var(--gap); }
.prop { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: center; }
.prop:last-child { border-bottom: 0; }
.prop .acts { grid-row: 1 / span 3; grid-column: 2; display: flex; gap: 6px; }
.prop .t { font-size: 13.5px; }
.prop .m { font-size: 12px; color: var(--muted); }
.prop.done { opacity: .55; }

/* таблица */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: var(--top-h); z-index: 2; background: var(--panel); }
.tbl td { height: 38px; padding: 0 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl thead tr:first-child th:first-child { border-top-left-radius: var(--radius); } .tbl thead tr:first-child th:last-child { border-top-right-radius: var(--radius); }
.tbl tr.click { cursor: pointer; } @media (hover: hover) { .tbl tr.click:hover td { background: var(--hover); } }
.tbl .code, .code { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.01em; }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.cards { display: none; }

/* карточка объекта */
.kv { margin: 0; display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 16px; font-size: 13px; padding: 12px 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); font-size: 12.5px; color: var(--text-2); }
.chip .dot { transform: none; }
.chip.done .dot { background: var(--ok); } .chip.wip .dot { background: var(--accent); } .chip.none .dot { background: var(--line); } .chip.na .dot { background: var(--faint); }
.move { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 0; font-size: 13px; }
.move .arrow { color: var(--faint); text-align: center; }

/* диалог, тост */
dialog.modal { border: 0; border-radius: 12px; background: var(--panel); color: var(--text); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-pop); }
dialog.modal::backdrop { background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.modal-h { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 12px 0 20px; border-bottom: 1px solid var(--line); }
.modal-h h2 { font-size: 14px; }
.modal-b { padding: 16px 20px; display: grid; gap: 12px; max-height: 70vh; overflow: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; transition: opacity .18s, transform .18s; background: var(--panel-2); border: 0; box-shadow: var(--shadow-pop);
  padding: 10px 16px; border-radius: 10px; font-size: 13px; pointer-events: none; z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); } .toast.bad { color: var(--bad); box-shadow: var(--shadow-pop), inset 3px 0 0 var(--bad); }
.token { font-family: var(--mono); font-size: 12.5px; word-break: break-all; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }

/* ---------- телефон ---------- */
@media (max-width: 899px) {
  :root { --ctl: 44px; --top-h: calc(52px + env(safe-area-inset-top)); }
  body { font-size: 14px; }
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { height: var(--top-h); padding: env(safe-area-inset-top) 12px 0 16px; gap: 8px; }
  .topbar h1 { font-size: 17px; }
  .topbar .meta { font-size: 12px; }
  .topbar .cmdk-m { display: grid; place-items: center; width: 40px; height: 40px; margin-right: -4px; border: 0; background: transparent; color: var(--muted); border-radius: var(--r); flex: none; cursor: pointer; }
  .topbar .cmdk-m svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; }
  .main { padding: 14px 14px calc(84px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: calc(60px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 10.5px; position: relative; }
  .tabbar a.on { color: var(--text); }
  .tabbar svg { width: 20px; height: 20px; }
  .tabbar .count { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; display: grid; place-items: center; }
  .grid-3, .grid-2, .morning { grid-template-columns: 1fr; gap: 12px; }
  .morning .wide { grid-column: auto; }
  .section-t { margin: 22px 0 8px; }
  .tl { grid-auto-flow: row; grid-auto-columns: auto; gap: 0; }
  .tl::before { left: 7px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; }
  .tl-i { display: grid; grid-template-columns: 16px 64px minmax(0, 1fr); gap: 12px; align-items: start; padding: 0 0 12px; }
  .tl-date, .tl-n { margin-top: 0; }
  .row { grid-template-columns: 96px minmax(0, 1fr) 44px; }
  .tbl { display: none; }
  .tbl.keep { display: table; table-layout: fixed; font-size: 12.5px; }
  .tbl.keep td, .tbl.keep th { padding: 6px 8px; white-space: normal; height: auto; }
  .tbl td.sel, .tbl th.sel { width: 48%; }
  .tbl td.act { width: 132px; }
  .rolesel { width: 100%; }
  .panel-h .right:has(.rolesel) { flex: 1 1 100%; }
  .addrule { grid-template-columns: 1fr 1fr; } .addrule .btn { grid-column: span 2; }
  .handed { height: 56px; }
  .hide-m { display: none; }
  .cards { display: grid; gap: 8px; }
  .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 4px; min-height: 44px; }
  .card .t { font-size: 14px; font-weight: 550; } .card .m { font-size: 12.5px; color: var(--muted); }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters > :first-child { grid-column: span 2; }
  .input, .select { font-size: 16px; }   /* 16px — Safari не зумит поле; высота — --ctl (44px) */
  .seg button { height: 38px; padding: 0 12px; font-size: 13.5px; }
  .prop { grid-template-columns: 1fr; }
  .prop .acts { grid-row: auto; grid-column: 1; margin-top: 6px; }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  .move { grid-template-columns: 1fr; gap: 4px; } .move .arrow { text-align: left; }
}

/* шаг 5: «Новое», отчёт ОВН */
.acts-h { display: flex; gap: 6px; flex-wrap: wrap; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.li.msg .li-t { white-space: pre-line; }
.seg { display: inline-flex; padding: 2px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); gap: 2px; }
.seg button { -webkit-appearance: none; appearance: none; height: 26px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.report-form { display: grid; gap: 12px; }
.report-form .pane { display: grid; gap: 12px; }
.dgrid { display: grid; gap: 6px; }
.dh { display: grid; grid-template-columns: 96px 4fr 3fr; gap: 8px; font-size: 11.5px; color: var(--faint); }
.drow { display: grid; grid-template-columns: 96px repeat(7, minmax(0, 1fr)); gap: 6px; align-items: center; }
.drow .dn { font-size: 13px; }
.drow .cap { display: none; }
.drow .input { height: 32px; padding: 0 6px; text-align: right; font-size: 13px; }
.drow .input::placeholder { font-size: 10.5px; color: var(--faint); text-align: right; }
.report-prev { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 8px; font-size: 13px; background: var(--panel-2); }
.report-prev .flags { display: grid; gap: 4px; }
.report-prev .metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; max-height: 220px; overflow: auto; font-size: 12px; color: var(--muted); }
.report-prev .mrow { display: flex; justify-content: space-between; gap: 8px; }
dialog.modal:has(.report-form) { width: min(760px, calc(100vw - 32px)); }
@media (max-width: 899px) {
  .dh { display: none; }
  .drow { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px 0; border-bottom: 1px solid var(--line-2); }
  .drow .dn { grid-column: 1 / -1; font-weight: 550; }
  .drow .cap { display: block; grid-column: 1 / -1; font-size: 11.5px; color: var(--faint); }
  .drow .input { height: 36px; font-size: 16px; }
  .report-prev .metrics { grid-template-columns: 1fr; }
}

/* шаг 5б: след синхронизации */
.fresh { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 12px; margin-bottom: 16px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--panel); color: var(--muted); text-decoration: none; font-size: 12.5px; }
.fresh .dot { transform: none; flex: none; background: var(--ok); }
.fresh-t { color: var(--text-2); font-weight: 500; white-space: nowrap; }
.fresh-m { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fresh-go { margin-left: auto; color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.fresh-go::before { content: "Синхронизация "; }
@media (hover: hover) { a.fresh:hover { border-color: var(--line-strong); } }
.fresh.lvl-warn .dot { background: var(--warn); } .fresh.lvl-warn .fresh-m { color: var(--warn); }
.fresh.lvl-bad .dot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); } .fresh.lvl-bad .fresh-m { color: var(--bad); }
.srcs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.src { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 4px; min-width: 0; }
.src-h { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.src-h .dot { transform: none; flex: none; } .src.lvl-ok .dot { background: var(--ok); } .src.lvl-warn .dot { background: var(--warn); } .src.lvl-bad .dot { background: var(--bad); }
.src-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-r { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; min-width: 0; }
.src-v { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.src-m { font-size: 12px; color: var(--muted); min-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src.lvl-warn .src-m { color: var(--warn); } .src.lvl-bad .src-m { color: var(--bad); white-space: normal; }
.sync-tbl { table-layout: fixed; }
.sync-tbl th:nth-child(1) { width: 76px; } .sync-tbl th:nth-child(2) { width: 150px; } .sync-tbl th:nth-child(4) { width: 170px; }
.sync-tbl th:nth-child(5) { width: 205px; } .sync-tbl th:nth-child(6) { width: 165px; }
.sync-tbl td { max-width: none; }
.sync-tbl .tag + .tag { margin-left: 6px; }
.small { font-size: 12px; } .foot { margin-top: 14px; }
.link { color: var(--accent); text-decoration: none; font-size: 12.5px; }
.run-reason { padding: 10px 12px; border-radius: 8px; background: var(--panel-2); font-size: 13px; }
.run-reason.bad { background: var(--bad-bg); color: var(--bad); } .run-reason.warn { background: var(--warn-bg); color: var(--warn); }
.run .kv { padding: 0; } .run .section-t { margin: 8px 0 0; }
.chks { display: grid; }
.chk { display: grid; grid-template-columns: 8px 120px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.chk:last-child { border-bottom: 0; }
.chk .dot { transform: none; } .chk.ok .dot { background: var(--ok); } .chk.warn .dot { background: var(--warn); } .chk.error .dot { background: var(--bad); } .chk.info .dot { background: var(--faint); }
.chk-k { color: var(--muted); } .chk.error .chk-m { color: var(--bad); }
.card-r { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card { color: inherit; text-decoration: none; }
.reason-m.bad { color: var(--bad); } .reason-m.warn { color: var(--warn); }
@media (max-width: 1100px) { .srcs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) {
  .tabbar .side-only { display: none; }
  .srcs { grid-template-columns: 1fr 1fr; gap: 8px; }
  .src { padding: 10px 12px; } .src-v { font-size: 17px; }
  .fresh { flex-wrap: wrap; gap: 2px 10px; margin-bottom: 12px; }
  .fresh-m { flex: 1 1 100%; order: 3; padding-left: 18px; white-space: normal; }
  .chk { grid-template-columns: 8px 92px minmax(0, 1fr); }
}

/* действия над задачами и переносами */
.li .li-r .btn { flex: none; }
.li.task.closed .li-t { color: var(--muted); }
/* задача: название во всю ширину, ниже — мета слева, срок и действия справа (колонки «Утра» узкие) */
.li.task { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
.li.task .li-t { grid-column: 1 / -1; }
.li.task .li-m { grid-row: 2; align-self: center; }
.li.task .li-r { grid-row: 2; grid-column: 2; }
.li.task .li-r .tag, .li.mv .li-r .tag { display: inline-block; line-height: 20px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.li-r .go { color: var(--faint); }
a.risk { color: inherit; text-decoration: none; } a.risk:hover span:last-child { color: var(--accent); }
.seg-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.seg-3 button { height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg-n { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.seg button.on .seg-n { color: var(--muted); }
.sheet { display: grid; gap: 14px; }
.sheet-t { font-size: 15px; font-weight: 550; margin-bottom: 2px; }
.sheet .li-m { white-space: normal; }
.sheet-wait { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.toast.act { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding: 6px 6px 6px 16px; }
.toast-act { -webkit-appearance: none; appearance: none; height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: var(--accent-bg); color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; }
.moves-top { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 10px; margin-bottom: 14px; align-items: center; }
.moves-top .seg-3 { height: 36px; }
.cb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0; flex: none; border: 1.5px solid var(--faint); border-radius: 6px; background: transparent; display: grid; place-items: center; cursor: pointer; }
.cb:checked, .cb:indeterminate { background: var(--accent); border-color: var(--accent); }
.cb:checked::after { content: ""; width: 10px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.cb:indeterminate::after { content: ""; width: 10px; height: 2px; background: #fff; }
.cb[disabled] { opacity: .35; cursor: default; }
.li.mv { grid-template-columns: 20px minmax(0, 1fr) auto; column-gap: 12px; }
.li.mv .cb { grid-row: 1 / span 2; }
.li.mv .li-t, .li.mv .li-m { grid-column: 2; }
.li.mv .li-r { grid-column: 3; }
.li.mv:not(:has(.cb)) { grid-template-columns: minmax(0, 1fr) auto; }
.li.mv:not(:has(.cb)) .li-t, .li.mv:not(:has(.cb)) .li-m { grid-column: 1; } .li.mv:not(:has(.cb)) .li-r { grid-column: 2; }
.li.mv.pick { cursor: pointer; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.li.mv.pick:hover { background: var(--hover); }
.li.mv.on { background: var(--accent-bg); }
.li-r a.btn { text-decoration: none; font-size: 18px; }
.pick-all { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.bulk { position: sticky; bottom: 16px; z-index: 5; margin-top: 12px; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--panel-2) 94%, transparent); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .28); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.bulk-n { font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bulk-a { margin-left: auto; display: flex; gap: 8px; }
.hint { white-space: normal; }
.move-i + .move-i { border-top: 1px solid var(--line-2); }
.move-acts { display: flex; gap: 8px; padding-bottom: 12px; }
@media (max-width: 899px) {
  .li .li-r .btn.icon { width: 44px; height: 44px; }
  .li .li-r .btn:not(.icon) { height: 44px; }
  .li.task .li-r .tag, .li.mv .li-r .tag { max-width: 150px; }
  .li.mv .li-r .tag { max-width: 110px; }
  .seg-3 button { height: 40px; font-size: 14px; }
  .sheet-wait { grid-template-columns: 1fr; }
  dialog.modal:has(.sheet) { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  dialog.modal:has(.sheet) .modal-f .btn { flex: 1; height: 44px; }
  .moves-top { grid-template-columns: 1fr; }
  .li.mv { padding-top: 12px; padding-bottom: 12px; }
  .li.mv.pick { margin: 0 -16px; }
  .bulk { bottom: calc(68px + env(safe-area-inset-bottom)); flex-wrap: wrap; padding: 10px; gap: 8px; }
  .bulk-n { flex: 1; padding-left: 6px; }
  .bulk-a { flex: 1 1 100%; margin: 0; }
  .bulk-a .btn { flex: 1; height: 44px; }
  .move-acts .btn { flex: 1; height: 44px; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ---------- вкладки «Настроек», вход: восстановление ключа ---------- */
.tabs-s { display: flex; flex-wrap: wrap; margin-bottom: 14px; max-width: 100%; }
.tabs-s button { white-space: nowrap; }
@media (max-width: 899px) { .tabs-s button { padding: 0 9px; font-size: 12.5px; flex: 1 1 auto; } }
.login-ok { color: var(--ok); font-size: 13px; min-height: 18px; }
.login-card h1 { font-size: 18px; margin: 0; }

/* ---------- питание ОВН ---------- */
.ctr-v.ok { color: var(--ok); } .ctr-v.warn { color: var(--warn); } .ctr-v.bad { color: var(--bad); }
.ctr.ms .ctr-l { font-weight: 550; }
.sub-t .faint.warn { color: var(--warn); }
.flags { display: grid; gap: 4px; margin-top: 8px; font-size: 13px; }
.segbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line); margin: 12px 0 10px; gap: 1px; }
.segbar i { display: block; height: 100%; min-width: 0; }
.segbar i.todo { background: var(--line); }
.segbar i.s0 { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.segbar i.s1 { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.segbar i.s2 { background: color-mix(in srgb, var(--accent) 75%, transparent); }
.segbar i.s3 { background: var(--accent); }
.segbar i.done { background: var(--ok); }
.funnel { display: grid; gap: 2px; font-size: 13px; }
.funnel .fr { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 3px 0; }
.funnel .v { font-variant-numeric: tabular-nums; }
.funnel .of { color: var(--faint); font-size: 12px; }
.funnel .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); opacity: .6; }
.funnel .sw.todo { background: var(--line); opacity: 1; } .funnel .sw.done { background: var(--ok); opacity: 1; }
.funnel.extra { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.funnel.extra .sw { background: transparent; border: 1px solid var(--faint); }
.ms-big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 10px 0 2px; }
.ms-n { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ms-n .of { color: var(--faint); font-size: 15px; font-weight: 500; }
.ms-n.ok { color: var(--ok); } .ms-n.warn { color: var(--warn); } .ms-n.bad { color: var(--bad); }
.ms-big .faint { font-size: 12px; }

/* ---------- Доступ, Помощник ---------- */
.form2 { display: grid; gap: 10px; }
.fld { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.chk { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.log { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow: auto; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; margin: 8px 0 0; }
.note { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); margin: 8px 0; font-size: 13px; }
.note.warn { background: var(--warn-bg); }
.checks { display: grid; gap: 8px; margin: 6px 0 10px; font-size: 13px; }
.diff { font-family: var(--mono); font-size: 12px; max-height: 480px; overflow: auto; background: var(--panel-2); border-radius: 8px; padding: 8px; margin-top: 10px; }
.diff div { white-space: pre-wrap; word-break: break-word; }
.diff .add { color: var(--ok); background: var(--ok-bg); } .diff .del { color: var(--bad); background: var(--bad-bg); }
.diff .hunk { color: var(--accent); } .diff .file { color: var(--text); font-weight: 600; margin-top: 6px; } .diff .m { color: var(--faint); }
.jobs { display: grid; gap: 0; padding-top: 0; padding-bottom: 0; }
.job { padding: 10px 0; border-bottom: 1px solid var(--line-2); display: grid; gap: 4px; }
.job:last-child { border-bottom: 0; }
.job-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; }
.job-t { font-size: 13px; }
@media (max-width: 899px) {
  .ms-big { gap: 8px; } .ms-n { font-size: 19px; } .ms-n .of { font-size: 12px; }
}
.ctr.ms .ctr-v { white-space: nowrap; }

/* ---------- пакет 3: фокус, направления, задачи текстом/голосом, источники ---------- */
.focus-btn { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: var(--r); border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: 13px; min-width: 0; }
.focus-btn svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.focus-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-btn:hover { background: var(--hover); color: var(--text); }
.focus-btn.active { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-bg); color: var(--text); }
.focus-btn.active svg { color: var(--accent); }
.focus-btn.fb-top { display: none; }
.fbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.fchips .chip { height: 30px; text-decoration: none; color: var(--text); background: var(--panel); }
.fchips .chip:hover { border-color: var(--accent); }
.fnote { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; margin-bottom: 14px; border-radius: 9px; background: var(--accent-bg); font-size: 13px; }
.fnote svg { width: 15px; height: 15px; flex: none; stroke: var(--accent); fill: none; stroke-width: 1.7; stroke-linecap: round; }
.fnote span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frows { display: grid; }
.frow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; height: 40px; border-bottom: 1px solid var(--line-2); }
.frow:last-child { border-bottom: 0; }
.chk input { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid var(--faint); border-radius: 5px; display: grid; place-items: center; flex: none; cursor: pointer; }
.chk input:checked { background: var(--accent); border-color: var(--accent); }
.chk input:checked::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.chk input:disabled { opacity: .35; cursor: default; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; height: 32px; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.row2:last-child { border-bottom: 0; }
.row.shift { grid-template-columns: minmax(0, 1fr) auto 52px; }
.row .v .of, .bn-top .of { color: var(--faint); font-size: 11.5px; }
.bn-top .row { grid-template-columns: 96px minmax(0, 1fr) 70px; }
.tbl.bn { margin-top: 6px; }
.panel-h h2 a.plain { color: inherit; text-decoration: none; } .panel-h h2 a.plain:hover { color: var(--accent); }
/* дерево задач */
.tree { display: grid; }
.tgroup { border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.tgroup:last-child { border-bottom: 0; margin-bottom: 0; }
.tnode { padding: 10px 0 4px; }
.tnode-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tnode-h .li-t { font-weight: 550; }
.tnode-r { display: flex; align-items: center; gap: 8px; font-size: 12px; flex: none; font-variant-numeric: tabular-nums; }
.tnode .bar { margin: 6px 0 5px; }
.tkids { margin-left: 14px; padding-left: 12px; border-left: 2px solid var(--line-2); }
.tmore { font-size: 12px; padding: 2px 0 4px 28px; }
/* форма задачи, голос */
.grid-2f { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.taskform .note { margin: 0; }
.qbox { display: grid; gap: 6px; }
.qbox .note .btn { height: 30px; }
@media (max-width: 899px) { .qbox .note .btn { height: 40px; } }
.vrow { display: flex; align-items: center; gap: 12px; }
.vstat { font-size: 12.5px; min-width: 0; }
.btn.mic svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; }
.btn.mic.rec { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.btn.mic.off { opacity: .55; }
.acts-h .btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; }
dialog.modal:has(.taskform), dialog.modal:has(.mapform) { width: min(640px, calc(100vw - 32px)); }
/* источники */
.src-tbl td { vertical-align: middle; height: 52px; }
.src-tbl td .faint { font-size: 12px; }
.src-tbl { table-layout: fixed; }
.src-tbl th:nth-child(1) { width: 28%; } .src-tbl th:nth-child(2) { width: 9%; } .src-tbl th:nth-child(3) { width: 14%; } .src-tbl th:nth-child(4) { width: 12%; } .src-tbl th:nth-child(5) { width: 20%; }
.src-tbl td.wrap { white-space: normal; max-width: none; font-size: 12px; line-height: 1.35; }
.src-tbl td .btn { margin-left: 6px; height: 26px; }
.srcfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.card .m.warn { color: var(--warn); }
.mapgrid { display: grid; gap: 6px; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; align-items: center; font-size: 13px; }
.mrow > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow.head { font-size: 12px; color: var(--faint); }
.panel.linked { border-color: var(--accent); }
@media (max-width: 899px) {
  .focus-btn.fb-side { display: none; }
  .focus-btn.fb-top { display: flex; height: 36px; padding: 0 10px; gap: 6px; flex: none; }
  .shell { grid-template-columns: minmax(0, 1fr); } .topbar h1 { flex: none; } .topbar .meta { flex: 1 1 auto; min-width: 0; max-width: none; text-align: right; }
  .fbar { flex-wrap: wrap; }
  .grid-2f { grid-template-columns: 1fr; }
  .tkids { margin-left: 4px; padding-left: 10px; }
  .vrow { flex-wrap: wrap; }
  .btn.mic { height: 44px; flex: 1; }
  .mrow { grid-template-columns: 1fr; gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
}

.shell > div { min-width: 0; }

/* ---------- командная палитра ⌘K ---------- */
dialog.cmdk { padding: 0; border: 0; background: transparent; width: min(640px, calc(100vw - 24px)); max-height: none; margin: 12vh auto auto; overflow: visible; color: var(--text); }
dialog.cmdk::backdrop { background: rgba(0, 0, 0, .45); }
.cmdk-box { background: var(--panel); border-radius: 12px; box-shadow: var(--shadow-pop); overflow: hidden; display: flex; flex-direction: column; max-height: min(520px, 76vh); }
.cmdk-h { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.cmdk-h svg { width: 17px; height: 17px; flex: none; stroke: var(--muted); fill: none; stroke-width: 1.7; stroke-linecap: round; }
.cmdk-in { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 52px; border: 0; outline: none; background: transparent; font-size: 15px; }
.cmdk-in::placeholder { color: var(--faint); }
.cmdk-list { overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.cmdk-g { padding: 10px 10px 4px; font-size: 11.5px; color: var(--faint); }
.cmdk-i { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: var(--r); cursor: pointer; color: var(--text-2); min-width: 0; }
.cmdk-i svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.cmdk-i.on { background: var(--hover); color: var(--text); }
.cmdk-l { white-space: nowrap; flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.cmdk-s { color: var(--muted); font-size: 12.5px; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-k { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }
.cmdk-e { padding: 18px 10px; color: var(--faint); font-size: 13px; }
.cmdk-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.cmdk-foot kbd { margin-right: 2px; }
@media (max-width: 899px) {
  dialog.cmdk { margin: 8px auto auto; width: calc(100vw - 16px); }
  .cmdk-box { max-height: calc(100vh - 120px); }
  .cmdk-i { height: 46px; }
  .cmdk-in { font-size: 16px; }
  .cmdk-foot { display: none; }
}

/* ---------- «Статус» (редизайн): сводка, таблица направлений, bullet-бар, тепловая таблица, риски ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 4px; }
.kpi { padding: 14px 16px; display: grid; gap: 6px; border-left: 1px solid var(--line); min-width: 0; color: inherit; text-decoration: none; }
.kpi:first-child { border-left: 0; }
@media (hover: hover) { a.kpi:hover { background: var(--hover); } a.kpi:hover .l { color: var(--text-2); } }
.kpi .l { color: var(--muted); font-size: 12.5px; }
.kpi-v { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.kpi-v small { font-size: 14px; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.kpi-v.warn { color: var(--warn); } .kpi-v.bad { color: var(--bad); } .kpi-v.ok { color: var(--ok); }
.kpi .s { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpis > :first-child { border-top-left-radius: var(--radius); border-bottom-left-radius: var(--radius); } .kpis > :last-child { border-top-right-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.legend { display: inline-flex; gap: 14px; align-items: center; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend .mk { display: inline-block; width: 2px; height: 12px; background: var(--text); border-radius: 1px; }
.legend .st { font-size: 12px; color: var(--muted); }
.bb { position: relative; height: 6px; border-radius: 3px; background: var(--line-strong); width: 100%; }
.bb i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--muted); }
.bb i.ok { background: var(--ok); } .bb i.warn { background: var(--warn); } .bb i.bad { background: var(--bad); } .bb i.acc { background: var(--accent); }
.bb b { position: absolute; top: -4px; width: 2px; height: 14px; border-radius: 1px; background: var(--text); opacity: .85; }
.tblwrap { overflow: visible; }
.tbl.dirs { table-layout: fixed; }
.tbl.dirs col.c-l { width: 22%; } .tbl.dirs col.c-b { width: 22%; } .tbl.dirs col.c-f { width: 12%; } .tbl.dirs col.c-p { width: 6%; } .tbl.dirs col.c-t { width: 15%; } .tbl.dirs col.c-s { width: 11%; } .tbl.dirs col.c-st { width: 12%; }
.tbl.dirs td { max-width: none; }
.tbl tr.grp td { height: 34px; background: var(--panel-2); font-weight: 600; font-size: 12.5px; color: var(--text); border-bottom: 1px solid var(--line); }
.tbl tr.grp td .m, .tbl tr.grp td.m { font-weight: 400; color: var(--muted); margin-left: 8px; font-size: 12px; }
.tbl tr.grp td.m { text-align: right; padding-right: 12px; }
.tbl td.lbl { padding-left: 24px; color: var(--text-2); } .tbl td.lbl.sub { padding-left: 40px; color: var(--muted); }
.tbl td.barc { padding-right: 20px; }
.tbl .of { color: var(--faint); font-size: 12px; } .tbl .fv { font-weight: 600; color: var(--text); }
.tbl.dirs .st { font-size: 12.5px; }
.handed-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.handed-row > div { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-left: 1px solid var(--line); min-width: 0; }
.handed-row > div:first-child { border-left: 0; }
.handed-row .check svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.handed-row .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.handed-row .m { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tl-rail { position: relative; display: grid; padding-top: 4px; }
.tl-rail::before { content: ""; position: absolute; left: 7px; right: 7px; top: 11px; height: 2px; background: var(--line-strong); }
.tl-fill { position: absolute; left: 7px; top: 11px; height: 2px; background: var(--ok); }
.tl-today { position: absolute; top: -2px; height: 28px; width: 0; border-left: 1px dashed var(--accent); z-index: 2; }
.tl-today em { position: absolute; top: -16px; left: 4px; font: 500 11px/1 var(--font); color: var(--accent); white-space: nowrap; }
.page-status .tl-i .tl-d { width: 14px; height: 14px; background: var(--panel); border-color: var(--line-strong); }
.page-status .tl-i.done .tl-d { background: var(--ok); border-color: var(--ok); }
.page-status .tl-i.wip .tl-d { border-color: var(--accent); background: var(--accent-bg); box-shadow: none; }
.page-status .tl-i.alarm .tl-d { border-color: var(--bad); }
.page-status .tl-n { color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.page-status .tl-i.done .tl-n { color: var(--muted); }
.page-status .track { padding: 26px 16px 14px; }
.vtl { display: none; }
.callout { display: flex; align-items: center; gap: 10px; margin: 0 16px 14px; padding: 8px 12px; border-radius: var(--r); background: var(--bad-bg); font-size: 12.5px; }
.callout .k { color: var(--bad); font-weight: 600; white-space: nowrap; } .callout .a { margin-left: auto; color: var(--muted); white-space: nowrap; }
.two { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.heat .tbl th { position: static; white-space: normal; line-height: 1.25; height: auto; padding-top: 8px; padding-bottom: 8px; vertical-align: bottom; }
.heat td.c { text-align: right; } .heat td.c.click { cursor: pointer; }
.heat td.c span { display: inline-block; min-width: 46px; padding: 3px 8px; border-radius: 5px; font-weight: 500; color: var(--text); }
.heat td.c small, .heat tr.tot small { color: var(--muted); font-size: 11px; font-weight: 400; }
.heat td.c.z span { color: var(--faint); font-weight: 400; }
.heat td.c.mm span { box-shadow: inset 0 0 0 1px var(--warn); }
@media (hover: hover) { .heat td.c.click:hover span { box-shadow: inset 0 0 0 1px var(--text-2); } }
.heat tr.tot td { font-weight: 600; background: var(--panel-2); }
.risks { display: flex; flex-direction: column; }
.risk1 { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline; padding: 9px 16px; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none; }
.risk1 .t { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.risk1 .s { grid-column: 2 / 4; font-size: 12px; color: var(--muted); }
.risk1 .v { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
@media (hover: hover) { a.risk1:hover .t { color: var(--accent); } }
button.more { -webkit-appearance: none; appearance: none; border: 0; background: transparent; width: 100%; text-align: left; padding: 10px 16px; color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 4px; cursor: pointer; }
button.more svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.mstack { display: none; }
@media (max-width: 1100px) and (min-width: 900px) { .two { grid-template-columns: 1fr; } }
@media (max-width: 899px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 12px 14px; } .kpi:nth-child(3) { border-left: 0; } .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .kpis > * { border-radius: 0 !important; }
  .kpi-v { font-size: 22px; }
  .section-t .legend { display: none; }
  .tbl.dirs { display: none; }
  .tblwrap:has(.tbl.dirs) { display: none; }
  .mstack { display: grid; gap: 12px; }
  .mcard .panel-h { min-height: 42px; }
  .crow { display: grid; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none; }
  .crow:last-child { border-bottom: 0; }
  .mr1, .mr2 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .mr1 b { font-size: 17px; font-weight: 600; } .mr1 .of { color: var(--faint); font-size: 13px; }
  .mr2 { font-size: 12.5px; color: var(--muted); } .mr2 .st { font-size: 12.5px; }
  .handed-row { grid-auto-flow: row; }
  .handed-row > div { border-left: 0; border-top: 1px solid var(--line); } .handed-row > div:first-child { border-top: 0; }
  .tl-rail { display: none; }
  .page-status .track { padding: 12px 14px 4px; }
  .vtl { display: grid; }
  .vdone { display: flex; gap: 8px; align-items: center; color: var(--ok); font-size: 12.5px; padding-bottom: 8px; } .vdone svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
  .vt { display: grid; grid-template-columns: 14px 92px minmax(0, 1fr); gap: 10px; align-items: start; padding: 6px 0; font-size: 13px; }
  .vt .tl-d { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); margin-top: 3px; }
  .vt.wip .tl-d { border-color: var(--accent); background: var(--accent-bg); } .vt.alarm .tl-d { border-color: var(--bad); }
  .vt .tl-date { margin: 0; color: var(--muted); font-size: 12.5px; } .vt.alarm .tl-date { color: var(--bad); } .vt .tl-n { margin: 0; }
  .vmore { font-size: 12px; padding: 4px 0 8px 24px; }
  .callout { margin: 8px 14px 12px; flex-wrap: wrap; } .callout .a { margin-left: 0; }
  .two { grid-template-columns: 1fr; }
  .heat .tbl.keep th, .heat .tbl.keep td { padding: 6px 4px; font-size: 12px; }
  .heat .tbl.keep th:first-child, .heat .tbl.keep td:first-child { padding-left: 10px; width: 84px; }
  .heat td.c span { min-width: 0; padding: 2px 4px; }
  .heat td.c small { display: none; }
  .heat { overflow-x: auto; }
  .risk1 .t { white-space: normal; }
  .fresh-go::before { content: ""; }
}

/* ---------- «Предложения»: triage (список слева, карточка справа) ---------- */
.tri-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.tri-tabs { margin-bottom: 12px; } .tri-top .tri-tabs { margin: 0; }
.tri-tabs .seg-n { margin-left: 6px; }
.tri-keys { display: flex; gap: 16px; color: var(--faint); font-size: 12px; } .tri-keys kbd { margin-right: 2px; }
.tri { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.tri-lp { position: sticky; top: calc(var(--top-h) + 16px); max-height: calc(100vh - var(--top-h) - 120px); overflow-y: auto; overscroll-behavior: contain; }
.tri-rp { min-height: 320px; }
.tri-g + .tri-g { border-top: 1px solid var(--line); }
.tri-gh { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px 6px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; flex-wrap: wrap; }
.tri-g:first-child .tri-gh { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.tri-gh .gt { font-size: 12.5px; font-weight: 600; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tri-gh .ga { display: flex; gap: 4px; } .tri-gh .ga .btn { height: 26px; font-size: 12px; padding: 0 8px; }
.tri-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 3px 10px; align-items: baseline; padding: 10px 14px; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none; position: relative; }
.tri-row:last-child { border-bottom: 0; }
.tri-row .tt { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tri-row .mm { grid-column: 2 / 4; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tri-row .dot { transform: translateY(-1px); }
@media (hover: hover) { .tri-row:hover { background: var(--hover); } }
.tri-row.on { background: var(--accent-bg); } .tri-row.on::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 1px; background: var(--accent); }
.tri-empty { padding: 28px 16px; text-align: center; }
.tri-card { padding: 18px 22px 22px; display: grid; gap: 16px; }
.tri-ag { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; margin-bottom: 8px; }
.tri-h h2 { font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; }
.tri-why { margin: -6px 0 0; color: var(--muted); font-size: 13px; }
.qcard { border-radius: var(--radius); background: var(--accent-bg); padding: 12px 14px; display: grid; gap: 8px; }
.qcard.warn { background: var(--warn-bg); }
.qh { font-size: 12px; font-weight: 600; color: var(--accent); } .qcard.warn .qh { color: var(--warn); }
.qt { font-size: 13.5px; }
.qopts { display: flex; flex-wrap: wrap; gap: 6px; }
.btn.chipb { height: 30px; border-radius: 15px; background: var(--panel); font-weight: 500; }
.btn.chipb.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.tri-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn.bad-t { color: var(--bad); }
.sec2 { display: grid; gap: 8px; }
.sh { font-size: 12px; font-weight: 600; color: var(--muted); }
.diffbox { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: 13px; }
.dh2 { padding: 8px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; }
.dl { display: grid; grid-template-columns: 14px minmax(110px, 160px) minmax(0, 1fr); gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--line-2); align-items: baseline; }
.dl:last-child { border-bottom: 0; }
.dl > span:first-child { font-family: var(--mono); font-weight: 600; }
.dl.add > span:first-child { color: var(--ok); } .dl.chg > span:first-child { color: var(--warn); }
.dl.add { background: color-mix(in srgb, var(--ok-bg) 50%, transparent); }
.dl .k { color: var(--muted); } .dl .v { overflow-wrap: anywhere; }
.srcmsg { margin: 0; padding: 10px 14px; border-left: 2px solid var(--line-strong); background: var(--panel-2); border-radius: 0 var(--r) var(--r) 0; display: grid; gap: 6px; }
.sm-h { font-size: 12px; color: var(--muted); } .sm-t { white-space: pre-line; font-size: 13px; overflow-wrap: anywhere; }
.tri-card .kv { padding: 0; grid-template-columns: 120px minmax(0, 1fr); }
.tri-back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 13.5px; height: 44px; margin: -12px 0 -8px -4px; }
.tri-back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
@media (max-width: 1100px) and (min-width: 900px) { .tri { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); } }
@media (max-width: 899px) {
  .tri { display: block; }
  .tri-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .tri-gh .ga { width: 100%; } .tri-gh .ga .btn { height: 40px; flex: 1; font-size: 13.5px; }
  .tri-row { padding: 12px 14px; min-height: 56px; }
  .tri-row .tt { white-space: normal; }
  .tri.one .tri-card { padding: 0; }
  .tri-h h2 { font-size: 18px; }
  .tri-acts { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 4; padding: 8px; margin: 0 -6px; border-radius: 14px; background: color-mix(in srgb, var(--panel-2) 94%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-pop); order: 10; }
  .tri-acts .btn { flex: 1; height: 44px; } .tri-acts .btn kbd { display: none; } .tri-acts .btn.bad-t { flex: 0 0 auto; }
  .btn.chipb { height: 40px; border-radius: 20px; padding: 0 14px; }
  .dl { grid-template-columns: 14px minmax(0, 1fr); } .dl .v { grid-column: 2; }
  .tri-tabs { display: flex; width: 100%; overflow-x: auto; } .tri-tabs button { flex: 1 0 auto; }
}

/* ---------- пакет 4: объекты, фокус, задачи, настройки в общей системе ---------- */
.resbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: -2px 0 12px; min-height: 28px; }
.resbar .rc { color: var(--text-2); font-size: 12.5px; margin-right: 6px; font-weight: 500; }
.pill { -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 6px 0 10px; border-radius: 13px; border: 0; background: var(--accent-bg); color: var(--text); font-size: 12.5px; cursor: pointer; }
.pill svg { width: 13px; height: 13px; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; }
@media (hover: hover) { .pill:hover svg { stroke: var(--text); } }
.link-b { -webkit-appearance: none; appearance: none; border: 0; background: transparent; color: var(--accent); font-size: 12.5px; cursor: pointer; padding: 0 6px; }
.tbl.objs td { height: 36px; }
.tbl.objs td.code { color: var(--text); }
.more-btn { display: flex; width: 100%; margin-top: 12px; }
.cards .card .card-r .m { font-family: var(--font); }
.dot.urg { margin-right: 6px; transform: translateY(-2px); }
.li .btn.icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.li .btn.icon.ok { color: var(--ok); }
.crow.fc { display: grid; gap: 7px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.crow.fc:last-child { border-bottom: 0; }
.crow.fc .mr1, .crow.fc .mr2 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.crow.fc .mr1 > span:first-child { font-size: 13px; color: var(--text-2); }
.crow.fc .mr1 b { font-size: 17px; font-weight: 600; letter-spacing: -.01em; } .crow.fc .of { color: var(--faint); font-size: 12.5px; }
.crow.fc .mr2 { font-size: 12px; color: var(--muted); }
.crow.fc.sm { padding: 8px 0; } .crow.fc.sm .mr1 b { font-size: 14px; }
.panel-h .right .st { font-size: 12.5px; }
.step .sr .st { font-size: 12px; }
.chip { background: var(--panel); }
@media (max-width: 899px) {
  .tabs-s { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; } .tabs-s::-webkit-scrollbar { display: none; } .tabs-s button { flex: 0 0 auto; }
  .tbl td.sel, .tbl th.sel { width: 58%; }
  .tbl.keep td.sel .select { padding-left: 10px; padding-right: 26px; }
  .resbar { margin-top: 0; }
  .pill { height: 32px; border-radius: 16px; }
}
dialog.modal:focus, dialog.modal:focus-visible { outline: none; box-shadow: var(--shadow-pop); }

/* ---------- DDS: планёрка направления ---------- */
.gap { height: var(--gap); } .gap-b { margin-bottom: var(--gap); }
.dds-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--gap); align-items: center; margin-bottom: var(--gap); }
.dds-f { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.dds-f .fchips .chip.on { border-color: var(--accent); background: var(--accent-bg); }
.tm { display: flex; align-items: center; gap: 16px; padding: 10px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.tm-l { display: grid; gap: 0; font-size: 12px; }
.tm-v { font-size: 34px; line-height: 1.05; font-weight: 600; letter-spacing: -.02em; }
.tm-b { display: flex; gap: 6px; }
.tm-go { min-width: 108px; }
.tm.run .tm-v { color: var(--text); } .tm:not(.run) .tm-v { color: var(--text-2); }
.tm.warn .tm-v { color: var(--warn); } .tm.over { border-color: color-mix(in srgb, var(--bad) 55%, transparent); } .tm.over .tm-v { color: var(--bad); }
.dds-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.dds-sum > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.dds-sum .cap { flex: 1 1 100%; font-size: 12px; color: var(--muted); }
.dds-sum b { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.dds-n { display: inline-flex; align-items: center; gap: 8px; }
.dds-n i { font-style: normal; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-bg); color: var(--accent); font-size: 11.5px; font-weight: 600; }
.section-t .dds-n { font-weight: 600; }
.dds-evs { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 0 6px; font-size: 13px; color: var(--text-2); }
.dds-ev b { color: var(--text); font-weight: 600; }
.dds-hint { font-size: 12px; padding-top: 8px; }
.dds-kpis { display: grid; }
.kpi-r { display: grid; grid-template-columns: minmax(0, 1fr) 90px 110px 90px 130px; gap: 4px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.kpi-r:last-child { border-bottom: 0; }
.kpi-c { display: grid; text-align: right; font-size: 13.5px; }
.kpi-c b { font-size: 17px; font-weight: 600; }
.kpi-c .cap { font-size: 11px; color: var(--faint); }
.kpi-s { justify-self: end; }
.dds-cm { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; border-radius: var(--r); background: var(--panel-2); font-size: 12.5px; }
.dds-cm svg { width: 14px; height: 14px; stroke: var(--ok); fill: none; stroke-width: 2; flex: none; }
.dds-cm.warn { background: var(--warn-bg); } .dds-cm.warn svg { stroke: var(--warn); }
.dds-cm.bad { background: var(--bad-bg); color: var(--bad); } .dds-cm.bad .btn { margin-left: auto; height: 28px; }
.lv { display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 5px; border-radius: 6px; font-size: 11.5px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }
.lv-T1 { background: var(--accent-bg); color: var(--accent); box-shadow: none; } .lv-T2 { background: var(--warn-bg); color: var(--warn); box-shadow: none; } .lv-T3 { background: var(--bad-bg); color: var(--bad); box-shadow: none; }
.li.blk { grid-template-columns: 34px minmax(0, 1fr) auto; column-gap: 10px; }
.li.blk > .lv { grid-row: 1 / span 2; }
.li.blk .li-t, .li.blk .li-m { grid-column: 2; } .li.blk .li-r { grid-column: 3; }
.li.blk .li-m { white-space: normal; }
.li.blk.hot .li-t { color: var(--bad); }
.select.lvl { height: 28px; width: auto; min-width: 104px; padding: 0 8px; font-size: 12.5px; }
.li.top { grid-template-columns: 22px minmax(0, 1fr) auto; column-gap: 10px; }
.li.top > .chk { grid-row: 1 / span 2; }
.li.top .li-t, .li.top .li-m { grid-column: 2; } .li.top .li-r { grid-column: 3; }
.li.top.done .li-t { color: var(--muted); text-decoration: line-through; } .li.top.dropped { opacity: .55; }
.dds-add { margin-top: 8px; width: 100%; justify-content: center; }
.dds-add svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.esc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--gap); }
.esc-c .sub-t { justify-content: space-between; }
.empty.sm { padding: 10px 0; font-size: 12.5px; }
.lvrow { display: grid; grid-template-columns: minmax(160px, 1fr) repeat(3, minmax(0, 1.2fr)); gap: 10px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.lvrow:last-child { border-bottom: 0; }
.lvn { font-size: 13.5px; padding-bottom: 8px; }
.kedit { padding: 10px 0; border-bottom: 1px solid var(--line-2); display: grid; gap: 8px; }
.kedit:last-child { border-bottom: 0; }
.kedit.off .ke-f { opacity: .5; }
.ke-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; } .ke-h .chk { flex: 1 1 auto; display: flex; gap: 8px; align-items: center; }
.ke-f { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto auto; gap: 8px; align-items: end; }
.ke-q { display: flex; gap: 4px; align-items: center; font-size: 12px; } .ke-q .btn { height: var(--ctl); padding: 0 8px; }
.dds-set { max-width: 560px; }
@media (min-width: 1600px) { .tm-v { font-size: 44px; } .dds-sum b { font-size: 30px; } }
@media (max-width: 1100px) and (min-width: 900px) { .esc { grid-template-columns: 1fr; } .kpi-r { grid-template-columns: minmax(0, 1fr) 80px 96px 80px 120px; } }
@media (max-width: 899px) {
  .tabbar { grid-template-columns: repeat(6, 1fr); }
  .dds-top { grid-template-columns: 1fr; gap: 10px; }
  .tm { justify-content: space-between; }
  .tm-v { font-size: 30px; }
  .dds-f { flex-direction: column; align-items: stretch; }
  .dds-f .fchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .dds-f .fchips .chip { flex: none; }
  .dds-f .link { align-self: flex-end; font-size: 12.5px; }
  .dds-sum { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dds-sum b { font-size: 20px; }
  .kpi-r { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-r .kpi-n { grid-column: 1 / -1; }
  .kpi-r .kpi-c { text-align: left; }
  .kpi-r .kpi-s { grid-column: 1 / -1; justify-self: start; }
  .li.blk { grid-template-columns: 34px minmax(0, 1fr); }
  .li.blk .li-r { grid-column: 2; grid-row: 3; flex-wrap: nowrap; justify-content: flex-end; }
  .li.blk .li-r .select.lvl { flex: 1 1 auto; min-width: 0; max-width: 200px; }
  .select.lvl { height: 36px; font-size: 14px; }
  .esc { grid-template-columns: 1fr; }
  .lvrow { grid-template-columns: 1fr; gap: 8px; }
  .lvn { padding: 0; font-weight: 550; }
  .ke-f { grid-template-columns: 1fr 1fr; }
  .ke-q { grid-column: 1 / -1; } .ke-f > .btn { grid-column: 1 / -1; }
}
