@import url("/static/fonts/fonts.css");

/* Тендерный помощник: деловой стиль. PT Serif — заголовки, PT Sans — интерфейс и данные.
   Фирменный знак — «Т», у которой ножка уходит веткой к салатовой точке: тот же рисунок, что у связей в дереве. */
:root {
  --ink: #16201a;
  --ink-2: #364139;
  --muted: #59655d;
  --faint: #879189;
  --line: #dde2dc;
  --line-2: #eaede8;
  --canvas: #f2f4ef;
  --panel: #fff;
  --head: #f7f8f5;
  --brand: #0f3a2b;
  --brand-2: #174d39;
  --brand-3: #1f5c45;
  --lime: #8ee06a;
  --accent: #0b7a43;
  --accent-ink: #075e33;
  --accent-soft: #e4f1e8;
  --accent-line: #b2d5be;
  --amber: #c08a1c;
  --amber-ink: #6b4500;
  --amber-soft: #fbf0d3;
  --red: #b42318;
  --red-soft: #fcebea;
  --blue: #1f4d8a;
  --blue-soft: #e5eef8;
  --violet: #6d4bb5;
  --violet-soft: #efeafa;
  --gray-soft: #edf0eb;
  --shadow: 0 1px 2px rgba(16, 32, 24, .05), 0 4px 14px rgba(16, 32, 24, .05);
  --r: 10px;
  --r-s: 7px;
  --wrap: 1360px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #bfc8c1 transparent; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 15px/1.55 "PT Sans", "Segoe UI", Arial, sans-serif;
  font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased;
}
::selection { background: #cbe5d4; color: var(--ink); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(22, 32, 26, .32); }
a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; }
h1 { font: 700 28px/1.2 "PT Serif", Georgia, serif; letter-spacing: -.01em; text-wrap: balance; }
h2 { font: 700 18.5px/1.3 "PT Serif", Georgia, serif; }
h3 { font: 700 15px/1.35 "PT Sans", Arial, sans-serif; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.num, td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { flex: none; }

/* ---------- знак ---------- */
.mark { display: block; flex: none; }
.mark .mk-tile { fill: var(--brand); }
.mark .mk-t { stroke: #fff; }
.mark .mk-dot { fill: var(--lime); }
.mark .mk-ping { fill: none; stroke: var(--lime); stroke-width: 2.4; opacity: 0; transform-box: fill-box; transform-origin: center; }
.mark.hd .mk-tile { fill: var(--brand-3); stroke: rgba(255, 255, 255, .16); stroke-width: 1.5; }
.logo:hover .mark .mk-ping, .mark.ping .mk-ping { animation: ping 1.1s var(--ease); }
@keyframes ping { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
.mark.draw .mk-t { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .9s var(--ease) .15s forwards; }
.mark.draw .mk-dot { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: dot .45s var(--ease) .95s forwards; }
.mark.draw .mk-ping { animation: ping 1.2s var(--ease) 1.25s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dot { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ---------- шапка ---------- */
.app-top { background: var(--brand); color: #dce8e0; }
.app-top .in { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; height: 58px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; flex: none; }
.logo:hover { color: #fff; }
.logo .name { font: 700 17.5px/1 "PT Serif", Georgia, serif; letter-spacing: -.005em; }
.app-top .org { color: #a9c4b4; font-size: 14px; padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .16); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-top .user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; white-space: nowrap; }
.app-top .user form { margin: 0 0 0 6px; }
.app-top .linkbtn { color: #a9c4b4; }
.app-top .linkbtn:hover { color: #fff; }
.app-top .ava { box-shadow: 0 0 0 2px var(--brand); }
.demo-tag { font-size: 11.5px; font-weight: 700; color: var(--brand); background: var(--lime); border-radius: 4px; padding: 1px 6px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { color: var(--ink); }

.nav { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.nav .in { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav .in::-webkit-scrollbar { display: none; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 14px 12px 13px; white-space: nowrap;
  color: var(--ink-2); text-decoration: none; font-size: 14.5px; transition: color .15s, background-color .15s;
}
.nav a .i { color: var(--faint); transition: color .15s; }
.nav a:first-child { margin-left: -12px; }
.nav a:hover { color: var(--ink); background: var(--head); }
.nav a:hover .i { color: var(--ink-2); }
.nav a.on { color: var(--ink); font-weight: 700; }
.nav a.on .i { color: var(--accent); }
.nav a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.nav .cnt {
  font-size: 12px; font-weight: 700; line-height: 18px; min-width: 20px; text-align: center; padding: 0 6px;
  border-radius: 9px; color: var(--accent-ink); background: var(--accent-soft); font-variant-numeric: tabular-nums;
}

/* ---------- страница ---------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 26px 32px 56px; }
.page-head { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 20px; }
.page-head .act { margin-left: auto; display: flex; gap: 10px; flex: none; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.crumbs .sep { color: var(--faint); }
.lead { color: var(--ink-2); margin-top: 8px; max-width: 80ch; }
.lead b { color: var(--ink); white-space: nowrap; }
.foot {
  max-width: var(--wrap); margin: 0 auto; padding: 4px 32px 34px; font-size: 13px; color: var(--muted);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
}
.foot-mark { display: inline-flex; align-items: center; gap: 8px; font: 700 13.5px/1 "PT Serif", Georgia, serif; color: var(--ink-2); }

/* ---------- панели ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: clip; }
.panel + .panel, .panel + .grid2, .grid2 + .panel, .views + .panel, .today + .panel, .today + .views,
.panel + .files-slot, .files-slot + .panel, .files-slot > .panel + .panel { margin-top: 18px; }
.panel-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; padding: 18px 22px 0; }
.panel-h .meta { color: var(--muted); font-size: 13.5px; }
.panel-h .act { margin-left: auto; display: flex; gap: 8px; align-self: center; }
.panel-b { padding: 14px 22px 22px; }
.panel-h + .tbl-wrap, .panel-h + .tree-wrap { margin-top: 14px; }
.panel-note { padding: 10px 22px 14px; font-size: 13px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px;
  font: 700 14px/1 "PT Sans", Arial, sans-serif; color: #fff; background: var(--accent); border: 1px solid var(--accent);
  border-radius: var(--r-s); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:hover { color: #fff; background: var(--accent-ink); border-color: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.sec { color: var(--ink); background: #fff; border-color: #c6cec8; font-weight: 400; }
.btn.sec:hover { color: var(--ink); border-color: #8e9a92; background: #fff; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13.5px; }
.btn.lg { height: 46px; padding: 0 20px; font-size: 15.5px; }
.btn.wide { width: 100%; }
.btn.icon { width: 32px; padding: 0; }
.btn svg { width: 16px; height: 16px; flex: none; }

input[type=text], input[type=password], input[type=search], select, textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: #fff; border: 1px solid #c6cec8; border-radius: var(--r-s);
  height: 38px; padding: 0 11px; transition: border-color .15s, box-shadow .15s;
}
select {
  -webkit-appearance: none; appearance: none; padding-right: 30px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%235b6760' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
}
textarea { height: auto; min-height: 92px; width: 100%; padding: 9px 11px; resize: vertical; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: #9ea9a1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 122, 67, .16); }
::placeholder { color: #66716a; opacity: 1; }
input[type=search] {
  padding-left: 33px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='4.6' fill='none' stroke='%235b6760' stroke-width='1.6'/%3E%3Cpath d='m10.5 10.5 3 3' stroke='%235b6760' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 11px center;
}
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
label.f, span.f { display: block; font-size: 13px; color: var(--muted); margin: 16px 0 6px; }

/* ---------- значки: направление, площадка, сотрудник, срок ---------- */
.dic {
  --s: 36px; width: var(--s); height: var(--s); flex: none; display: inline-grid; place-items: center;
  border-radius: calc(var(--s) * .3); color: var(--dc, var(--accent)); background: var(--db, var(--accent-soft));
}
.dic svg { width: 58%; height: 58%; }
.dic-med { --dc: #b4233c; --db: #fcebee; }
.dic-bio { --dc: #2f7d32; --db: #e7f3e5; }
.dic-pharm { --dc: #6d4bb5; --db: #efeafa; }
.dic-food { --dc: #b45309; --db: #fdefdf; }
.dic-merc { --dc: #3b5b8c; --db: #e7eef8; }
.dic-recyc { --dc: #0f766e; --db: #dff2ef; }
.dic-kbu { --dc: #8a5a14; --db: #f5ecda; }
.dic-dez { --dc: #1f6fb2; --db: #e3eefa; }
.dic-siz { --dc: #4b5f6b; --db: #e8eef1; }
.dic-none { --dc: #87918a; --db: #edf0eb; }

.plat { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.plat::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); flex: none; }
.plat-sk::before { background: var(--blue); }
.plat-mw::before { background: var(--violet); }

.ava {
  --s: 24px; --c: var(--accent); width: var(--s); height: var(--s); flex: none; display: inline-grid; place-items: center;
  border-radius: 50%; background: var(--c); color: #fff; font: 700 calc(var(--s) * .4)/1 "PT Sans", Arial, sans-serif; letter-spacing: .02em;
}

/* обратный отсчёт: текст + полоска прошедшего окна приёма заявок */
.cd { display: inline-flex; flex-direction: column; gap: 4px; margin-top: 6px; min-width: 112px; vertical-align: top; }
.cd-t {
  align-self: flex-start; padding: 0 8px; border-radius: 5px; font-size: 12.5px; line-height: 21px; white-space: nowrap;
  color: var(--ink-2); background: var(--gray-soft); font-variant-numeric: tabular-nums;
}
.cd-bar { height: 3px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.cd-bar i { display: block; height: 100%; border-radius: 2px; background: #9fb4a6; }
.cd.warm .cd-t { color: var(--amber-ink); background: var(--amber-soft); }
.cd.warm .cd-bar i { background: var(--amber); }
.cd.hot .cd-t { color: var(--red); background: var(--red-soft); font-weight: 700; }
.cd.hot .cd-bar i { background: var(--red); }
.cd.past .cd-t { color: var(--faint); background: none; padding: 0; }
.cd.past .cd-bar { display: none; }
.cd.big { min-width: 0; width: 100%; margin-top: 8px; }
.cd.big .cd-t { font-size: 13.5px; line-height: 24px; }
.cd.big .cd-bar { height: 5px; border-radius: 3px; }

/* ---------- лента: сводка «Сегодня» ---------- */
.today { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
.today-main {
  position: relative; overflow: hidden; border-radius: var(--r); padding: 24px 28px 26px; color: #d7e6dc;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='220' viewBox='0 0 360 220'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M40 40h140M110 40v70a20 20 0 0 0 20 20h60M110 80v10a20 20 0 0 0 20 20h150M250 130v30a16 16 0 0 0 16 16h70'/%3E%3C/g%3E%3Cg fill='%238ee06a' fill-opacity='.22'%3E%3Ccircle cx='196' cy='130' r='6'/%3E%3Ccircle cx='286' cy='110' r='6'/%3E%3Ccircle cx='340' cy='176' r='6'/%3E%3C/g%3E%3C/svg%3E") no-repeat right -70px top -46px;
}
.today-date { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 13.5px; color: #9fbcab; }
.today-date .sep { color: #5f8572; }
.today-main h1 { margin-top: 12px; color: #fff; font-size: 30px; }
.today-lead { margin-top: 8px; max-width: 62ch; font-size: 15.5px; color: #c4d8cb; }
.today-lead b { color: #fff; }
.today-lead b.hot { color: #ffb4a8; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr); gap: 10px; margin-top: 22px; }
.kpi {
  display: flex; flex-direction: column; justify-content: space-between; min-height: 92px; padding: 12px 14px; border-radius: 8px;
  background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .08);
  transition: background-color .15s, border-color .15s;
}
a.kpi:hover { color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .18); }
.kpi .v { font: 700 28px/1 "PT Sans", Arial, sans-serif; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 13px; color: #a8c4b4; line-height: 1.3; }
.kpi.hot .v { color: #ffb4a8; }
.kpi-chart { justify-content: flex-start; gap: 4px; }
.kpi-chart .bars14 { height: 26px; margin-top: auto; }
.bars14 { display: flex; align-items: flex-end; gap: 3px; height: 40px; }
.bars14 i { flex: 1; min-width: 3px; border-radius: 2px 2px 0 0; background: rgba(142, 224, 106, .38); }
.bars14 i:last-child { background: var(--lime); }

.today-soon { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 20px 14px; display: flex; flex-direction: column; }
.soon-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.soon-h a { font-size: 13.5px; color: var(--accent-ink); }
.soon { list-style: none; margin: 10px 0 0; padding: 0; }
.soon li + li { border-top: 1px solid var(--line-2); }
.soon a { display: flex; align-items: center; gap: 12px; padding: 11px 6px; margin: 0 -6px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.soon a:hover { background: var(--head); color: var(--ink); }
.s-body { flex: 1; min-width: 0; }
.s-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; font-size: 14px; line-height: 1.35; }
.s-c { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.s-side .cd { margin: 0; min-width: 104px; }
.s-side .cd-t { align-self: flex-end; }
.s-sum { font-size: 13px; font-variant-numeric: tabular-nums; }
.soon-empty { margin-top: 14px; color: var(--muted); }

/* ---------- лента: выборки, вкладки, фильтры ---------- */
.views { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.views .lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); margin-right: 2px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px; border-radius: 16px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: border-color .15s, background-color .15s, color .15s;
}
.chip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.chip .dot.amber { background: var(--amber); }
.chip .dot.red { background: var(--red); }
.chip:hover { color: var(--ink); border-color: #a9b4ac; }
.chip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.chip.on b { color: var(--accent-ink); }
.chip .x { font-size: 13px; color: var(--accent-ink); margin-left: 2px; }

.feed-h { padding-bottom: 4px; }
.tabs { display: flex; gap: 2px; padding: 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-top: 8px; }
.tabs a { position: relative; padding: 13px 10px 12px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.tabs a:first-child { margin-left: -10px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); font-weight: 700; }
.tabs a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--ink); }
.tabs .cnt { margin-left: 6px; padding: 0 7px; border-radius: 9px; font-size: 12.5px; color: var(--muted); background: var(--gray-soft); font-weight: 400; font-variant-numeric: tabular-nums; }
.tabs a.on .cnt { color: #fff; background: var(--ink); font-weight: 700; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 22px; background: var(--head); border-bottom: 1px solid var(--line); }
.toolbar .q { flex: 1 1 230px; min-width: 200px; max-width: 340px; }
.toolbar .reset { font-size: 14px; color: var(--muted); margin-left: 4px; }
.reset { font-size: 14px; color: var(--muted); }
.hint { padding: 10px 22px; font-size: 14px; color: var(--ink-2); background: #fff; border-bottom: 1px solid var(--line-2); }
.hint a { color: var(--accent-ink); }

/* ---------- таблицы ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th {
  text-align: left; font: 700 12.5px/1.3 "PT Sans", Arial, sans-serif; color: var(--muted); white-space: nowrap;
  padding: 10px 14px; background: var(--head); border-bottom: 1px solid var(--line);
}
.tbl td { padding: 16px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl th.num { text-align: right; }
.tbl tr > :first-child { padding-left: 22px; }
.tbl tr > :last-child { padding-right: 22px; }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl tbody tr { transition: background-color .12s; }
.tbl tbody tr:hover { background: #fafbf8; }
.tbl a.title, .tbl a.strong { font-weight: 700; text-decoration: none; }
.tbl a.title:hover, .tbl a.strong:hover { text-decoration: underline; }
.tbl .sub { margin-top: 4px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.tbl .sub > * + *::before { content: "·"; margin: 0 7px; color: var(--faint); }
.tbl .sub .plat + *::before { margin-left: 8px; }
.tbl.compact td { padding-top: 11px; padding-bottom: 11px; }
tr.dim > td { opacity: .45; transition: opacity .4s; }

.feed .ic-col { width: 1%; padding-right: 0; }
.feed td.ic-col { padding-top: 15px; }
.when b { display: block; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.t a.title { color: var(--ink); font-size: 15.5px; line-height: 1.38; }
.t a.title:hover { color: var(--accent-ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  display: inline-flex; align-items: center; padding: 0 8px; border-radius: 5px; font-size: 12.5px; line-height: 22px;
  white-space: nowrap; color: var(--ink-2); background: var(--gray-soft);
}
.tag.green { color: var(--accent-ink); background: var(--accent-soft); }
.tag.amber { color: var(--amber-ink); background: var(--amber-soft); }
.why { margin-top: 7px; font-size: 13px; line-height: 1.45; color: var(--accent-ink); max-width: 74ch; }
.cust { max-width: 300px; }
.cust .name { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }
.cust .reg { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.sum { font-weight: 700; font-size: 15px; }
.decide { display: flex; gap: 6px; margin: 0; }
td.stcell { width: 1%; white-space: nowrap; }
.spec-dl {
  display: flex; width: fit-content; align-items: center; gap: 6px; margin-top: 9px; font-size: 13px; color: var(--accent-ink); text-decoration: none;
}
.spec-dl:hover { text-decoration: underline; }

.st {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 12px; font-size: 13px; font-weight: 700;
  line-height: 25px; white-space: nowrap;
}
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.st-work { color: var(--amber-ink); background: var(--amber-soft); }
.st-applied { color: var(--blue); background: var(--blue-soft); }
.st-won { color: #fff; background: var(--accent); }
.st-lost { color: var(--muted); background: var(--gray-soft); }
.st-skip { color: var(--muted); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.st-new { color: var(--muted); background: var(--gray-soft); }
.who { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 13px; color: var(--muted); }
.st.pop, .nav .cnt.pop { animation: pop .35s var(--ease); }
@keyframes pop { 0% { transform: scale(.75); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* итог закупки: цветная точка + текст */
.out { display: inline-flex; align-items: baseline; gap: 7px; font-size: 14px; color: var(--muted); }
.out::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #b9c1bb; transform: translateY(-1px); }
.out.win { color: var(--ink); }
.out.win::before { background: var(--accent); }
.out.nobids, .out.failed { color: var(--amber-ink); }
.out.nobids::before, .out.failed::before { background: var(--amber); }
.out.cancelled::before { background: #a3aba5; }
.out a { color: inherit; }
.inline-bar { height: 6px; border-radius: 3px; background: #cfe1d4; margin-top: 7px; }
.inline-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 14px 22px; border-top: 1px solid var(--line-2); }
.pager a, .pager span {
  min-width: 34px; height: 32px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: var(--r-s);
  border: 1px solid var(--line); text-decoration: none; font-size: 14px; font-variant-numeric: tabular-nums;
}
.pager a:hover { border-color: #9ea9a1; }
.pager span.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager .gap { border: 0; min-width: 0; padding: 0 2px; }
.pager .total { margin-left: auto; border: 0; color: var(--muted); font-size: 13.5px; }
.empty { padding: 34px 22px; color: var(--muted); max-width: 72ch; display: flex; align-items: center; gap: 18px; }
p.empty { display: block; }
.empty-mark { opacity: .9; }

/* ---------- прогноз ---------- */
.forecast td.exp { width: 1%; }
.cal-chip {
  display: inline-flex; flex-direction: column; align-items: center; width: 52px; overflow: hidden; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; text-align: center; line-height: 1;
}
.cal-chip b { padding: 7px 0 5px; font-size: 20px; font-variant-numeric: tabular-nums; }
.cal-chip span { width: 100%; padding: 3px 0 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--accent); }
.forecast .cust { width: 30%; max-width: 360px; }
.forecast .cust .name { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; }
.fc-t { display: flex; align-items: flex-start; gap: 10px; }
.fc-t a { line-height: 1.38; padding-top: 3px; }
.fc-t + .sub { margin-left: 38px; }

/* ---------- карточка закупки ---------- */
.card-head { display: flex; align-items: flex-start; gap: 18px; }
.card-head .dic { margin-top: 2px; }
.card-title { min-width: 0; }
.card-head h1 { max-width: 62ch; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.card-meta .ext { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-ink); }
.copy {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px; cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); font-variant-numeric: tabular-nums;
  transition: border-color .15s, color .15s, background-color .15s;
}
.copy:hover { border-color: #9ea9a1; color: var(--ink); }
.copy.done { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent-soft); }

.tiles { display: grid; grid-template-columns: 1.05fr 1fr 1.25fr 1fr; gap: 12px; margin-top: 22px; }
.tile { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 15px 18px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.tl { font-size: 12.5px; color: var(--muted); font-weight: 700; letter-spacing: .01em; }
.tv { font: 700 22px/1.2 "PT Sans", Arial, sans-serif; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tv-s { font-size: 15.5px; line-height: 1.35; letter-spacing: 0; }
.tv a { text-decoration: none; }
.tv a:hover { text-decoration: underline; }
.ts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.tile-when.hot { border-color: #f1c4bf; background: #fffafa; }
.tile-when.warm { border-color: #ecd9a8; background: #fffdf6; }

.card-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; margin-top: 18px; }
.card-main > .panel + .panel, .card-main > .panel + .files-slot, .card-main > .files-slot + .panel { margin-top: 18px; }
.side { position: sticky; top: 64px; }
.facts { display: grid; grid-template-columns: 160px minmax(0, 1fr); margin: 0; }
.facts dt, .facts dd { margin: 0; padding: 12px 0; border-top: 1px solid var(--line-2); }
.facts dt { color: var(--muted); font-size: 14px; padding-right: 16px; }
.facts dt:first-of-type, .facts dd:first-of-type { border-top: 0; padding-top: 2px; }
.facts .big { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bullets { list-style: none; margin: 0; padding: 0; }
.bullets li { position: relative; padding: 5px 0 5px 18px; max-width: 80ch; }
.bullets li::before { content: ""; position: absolute; left: 3px; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.facts .bullets li { padding: 0 0 5px 16px; }
.facts .bullets li:last-child { padding-bottom: 0; }
.facts .bullets li::before { left: 1px; top: 9px; }
.callout { padding: 11px 14px; border-radius: 8px; background: var(--amber-soft); color: var(--amber-ink); }
.callout p + p { margin-top: 6px; }
.lots .ex { margin-top: 4px; font-size: 13px; color: var(--ink-2); max-width: 78ch; }
.lots tr.off td, .lots tr.off .ex { color: var(--faint); }
.lot-no { display: block; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 2px; }

/* загрузка документов */
.skel { display: grid; gap: 10px; padding: 4px 0 2px; }
.skel i { display: block; height: 12px; width: 100%; border-radius: 6px; background: linear-gradient(90deg, #eef1ec 0%, #f8faf6 50%, #eef1ec 100%) 0 0 / 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* главное из техспецификации */
.spec-panel .panel-h .meta { max-width: 52ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spec-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 2px 0 16px; }
.spec-facts > div { padding: 11px 14px 12px; border-radius: 8px; background: var(--head); border: 1px solid var(--line-2); }
.spec-facts > div.wide { grid-column: span 2; }
.spec-facts dt { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.spec-facts dd { margin: 3px 0 0; font-size: 15px; line-height: 1.4; }
.spec-text { position: relative; max-width: 76ch; font-size: 15.5px; line-height: 1.62; color: var(--ink-2); }
.spec-text p + p { margin-top: 8px; }
.spec-text.clamp { max-height: 15em; overflow: hidden; }
.spec-text.clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4.5em; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.spec-more { margin-top: 10px; color: var(--accent-ink); font-weight: 700; }
.spec-note { margin-top: 14px; font-size: 12.5px; color: var(--faint); }
.docs-note { color: var(--ink-2); max-width: 70ch; }
.docs-note + .btn { margin-top: 14px; }

/* документы закупки */
.files { padding: 6px 22px 18px; }
.fgroup + .fgroup { margin-top: 10px; }
.fgroup h3 { padding: 10px 0 6px; font-size: 13px; color: var(--muted); }
.fgroup h3 span { margin-left: 4px; padding: 0 6px; border-radius: 8px; background: var(--gray-soft); font-weight: 400; }
.fgroup ul { list-style: none; margin: 0; padding: 0; }
.file { display: flex; align-items: center; gap: 13px; padding: 9px 10px; margin: 0 -10px; border-radius: 8px; transition: background-color .12s; }
.file:hover { background: var(--head); }
.file.ours { background: #f3faf5; }
.fi {
  width: 38px; height: 44px; flex: none; display: grid; place-items: end center; padding-bottom: 6px; border-radius: 5px;
  font: 700 10px/1 "PT Sans", Arial, sans-serif; letter-spacing: .04em; color: #fff; background: #7d8a82;
  clip-path: polygon(0 0, 70% 0, 100% 22%, 100% 100%, 0 100%);
}
.fi-pdf { background: #c8352b; }
.fi-doc, .fi-rtf, .fi-odt { background: #2b5fb4; }
.fi-xls, .fi-ods, .fi-csv { background: #1d7a45; }
.fi-zip, .fi-rar, .fi-7z { background: #8a6a1f; }
.fi-jpg, .fi-png { background: #6d4bb5; }
.f-body { flex: 1; min-width: 0; }
.f-name { display: block; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.f-name:hover { text-decoration: underline; }
.f-meta { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.f-meta b { color: var(--accent-ink); }
.f-act { display: flex; gap: 4px; flex: none; }
.f-act a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; color: var(--ink-2); border: 1px solid transparent; }
.f-act a:hover { color: var(--accent-ink); background: #fff; border-color: var(--line); }

/* работа с закупкой */
.side form { margin: 0; }
.side select { width: 100%; }
.side .btn { margin-top: 16px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-o { position: relative; cursor: pointer; }
.seg-o input { position: absolute; opacity: 0; pointer-events: none; }
.seg-o span {
  display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: 15px; font-size: 13.5px;
  border: 1px solid var(--line); color: var(--ink-2); background: #fff; transition: background-color .15s, border-color .15s, color .15s;
}
.seg-o:hover span { border-color: #9ea9a1; }
.seg-o input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg-o input:checked + span { font-weight: 700; border-color: transparent; color: var(--ink); background: var(--gray-soft); }
.seg-work input:checked + span { color: var(--amber-ink); background: var(--amber-soft); }
.seg-applied input:checked + span { color: var(--blue); background: var(--blue-soft); }
.seg-won input:checked + span { color: #fff; background: var(--accent); }
.log { margin-top: 18px; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.log > div { display: flex; align-items: flex-start; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.log .lg { min-width: 0; }
.log .when { display: block; color: var(--muted); font-size: 12.5px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 22px 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend i.ring { background: #fff; box-shadow: inset 0 0 0 1.5px var(--accent); }

/* ---------- в работе: доска ---------- */
.seg-nav { display: flex; padding: 3px; border-radius: 9px; background: #e6eae4; }
.seg-nav a { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 7px; font-size: 14px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.seg-nav a:hover { color: var(--ink); }
.seg-nav a.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(16, 32, 24, .1); }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { background: #e9ece6; border-radius: var(--r); padding: 10px; min-height: 220px; transition: background-color .15s, box-shadow .15s; }
.col.over { background: #dfe9e2; box-shadow: inset 0 0 0 2px var(--accent-line); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; }
.col-n { font-weight: 700; font-size: 13.5px; color: var(--muted); }
.col-sum { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.col-list { display: flex; flex-direction: column; gap: 9px; min-height: 120px; }
.col-empty { display: none; padding: 26px 10px; text-align: center; font-size: 13px; color: var(--faint); border: 1.5px dashed #c9d1ca; border-radius: 8px; }
.col-list > .col-empty:first-child { display: block; }
.kcard {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 12px 13px 11px; cursor: grab;
  box-shadow: 0 1px 2px rgba(16, 32, 24, .04); transition: box-shadow .15s, transform .15s, opacity .15s;
}
.kcard:hover { box-shadow: var(--shadow); }
.kcard.dragging { opacity: .55; transform: rotate(1.2deg); box-shadow: 0 10px 26px rgba(16, 32, 24, .16); }
.kcard.landed { animation: land .5s var(--ease); }
@keyframes land { 0% { transform: scale(.96); box-shadow: 0 0 0 3px var(--accent-line); } 100% { transform: none; } }
.kc-top { display: flex; gap: 10px; align-items: flex-start; }
.kc-t { font-weight: 700; font-size: 14px; line-height: 1.35; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kc-t:hover { text-decoration: underline; }
.kc-c { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.kc-note { margin-top: 7px; padding: 6px 9px; border-radius: 6px; background: var(--head); font-size: 12.5px; color: var(--ink-2); }
.kc-foot { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
.kc-foot .cd { margin: 0; min-width: 0; flex: 1; }
.kc-date { flex: 1; font-size: 12.5px; color: var(--muted); }
.kc-sum { font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kc-move { display: none; }
.kc-move select { width: 100%; height: 32px; font-size: 13px; margin-top: 10px; }

/* ---------- в работе: календарь сроков ---------- */
.cal-h { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.cal-h h2 { min-width: 160px; text-align: center; }
.cal-h .meta { margin-left: auto; font-size: 13.5px; color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-wd { padding: 9px 12px; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--head); border-bottom: 1px solid var(--line); }
.day { min-height: 118px; padding: 8px 8px 10px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.day:nth-child(7n) { border-right: 0; }
.day.off { background: #fafbf9; }
.day.off .dn { color: #b5bdb7; }
.dn { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); padding: 1px 4px 3px; font-variant-numeric: tabular-nums; }
.dn em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 4px; padding: 0 5px; line-height: 17px; }
.day.today { background: #f4faf6; box-shadow: inset 0 0 0 2px var(--accent-line); }
.day.past:not(.today) .ev { opacity: .6; }
.ev {
  display: flex; align-items: center; gap: 5px; min-width: 0; padding: 3px 6px; border-radius: 5px; font-size: 12px; line-height: 1.3;
  text-decoration: none; color: var(--ink); background: var(--amber-soft);
}
.ev span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev:hover { color: var(--ink); filter: brightness(.97); }
.ev-applied { background: var(--blue-soft); }
.ev-won { background: var(--accent-soft); }
.ev-lost { background: var(--gray-soft); color: var(--muted); }
.ev .ava { font-size: 7px; }
.ev-more { font-size: 12px; color: var(--muted); padding: 0 6px; }
.ev-new { margin-top: auto; align-self: flex-start; font-size: 12px; color: var(--accent-ink); text-decoration: none; padding: 1px 7px; border-radius: 9px; box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.ev-new:hover { background: var(--accent-soft); color: var(--accent-ink); }
.cal-panel .legend { padding-top: 14px; }

/* ---------- дерево связей ----------
   Каждая ветка — отдельный родитель, поэтому линии не пересекаются.
   Компьютер: слева направо, родитель по центру своих потомков. Телефон: вертикальный список с отступами. */
.tree-wrap { overflow-x: auto; padding: 4px 22px 18px; }
.tree { --gap: 52px; --ln: #b6c1b9; --lw: 1.5px; --rad: 8px; }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree li { position: relative; display: flex; align-items: center; }
.tree li > ul { position: relative; display: flex; flex-direction: column; padding-left: calc(var(--gap) / 2); }
.tree li > ul::before {
  content: ""; position: absolute; left: 0; top: 50%; width: calc(var(--gap) / 2); border-top: var(--lw) solid var(--ln);
  transform-origin: left center;
}
.tree li > ul > li { padding: 5px 0 5px calc(var(--gap) / 2); }
.tree li > ul > li::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: var(--lw) solid var(--ln); transform-origin: top center;
}
.tree li > ul > li::after {
  content: ""; position: absolute; left: 0; top: 50%; width: calc(var(--gap) / 2); border-top: var(--lw) solid var(--ln);
  transform-origin: left center;
}
.tree li > ul > li:first-child::before { top: calc(50% + var(--rad)); }
.tree li > ul > li:last-child::before { bottom: calc(50% + var(--rad)); }
.tree li > ul > li:first-child::after { height: var(--rad); border-left: var(--lw) solid var(--ln); border-top-left-radius: var(--rad); }
.tree li > ul > li:last-child::after {
  top: auto; bottom: 50%; height: var(--rad); border-top: 0; border-left: var(--lw) solid var(--ln);
  border-bottom: var(--lw) solid var(--ln); border-bottom-left-radius: var(--rad); transform-origin: left bottom;
}
.tree li > ul > li:only-child::before { display: none; }
.tree li > ul > li:only-child::after { top: 50%; bottom: auto; height: 0; border-left: 0; border-bottom: 0; border-top: var(--lw) solid var(--ln); border-radius: 0; }

.tn {
  position: relative; display: block; flex: none; width: 256px; padding: 9px 12px 10px; color: var(--ink); text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-s);
  transition: border-color .15s, background-color .15s, opacity .35s ease-out, transform .45s cubic-bezier(.2, .7, .2, 1);
}
a.tn:hover { color: var(--ink); border-color: #93a399; background: #fbfdfb; }
.tn b { display: flex; align-items: baseline; gap: 8px; font-size: 14px; line-height: 1.3; }
.tn b .tx { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tn > span { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tn-root { width: 236px; background: var(--head); border-color: #c9d2cb; }
.tn-root b { font-size: 14.5px; }
.tn-lot { background: #f2f9f4; border: 1.5px solid var(--accent); }
.tn-lot b { color: var(--accent-ink); }
.tn-win b::before, .tn-nobid b::before, .tn-other b::before, .tn-region b::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; transform: translateY(-1px);
}
.tn-win b::before { background: var(--accent); }
.tn-nobid b::before { background: var(--amber); }
.tn-nobid b { color: var(--amber-ink); }
.tn-other b::before { background: #a3aba5; }
.tn-region b::before { background: var(--brand-2); border-radius: 2px; }
.tn-date, .tn-more { width: auto; max-width: 300px; border: 0; background: none; padding: 3px 2px; }
.tn-leaf { width: 300px; padding: 7px 11px 8px; background: var(--head); border-color: var(--line-2); }
a.tn-leaf:hover { background: #fff; border-color: #b9c4bc; }
.tn-leaf b { font-weight: 400; font-size: 13.5px; }
.tn-leaf > span { margin-top: 1px; }
.tn-date { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.tn-date b { font-weight: 400; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tn-date > span { margin: 0; }
.tn-more b { font-weight: 400; font-size: 13px; color: var(--muted); }
a.tn-date:hover, a.tn-more:hover { background: none; }
a.tn-leaf:hover b, a.tn-date:hover b, a.tn-more:hover b { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.dir-cell { display: inline-flex; align-items: center; gap: 11px; }
.dir-cell .tag { margin-left: -2px; }

/* рисование: ветки вырастают по уровням, узлы проявляются следом */
.tree.pre .tn { opacity: 0; transform: translateX(-8px); }
.tree.pre li > ul::before, .tree.pre li > ul > li::after { transform: scaleX(0); }
.tree.pre li > ul > li::before { transform: scaleY(0); }
.tree li > ul::before { transition: transform .22s ease-out calc(var(--l, 0) * .42s); }
.tree li > ul > li::before { transition: transform .28s ease-out calc(var(--l, 0) * .42s + .1s); }
.tree li > ul > li::after { transition: transform .22s ease-out calc(var(--l, 0) * .42s + .2s + var(--i, 0) * .035s); }
.tree.pre .tn { transition-delay: 0s, 0s, calc(var(--l, 0) * .42s + .2s + var(--i, 0) * .05s), calc(var(--l, 0) * .42s + .2s + var(--i, 0) * .05s); }
.tree.pre.on .tn, .tree.pre.on li > ul::before, .tree.pre.on li > ul > li::before, .tree.pre.on li > ul > li::after { opacity: 1; transform: none; }
.tree.done .tn { transition-delay: 0s; }

/* ---------- матрица «исполнитель × регион» ---------- */
.matrix-wrap { overflow-x: auto; }
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; }
.matrix thead th {
  font: 700 12px/1.25 "PT Sans", Arial, sans-serif; color: var(--muted); text-align: center; vertical-align: bottom;
  padding: 10px 6px; background: var(--head); border-bottom: 1px solid var(--line);
}
.matrix thead th:first-child { text-align: left; padding-left: 22px; }
.matrix thead th:last-child { text-align: right; padding-right: 22px; }
.matrix tbody th {
  position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 400; min-width: 250px; max-width: 320px;
  padding: 9px 14px 9px 22px; background: #fff; border-bottom: 1px solid var(--line-2);
}
.matrix tbody th a { font-weight: 700; text-decoration: none; }
.matrix tbody th a:hover { text-decoration: underline; }
.matrix tbody th span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.matrix td.m {
  min-width: 86px; height: 50px; text-align: center; font-size: 13.5px; font-variant-numeric: tabular-nums;
  border-bottom: 1px solid #fff; border-left: 1px solid #fff; background: rgba(11, 122, 67, var(--a, 0)); color: var(--ink);
}
.matrix td.m.hi { color: #fff; font-weight: 700; }
.matrix td.m.zero { color: #c2c9c4; background: #fafbf9; }
.matrix td.tot { padding: 0 22px 0 14px; text-align: right; font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.matrix tbody tr:last-child > * { border-bottom: 0; }

/* ---------- аналитика ---------- */
.chart { position: relative; display: flex; align-items: flex-end; gap: 10px; height: 230px; padding: 0 4px; border-bottom: 1px solid var(--ink-2);
  background: linear-gradient(to top, var(--line-2) 1px, transparent 1px) 0 0 / 100% 25%; }
.chart .col { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column-reverse; background: none; border-radius: 0; padding: 0; min-height: 0; }
.chart .seg-g { background: #9cc3a7; }
.chart .seg-s { background: var(--accent); }
.chart .seg-w { background: var(--amber); }
.chart .col > :last-child { border-radius: 2px 2px 0 0; }
.chart .val { position: absolute; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-x { display: flex; gap: 10px; padding: 7px 4px 0; font-size: 12px; color: var(--muted); }
.chart-x span { flex: 1; text-align: center; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; vertical-align: -1px; }
.heat td.m { text-align: center; font-size: 13px; padding: 9px 2px; border-left: 2px solid #fff; font-variant-numeric: tabular-nums; }
.heat th.m { text-align: center; padding-left: 2px; padding-right: 2px; }

/* ---------- настройки ---------- */
.checks label { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 4px; }
.form-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.msg { margin-bottom: 18px; padding: 11px 16px; border-radius: var(--r-s); background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; }
.err { margin-top: 12px; color: var(--red); font-size: 14px; }

/* ---------- всплывающие уведомления ---------- */
.toasts { position: fixed; left: 50%; bottom: 22px; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-radius: 10px; pointer-events: auto;
  color: #fff; background: #17251d; box-shadow: 0 10px 30px rgba(10, 20, 14, .28); font-size: 14px; max-width: min(560px, calc(100vw - 32px));
  animation: toast-in .35s var(--ease);
}
.toast .mark { margin-right: -4px; }
.toast button { flex: none; height: 30px; padding: 0 11px; border-radius: 6px; border: 0; cursor: pointer; font: 700 13.5px/1 "PT Sans", Arial, sans-serif; color: var(--brand); background: var(--lime); display: inline-flex; align-items: center; gap: 6px; }
.toast button:hover { background: #a4e98a; }
.toast.out { animation: toast-out .25s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- вход ---------- */
.login-page { background: var(--panel); }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.login-brand { position: relative; overflow: hidden; background: var(--brand); color: #d6e5dc; padding: 46px 56px 40px; display: flex; flex-direction: column; }
.login-brand .logo .name { font-size: 20px; }
.login-art { width: min(520px, 100%); height: auto; margin-top: 40px; }
.la-l { stroke: rgba(255, 255, 255, .22); stroke-width: 3; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.4s var(--ease) .3s forwards; }
.la-n circle { fill: var(--brand); stroke: rgba(255, 255, 255, .45); stroke-width: 2.5; opacity: 0; animation: fade .5s ease-out forwards; }
.la-n circle:nth-child(1) { animation-delay: 1s; }
.la-n circle:nth-child(2) { animation-delay: 1.3s; }
.la-n circle:nth-child(3) { animation-delay: 1.5s; }
.la-n circle:nth-child(4) { animation-delay: 1.7s; }
.la-n circle:nth-child(5) { animation-delay: 1.9s; }
.la-hit { fill: var(--lime); transform-box: fill-box; transform-origin: center; transform: scale(0); animation: dot .5s var(--ease) 2.2s forwards; }
@keyframes fade { to { opacity: 1; } }
.login-brand h1 { margin-top: auto; padding-top: 34px; color: #fff; font-size: 38px; line-height: 1.15; max-width: 21ch; }
.login-brand > p { margin-top: 16px; max-width: 48ch; font-size: 16px; color: #b5ccbf; }
.login-brand ul { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .14); max-width: 520px; }
.login-brand li { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); font-size: 14.5px; }
.login-brand li span { color: #8db29e; text-align: right; }
.login-brand .src { margin-top: 24px; font-size: 13px; color: #8db29e; }
.login-main { display: flex; flex-direction: column; justify-content: center; padding: 48px 56px; }
.login-box { width: 100%; max-width: 470px; }
.login-box h2 { font-size: 25px; }
.login-box > p { margin-top: 8px; color: var(--muted); }
.entry { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--r); }
.entry-opt { padding: 22px 24px 24px; }
.entry-opt + .entry-opt { border-top: 1px solid var(--line); }
.entry-opt h3 { font-size: 17px; }
.entry-opt p { margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.entry-opt .btn { margin-top: 16px; }
.entry-opt input { width: 100%; height: 44px; font-size: 16px; }
.entry-form { display: none; }
.entry-opt.open .entry-form { display: block; }
.entry-opt.open .entry-reveal { display: none; }

/* ---------- спросить ИИ ---------- */
.nav a.ai .i { color: var(--accent); }
.ask-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.ask-main { min-width: 0; }
.ask-side { display: grid; gap: 18px; position: sticky; top: 64px; }
.ask-box {
  background: var(--panel); border: 1px solid #cfd7d1; border-radius: var(--r); padding: 14px 14px 12px 18px;
  box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
.ask-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.ask-box.off { background: var(--head); box-shadow: none; }
.ask-box textarea {
  display: block; width: 100%; min-height: 54px; max-height: 220px; padding: 4px 0; border: 0; outline: 0; resize: none;
  background: transparent; color: var(--ink); font: 17px/1.5 "PT Sans", "Segoe UI", Arial, sans-serif;
}
.ask-box textarea::placeholder { color: var(--faint); }
.ask-bar { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.ask-hint { color: var(--faint); font-size: 13px; }
.ask-bar .btn { margin-left: auto; }
.thread:not(:empty) + .ask-box { margin-top: 18px; }
.h-sec { font-size: 15px; font-family: "PT Sans", "Segoe UI", Arial, sans-serif; color: var(--muted); margin: 26px 0 12px; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.ex {
  display: flex; flex-direction: column; gap: 5px; padding: 13px 15px 14px; text-align: left; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-s); color: var(--ink-2);
  font: 14.5px/1.45 "PT Sans", "Segoe UI", Arial, sans-serif; transition: border-color .15s, background .15s, transform .15s;
}
.ex .w { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.ex:hover { border-color: var(--accent-line); background: #fbfdfb; color: var(--ink); }
.ex:active { transform: translateY(1px); }
.ex:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.qa + .qa { margin-top: 28px; }
.qa { animation: askIn .35s var(--ease) both; }
.qa .q { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 12px; }
.qa .q h2 { font-size: 20px; line-height: 1.35; padding-top: 1px; text-wrap: pretty; }
.qa .a { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: clip; box-shadow: var(--shadow); }
.a-head { display: flex; align-items: center; gap: 10px; padding: 12px 20px; background: var(--head); border-bottom: 1px solid var(--line-2); }
.a-head b { font-size: 15px; }
.a-head .meta { margin-left: auto; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.a-err { margin: 0; padding: 16px 20px; color: var(--red); }

.steps { list-style: none; margin: 0; padding: 14px 20px 6px; display: grid; gap: 9px; }
.step { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; column-gap: 11px; align-items: start; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.steps.live .step { animation: askIn .35s var(--ease) both; }
.step .n { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 1px; }
.step .sg { position: relative; width: 18px; height: 18px; margin-top: 1.5px; border-radius: 50%; }
.step.run .sg { border: 2px solid var(--accent-line); border-top-color: var(--accent); animation: askSpin .75s linear infinite; }
.step.run .t { color: var(--ink); }
.step.ok .sg { background: var(--accent); }
.step.ok .sg::after { content: ""; position: absolute; left: 6.2px; top: 3.6px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.step.err .sg { background: var(--amber-soft); box-shadow: inset 0 0 0 1.5px var(--amber); }
.step.err .sg::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 11px/1 "PT Sans", Arial, sans-serif; color: var(--amber-ink); }
.step .sql { grid-column: 2 / -1; margin: 6px 0 4px; padding: 9px 12px; max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  background: var(--head); border: 1px solid var(--line-2); border-radius: 6px; color: var(--ink-2); font: 12.5px/1.5 Consolas, "Courier New", monospace; }
.phase { display: flex; align-items: center; gap: 14px; padding: 8px 20px 18px; color: var(--muted); font-size: 14px; }
.phase .bar { position: relative; flex: 1; max-width: 220px; height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.phase .bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: -35%; width: 35%; border-radius: 3px; background: var(--accent); animation: askBar 1.3s var(--ease) infinite; }

.a-body { padding: 18px 22px 8px; font-size: 15.5px; line-height: 1.62; color: var(--ink); max-width: 86ch; }
.a-body p { margin: 0 0 12px; }
.a-body p:first-child { font-size: 16.5px; }
.a-body ul, .a-body ol { margin: 0 0 14px; padding-left: 22px; }
.a-body li { margin: 5px 0; padding-left: 2px; }
.a-body li::marker { color: var(--accent); font-weight: 700; }
.a-body b { font-weight: 700; }
.a-body a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: var(--accent-line); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.a-body a:hover { text-decoration-color: currentColor; }
.md-tbl { overflow-x: auto; margin: 0 0 14px; }
.md-tbl table { border-collapse: collapse; font-size: 14px; }
.md-tbl th, .md-tbl td { padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.a-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 4px; padding: 11px 22px 13px; border-top: 1px solid var(--line-2); font-size: 13.5px; color: var(--muted); }
.a-foot .sp { flex: 1; }
.a-foot .linkbtn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.a-foot .linkbtn:hover { text-decoration: underline; }
.trace { width: 100%; order: 3; }
.trace[open] { padding-bottom: 4px; }
.trace summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--ink-2); list-style: none; }
.trace summary::-webkit-details-marker { display: none; }
.trace summary::before { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.trace[open] summary::before { transform: rotate(45deg); }
.trace .steps { padding: 12px 0 2px; }
.a-foot:has(.trace:not([open])) .trace { width: auto; order: 0; }

.how { list-style: none; counter-reset: how; margin: 0; padding: 14px 22px 4px; display: grid; gap: 12px; }
.how li { counter-increment: how; display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 11px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.how li::before { content: counter(how); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.recent { list-style: none; margin: 10px 0 0; padding: 0 0 8px; }
.recent a { display: block; padding: 9px 22px; color: var(--ink); text-decoration: none; font-size: 14.5px; line-height: 1.4; border-left: 3px solid transparent; }
.recent a:hover { background: var(--head); }
.recent a[aria-current] { border-left-color: var(--accent); background: var(--accent-soft); }
.recent .sub { display: block; margin-top: 3px; color: var(--faint); font-size: 12.5px; }
.grid2 + .tg-panel { margin-top: 18px; }
.tg-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; padding: 14px 22px 22px; align-items: start; }
.tg-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.tg-feats li { position: relative; padding-left: 18px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.tg-feats li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tg-feats b { color: var(--ink); }
.tg-connect { display: grid; gap: 12px; justify-items: start; padding: 16px 18px; background: var(--head); border: 1px solid var(--line-2); border-radius: var(--r-s); }
.tg-connect .btn .i { margin-right: 2px; }
.tg-connect p { margin: 0; }
.tg-chat { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: start; width: 100%; font-size: 14.5px; }
.tg-chat > .i { color: #229ed9; margin-top: 2px; }
.tg-chat .sub { display: block; color: var(--muted); font-size: 13px; }
@keyframes askIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes askSpin { to { transform: rotate(360deg); } }
@keyframes askBar { to { left: 100%; } }

/* ---------- планшет и телефон ---------- */
@media (max-width: 1180px) {
  .today { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .ask-grid { grid-template-columns: minmax(0, 1fr); }
  .ask-side { position: static; }
  .tg-grid { grid-template-columns: minmax(0, 1fr); }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .feed .cust { max-width: 220px; }
}
@media (max-width: 760px) {
  .app-top .in, .nav .in, main, .foot { padding-left: 16px; padding-right: 16px; }
  .app-top .in { height: 54px; gap: 12px; }
  .app-top .org, .app-top .me { display: none; }
  .logo .name { font-size: 16.5px; }
  .nav a { padding: 13px 10px 12px; font-size: 14px; }
  .nav a:first-child { margin-left: -10px; }
  main { padding-top: 16px; }
  h1 { font-size: 23px; }
  .page-head { flex-wrap: wrap; align-items: flex-start; gap: 12px; }
  .page-head .act { margin-left: 0; }
  .panel-h, .panel-b, .toolbar, .hint, .panel-note, .pager, .legend, .files, .cal-h { padding-left: 16px; padding-right: 16px; }
  .tabs { padding: 0 16px; }
  .xs-hide { display: none; }

  .today-main { padding: 18px 16px 18px; background-size: 260px auto; }
  .today-main h1 { font-size: 24px; margin-top: 10px; }
  .today-lead { font-size: 15px; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
  .kpi { min-height: 78px; padding: 10px 11px; }
  .kpi .v { font-size: 23px; }
  .kpi .l { font-size: 12px; }
  .kpi-chart { grid-column: 1 / -1; min-height: 0; display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: end; column-gap: 10px; }
  .kpi-chart .bars14 { height: 30px; margin: 0; }
  .today-soon { padding: 16px 16px 10px; }
  .soon a { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; column-gap: 12px; row-gap: 6px; }
  .s-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
  .s-side .cd { min-width: 0; flex-direction: row; align-items: center; gap: 8px; }
  .s-side .cd-bar { width: 56px; }

  .toolbar select { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .toolbar .q { flex: 1 1 100%; max-width: none; }
  .toolbar .btn { flex: 1 1 auto; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .feed-h .act { margin-left: 0; }

  /* таблицы превращаются в карточки */
  .tbl.stack thead { display: none; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .tbl.stack tbody tr:last-child { border-bottom: 0; }
  .tbl.stack td, .tbl.stack tr > :first-child, .tbl.stack tr > :last-child { padding: 3px 0; border: 0; }
  .tbl.stack td.num { text-align: left; }
  .tbl.stack td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 13px; font-weight: 400; }
  .tbl.stack td.when { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-top: 8px; }
  .tbl.stack td.when b { display: inline; }
  .tbl.stack td.when .cd { margin-top: 0; flex-direction: row; align-items: center; gap: 8px; min-width: 0; }
  .tbl.stack td.when .cd-bar { width: 64px; }
  .tbl.stack td.stcell { width: 100%; padding-top: 10px; }
  .tbl.stack .decide .btn { flex: 1; height: 38px; }
  .feed.stack td.ic-col { float: left; width: auto; margin: 0 12px 6px 0; padding-top: 2px; }
  .feed.stack td.ic-col .dic { --s: 32px !important; }
  .feed .cust { max-width: none; }
  .forecast td.exp { float: left; width: auto; margin: 0 12px 6px 0; }
  .forecast .cust { width: auto; max-width: none; }
  .fc-t + .sub { margin-left: 0; }

  .card-head { gap: 12px; }
  .card-head .dic { --s: 40px !important; }
  .tiles { gap: 8px; margin-top: 16px; }
  .tile { padding: 12px 13px 13px; }
  .tv { font-size: 18px; }
  .tv-s { font-size: 14.5px; }
  .card-meta { gap: 8px 12px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dt { padding: 10px 0 0; border-top: 1px solid var(--line-2); font-size: 13px; }
  .facts dd { padding: 2px 0 10px; border-top: 0; }
  .facts dt:first-of-type { padding-top: 0; }
  .spec-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .spec-facts > div { padding: 9px 11px 10px; }
  .spec-facts > div.wide { grid-column: 1 / -1; }
  .spec-text { font-size: 15px; }
  .file { gap: 11px; }
  .fi { width: 32px; height: 38px; font-size: 9px; }

  .board { grid-template-columns: minmax(0, 1fr); }
  .col { min-height: 0; }
  .kcard { cursor: default; }
  .kc-move { display: block; }
  .col-empty { padding: 14px 10px; }
  .seg-nav { width: 100%; }
  .seg-nav a { flex: 1; justify-content: center; padding: 0 8px; }
  .cal-h .meta { margin-left: 0; width: 100%; }
  .cal { display: block; }
  .cal-wd { display: none; }
  .day { min-height: 0; border-right: 0; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; }
  .day:not(.has), .day.off { display: none; }
  .dn { width: 100%; }
  .ev { max-width: 100%; }
  .ev-new { margin-top: 0; }

  /* дерево: вертикальный список с направляющей слева */
  .tree-wrap { overflow: visible; padding: 2px 16px 16px; }
  .tree { --gap: 0px; }
  .tree li { display: block; }
  .tree li > ul { padding-left: 0; margin-left: 11px; }
  .tree li > ul::before { display: none; }
  .tree li > ul > li { padding: 8px 0 0 22px; }
  .tree li > ul > li::before, .tree li > ul > li:first-child::before { top: 0; bottom: 0; }
  .tree li > ul > li:last-child::before { display: none; }
  .tree li > ul > li::after, .tree li > ul > li:first-child::after {
    top: 0; bottom: auto; width: 16px; height: 27px; border: 0; border-bottom: var(--lw) solid var(--ln); border-radius: 0; transform-origin: left bottom;
  }
  .tree li > ul > li:last-child::after, .tree li > ul > li:only-child::after {
    top: 0; bottom: auto; width: 16px; height: 27px; border-top: 0; border-left: var(--lw) solid var(--ln);
    border-bottom: var(--lw) solid var(--ln); border-bottom-left-radius: var(--rad);
  }
  .tree li.k-date::after, .tree li.k-deal::after, .tree li.k-leaf::after, .tree li.k-more::after { height: 20px; }
  .tn, .tn-root { width: auto; }
  .tn-date, .tn-deal, .tn-leaf, .tn-more { max-width: none; }
  .tn-leaf { width: auto; }

  .matrix tbody th { min-width: 170px; max-width: 190px; padding-left: 16px; }
  .matrix thead th:first-child { padding-left: 16px; }

  .login { grid-template-columns: minmax(0, 1fr); }
  .login-brand { padding: 24px 20px 26px; }
  .login-art { display: none; }
  .login-brand h1 { padding-top: 30px; font-size: 28px; }
  .login-brand ul, .login-brand .src { display: none; }
  .login-main { padding: 28px 20px 40px; justify-content: flex-start; }
  .entry-opt { padding: 18px 18px 20px; }
  .toasts { bottom: 14px; }

  .ask-box { padding: 12px 12px 10px 14px; }
  .ask-box textarea { font-size: 16px; }
  .ask-hint { display: none; }
  .ex-grid { grid-template-columns: minmax(0, 1fr); }
  .qa .q h2 { font-size: 18px; }
  .a-head, .steps, .phase { padding-left: 16px; padding-right: 16px; }
  .a-body { padding: 16px 16px 6px; font-size: 15px; }
  .a-foot { padding: 10px 16px 12px; }
  .recent a { padding-left: 16px; padding-right: 16px; }
  .how { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .tree.pre .tn, .tree.pre li > ul::before, .tree.pre li > ul > li::before, .tree.pre li > ul > li::after { opacity: 1; transform: none; transition: none; }
  .st.pop, .nav .cnt.pop, .toast, .kcard.landed { animation: none; }
  .mark.draw .mk-t, .la-l { animation: none; stroke-dashoffset: 0; }
  .mark.draw .mk-dot, .la-hit { animation: none; transform: none; }
  .la-n circle { animation: none; opacity: 1; }
  .mark .mk-ping { display: none; }
  .skel i { animation: none; }
  .qa, .steps.live .step { animation: none; }
  .step.run .sg { animation-duration: 2.4s; }
  .phase .bar::after { animation: none; left: 0; width: 100%; opacity: .35; }
}

/* ---------- разбор закупки ИИ ---------- */
.rv { --v: var(--accent); --v-soft: var(--accent-soft); --v-ink: var(--accent-ink); --v-line: var(--accent-line); }
.rv-maybe { --v: #9a6a06; --v-soft: #fdf6e3; --v-ink: var(--amber-ink); --v-line: #ecd9a8; }
.rv-no { --v: var(--red); --v-soft: #fdf3f2; --v-ink: #8a1c13; --v-line: #f1c4bf; }
.rv-top { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; margin: 14px 22px 0; padding: 16px 18px 17px; border-radius: 9px; background: var(--v-soft); border: 1px solid var(--v-line); }
.rv-verdict { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.rv-badge { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px 0 11px; border-radius: 8px; background: var(--v); color: #fff; font: 700 16.5px/1 "PT Sans", Arial, sans-serif; letter-spacing: .01em; box-shadow: 0 1px 2px rgba(16, 32, 24, .14); white-space: nowrap; }
.rv-badge .i { stroke-width: 2.1; }
.rv-cap { font-size: 12.5px; color: var(--v-ink); }
.rv-hl { font: 700 18px/1.38 "PT Serif", Georgia, serif; color: var(--ink); text-wrap: pretty; max-width: 72ch; }
.rv-why { list-style: none; margin: 8px 0 0; padding: 0; }
.rv-why li { position: relative; padding: 3px 0 3px 17px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); max-width: 88ch; }
.rv-why li::before { content: ""; position: absolute; left: 3px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--v); }

.rv-sum { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px 0; }
.rs { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; line-height: 1.3; color: var(--ink-2); text-decoration: none; transition: border-color .15s, color .15s; }
.rs .i { color: var(--muted); }
.rs b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rs:hover { border-color: #a9b4ac; color: var(--ink); }
.rs.bad { border-color: #f1c4bf; background: #fffafa; }
.rs.bad .i, .rs.bad b { color: var(--red); }
.rs.warn { border-color: #ecd9a8; background: #fffdf6; }
.rs.warn .i, .rs.warn b { color: var(--amber-ink); }

.rv-terms { padding: 16px 22px 0; }
.rv-subj { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin-bottom: 12px; max-width: 90ch; }
.rv-terms .spec-facts { margin-bottom: 0; }
.rv-cmp { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.rv-cmp.lo { color: var(--amber-ink); }
.rv-cmp.hi { color: var(--accent-ink); }

.rv-sec { border-top: 1px solid var(--line-2); margin-top: 18px; }
.rv-sec + .rv-sec { margin-top: 0; }
.rv-sec > summary { display: flex; align-items: center; gap: 11px; padding: 14px 22px; cursor: pointer; list-style: none; user-select: none; }
.rv-sec > summary::-webkit-details-marker { display: none; }
.rv-sec > summary::before { content: ""; flex: none; width: 7px; height: 7px; margin: 0 2px 0 1px; border-right: 1.7px solid var(--muted); border-bottom: 1.7px solid var(--muted); transform: rotate(-45deg); transition: transform .18s var(--ease); }
.rv-sec[open] > summary::before { transform: rotate(45deg) translate(-2px, -1px); }
.rv-sec > summary h3 { font: 700 16px/1.3 "PT Serif", Georgia, serif; }
.rv-sec > summary:hover h3 { color: var(--accent-ink); }
.rv-sec[open] { padding-bottom: 18px; }
.rv-sec > :not(summary) { margin-left: 22px; margin-right: 22px; }
.rv-cnt { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rv-cnt > span { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.c-ok { color: var(--accent-ink); }
.c-chk { color: var(--amber-ink); }
.c-miss { color: var(--red); }

.rq-list, .rk-list, .pn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rq { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; }
.rq-mk { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 700; font-size: 13.5px; line-height: 1; }
.rq-mk .i { stroke-width: 2.2; }
.rq-ok .rq-mk { background: var(--accent-soft); color: var(--accent-ink); }
.rq-check .rq-mk { background: var(--amber-soft); color: var(--amber-ink); }
.rq-missing { border-color: #f1c4bf; background: #fffafa; }
.rq-missing .rq-mk { background: var(--red); color: #fff; }
.rq-t { font-weight: 700; font-size: 14.5px; line-height: 1.42; }
.rq-st { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 5px; font-size: 12px; font-weight: 700; vertical-align: 1px; white-space: nowrap; }
.rq-ok .rq-st { color: var(--accent-ink); background: var(--accent-soft); }
.rq-check .rq-st { color: var(--amber-ink); background: var(--amber-soft); }
.rq-missing .rq-st { color: #fff; background: var(--red); }
.rq-n { margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.rq-k { padding-top: 3px; font-size: 12px; color: var(--faint); white-space: nowrap; }

.rv-src { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 14px; margin-top: 8px; font-size: 13px; line-height: 1.45; }
.rv-src q { flex: 1 1 340px; display: block; padding-left: 10px; border-left: 2px solid var(--line); color: var(--muted); font-style: italic; quotes: "\00ab" "\00bb"; }
.rv-src a { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); text-decoration: none; white-space: nowrap; }
.rv-src a:hover { text-decoration: underline; }

.rk { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; }
.rk-l { justify-self: start; padding: 2px 8px; border-radius: 5px; font-size: 12px; font-weight: 700; line-height: 1.5; }
.rk-high { border-color: #f1c4bf; background: #fffafa; }
.rk-high .rk-l { background: var(--red); color: #fff; }
.rk-medium .rk-l { background: var(--amber-soft); color: var(--amber-ink); }
.rk-low .rk-l { background: var(--gray-soft); color: var(--muted); }
.rk-tail { border-color: #ddd3f2; background: #fbfaff; }
.rk-tail .rk-l { background: var(--violet-soft); color: var(--violet); }
.rk-b p { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.rk-b p b { color: var(--ink); }

.rv-pay { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 7px 14px; margin: 0 0 12px; }
.rv-pay dt { font-size: 14px; color: var(--muted); }
.rv-pay dd { margin: 0; font-size: 14.5px; line-height: 1.45; }
.pn { padding: 10px 14px; border-radius: 8px; border: 1px solid #ecd9a8; background: #fffdf6; font-size: 14.5px; line-height: 1.45; }
.pn.std { border-color: var(--line-2); background: #fff; color: var(--ink-2); }
.pn-std { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 5px; background: var(--gray-soft); color: var(--muted); font-size: 12px; white-space: nowrap; }

.dc-list { list-style: none; margin: 0; padding: 0; columns: 2 300px; column-gap: 28px; }
.dc { break-inside: avoid; }
.dc label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; margin: 0 -8px; border-radius: 7px; font-size: 14.5px; line-height: 1.42; cursor: pointer; transition: background-color .15s; }
.dc label:hover { background: var(--head); }
.dc input { flex: none; margin-top: 2px; width: 17px; height: 17px; }
.dc input:checked + span { color: var(--muted); }
.dc input:checked + span .dc-t { text-decoration: line-through; text-decoration-color: rgba(89, 101, 93, .55); }
.dc-h { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 5px; font-size: 11.5px; font-weight: 700; vertical-align: 1px; white-space: nowrap; }
.dc-h.yes { color: var(--accent-ink); background: var(--accent-soft); }
.dc-h.no { color: var(--red); background: var(--red-soft); }
.dc-n { display: block; font-size: 12.5px; color: var(--muted); }
[data-more-list]:not(.all) > .more { display: none; }
.more-btn { margin-top: 10px; color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.more-btn:hover { color: var(--accent-ink); text-decoration: underline; }

.q-list { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.clar { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.clar-h { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--head); border-bottom: 1px solid var(--line-2); font-size: 13px; font-weight: 700; color: var(--muted); }
.clar-h .linkbtn { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--accent-ink); text-decoration: none; font-weight: 700; }
.clar-t { max-height: 24em; overflow: auto; padding: 14px 16px; white-space: pre-wrap; font: 14.5px/1.62 "PT Serif", Georgia, serif; color: var(--ink-2); }

.rv-note { margin-top: 10px; font-size: 13px; color: var(--muted); }
.rv-note a { color: var(--accent-ink); }
.rv-empty { font-size: 14.5px; color: var(--ink-2); }
.rv-foot { display: grid; gap: 6px; padding: 13px 22px 16px; border-top: 1px solid var(--line-2); background: var(--head); font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.rv-foot .lbl { font-weight: 700; margin-right: 4px; }
.rv-foot .i { vertical-align: -2px; color: var(--accent); }
.rf { display: inline-flex; align-items: center; gap: 4px; margin: 2px 6px 2px 0; padding: 1px 8px; border-radius: 5px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); }
.rf.err { color: var(--red); }

.rv-wait { display: flex; gap: 16px; align-items: flex-start; }
.rv-spin { flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%; border: 2.5px solid var(--accent-soft); border-top-color: var(--accent); animation: askSpin .8s linear infinite; }
.rv-phase { font-weight: 700; font-size: 15.5px; margin-bottom: 3px; }
.rv-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.rv-cta-t { flex: 1 1 440px; max-width: 80ch; }
.rv-cta-t p { color: var(--ink-2); }
.rv-cta-l { margin: 8px 0 0; padding-left: 18px; columns: 2 260px; column-gap: 26px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.rv-cta form { display: flex; align-items: center; gap: 12px; }
.rv.rv-in .rv-top { animation: askIn .5s var(--ease); }

.vt { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; }
.vt .i { stroke-width: 2.1; }
.vt-go { color: var(--accent-ink); background: var(--accent-soft); }
.vt-maybe { color: var(--amber-ink); background: var(--amber-soft); }
.vt-no { color: var(--red); background: var(--red-soft); }
.vt-wait { color: var(--muted); background: var(--gray-soft); font-weight: 400; }
a.vt:hover { color: inherit; text-decoration: underline; }
.views .chip .i { color: var(--accent); }
.kc-v { margin-top: 7px; font-size: 12px; }

/* ---------- оценка заказчика и конкурента ---------- */
.scc { display: inline-flex; align-items: baseline; gap: 5px; padding: 1px 8px; border-radius: 6px; font-size: 12.5px; font-weight: 700; line-height: 1.55; white-space: nowrap; }
.scc b { font-variant-numeric: tabular-nums; }
.scc-good { color: var(--accent-ink); background: var(--accent-soft); }
.scc-mid { color: var(--amber-ink); background: var(--amber-soft); }
.scc-bad { color: var(--red); background: var(--red-soft); }
.scc-low, .scc-na { color: var(--muted); background: var(--gray-soft); }
.tl-sc { margin-left: 6px; text-decoration: none; font-weight: 400; }
.rival-tag { display: block; margin-top: 3px; font-size: 12px; color: var(--red); }

.g-good { --g: var(--accent); --g-ink: var(--accent-ink); }
.g-mid { --g: var(--amber); --g-ink: var(--amber-ink); }
.g-bad { --g: var(--red); --g-ink: var(--red); }
.g-low, .g-na { --g: #a3aba5; --g-ink: var(--muted); }
.scp-b { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; padding: 14px 22px 20px; }
.scp-n { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px 15px; border-radius: 9px; background: var(--head); border: 1px solid var(--line-2); }
.scp-v { font: 700 34px/1 "PT Sans", Arial, sans-serif; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.scp-v small { margin-left: 6px; font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.scp-l { font-weight: 700; font-size: 14.5px; color: var(--g-ink); }
.scp-bar { display: block; height: 6px; margin-top: 7px; border-radius: 3px; background: #e3e8e2; overflow: hidden; }
.scp-bar i { display: block; height: 100%; border-radius: 3px; background: var(--g); transform-origin: left; animation: scGrow .7s var(--ease); }
@keyframes scGrow { from { transform: scaleX(0); } }
.scp-f { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.scp-f li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 9px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.scp-f .sg { display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; font-weight: 700; font-size: 14px; line-height: 1; }
.scp-f .up .sg { background: var(--accent-soft); color: var(--accent-ink); }
.scp-f .down .sg { background: var(--red-soft); color: var(--red); }
.scp-f .eq .sg { background: var(--gray-soft); color: var(--muted); }

/* ---------- профиль компании ---------- */
.prof-draft { display: flex; align-items: center; gap: 9px; margin: 14px 22px 0; padding: 10px 14px; border-radius: 8px; background: var(--amber-soft); color: var(--amber-ink); font-size: 14px; }
.prof { min-width: 0; margin: 0; padding: 0; border: 0; }
.prof-id { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 130px); gap: 12px; }
.prof-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 14px; }
.prof-f label, .prof-id label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 700; color: var(--muted); }
.prof-f textarea { min-height: 86px; }
.prof input[type=text] { width: 100%; }
.prof-reg { margin-top: 18px; }
.reg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 12px; margin-top: 8px; }
.reg { display: flex; align-items: center; gap: 10px; padding: 4px 5px 4px 12px; border-radius: 8px; border: 1px solid var(--line-2); font-size: 14px; }
.reg span { flex: 1; min-width: 0; }
.reg select { width: auto; height: 30px; padding: 0 28px 0 9px; font-size: 13px; }
.reg-home { background: var(--accent-soft); border-color: var(--accent-line); }
.reg-plan { background: var(--blue-soft); border-color: #c7d7ec; }

@media (max-width: 760px) {
  .rv-top { grid-template-columns: 1fr; gap: 10px; margin: 12px 16px 0; padding: 14px 14px 15px; }
  .rv-verdict { flex-direction: row; align-items: center; gap: 10px; }
  .rv-hl { font-size: 17px; }
  .rv-sum, .rv-terms { padding-left: 16px; padding-right: 16px; }
  .rs { width: 100%; }
  .rv-sec > summary { padding: 13px 16px; }
  .rv-sec > :not(summary) { margin-left: 16px; margin-right: 16px; }
  .rq { grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 11px 12px; }
  .rq-k { grid-column: 2; padding-top: 0; }
  .rk { grid-template-columns: 1fr; gap: 7px; padding: 11px 12px; }
  .rv-pay { grid-template-columns: 1fr; gap: 1px; }
  .rv-pay dd { margin-bottom: 9px; }
  .rv-foot { padding: 12px 16px 15px; }
  .scp-b { grid-template-columns: 1fr; gap: 14px; padding: 12px 16px 16px; }
  .prof-draft { margin: 12px 16px 0; }
  .prof-id, .prof-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .scp-bar i, .rv.rv-in .rv-top { animation: none; }
}

/* ---------- цена и выгода ---------- */
.pr { --e: var(--blue); --e-soft: var(--blue-soft); --e-ink: #173b6b; --e-line: #c5d6ec; }
.pr-good { --e: var(--accent); --e-soft: var(--accent-soft); --e-ink: var(--accent-ink); --e-line: var(--accent-line); }
.pr-edge { --e: #9a6a06; --e-soft: #fdf6e3; --e-ink: var(--amber-ink); --e-line: #ecd9a8; }
.pr-bad { --e: var(--red); --e-soft: #fdf3f2; --e-ink: #8a1c13; --e-line: #f1c4bf; }
.pr-top { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; margin: 14px 22px 0; padding: 16px 18px 17px; border-radius: 9px; background: var(--e-soft); border: 1px solid var(--e-line); }
.pr-verdict { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.pr-badge { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px 0 11px; border-radius: 8px; background: var(--e); color: #fff; font: 700 16px/1 "PT Sans", Arial, sans-serif; white-space: nowrap; box-shadow: 0 1px 2px rgba(16, 32, 24, .14); }
.pr-badge .i { stroke-width: 2.1; }
.pr-cap { font-size: 12.5px; line-height: 1.35; color: var(--e-ink); }
.pr-hl { font: 700 17.5px/1.4 "PT Serif", Georgia, serif; color: var(--ink); text-wrap: pretty; max-width: 76ch; }
.pr-facts { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.pr-facts li { display: flex; flex-direction: column; gap: 1px; font-size: 13px; color: var(--muted); }
.pr-facts b { font-size: 15.5px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pr-facts em { font-style: normal; font-size: 12.5px; }
.pr-facts em.up { color: var(--accent-ink); }
.pr-facts em.down { color: var(--red); }

.pr-chart { margin: 18px 22px 0; }
.pc-plot { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; }
.pc-ylab { display: flex; flex-direction: column; justify-content: space-between; height: 150px; font-size: 11.5px; color: var(--faint); text-align: right; padding: 0 0 0; }
.pc-ylab i { font-style: normal; line-height: 1; }
.pc-box { position: relative; height: 150px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pc-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pc-grid { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 4; }
.pc-loss { fill: rgba(180, 35, 24, .05); }
.pc-area { fill: var(--e-soft); }
.pr-win .pc-area, .pr .pc-area { fill-opacity: .9; }
.pc-line { fill: none; stroke: var(--e); stroke-width: 2.2; stroke-linejoin: round; }
.pc-mk { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed #9aa59d; pointer-events: none; }
.pc-mk i { position: absolute; top: -2px; left: 5px; font-style: normal; font-size: 11.5px; line-height: 1.2; color: var(--muted); white-space: nowrap; background: rgba(255, 255, 255, .85); padding: 1px 3px; border-radius: 3px; }
.pc-mk.pc-floor { border-left-color: var(--red); }
.pc-mk.pc-floor i { color: var(--red); top: 16px; }
.pc-mk.pc-list i { top: 32px; }
.pc-mk.pc-dump { border-left: 1.5px dotted var(--amber); }
.pc-mk.pc-dump i { color: var(--amber-ink); top: auto; bottom: 4px; }
.pc-cur { position: absolute; top: -6px; bottom: 0; width: 0; border-left: 2px solid var(--ink); pointer-events: none; transition: left .12s var(--ease); }
.pc-cur b { position: absolute; top: -2px; left: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px #fff; }
.pc-x { position: relative; height: 20px; margin: 5px 0 0 46px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pc-x span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.pc-x span:first-child { transform: none; }
.pc-x span:last-child { transform: translateX(-100%); }
.pc-ctl { display: block; margin: 4px 0 0 46px; }
.pc-range { width: 100%; height: 26px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.pc-read { margin: 6px 0 0 46px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.pc-read b { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-dump { color: var(--amber-ink); }

.pr-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 22px 0; }
.pl { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; text-align: left; font: inherit; color: var(--ink-2); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pl:hover { border-color: #a9b4ac; }
.pl.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pl-t { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--muted); }
.pl-t em { font-style: normal; font-size: 11.5px; padding: 1px 6px; border-radius: 4px; background: var(--e-soft); color: var(--e-ink); }
.pl-v { font: 700 19px/1.25 "PT Sans", Arial, sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-s { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pl-m { font-size: 13px; color: var(--accent-ink); }
.pl-m.neg { color: var(--red); }
.pl-d { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--amber-ink); }
.pl-rec { border-color: var(--e-line); background: linear-gradient(var(--e-soft), #fff 70%); }
.pr-note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 22px 0; font-size: 13px; line-height: 1.45; color: var(--amber-ink); max-width: 100ch; }
.pr-note .i { margin-top: 2px; }
.pr-empty { color: var(--muted); }
.pr-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 2px 0 2px; }
.pr-cta p { flex: 1 1 380px; color: var(--ink-2); font-size: 14.5px; max-width: 80ch; }
.pr-lines .sub > * + *::before { content: "·"; margin: 0 7px; color: var(--faint); }
.pr-lines tfoot td { padding: 11px 14px; border-top: 1px solid var(--line); font-weight: 700; }
.pr-lines tfoot td:first-child { padding-left: 22px; }
.pr .rv-sec > .tbl-wrap { margin-left: 0; margin-right: 0; }
.pr .rv-sec > .tbl-wrap .tbl tr > :first-child { padding-left: 22px; }

.dots-c { min-width: 170px; }
.dots { position: relative; display: block; width: 150px; height: 18px; margin-top: 3px; border-radius: 9px; background: linear-gradient(90deg, #f1f3ee, #e3e8e2); }
.dots i { position: absolute; top: 4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #fff; border: 1.6px solid #8e9a92; }
.dots i.w { background: var(--accent); border-color: var(--accent); z-index: 1; }
.dots-n { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }

.ec { gap: 4px; text-decoration: none; font-weight: 700; }
.ec .i { stroke-width: 2; }
.ec-good { color: var(--accent-ink); background: var(--accent-soft); }
.ec-edge { color: var(--amber-ink); background: var(--amber-soft); }
.ec-bad { color: var(--red); background: var(--red-soft); }
.ec-win { color: #173b6b; background: var(--blue-soft); font-weight: 400; }
.win-p { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 400; color: var(--muted); text-decoration: none; white-space: nowrap; }
.win-p:hover { color: var(--accent-ink); }
.ts-win { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 13px; color: var(--accent-ink); text-decoration: none; }
.ts-win:hover { text-decoration: underline; }

/* ---------- раздел «Цены» ---------- */
.px-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.px-grid + .panel { margin-top: 18px; }
.px-counts { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px 0; }
.pxc { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.pxc b { font-size: 17px; font-variant-numeric: tabular-nums; }
.pxc.good b { color: var(--accent-ink); }
.pxc.edge b { color: var(--amber-ink); }
.pxc.bad b { color: var(--red); }
.pxc.win b { color: #173b6b; }
.pxc:hover { border-color: #a9b4ac; color: var(--ink); }
.px-best .tbl-wrap { margin-top: 12px; }
.px-tbl .sub-r { justify-content: flex-end; }
.px-up .panel-b { display: flex; flex-direction: column; gap: 12px; }
.px-cur { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13.5px; line-height: 1.45; }
.px-cur .i { margin-top: 2px; }
.px-cur b { color: var(--ink); word-break: break-word; }
.px-sample { color: var(--amber-ink); }
.px-form { display: flex; flex-direction: column; gap: 10px; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 14px 18px; border: 1.5px dashed #b8c3bb; border-radius: 10px; background: #fafbf8; text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-i { color: var(--accent); }
.drop-t { font-size: 14.5px; color: var(--ink-2); }
.drop-t b { color: var(--ink); }
.drop-s { font-size: 12.5px; color: var(--muted); }
.drop-f { font-size: 13px; font-weight: 700; color: var(--accent-ink); word-break: break-word; }
.drop-f:empty { display: none; }
.px-job { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; background: var(--head); border: 1px solid var(--line); font-size: 14px; }
.px-job[hidden] { display: none; }
.px-job.err { background: var(--red-soft); border-color: #f1c4bf; color: #8a1c13; }
.px-job.err .rv-spin { display: none; }
.px-hint { font-size: 13px; line-height: 1.45; color: var(--muted); }
.px-hint a { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.px-edit .tbl-wrap { margin-top: 12px; }
.px-items td { padding-top: 8px; padding-bottom: 8px; vertical-align: middle; }
.px-items input[type=text], .px-items select { width: 100%; height: 34px; font-size: 14px; }
.px-items td:nth-child(1) { min-width: 340px; }
.px-items td:nth-child(2) { width: 230px; }
.px-items td:nth-child(3) { width: 96px; }
.px-items td:nth-child(4), .px-items td:nth-child(5) { width: 112px; }
.px-items td:nth-child(6) { min-width: 180px; }
.px-items td:nth-child(7) { width: 44px; }
.px-items td.num input { text-align: right; font-variant-numeric: tabular-nums; }
.px-new input[type=text] { background: #fafbf8; }
.px-del label { display: inline-flex; cursor: pointer; color: var(--faint); }
.px-del input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.px-del span { display: inline-flex; padding: 6px; border-radius: 6px; }
.px-del label:hover span { color: var(--red); background: var(--red-soft); }
.px-del input:checked + span { color: #fff; background: var(--red); }
.px-items tr:has(.px-del input:checked) input, .px-items tr:has(.px-del input:checked) select { text-decoration: line-through; opacity: .55; }
.px-set { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; padding: 16px 22px 22px; border-top: 1px solid var(--line-2); }
.px-vat { display: flex; gap: 14px; align-items: center; border: 0; margin: 0; padding: 0; font-size: 14px; }
.px-vat legend { float: left; margin-right: 6px; color: var(--muted); padding: 0; }
.px-vat label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.px-vat input { accent-color: var(--accent); }
.px-floor { font-size: 14px; color: var(--ink-2); }
.px-floor input { width: 64px; height: 34px; margin: 0 4px; text-align: right; border: 1px solid #c6cec8; border-radius: 7px; font: inherit; padding: 0 8px; }
.px-set .btn { margin-left: auto; }
.px-hist .px-vers { list-style: none; padding: 0; }
.px-vers li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); }
.px-vers li:last-child { border-bottom: 0; }
.px-vers li form { margin-left: auto; }
.px-vers li .tag { margin-left: auto; }
.bad-t { color: var(--red); }
.px-steps { list-style: none; counter-reset: pxs; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 34px; }
.px-steps li { counter-increment: pxs; position: relative; padding-left: 36px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.px-steps li::before { content: counter(pxs); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.px-steps li b { color: var(--ink); }
/* закупочные цены поставщиков — перепродажа */
.px-role { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; font-size: 14px; color: var(--ink-2); }
.px-role label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.px-role input { accent-color: var(--accent); }
.px-sup { height: 36px; border: 1px solid #c6cec8; border-radius: 7px; padding: 0 10px; font: inherit; font-size: 14px; }
.px-sup[hidden] { display: none; }
.sp-b { display: flex; flex-direction: column; gap: 12px; }
.sp-set { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; font-size: 14px; color: var(--ink-2); }
.sp-set input { width: 64px; height: 34px; margin: 0 4px; text-align: right; border: 1px solid #c6cec8; border-radius: 7px; font: inherit; padding: 0 8px; }
.sp-now { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.sp-list { border: 1px solid var(--line); border-radius: 10px; }
.sp-list > summary { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; padding: 12px 14px; cursor: pointer; list-style: none; font-size: 14.5px; }
.sp-list > summary::-webkit-details-marker { display: none; }
.sp-list > summary span { color: var(--muted); font-size: 13.5px; }
.sp-list > summary b { display: inline-flex; align-items: center; gap: 6px; }
.sp-list.off > summary b { color: var(--muted); }
.sp-list .tbl-wrap { margin: 0; border-top: 1px solid var(--line-2); }
.sp-list .px-set { padding: 12px 14px 14px; }
.sp-add > summary b { color: var(--accent-ink); font-weight: 600; }
.sp-name { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.sp-name input { width: 240px; height: 34px; border: 1px solid #c6cec8; border-radius: 7px; padding: 0 10px; font: inherit; }
.sp-acts { display: inline-flex; gap: 14px; font-size: 13.5px; }
.linkbtn.danger:hover { color: var(--red); }
.sp-items td:nth-child(5) { width: auto; min-width: 180px; }
.sp-items td:nth-child(6) { width: 44px; min-width: 0; }
.sp-empty { font-size: 14px; }
@media (max-width: 640px) {
  .sp-name { flex-wrap: wrap; width: 100%; }
  .sp-name input { width: 100%; }
}
.px-link-b { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.px-link-b p { flex: 1 1 420px; color: var(--ink-2); }
.grid2 + .px-link, .prof-panel + .px-link, .px-link + .tg-panel { margin-top: 18px; }

@media (max-width: 1100px) {
  .px-grid { grid-template-columns: minmax(0, 1fr); }
  .px-up { order: -1; }
}
@media (max-width: 760px) {
  .pr-top { grid-template-columns: 1fr; gap: 12px; margin: 12px 14px 0; padding: 14px; }
  .pr-hl { font-size: 16.5px; }
  .pr-chart { margin: 16px 14px 0; }
  .pc-plot { grid-template-columns: 30px minmax(0, 1fr); }
  .pc-box, .pc-ylab { height: 130px; }
  .pc-x, .pc-ctl, .pc-read { margin-left: 38px; }
  .pc-x span:nth-child(2), .pc-x span:nth-child(4) { display: none; }
  .pc-mk i { font-size: 10.5px; }
  .pr-levels { grid-template-columns: 1fr; margin: 14px 14px 0; gap: 8px; }
  .pl { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 10px; padding: 10px 12px; }
  .pl-v { grid-row: 1; grid-column: 2; font-size: 17px; }
  .pl-t { grid-column: 1; }
  .pl-s, .pl-m, .pl-d { grid-column: 1 / -1; }
  .pr-note { margin: 10px 14px 0; }
  .pr .rv-sec > .tbl-wrap .tbl tr > :first-child { padding-left: 14px; }
  .dots-c { min-width: 0; }
  .px-counts { padding: 12px 14px 0; }
  .px-steps { grid-template-columns: 1fr; }
  .px-set { padding: 14px; }
  .px-set .btn { margin-left: 0; width: 100%; }
  .px-items td:nth-child(n) { min-width: 0; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .pc-cur { transition: none; }
}
.px-trips { display: inline-flex; gap: 7px; align-items: center; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.pr-note.pr-warn { color: var(--red); }

/* =====================================================================
   Разделы: радар, договоры, календарь, «Мои документы», ссылки для WhatsApp
   ===================================================================== */
input[type=date], input[type=number] {
  font: inherit; font-size: 14px; color: var(--ink); background: #fff; border: 1px solid #c6cec8; border-radius: var(--r-s);
  height: 38px; padding: 0 9px; transition: border-color .15s, box-shadow .15s;
}
input[type=date]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 122, 67, .16); }
.w-full { width: 100%; }
.w-s { width: 70px; }
.w-m { width: 110px; }
input.num { text-align: right; font-variant-numeric: tabular-nums; }
.red-t { color: var(--red); }
.tag.red { color: var(--red); background: var(--red-soft); }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn.danger:hover { background: #8f1c13; border-color: #8f1c13; }
.form-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.form-row2 input, .form-row2 select { width: 100%; }

/* шапка: поиск и настройки значками */
.top-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #a9c4b4; transition: background-color .15s, color .15s; }
.top-ic:hover, .top-ic.on { color: #fff; background: rgba(255, 255, 255, .1); }
.top-sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .16); margin: 0 4px; }
.nav .cnt.amber { color: var(--amber-ink); background: var(--amber-soft); }
.nav .cnt.red { color: #fff; background: var(--red); }

/* «Рынок»: подразделы */
.subnav { display: flex; gap: 4px; margin: -6px 0 18px; overflow-x: auto; scrollbar-width: none; }
.subnav a { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 8px; color: var(--ink-2); text-decoration: none; white-space: nowrap; font-size: 14px; }
.subnav a .i { color: var(--faint); }
.subnav a:hover { background: #e9ece6; color: var(--ink); }
.subnav a.on { background: var(--panel); color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); }
.subnav a.on .i { color: var(--accent); }

/* лента: что требует внимания и направления */
.alerts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.al { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 9px; font-size: 14px; text-decoration: none;
  color: var(--ink); background: var(--panel); border: 1px solid var(--line); transition: border-color .15s; }
.al:hover { color: var(--ink); border-color: #a9b4ac; }
.al.red { color: var(--red); background: var(--red-soft); border-color: #f2c4bf; font-weight: 700; }
.al.amber .i { color: var(--amber); }
.dirbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 22px 0; }
.dirbar a { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 5px; border-radius: 18px; font-size: 13.5px; text-decoration: none;
  color: var(--ink-2); border: 1px solid var(--line); background: #fff; }
.dirbar a:hover { border-color: #a9b4ac; color: var(--ink); }
.dirbar a.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.dirbar a b { font-variant-numeric: tabular-nums; color: var(--ink); }
.dirbar a.zero { opacity: .55; }

/* ---------- радар ---------- */
.rd-why { background: var(--brand); color: #d6e5dc; border-radius: var(--r); padding: 18px 22px; margin-bottom: 18px; }
.rd-why-t { display: flex; gap: 12px; align-items: flex-start; max-width: 110ch; line-height: 1.5; }
.rd-why-t .i { color: var(--lime); margin-top: 3px; }
.rd-why-t b { color: #fff; }
.rd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.rd-stats div { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 9px; padding: 10px 12px; }
.rd-stats b { display: block; font-size: 24px; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.rd-stats span { font-size: 13px; color: #a8c4b4; }
.rd-note { margin-top: 12px; font-size: 13.5px; color: #a8c4b4; }
.rd-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.rd-col-h { display: flex; align-items: center; gap: 9px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.rd-col-h h2 { font-size: 16px; }
.rd-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.rd-h3 .rd-dot { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.rd-h5 .rd-dot { background: #9fb4a6; box-shadow: 0 0 0 4px var(--gray-soft); }
.rd-n { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.rd-list { list-style: none; margin: 0; padding: 0; }
.rd-card { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.rd-card:last-child { border-bottom: 0; }
.rd-top { display: flex; gap: 10px; align-items: flex-start; }
.rd-t { font-weight: 700; text-decoration: none; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rd-t:hover { text-decoration: underline; }
.rd-c { margin-top: 4px; font-size: 13px; color: var(--muted); }
.rd-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rd-sum { margin-top: 8px; font-variant-numeric: tabular-nums; }
.rd-p { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; font-size: 13.5px; }
.rd-bar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.rd-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.rd-hist { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--accent-ink); }
.rd-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 13.5px; }
.rd-empty { padding: 16px; color: var(--muted); font-size: 14px; }
.rd-tg { display: flex; gap: 8px; align-items: center; margin: 12px 2px 18px; font-size: 13.5px; color: var(--muted); }
.rd-sub { font-size: 12.5px; color: var(--muted); }
.rd-cols > .panel + .panel { margin-top: 0; }  /* колонки радара в сетке — без отступа между панелями */
.rd-cols + .panel { margin-top: 18px; }
/* перепродажа: маржа, если подать одним, и пустые закупки в ожидании повтора */
.rd-rs { margin: -6px 2px 14px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.rd-rv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 10px; padding: 7px 10px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 13.5px; }
.rd-rv b { font-variant-numeric: tabular-nums; }
.rd-rv .rd-sub { flex-basis: 100%; }
.rd-rv.neg { background: var(--red-soft); color: #8a1c13; }
.rd-rv.odd { background: var(--amber-soft); color: var(--amber-ink); }
.rd-wait b.pos { color: var(--accent-ink); }
.rd-wait b.odd { color: var(--amber-ink); }
.rd-wait b.neg { color: var(--red); }
.rd-wait .sub-r { justify-content: flex-end; }
.rd-wait tr.rw-open td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.rd-wait tr.off td { color: var(--muted); }
.rw-rep { font-weight: 700; color: var(--accent-ink); }
.rw-w { width: 1%; white-space: nowrap; text-align: right; }
.wbtn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--panel, #fff); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.wbtn:hover { border-color: #a9b4ac; color: var(--ink); }
.wbtn.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }

/* версии объявления: изменили документацию */
.ver-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 12px 16px; border-radius: var(--r); font-size: 14.5px;
  line-height: 1.45; color: var(--amber-ink); background: var(--amber-soft); border: 1px solid #ecd9a8; }
.ver-note .i { margin-top: 2px; flex: none; }
.ver-note a { color: inherit; font-weight: 700; }
.ver-note.ver-new { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-line); }
.rd-card.rd-has .rd-t { color: var(--ink-2); }

/* сколько заявок уже подано — со страницы объявления госзакупа */
.ap { display: block; width: fit-content; margin-top: 5px; padding: 1px 7px; border-radius: 6px; font-size: 12px; line-height: 18px;
  color: var(--ink-2); background: var(--gray-soft); white-space: nowrap; }
.ap b, .when .ap b { display: inline; font-size: inherit; font-variant-numeric: tabular-nums; }
.ap-0 { color: var(--accent-ink); background: var(--accent-soft); font-weight: 700; }
.ap.big { margin-top: 8px; padding: 0 9px; font-size: 13.5px; line-height: 24px; }
.rd-p .ap.big { margin-top: 0; }
.s-row { display: flex; align-items: center; gap: 8px; }
.s-side .ap { margin: 0; }

/* ---------- договоры: список ---------- */
.dl-req { margin-bottom: 14px; }
.dl-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.dl-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); transition: border-color .15s; }
.dl-tile:hover { border-color: #a9b4ac; color: var(--ink); }
.dl-tile .v { font: 700 24px/1.1 "PT Sans", Arial, sans-serif; font-variant-numeric: tabular-nums; }
.dl-tile .l { font-size: 13px; color: var(--muted); }
.dl-tile.red { background: var(--red-soft); border-color: #f2c4bf; }
.dl-tile.red .v { color: var(--red); }
.dl-tile.reg { background: var(--head); }
.dl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.dl-side { display: grid; gap: 18px; position: sticky; top: 64px; }
.tabs a.t-red .cnt { color: #fff; background: var(--red); }
.dl-tbl .title { font-size: 15px; }
.src { font-size: 12px; color: var(--muted); }
.src-registry { color: var(--blue); }
.src-demo { color: var(--violet); font-weight: 700; }
.dst { display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border-radius: 5px; font-size: 12.5px; font-weight: 700; line-height: 23px; white-space: nowrap; }
.dst::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dst-signed { color: var(--muted); background: var(--gray-soft); }
.dst-active { color: var(--blue); background: var(--blue-soft); }
.dst-wait { color: var(--amber-ink); background: var(--amber-soft); }
.dst-overdue { color: var(--red); background: var(--red-soft); }
.dst-claim { color: #fff; background: var(--red); }
.dst-paid { color: #fff; background: var(--accent); }
.dst-closed { color: var(--accent-ink); background: var(--accent-soft); }
.dst-cancelled { color: var(--muted); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.sub-red { color: var(--red); font-weight: 700; }
.mbar { display: inline-block; vertical-align: middle; width: 76px; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.mbar i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.mbar.paid i { background: var(--accent); }
.mbar-t { margin-left: 7px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dl-next { display: flex; flex-direction: column; font-size: 13.5px; color: var(--ink-2); }
.dl-next b { font-size: 13px; color: var(--muted); font-weight: 400; }
.dl-next.late { color: var(--red); }
.dl-next.late b { color: var(--red); font-weight: 700; }
.dl-parse { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.dl-parse .rv-spin { width: 18px; height: 18px; margin: 0; }
.dl-sync { margin-left: auto; font-size: 13px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.rs-st { font-size: 13px; }
.rs-ok { color: var(--accent-ink); }
.rs-bad { color: var(--muted); text-decoration: line-through; }
.rs-run { color: var(--blue); }
.how-steps { list-style: none; counter-reset: hs; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.how-steps li { counter-increment: hs; position: relative; padding-left: 32px; min-height: 22px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.how-steps li::before { content: counter(hs); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 12px; }
.how-steps li .i { vertical-align: -2px; }
.dl-manual { margin-top: 16px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.dl-manual summary { cursor: pointer; color: var(--accent-ink); font-size: 14px; }
.dl-new input, .dl-new select { width: 100%; }

/* ---------- договор: карточка ---------- */
.dl-head h1 { max-width: 34ch; }
.dl-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.dl-parsing { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; margin-bottom: 18px; }
.dl-alerts { display: grid; gap: 10px; margin-bottom: 18px; }
.dl-al { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); font-size: 14.5px; }
.dl-al > .i { flex: none; color: var(--muted); }
.dl-al.red { background: var(--red-soft); border-color: #f2c4bf; color: #7a1a12; }
.dl-al.red > .i { color: var(--red); }
.dl-al.amber { background: var(--amber-soft); border-color: #ecd9a6; color: var(--amber-ink); }
.dl-al.amber > .i { color: var(--amber); }
.dl-al-act { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.dl-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.dl-steps li { position: relative; padding: 12px 14px 11px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); }
.dl-steps li b { display: block; font-size: 14px; color: var(--muted); }
.dl-steps li span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.dl-steps li.done { background: var(--accent-soft); border-color: var(--accent-line); }
.dl-steps li.done b { color: var(--accent-ink); }
.dl-steps li.done b::before { content: "✓ "; }
.dl-steps li.now { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.dl-steps li.now b { color: var(--ink); }
.dl-steps li.bad { background: var(--red-soft); border-color: #f2c4bf; }
.dl-steps li.bad b { color: var(--red); }
.dl-page { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.dl-col { display: grid; gap: 18px; min-width: 0; }
.dl-col-side { display: grid; gap: 18px; }
.dl-col > .panel + .panel, .dl-col-side > .panel + .panel { margin-top: 0; }
.dl-compose { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(11, 122, 67, .06); }
.seg.dl-modes { padding: 12px 22px 0; }
.dl-modes button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; }
.dl-modes button:hover { border-color: #a9b4ac; }
.dl-modes button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.dl-req { padding: 12px 22px 18px; }
.dl-req textarea { min-height: 76px; font-size: 15px; }
.dl-ex { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dl-ex .chip { cursor: pointer; font: inherit; font-size: 13px; background: #fff; }
.dl-req-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.drop-sm { padding: 14px; }
.dl-prev { padding: 0 0 18px; border-top: 1px solid var(--line-2); }
.dl-prev-t input { width: 84px; height: 32px; text-align: right; }
.dl-prev-t tr.over td { background: var(--amber-soft); }
.dl-prev-t .rm { font-size: 12px; color: var(--muted); display: block; }
.dl-warn { margin: 10px 22px 0; padding: 9px 12px; border-radius: 8px; background: var(--amber-soft); color: var(--amber-ink); font-size: 13.5px; }
.dl-prev-f { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 4px 22px 0; }
.dl-prev .dl-req-act { padding: 0 22px; }
.dl-chk { display: inline-flex; align-items: center; gap: 8px; height: 38px; font-size: 14px; }
.dl-items .ck { width: 34px; }
.dl-items .ck input { width: 17px; height: 17px; }
.dl-items:not(.picking) .ck { display: none; }
.dl-items .dl-q { width: 80px; height: 30px; margin-top: 4px; text-align: right; }
.dl-items tr.picked td { background: var(--accent-soft); }
.dl-edit { border-top: 1px solid var(--line-2); padding: 12px 22px 16px; }
.dl-edit summary { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--accent-ink); font-size: 14px; }
.dl-items-f, .dl-terms-f { margin-top: 12px; }
.dl-items-f table input { width: 100%; height: 34px; }
.dl-items-f .tbl td { padding: 6px 6px; }
.dl-items-f .btn { margin-top: 10px; }
.dl-del { display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.dl-terms-f input, .dl-terms-f select { width: 100%; }
.ddocs { list-style: none; margin: 10px 0 0; padding: 0; }
.ddoc { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--line-2); }
.ddoc-i { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--accent-ink); background: var(--accent-soft); }
.dk-act .ddoc-i { color: #0f766e; background: #dff2ef; }
.dk-invoice .ddoc-i { color: var(--blue); background: var(--blue-soft); }
.dk-claim .ddoc-i { color: var(--red); background: var(--red-soft); }
.dk-guarantee .ddoc-i { color: var(--violet); background: var(--violet-soft); }
.ddoc-b { min-width: 0; flex: 1; }
.ddoc-t { display: block; font-weight: 700; text-decoration: none; }
.ddoc-t:hover { text-decoration: underline; }
.ddoc-m { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.ddoc-act { display: flex; gap: 6px; }
.dds { font-size: 12.5px; padding: 0 8px; line-height: 22px; border-radius: 5px; white-space: nowrap; color: var(--muted); background: var(--gray-soft); }
.dds-sent { color: var(--blue); background: var(--blue-soft); }
.dds-signed { color: var(--amber-ink); background: var(--amber-soft); }
.dds-paid, .dds-done, .dds-answered { color: var(--accent-ink); background: var(--accent-soft); }
.evs { list-style: none; margin: 10px 0 0; padding: 0 22px 16px; }
.evs li { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; padding: 7px 0; font-size: 13.5px; border-top: 1px solid var(--line-2); }
.evs li:first-child { border-top: 0; }
.evs-t { color: var(--muted); font-variant-numeric: tabular-nums; }
.dl-money { display: grid; gap: 12px; }
.dm { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 10px; }
.dm span:first-child { font-size: 13.5px; color: var(--muted); }
.dm b { font-variant-numeric: tabular-nums; }
.dm .mbar { grid-column: 1 / -1; width: 100%; }
.dm.red span:first-child, .dm.red b { color: var(--red); }
.dm-pays { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--line-2); display: grid; gap: 6px; font-size: 13px; }
.dm-pays li { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 2px 10px; }
.dm-pays em { grid-column: 2; color: var(--muted); font-style: normal; font-size: 12.5px; }
.dm-add summary { list-style: none; width: fit-content; }
.dm-add summary::-webkit-details-marker { display: none; }
.dm-add[open] summary { display: none; }
.dl-terms { margin: 0; display: grid; grid-template-columns: 1fr; gap: 0; }
.dl-terms dt { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.dl-terms dt:first-child { margin-top: 0; }
.dl-terms dd { margin: 2px 0 0; font-size: 14px; line-height: 1.45; }
.dl-terms dd em { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.dl-ct { display: block; }
.dl-risks { margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; }
.pen-calc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 14px; padding: 10px 12px; border-radius: 9px; background: var(--head); font-size: 14px; }
.pen-calc input { width: 54px; height: 32px; text-align: center; }
.pen-calc b { color: var(--red); font-variant-numeric: tabular-nums; }
.dl-meta p { font-size: 14px; display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.dl-stage-f { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* документ */
.dd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.dd-frame { height: 74vh; min-height: 520px; background: #e9ece6; }
.dd-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.dd-open { padding: 10px 16px; font-size: 13.5px; color: var(--muted); }
.dd-open a { display: inline-flex; gap: 6px; align-items: center; color: var(--accent-ink); }
.dd-side { display: grid; gap: 18px; }
.dd-side > .panel + .panel { margin-top: 0; }
.dd-steps { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 0; }
.dd-steps li { position: relative; padding: 0 0 14px 26px; font-size: 14px; }
.dd-steps li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #b9c1bb; background: #fff; box-sizing: border-box; }
.dd-steps li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 2px; width: 2px; background: var(--line); }
.dd-steps li:last-child::after { display: none; }
.dd-steps li.done::before { border-color: var(--accent); background: var(--accent); }
.dd-steps li.now::before { border-color: var(--ink); }
.dd-steps li.bad::before { border-color: var(--red); background: var(--red); }
.dd-steps b { display: block; }
.dd-steps span { font-size: 13px; color: var(--muted); }
.dd-f { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.dd-f .f { margin-top: 0; }
.dd-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dd-row input[type=text] { width: 140px; }
.dd-file { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--accent-ink); cursor: pointer; position: relative; }
.dd-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dd-file.has { font-weight: 700; }
.dd-items { list-style: none; margin: 10px 0 0; padding: 0 22px 14px; font-size: 13.5px; }
.dd-items li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line-2); }
.dd-items li:first-child { border-top: 0; }
.dd-items b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dd-scan { margin-top: 12px; font-size: 14px; }
.dd-scan a { display: inline-flex; gap: 6px; align-items: center; }
.dd-del { padding: 0 4px; }
.dd-del .linkbtn { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; }

/* письмо */
.lt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.lt-main textarea { min-height: 380px; font: 15px/1.6 "PT Serif", Georgia, serif; }
.lt-note { display: flex; gap: 7px; align-items: flex-start; margin: 10px 0 14px; font-size: 13px; color: var(--muted); }
.lt-side { display: grid; gap: 18px; }
.lt-side > .panel + .panel { margin-top: 0; }
.lt-params { gap: 10px 14px; }
.lt-params label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.lt-params input[type=text] { flex: 1 1 220px; }
.lt-rate .f { margin-top: 0; line-height: 1.45; }

/* ---------- календарь ---------- */
.cl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cl-nav { display: flex; align-items: center; gap: 10px; }
.cl-nav h2 { min-width: 150px; text-align: center; font-size: 20px; }
.cl-types { display: flex; flex-wrap: wrap; gap: 6px; }
.clt { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 8px; font-size: 13.5px; text-decoration: none;
  color: var(--muted); background: #fff; border: 1px solid var(--line); }
.clt i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); opacity: .35; }
.clt b { font-variant-numeric: tabular-nums; color: var(--ink); }
.clt.on { color: var(--ink); border-color: #b9c4bc; }
.clt.on i { opacity: 1; }
.clt:hover { color: var(--ink); }
.clt-tender, .cle-tender, .clp-tender, .cdot-tender { --c: var(--amber); --cs: var(--amber-soft); }
.clt-deliver, .cle-deliver, .clp-deliver, .cdot-deliver { --c: var(--violet); --cs: var(--violet-soft); }
.clt-act, .cle-act, .clp-act, .cdot-act { --c: #0f766e; --cs: #dff2ef; }
.clt-pay, .cle-pay, .clp-pay, .cdot-pay { --c: var(--accent); --cs: var(--accent-soft); }
.clt-claim, .cle-claim, .clp-claim, .cdot-claim { --c: var(--red); --cs: var(--red-soft); }
.clt-end, .cle-end, .clp-end, .cdot-end { --c: #6b7770; --cs: var(--gray-soft); }
.clt-doc, .cle-doc, .clp-doc, .cdot-doc { --c: var(--blue); --cs: var(--blue-soft); }
.cl-late { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; padding: 10px 14px; border-radius: 9px; background: var(--red-soft); color: #7a1a12; font-size: 14px; }
.cl-late .i { color: var(--red); flex: none; }
.cl-late a { color: inherit; }
.cl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.cl-wds { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.cl-wds span { padding: 9px 10px; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cl-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cld { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-height: 112px; padding: 7px 7px 8px; text-align: left;
  font: inherit; background: #fff; border: 0; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); cursor: pointer; min-width: 0; color: inherit; }
.cld:nth-child(7n) { border-right: 0; }
.cld:hover { background: #fafbf8; }
.cld.off { background: #fbfcfa; }
.cld.off .cld-n { color: #b9c1bb; }
.cld.sel { box-shadow: inset 0 0 0 2px var(--ink); z-index: 1; }
.cld-n { font-size: 13.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cld.today .cld-n { display: inline-grid; place-items: center; width: 26px; height: 26px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--accent); color: #fff; }
.cld.past .cld-n { color: var(--faint); }
.cld.late::after { content: ""; position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.clp { display: block; padding: 1px 6px; border-radius: 4px; font-size: 12px; line-height: 18px; color: var(--ink-2); background: var(--cs);
  box-shadow: inset 2px 0 0 var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clp em { font-style: normal; font-weight: 700; margin-right: 4px; }
.clp.late { color: var(--red); background: var(--red-soft); box-shadow: inset 2px 0 0 var(--red); }
.clp-more { font-size: 12px; color: var(--muted); padding-left: 6px; }
.clp-new { font-size: 11.5px; color: var(--accent-ink); padding-left: 6px; }
.cld-dots { display: none; gap: 3px; flex-wrap: wrap; }
.cld-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.cl-side { position: sticky; top: 64px; padding: 16px 16px 18px; max-height: calc(100vh - 84px); overflow: auto; }
.cl-dayp h3 { font-size: 19px; display: flex; flex-direction: column; margin-bottom: 12px; }
.cl-dayp h3 span { font: 400 13.5px/1.4 "PT Sans", Arial, sans-serif; color: var(--muted); }
.cle-list { display: grid; gap: 8px; }
.cle { display: block; padding: 9px 11px 10px; border-radius: 9px; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line);
  transition: border-color .15s; }
.cle:hover { border-color: #a9b4ac; color: var(--ink); }
.cle.late { border-color: #f2c4bf; }
.cle-k { display: block; font-size: 12.5px; font-weight: 700; color: var(--c); }
.cle.late .cle-k { color: var(--red); }
.cle-t { display: block; margin-top: 3px; font-weight: 700; font-size: 14px; line-height: 1.35; }
.cle-o { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.cle-s { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.cl-newl { display: flex; gap: 7px; align-items: center; margin-top: 12px; font-size: 13.5px; color: var(--accent-ink); }
.cl-up .cle-rows { padding: 12px 22px 18px; }
.cle-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: start; }
.cle-d { font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 10px; color: var(--ink-2); }
.cl-up { display: none; }
.cl-ics { display: flex; flex-wrap: wrap; gap: 8px; }
.cl-ics input { flex: 1 1 320px; min-width: 0; font-size: 13px; color: var(--muted); }
.cl-howto { margin: 14px 0; padding-left: 18px; font-size: 14px; line-height: 1.55; color: var(--ink-2); display: grid; gap: 6px; }

/* ---------- мои документы ---------- */
.md-exp { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; padding: 12px 16px; border-radius: var(--r); background: var(--amber-soft); color: var(--amber-ink); }
.md-exp .i { flex: none; color: var(--amber); margin-top: 2px; }
.md-exp div { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.md-exp-i { color: inherit; font-size: 14px; }
.md-exp-i.dead { color: var(--red); font-weight: 700; }
.md-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.md-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.md-tools .q { flex: 1 1 260px; max-width: 360px; }
.md-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.md-group + .md-group { margin-top: 22px; }
.md-group h2 { display: flex; align-items: center; gap: 8px; font-size: 16.5px; margin-bottom: 10px; }
.md-group h2 .i { color: var(--accent); }
.md-group h2 span { font: 400 13.5px/1 "PT Sans", Arial, sans-serif; color: var(--muted); }
.md-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.md-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 12px; align-items: start; padding: 14px 14px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.md-card.md-soon { border-color: #ecd9a6; }
.md-card.md-dead { border-color: #f2c4bf; background: #fffafa; }
.md-card:target { box-shadow: 0 0 0 3px rgba(11, 122, 67, .25); }
.md-pick input { width: 18px; height: 18px; margin-top: 2px; }
.md-t { display: block; font-weight: 700; text-decoration: none; line-height: 1.35; }
.md-t:hover { text-decoration: underline; }
.md-m { display: flex; flex-wrap: wrap; gap: 2px 0; margin-top: 3px; font-size: 13px; color: var(--muted); }
.md-m > * + *::before { content: "·"; margin: 0 6px; color: var(--faint); }
.md-n { margin-top: 5px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.md-ai { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.md-ai .rv-spin { width: 16px; height: 16px; margin: 0; }
.md-st { font-size: 12.5px; padding: 0 8px; line-height: 22px; border-radius: 5px; white-space: nowrap; color: var(--accent-ink); background: var(--accent-soft); }
.md-st.soon { color: var(--amber-ink); background: var(--amber-soft); font-weight: 700; }
.md-st.dead { color: #fff; background: var(--red); font-weight: 700; }
.md-act { grid-column: 2 / -1; display: flex; gap: 6px; }
.md-wa { color: #128c4b; }
.md-edit { grid-column: 1 / -1; border-top: 1px solid var(--line-2); padding-top: 8px; }
.md-edit summary { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; font-size: 13px; color: var(--muted); }
.md-edit select, .md-edit input { width: 100%; }
.md-edit-act { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.md-side { display: grid; gap: 18px; position: sticky; top: 64px; }
.md-side > .panel + .panel { margin-top: 0; }
.md-selbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 10px 18px; border-radius: 12px; background: var(--brand); color: #fff; box-shadow: 0 10px 30px rgba(16, 32, 24, .25); }
.md-selbar .btn.sec { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }

/* окно «отправить в WhatsApp» */
.shm { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(16, 32, 24, .45); }
.shm-b { width: min(460px, 100%); background: #fff; border-radius: 14px; padding: 20px 20px 18px; box-shadow: 0 20px 50px rgba(16, 32, 24, .3); }
.shm-b h3 { font-size: 18px; margin-bottom: 6px; }
.shm-b p { font-size: 14px; color: var(--ink-2); }
.shm-url { display: flex; gap: 8px; margin: 14px 0; }
.shm-url input { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.shm-act { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.wa { background: #1fa855; border-color: #1fa855; }
.btn.wa:hover { background: #178a45; border-color: #178a45; }

/* публичная страница документов */
.share-body { background: var(--canvas); }
.sh { max-width: 640px; margin: 0 auto; padding: 40px 16px; }
.sh-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.sh-org { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink-2); }
.sh h1 { margin-top: 16px; font-size: 24px; }
.sh-lead { margin-top: 6px; color: var(--muted); }
.sh-list { list-style: none; margin: 18px 0 0; padding: 0; }
.sh-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.sh-i { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--accent-ink); background: var(--accent-soft); flex: none; }
.sh-b { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.sh-b span { font-size: 13px; color: var(--muted); }
.sh-act { display: flex; gap: 6px; }
.sh-foot { margin-top: 16px; text-align: center; font-size: 13px; color: var(--faint); }

/* «Мои документы» в разборе закупки */
.dc-my { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; font-size: 12.5px; padding: 0 7px; line-height: 20px; border-radius: 5px; text-decoration: none; }
.dc-my.ok { color: var(--accent-ink); background: var(--accent-soft); }
.dc-my.soon { color: var(--amber-ink); background: var(--amber-soft); }
.dc-my.dead { color: #fff; background: var(--red); }
.dc-my.none { color: var(--muted); background: var(--gray-soft); }
.dc-pack { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }

/* ПФУ */
.pfu-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 0 7px; line-height: 20px; border-radius: 5px; color: var(--blue); background: var(--blue-soft); white-space: nowrap; }
.pfu-explain { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.pfu-explain b { color: var(--ink); }
.kgd-y { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kgd-y div { padding: 10px 12px; border-radius: 9px; background: var(--head); }
.kgd-y b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.kgd-y span { font-size: 12.5px; color: var(--muted); }

@media (max-width: 1180px) {
  .dl-grid, .dl-page, .dd-grid, .md-grid, .lt-grid { grid-template-columns: minmax(0, 1fr); }
  .dl-side, .md-side { position: static; }
  .rd-cols { grid-template-columns: minmax(0, 1fr); }
  .cl-grid { grid-template-columns: minmax(0, 1fr); }
  .cl-side { position: static; max-height: none; }
}
@media (max-width: 760px) {
  .top-ic { width: 32px; height: 32px; }
  .top-sep { display: none; }
  .dl-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dl-tile .v { font-size: 20px; }
  .dl-steps { grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow-x: auto; }
  .dl-al { flex-wrap: wrap; }
  .dl-al-act { margin-left: 0; width: 100%; justify-content: flex-start; }
  .seg.dl-modes, .dl-req, .dl-prev-f, .dl-prev .dl-req-act, .ddoc, .evs, .dd-items, .dl-edit, .dirbar { padding-left: 16px; padding-right: 16px; }
  .dl-modes button { flex: 1 1 auto; justify-content: center; }
  .ddoc { flex-wrap: wrap; }
  .evs li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-why { padding: 16px; }
  .cl-month .clp, .cl-month .clp-more, .cl-month .clp-new { display: none; }
  .cld { min-height: 58px; padding: 5px; }
  .cld-dots { display: flex; margin-top: auto; }
  .cl-wds span { padding: 7px 4px; text-align: center; font-size: 11px; }
  .cld-n { text-align: center; }
  .cl-nav h2 { min-width: 0; font-size: 18px; }
  .cl-up { display: block; }
  .cl-up .cle-rows { padding: 12px 16px 16px; }
  .md-cards { grid-template-columns: minmax(0, 1fr); }
  .md-selbar { left: 12px; right: 12px; transform: none; flex-wrap: wrap; }
  .dd-frame { height: 60vh; min-height: 380px; }
  .form-row2 { grid-template-columns: minmax(0, 1fr); }
}

.req-grid { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.req-grid input { width: 100%; }
.req-grid .wide { grid-column: span 3; }
.req-vat { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; }
.req-inl { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .req-grid { grid-template-columns: minmax(0, 1fr); } .req-grid .wide { grid-column: auto; } }

/* узкие экраны: шапка и меню не шире экрана, карточка договора в одну колонку */
@media (max-width: 760px) {
  .nav .in { padding-right: 40px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
  .page-head .act { flex: 1 1 100%; flex-wrap: wrap; }
  .dl-col, .dl-col-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .app-top .in { gap: 10px; }
  .app-top .logo { gap: 8px; }
  .app-top .logo .name { font-size: 15px; line-height: 1.08; max-width: 5.8em; }
  .app-top .user { gap: 6px; }
  .app-top .user .ava { display: none; }
  .app-top .user form { margin-left: 2px; }
}
@media (max-width: 760px) { .ap.big { max-width: 100%; white-space: normal; } }

/* ---------- разделы с подразделами: Лента, В работе, Рынок, Компания ---------- */
.subnav .sn-n { margin-left: 1px; padding: 0 7px; border-radius: 9px; font-size: 12.5px; line-height: 19px; font-weight: 400;
  color: var(--muted); background: var(--gray-soft); font-variant-numeric: tabular-nums; }
.subnav a.on .sn-n { color: #fff; background: var(--ink); font-weight: 700; }
.subnav .sn-n.amber { color: var(--amber-ink); background: var(--amber-soft); }
.subnav a.on .sn-n.amber { color: #fff; background: var(--amber); }
.subnav .sn-radar { margin-left: 10px; position: relative; }
.subnav .sn-radar::before { content: ""; position: absolute; left: -7px; top: 9px; bottom: 9px; width: 1px; background: var(--line); }

/* ---------- лента: заголовок и строка состояния вместо приветствия с цифрами ---------- */
.feed-head { margin-bottom: 16px; }
.feed-status { display: flex; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 14px; color: var(--muted); }
.feed-status .sep { margin: 0 8px; color: var(--faint); }
.feed-status a { color: var(--ink-2); text-underline-offset: 3px; }
.feed-status b { color: var(--ink); font-variant-numeric: tabular-nums; }
.feed-status .fs-alert { display: inline-flex; align-items: center; gap: 5px; color: var(--red); font-weight: 700; text-decoration: none; }
.feed-status .fs-alert:hover { text-decoration: underline; }
.feed-panel .dirbar { padding-top: 14px; padding-bottom: 2px; }
.feed-panel .dirbar + .toolbar { margin-top: 12px; border-top: 1px solid var(--line); }

/* переключатель вида: порядок и быстрые выборки одним рядом */
.vw { flex: none; }
.vw a { gap: 0; }
.vw a b { margin-left: 7px; min-width: 18px; padding: 0 6px; border-radius: 8px; font-size: 12px; line-height: 18px; text-align: center;
  color: var(--muted); background: rgba(16, 32, 24, .07); font-variant-numeric: tabular-nums; }
.vw a.on b { color: var(--accent-ink); background: var(--accent-soft); }
.vw a b.hot { color: var(--red); background: var(--red-soft); }

/* редкие фильтры — во всплывающей панели */
.more-f { position: relative; }
.more-f > summary { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border: 1px solid #c6cec8; border-radius: var(--r-s);
  background: #fff; font-size: 14px; color: var(--ink); cursor: pointer; list-style: none; user-select: none; }
.more-f > summary::-webkit-details-marker { display: none; }
.more-f > summary:hover { border-color: #9ea9a1; }
.more-f > summary .i { color: var(--muted); }
.more-f > summary b { min-width: 18px; padding: 0 6px; border-radius: 8px; font-size: 12px; line-height: 18px; text-align: center; color: #fff; background: var(--accent); }
.more-f[open] > summary { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.more-f-b { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(540px, calc(100vw - 32px)); padding: 16px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 2px 4px rgba(16, 32, 24, .06), 0 14px 34px rgba(16, 32, 24, .14); }
.more-f-b label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.more-f-b select { width: 100%; }
.more-f-b .chk { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.more-f-b .chk b { margin-left: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* строка ленты: техспецификация — рядом с номером, без отдельной строки */
.tbl .sub .spec-dl { display: inline-flex; margin-top: 0; gap: 3px; font-size: 13px; }

@media (max-width: 760px) {
  .vw { flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
  .vw::-webkit-scrollbar { display: none; }
  .vw a { flex: 1 0 auto; justify-content: center; padding: 0 10px; }
  .feed-tools .q { flex: 1 1 100%; max-width: none; }
  .feed-tools select[name=region] { flex: 1 1 140px; min-width: 0; }
  .more-f-b { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; grid-template-columns: minmax(0, 1fr); max-height: 75vh; overflow: auto; }
  .subnav .sn-radar { margin-left: 6px; }
}

/* ---------- вкладки внутри страницы: карточка закупки, заказчик, конкурент ---------- */
.ctabs { position: sticky; top: 58px; z-index: 6; display: flex; gap: 2px; margin-bottom: 16px; padding: 4px; border-radius: 10px;
  background: #e6eae4; box-shadow: 0 0 0 6px var(--canvas); overflow-x: auto; scrollbar-width: none; }
.ctabs::-webkit-scrollbar { display: none; }
.ctabs a { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 7px; font-size: 14.5px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.ctabs a .i { color: var(--faint); }
.ctabs a:hover { color: var(--ink); }
.ctabs a.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(16, 32, 24, .1); }
.ctabs a.on .i { color: var(--accent); }
.ctabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ct-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.ct-dot.vd-go, .ct-dot.ec-good { background: var(--accent); }
.ct-dot.vd-maybe, .ct-dot.ec-edge { background: var(--amber); }
.ct-dot.vd-no, .ct-dot.ec-bad { background: var(--red); }
.ct-sc { padding: 0 6px; border-radius: 8px; font-size: 12px; line-height: 18px; font-variant-numeric: tabular-nums; }
.js [data-tabs]:not(.tabs-ready) > .ctab:not(:first-of-type) { display: none; }
.tabs-ready > .ctab:not(.on) { display: none; }
.ctab > .panel + .panel, .ctab > .files-slot + .panel, .ctab > .panel + .files-slot { margin-top: 18px; }

/* «Почему в ленте» — коротко, под разбором */
.about .bullets { margin-top: 0; }
.about .callout { margin-top: 12px; }
.about-dates, .about-res { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.about-dates b { color: var(--ink); }

/* оценка заказчика и сила конкурента: три главных фактора, остальные по клику */
.scp-fs { min-width: 0; }
.scp-more { margin-top: 6px; }
.scp-more > summary { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--accent-ink); cursor: pointer; list-style: none; }
.scp-more > summary::-webkit-details-marker { display: none; }
.scp-more > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.scp-more[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.scp-more > .scp-f { margin-top: 6px; }

/* длинные списки: кнопка «Показать ещё» */
[data-show] > [hidden] { display: none !important; }
.show-more { display: block; width: calc(100% - 44px); margin: 10px 22px 18px; height: 38px; border: 1px dashed #b9c3bc; border-radius: var(--r-s);
  background: #fff; font: inherit; font-size: 14px; color: var(--accent-ink); cursor: pointer; }
.show-more:hover { border-style: solid; border-color: var(--accent-line); background: var(--accent-soft); }

@media (max-width: 760px) {
  .ctabs { top: 50px; margin-left: -4px; margin-right: -4px; }
  .ctabs a { padding: 0 11px; font-size: 14px; }
  .show-more { width: calc(100% - 32px); margin: 10px 16px 16px; }
}
/* переход по #ссылке: блок не прячется под липкими меню и вкладками */
main [id] { scroll-margin-top: 112px; }

/* свёрнутые панели-пояснения: «Как это работает», «Как помощник считает выгоду» */
details.panel > summary.panel-h { display: flex; cursor: pointer; list-style: none; padding-bottom: 18px; user-select: none; }
details.panel > summary.panel-h::-webkit-details-marker { display: none; }
details.panel > summary.panel-h::after { content: ""; margin-left: auto; align-self: center; width: 7px; height: 7px; border-right: 1.7px solid var(--muted);
  border-bottom: 1.7px solid var(--muted); transform: rotate(45deg); transition: transform .18s var(--ease); }
details.panel[open] > summary.panel-h { padding-bottom: 0; }
details.panel[open] > summary.panel-h::after { transform: rotate(-135deg); }
details.panel > summary.panel-h:hover h2 { color: var(--accent-ink); }
.panel + details.panel, details.panel + .panel, .grid2 + details.panel, details.panel + details.panel { margin-top: 18px; }

/* короткие пояснения по клику: ПФУ, токен КГД, ещё примеры вопросов */
.pfu-more > summary, .ex-more > summary { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--accent-ink);
  cursor: pointer; list-style: none; }
.pfu-more > summary::-webkit-details-marker, .ex-more > summary::-webkit-details-marker { display: none; }
.pfu-more > summary::after, .ex-more > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.pfu-more[open] > summary::after, .ex-more[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.pfu-more .pfu-explain { margin-top: 8px; }
.ex-more { margin-top: 12px; }
.ex-more .ex-grid { margin-top: 12px; }

/* раздел с вкладками сразу после оценки или шапки страницы */
.panel + [data-tabs], .page-head + [data-tabs] { margin-top: 18px; }
.px-now .px-counts { margin-top: 14px; }
.team-panel { margin-top: 18px; }

/* радар: пояснение и статистика подачи — по клику, столбцы срочных закупок сразу под заголовком */
.rd-more { margin-bottom: 18px; }
.rd-more > summary { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--accent-ink); cursor: pointer; list-style: none; }
.rd-more > summary::-webkit-details-marker { display: none; }
.rd-more > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px); }
.rd-more[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.rd-more > .rd-why { margin-top: 12px; }
@media (max-width: 520px) {
  .ctabs a { padding: 0 8px; gap: 5px; font-size: 13.5px; }
  .ctabs a .i { display: none; }
}
@media (max-width: 760px) {
  .feed-head .act { display: none; }
  .feed-panel .dirbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .feed-panel .dirbar::-webkit-scrollbar { display: none; }
  .feed-panel .dirbar a { flex: none; }
  .feed-tools select[name=region] { flex: 1 1 120px; }
  .feed-tools .btn { flex: none; }
}
.more-f-b .more-f-go { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 760px) { .more-f-b .more-f-go { justify-self: stretch; } }

/* ---------- бюджет и оплаты заказчика ---------- */
.bg-sum p { max-width: 82ch; }
.bg-bar { display: flex; gap: 2px; height: 12px; margin: 14px 0 10px; border-radius: 6px; overflow: hidden; background: var(--line-2); }
.bg-bar i { flex: 1 1 0; min-width: 6px; }
.bgs-contract { background: #b9c1bb; }
.bgs-running { background: var(--blue); }
.bgs-ahead { background: var(--accent); }
.bgs-failed { background: var(--amber); }
.bg-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13.5px; color: var(--muted); }
.bg-legend span { display: inline-flex; align-items: center; gap: 7px; }
.bg-legend i { width: 9px; height: 9px; border-radius: 2px; }
.bg-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tag.bgc-contract { color: var(--ink-2); background: var(--gray-soft); }
.tag.bgc-running { color: var(--blue); background: var(--blue-soft); }
.tag.bgc-ahead { color: var(--accent-ink); background: var(--accent-soft); }
.tag.bgc-failed { color: var(--amber-ink); background: var(--amber-soft); }
.bg-year { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 18px 22px 0; }
.bg-year h3 { margin: 0; font-size: 16px; font-variant-numeric: tabular-nums; }
.bg-year span { font-size: 13.5px; color: var(--muted); }
.bg-year + .tbl-wrap { margin-top: 8px; }
.bg-deals td:nth-child(4) { min-width: 120px; }
.bg-deals td:nth-child(5) { min-width: 150px; }
.bg-deals .tag { margin-top: 5px; white-space: normal; line-height: 1.35; padding-top: 2px; padding-bottom: 2px; }
.bullets li.bm-warn::before { background: var(--amber); }
@media (max-width: 760px) {
  .tbl.stack.bg-items tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
  .tbl.stack.bg-items td { width: auto; }
  .tbl.stack.bg-items td:first-child { width: 100%; }
  .tbl.stack.bg-items td[data-l]::before { content: none; }
  .tbl.stack.bg-items td:first-child .sub, .tbl.stack.bg-items td:last-child .sub { display: none; }
  .tbl.stack.bg-items td:last-child { order: 1; }
  .tbl.stack.bg-items td:nth-child(2) { order: 2; }
  .tbl.stack.bg-items td:nth-child(2) .sub { display: inline; margin: 0 0 0 4px; }
  .tbl.stack.bg-items td:nth-child(2) .sub::before { content: "— "; }
  .tbl.stack.bg-items td.num { order: 3; margin-left: auto; font-weight: 700; }
  .tbl.stack.bg-items td.num::after { content: " ₸"; }
  .bg-deals td:nth-child(4), .bg-deals td:nth-child(5) { min-width: 0; }
}

/* =====================================================================
   Упрощение 24.10: меньше кнопок, повторов и пояснений. Цвет — только там, где решение:
   вывод ИИ, выгода, срочный срок, заявки, статус работы, стадия договора, маржа.
   Метка-ссылка — со стрелкой: открывает окно с причинами или нужный раздел.
   ===================================================================== */

/* меню: только слова; «в работе» — серым числом, просрочка — красной плашкой */
.nav a { gap: 6px; }
.nav .cnt { min-width: 0; padding: 0; background: none; color: var(--muted); }
.nav .cnt.red { min-width: 20px; padding: 0 6px; background: var(--red); color: #fff; }
.nav .cnt.amber { min-width: 20px; padding: 0 6px; background: var(--amber-soft); color: var(--amber-ink); }

/* подразделы: текстовые вкладки; выбранная — жирным и подчёркнута */
.subnav { gap: 0 4px; margin: -8px 0 16px; }
.subnav a { height: 38px; padding: 0 10px; border-radius: 0; color: var(--muted); }
.subnav a:hover { background: none; color: var(--ink); }
.subnav a.on { background: none; box-shadow: none; color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 10px; text-decoration-color: var(--accent); }
.subnav a:first-child { margin-left: -10px; }
.subnav .sn-n, .subnav a.on .sn-n { padding: 0; background: none; color: var(--faint); font-weight: 400; }
.subnav .sn-n.amber, .subnav a.on .sn-n.amber { background: none; color: var(--amber-ink); font-weight: 700; }
.subnav .sn-radar::before { top: 12px; bottom: 12px; }

/* ---------- метки решения: мягкая заливка в цвете смысла ---------- */
.vchip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 7px;
  font: 700 13px/1 "PT Sans", Arial, sans-serif; white-space: nowrap; text-decoration: none;
  color: var(--ink-2); background: var(--gray-soft); transition: box-shadow .15s;
}
a.vchip { cursor: pointer; }
a.vchip::after {
  content: ""; flex: none; width: 5px; height: 5px; margin: 0 1px 0 -1px; border: solid currentColor; border-width: 0 1.6px 1.6px 0;
  transform: rotate(-45deg); opacity: .6;
}
a.vchip:hover { text-decoration: none; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, currentColor 45%, transparent); }
a.vchip:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.vchip.vt-go, .vchip.ec-good { color: var(--accent-ink); background: var(--accent-soft); }
.vchip.vt-maybe, .vchip.ec-edge, .vchip.vt-amber { color: var(--amber-ink); background: var(--amber-soft); }
.vchip.vt-no, .vchip.ec-bad { color: var(--red); background: var(--red-soft); }
.vchip.ec-win, .vchip.vt-info { color: #173b6b; background: var(--blue-soft); }
.vchip.vt-wait { color: var(--muted); font-weight: 400; }
.vchip .rv-spin { width: 12px; height: 12px; margin: 0; border-width: 2px; }
.tags { gap: 6px; margin-top: 8px; }
.tags .vchip { height: 24px; padding: 0 9px; font-size: 12.5px; }

/* срок подачи: обычный — серым, через 2–3 дня — янтарным, последние сутки — красной меткой; полоска окна не нужна */
.cd { min-width: 0; margin-top: 4px; }
.cd-bar { display: none; }
.cd-t { padding: 0; background: none; font-size: 13px; line-height: 1.45; color: var(--muted); }
.cd.warm .cd-t { padding: 0; background: none; color: var(--amber-ink); font-weight: 700; }
.cd.hot .cd-t { padding: 0 7px; border-radius: 6px; line-height: 22px; color: var(--red); background: var(--red-soft); font-weight: 700; }
.cd.past .cd-t { color: var(--faint); }
.cd.big { margin-top: 6px; }
.cd.big .cd-t { font-size: 13.5px; }
.cd.big.hot .cd-t { padding: 0 9px; line-height: 24px; }

/* заявки: нет ни одной — зелёной меткой (конкурентов пока нет), есть — серым числом */
.ap { margin-top: 4px; padding: 0; background: none; font-size: 13px; line-height: 1.45; color: var(--muted); }
.ap-0 { padding: 0 7px; border-radius: 6px; line-height: 22px; color: var(--accent-ink); background: var(--accent-soft); font-weight: 700; }
.ap.big { margin-top: 6px; padding: 0; font-size: 13.5px; line-height: 1.45; }
.ap.big.ap-0 { padding: 0 9px; line-height: 24px; }

/* ---------- лента: строка — название, заказчик и регион, метки; справа срок, сумма и одно действие ---------- */
.feed-panel .toolbar { background: none; }
.feed-panel .dirbar { gap: 2px 4px; }
.dirbar a { padding: 4px 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); }
.dirbar a:hover { background: var(--head); color: var(--ink); }
.dirbar a.on { background: var(--accent-soft); color: var(--accent-ink); }
.dirbar a b { color: inherit; font-weight: 700; }
/* название забирает остаток ширины, длинный заказчик — многоточием: таблица не вылезает за панель */
.feed td.t { width: 100%; max-width: 0; }
.feed .sub { flex-wrap: nowrap; }
.feed .sub > * { flex: none; }
.feed .sub .fc { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.feed .when b { font-size: 14px; }
.feed .sum .sv { font-size: 15px; }
.win-p { font-size: 13px; }
.decide { align-items: center; gap: 4px; }
.decide .skip {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 7px;
  background: none; color: var(--faint); cursor: pointer; transition: background-color .15s, color .15s;
}
.decide .skip:hover { background: var(--red-soft); color: var(--red); }
.decide .skip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.stcell .ava, .log .ava { display: none; }
.more-f > summary b { background: none; color: var(--accent-ink); padding: 0; min-width: 0; }
/* низ ленты: страницы, сколько всего, скрытые дешёвые и выгрузка — одной строкой */
.feed-foot .total { display: inline; height: auto; padding: 0; line-height: 1.45; }
.feed-foot .total a { display: inline; min-width: 0; height: auto; padding: 0; border: 0; color: var(--accent-ink); text-decoration: underline; }
.feed-foot .ff-x { display: inline-flex; gap: 5px; align-items: center; min-width: 0; padding: 0 0 0 6px; border: 0; color: var(--accent-ink); font-size: 13.5px; }
.feed-foot .ff-x:hover { text-decoration: underline; }

/* ---------- карточка закупки: вывод метками, факты — одной полосой, вкладки с подчёркиванием ---------- */
.crumbs { margin-bottom: 8px; }
.card-meta { gap: 6px 16px; margin-top: 8px; }
.verdicts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.verdicts:not(:has(.vchip, .st)) { display: none; }
.verdicts .st { line-height: 26px; }
.tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.35fr); gap: 0; margin-top: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.tile { padding: 14px 18px 15px; border: 0; border-radius: 0; background: none; }
.tile + .tile { border-left: 1px solid var(--line-2); }
.tile-when.hot, .tile-when.warm { border-color: var(--line-2); background: none; }
.tv { font-size: 20px; }
.ts-res { color: var(--ink-2); }
.ts-res a { color: var(--ink); font-weight: 700; }
.ctabs { gap: 0 2px; padding: 0; border-radius: 0; background: var(--canvas); border-bottom: 1px solid var(--line); }
.ctabs a { position: relative; flex: none; height: 44px; padding: 0 14px; border-radius: 0; }
.ctabs a.on { background: none; box-shadow: none; }
.ctabs a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--ink); }
.cust-tips { margin-bottom: 18px; }
.why-feed .about-dates { margin-top: 10px; }

/* разбор: что закупают — коротким списком «название — значение», дальше раскрывающиеся разделы */
.rv-what { padding: 18px 22px 2px; }
.rv-subj { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: var(--ink); max-width: 80ch; }
.rv-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 22px; margin: 0; font-size: 14.5px; line-height: 1.45; }
.rv-facts > div { display: contents; }
.rv-facts dt { color: var(--muted); }
.rv-facts dd { margin: 0; max-width: 76ch; color: var(--ink-2); }
.rv > template + .rv-sec { margin-top: 0; border-top: 0; }
.rv-cnt.c-done { color: var(--accent-ink); font-weight: 700; }
.rv-foot { padding: 12px 22px 14px; }
.rv-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.rv-redo { display: inline; margin: 0; }
.rv-redo .linkbtn { font-size: inherit; color: var(--accent-ink); }
.rv-files { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.rv-files .rf { margin: 0; }
.rv-cta p { flex: 1 1 360px; max-width: 70ch; color: var(--ink-2); }

/* цена: главная фраза и цифры без отдельной плашки — метка выгоды уже над вкладками */
.pr-top { display: block; margin: 0; padding: 18px 22px 2px; border: 0; border-radius: 0; background: none; }
.pr-hl { font-size: 17px; }

/* ---------- окно с причинами вывода ИИ ---------- */
html:has(dialog.pop[open]) { overflow: hidden; }
.pop {
  width: min(560px, calc(100vw - 32px)); max-width: none; max-height: min(82vh, 720px); padding: 0; border: 0; border-radius: 14px;
  background: var(--panel); color: var(--ink); overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 24px 64px rgba(10, 30, 20, .28), 0 2px 8px rgba(10, 30, 20, .12);
}
.pop::backdrop { background: rgba(14, 30, 22, .45); }
.pop[open] { animation: popIn .22s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.pop-in { padding: 18px 22px 20px; }
.pop-h { display: flex; align-items: center; gap: 10px; }
.pop-h .vchip { height: 30px; padding: 0 12px; font-size: 14.5px; }
.pop-x { display: grid; place-items: center; width: 36px; height: 36px; margin: -6px -10px 0 auto; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--muted); cursor: pointer; }
.pop-x:hover { background: var(--head); color: var(--ink); }
.pop-t { margin-top: 12px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.pop-hl { margin-top: 6px; font: 700 17px/1.42 "PT Serif", Georgia, serif; color: var(--ink); text-wrap: pretty; }
.pop-why { list-style: none; margin: 10px 0 0; padding: 0; }
.pop-why li { position: relative; padding: 4px 0 4px 17px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.pop-why li::before { content: ""; position: absolute; left: 3px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.pop-sum { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line-2); }
.pop-sum a { display: flex; align-items: baseline; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; text-decoration: none; }
.pop-sum a span { flex: none; width: 100px; color: var(--muted); }
.pop-sum a b { min-width: 0; color: var(--ink); }
.pop-sum a.bad b { color: var(--red); }
.pop-sum a.warn b { color: var(--amber-ink); }
.pop-sum a.ok b { color: var(--accent-ink); }
.pop-sum a:hover b { text-decoration: underline; }
.pop-f { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.pop-load { display: flex; align-items: center; gap: 10px; padding: 22px 0; color: var(--muted); }
.pop-load .rv-spin { width: 18px; height: 18px; margin: 0; border-width: 2px; }

/* радар: маржа и шанс — в цвете, без лишних полос */
.rd-card.rd-hi .rd-p b { color: var(--accent-ink); }
.rd-rv.odd b, .rd-rv.odd .rd-sub { color: var(--amber-ink); }
.rd-wait tr.rw-open td:first-child { box-shadow: none; }
.kc-v { margin-top: 8px; font-size: inherit; }

/* договоры: деньги одной строкой вместо плиток */
.dl-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; margin: -8px 0 18px; font-size: 14.5px; color: var(--ink-2); }
.dl-line a { color: var(--ink-2); text-decoration: none; }
.dl-line a:hover { color: var(--accent-ink); text-decoration: underline; }
.dl-line a.red, .dl-line a.red b { color: var(--red); }
.dl-line b { color: var(--ink); font-variant-numeric: tabular-nums; }
/* договоры группы: фильтр по компании и подпись компании у договора */
.dl-note { margin: -10px 0 14px; }
.dl-cos { margin: -6px 0 16px; }
.co-tag { font-size: 12px; font-weight: 700; color: var(--accent-ink); letter-spacing: .01em; }
.kc-reg { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin-top: 4px; font-size: 12.5px; }
.dl-line .sep { margin: 0 10px; color: var(--faint); }
.tabs .cnt { padding: 0; background: none; }
.tabs a.on .cnt { background: none; color: var(--ink); }
.tabs a.t-red .cnt, .tabs a.on.t-red .cnt { padding: 0 7px; background: var(--red); color: #fff; font-weight: 700; }
/* загрузка договора — под таблицей, раскрывается по кнопке «Загрузить договор» */
.dl-grid { grid-template-columns: minmax(0, 1fr); }
.dl-side { position: static; }
/* мои документы: загрузка и подсказка — свёрнутыми панелями под списком */
.md-grid { grid-template-columns: minmax(0, 1fr); }
.md-side { position: static; display: grid; gap: 18px; }
.md-group h2 .i { display: none; }
/* фильтры-переключатели: без рамок, выбранный — мягкой заливкой */
.chip { height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); }
.chip:hover { background: var(--head); }
.chip.on { background: var(--accent-soft); }
.clt { height: 30px; padding: 0 9px; border: 0; background: none; }
.clt.on { background: var(--head); }
/* примеры вопросов к ИИ — без надписей-рубрик над вопросом */
.ex .w { display: none; }

@media (max-width: 760px) {
  h1 { font-size: 22px; }
  .lead { font-size: 14px; }
  .subnav { margin-top: -4px; }
  /* лента на телефоне: карточка — название и метки, ниже срок слева и сумма справа, под ними действие */
  .feed td.t { max-width: none; }
  .feed.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; }
  .feed.stack td, .feed.stack tr > :first-child, .feed.stack tr > :last-child { padding: 0; }
  .feed.stack td.t { grid-column: 1 / -1; }
  .feed.stack td.when { grid-column: 1; padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .feed.stack td.when .cd, .feed.stack td.when .ap { margin: 0; }
  .feed.stack td.sum { grid-column: 2; padding-top: 6px; text-align: right; }
  .feed.stack td.sum .sv::after { content: " ₸"; }
  .feed.stack td.stcell { grid-column: 1 / -1; padding-top: 8px; }
  .feed.stack .decide .btn { flex: none; height: 34px; }
  .feed.stack .decide .skip { width: 38px; height: 34px; }
  .feed-status .fs-scan { display: none; }
  .tile .ap-at { display: none; }
  .feed .t a.title { font-size: 15px; }
  .feed-foot .total { flex: 1 1 100%; margin-left: 0; }
  .ctabs { margin-left: 0; margin-right: 0; }
  .ctabs a { padding: 0 10px; }
  .ctabs a.on::after { left: 10px; right: 10px; }
  .dl-line { font-size: 14px; }
  /* факты карточки: сумма и срок рядом, заказчик — строкой ниже */
  .tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tile:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line-2); }
  .tv { font-size: 17px; }
  .tv-s { font-size: 14.5px; }
  .rv-what { padding: 16px 16px 2px; }
  .rv-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rv-facts dd { margin-bottom: 8px; }
  .pr-top { padding: 16px 16px 2px; }
  /* окно — снизу, на всю ширину */
  .pop { width: 100%; max-height: 86vh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .pop[open] { animation: sheetIn .26s var(--ease); }
  .pop-in { padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
  .pop-sum a span { width: 92px; }
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(28px); } }
@media (prefers-reduced-motion: reduce) {
  .pop[open] { animation: none; }
}
@media (max-width: 1180px) and (min-width: 761px) {
  .tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.35fr); }
}

/* ---------- рынок: кто кого обслуживает, сроки договоров, цены за килограмм, досье исполнителя ---------- */
.mk-sum { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.mk-ends { padding: 18px 22px 16px; border-right: 1px solid var(--line); }
.mk-ends h2, .mk-two h3 { margin: 0 0 12px; font-size: 15px; }
.mk-ends ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.mk-ends li { display: grid; grid-template-columns: 118px minmax(60px, 1fr) auto; align-items: center; gap: 14px; font-size: 14px; }
.mk-m { color: var(--ink-2); }
.mk-bar { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.mk-bar i { display: block; height: 100%; border-radius: 4px; background: var(--amber); }
.mk-v { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk-v b { color: var(--ink); }
.mk-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.mk-facts { margin: 0; padding: 18px 22px; display: grid; gap: 16px; align-content: start; }
.mk-facts dt { font-size: 13px; color: var(--muted); }
.mk-facts dd { margin: 3px 0 0; font-size: 15px; }
.mk-facts dd b { font-size: 21px; font-variant-numeric: tabular-nums; }
.end-soon { color: var(--amber-ink); font-weight: 700; }
.end-past { color: var(--faint); }
.chg-up { color: var(--accent-ink); font-weight: 700; }
.chg-down { color: var(--red); font-weight: 700; }
.mk-flow b.up { color: var(--accent-ink); }
.mk-flow b.down { color: var(--red); }
.mk-cust .vchip, .mk-sig .vchip { height: 24px; padding: 0 9px; font-size: 12.5px; }
.mk-sig { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-flags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mk-list { list-style: none; margin: 0; padding: 4px 22px 14px; }
.mk-list li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.mk-list li:first-child { border-top: 0; }
.mk-list li span { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mk-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 36px; }
.mk-two .mk-list { padding: 0; }
.callout.mk-red { margin-bottom: 14px; background: var(--red-soft); color: var(--red); }
.mk-quiet { font-size: 14px; color: var(--muted); }
.mk-legend { margin: 4px 2px 0; font-size: 13px; line-height: 2.1; color: var(--muted); }
.mk-legend .vchip { height: 22px; padding: 0 8px; font-size: 12px; }
.ts-inc { font-size: 13px; color: var(--accent-ink); text-decoration: none; }
.ts-inc:hover { text-decoration: underline; }
.mk-years tr.yr-first td { border-top: 2px solid var(--line); }
.mk-inc .facts { grid-template-columns: 64px minmax(0, 1fr); }
@media (max-width: 760px) {
  .mk-sum { grid-template-columns: 1fr; }
  .mk-ends { padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .mk-ends li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .mk-ends .mk-bar { grid-column: 1 / -1; grid-row: 2; }
  .mk-facts { padding: 16px; }
  .mk-two { grid-template-columns: 1fr; gap: 18px; }
  .mk-list { padding: 4px 16px 12px; }
}
@media (max-width: 760px) {
  /* в карточке-строке на телефоне пустые поля («—») не показываем */
  .mk-cust td:is([data-l="За кг"], [data-l^="В 20"], [data-l="Закупки в ленте"], [data-l="До"]):has(> .muted:only-child),
  .mk-fc td[data-l="За кг"]:has(> .muted:only-child) { display: none; }
}

/* ---------- исполнение договоров ---------- */
.ex-sum h2 a { color: inherit; text-decoration: none; }
.ex-sum h2 a:hover { text-decoration: underline; }
.ex-who { margin: -6px 0 12px; font-size: 14px; color: var(--muted); }
.ex-big { margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ex-big b { font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.ex-big span { font-size: 14px; color: var(--muted); }
.mk-bar.ex-bar { display: block; }
.ex-bar i, .ex-mini i { background: var(--accent); }
.mk-bar.ex-mini { display: block; width: 64px; height: 4px; margin: 6px 0 0 auto; }
.ex-refresh { display: inline-block; margin-left: 10px; vertical-align: middle; }
.ex-view { width: max-content; margin: 14px 22px 2px; }
.ex-st { font-size: 13.5px; }
.ex-ok { color: var(--accent-ink); }
.ex-gap { color: var(--amber-ink); font-weight: 700; }
.ex-na, .ex-none { color: var(--muted); }
.ex-tbl td:first-child { min-width: 240px; }
.ex-months th, .ex-months td { white-space: nowrap; }
.ex-months td:first-child { white-space: normal; min-width: 260px; }
.ex-months .faint { color: var(--faint); }
.ex-tot td { font-weight: 700; background: var(--head); }
.toolbar input.q[name="supplier"], .toolbar input.q[name="customer"] { flex: 1 1 170px; min-width: 150px; max-width: 230px; }
@media (max-width: 760px) {
  .ex-view { margin: 12px 16px 2px; }
  .ex-refresh { display: block; margin: 8px 0 0; }
  .ex-big b { font-size: 26px; }
  .ex-tbl td:first-child { min-width: 0; }
  .mk-bar.ex-mini { margin: 6px 0 0; }
  .ex-tbl td:is([data-l="Остаток, ₸"], [data-l="Исполнено"]):has(> .muted:only-child) { display: none; }
}

/* ---------- обсуждение документации и уведомления ---------- */
.stg { display: block; margin-top: 5px; font-size: 12.5px; color: var(--blue); white-space: nowrap; }
.stg-disc_done, .stg-wait { color: var(--muted); }
.ts-stage { display: block; margin-top: 6px; font-size: 13px; color: var(--blue); text-decoration: none; }
.ts-stage:hover { text-decoration: underline; }
.ts-stage.stg-disc_done, .ts-stage.stg-wait { color: var(--muted); }
.vchip.vt-new { color: #fff; background: var(--blue); text-decoration: none; }
.tab-n { font-size: 12px; font-weight: 400; color: var(--muted); }
.tab-n.new { padding: 0 6px; border-radius: 9px; color: #fff; background: var(--blue); font-weight: 700; }
.ds-st { margin-left: 6px; font-size: 13.5px; color: var(--muted); }
.ds-st.stg-disc { color: var(--blue); font-weight: 700; }
.ds-note { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.ds-newt { color: var(--blue); }
.ds-list { list-style: none; margin: 0; padding: 0 22px 8px; }
.ds { padding: 14px 0; border-top: 1px solid var(--line-2); scroll-margin-top: 72px; }
.ds.new { padding-left: 12px; border-left: 3px solid var(--blue); }
.ds-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 13.5px; color: var(--muted); }
.ds-h b { font-size: 14.5px; color: var(--ink); }
.ds-h a { color: var(--muted); }
.ds-new { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: 12px; font-weight: 700; color: #fff; background: var(--blue); }
.ds-t { margin-top: 8px; max-width: 80ch; font-size: 14.5px; line-height: 1.5; }
.ds-t p { margin: 0 0 6px; }
.ds-a { margin-top: 10px; padding: 10px 14px; border-radius: 8px; background: var(--head); }
.ds-wait { margin: 8px 0 0; font-size: 13.5px; color: var(--faint); }
.top-ic.bell { position: relative; }
.bell-n { position: absolute; top: 1px; right: -2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; font-size: 11px; line-height: 17px;
  text-align: center; font-weight: 700; color: var(--brand); background: var(--lime); }
.nt-list { list-style: none; margin: 0; padding: 0; }
.nt { border-top: 1px solid var(--line-2); }
.nt:first-child { border-top: 0; }
.nt-a { display: grid; gap: 4px; padding: 14px 22px; color: var(--ink); text-decoration: none; }
.nt-a:hover { background: var(--head); }
.nt.new .nt-a { box-shadow: inset 3px 0 0 var(--blue); }
.nt-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 13.5px; color: var(--muted); }
.nt-h b { font-size: 14.5px; color: var(--ink); }
.nt-t { max-width: 90ch; font-size: 14.5px; line-height: 1.45; }
.nt-m { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .nt-a { padding: 12px 16px; }
  .ds-list { padding: 0 16px 6px; }
  .tbl.stack td.when .stg { flex-basis: 100%; margin-top: 0; }
}

/* ---------- договор рынка: изменения, позиции ---------- */
.mc-meta { margin-top: 6px; font-size: 14px; color: var(--muted); }
.chg-k { font-size: 13px; text-decoration: none; }
a.chg-k:hover { text-decoration: underline; }
.chg-k-up { color: var(--accent-ink); font-weight: 700; }
.chg-k-down, .chg-k-end { color: var(--red); font-weight: 700; }
.chg-k-extend { color: var(--amber-ink); font-weight: 700; }
.chg-k-tech { color: var(--muted); }
.mc-why { max-width: 72ch; margin-top: 3px; font-size: 12.5px; color: var(--faint); }
.mc-pos td:first-child { min-width: 260px; }
.mc-ex span { white-space: normal; }
.mc-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 2px 0; font-size: 13.5px; color: var(--muted); }
.mc-links a { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 760px) {
  .mc-pos td:first-child { min-width: 0; }
  .mc-links { margin: 4px 16px 0; }
}

/* ---------- поиск по длинному списку ---------- */
.tfind { padding: 12px 22px 2px; }
.tfind input { width: 100%; max-width: 340px; height: 36px; padding: 0 12px; border: 1px solid #c6cec8; border-radius: var(--r-s); font: inherit; font-size: 14px; background: #fff; }
.tfind input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.tfind-none { padding: 12px 22px 16px; margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) {
  .tfind { padding: 10px 16px 2px; }
  .tfind input { max-width: none; }
  .tfind-none { padding: 10px 16px 14px; }
}

/* ---------- черновик замечания к документации ---------- */
.rm-job { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 14.5px; color: var(--ink-2); }
.rm-sum { margin: 0 0 12px; font-size: 15px; }
.rm-list { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 14px; }
.rm-list li > b { font-size: 15px; }
.rm-list p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.5; max-width: 80ch; }
.rm-q { margin: 6px 0 0; padding: 6px 12px; border-left: 3px solid var(--line); background: var(--head); font-size: 14px; color: var(--ink-2); max-width: 80ch; }
.rm-q span { color: var(--muted); font-size: 12.5px; }
.rm-law { color: var(--blue); font-size: 13.5px !important; }
.rm-lawful { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); max-width: 80ch; }
.rm-letter { width: 100%; min-height: 220px; padding: 12px; border: 1px solid #c6cec8; border-radius: var(--r-s); font: inherit; font-size: 14px; line-height: 1.5; background: #fff; resize: vertical; }
.rm-act { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.rm-again { margin-top: 6px; }
.rm-what { margin: 0 0 12px; max-width: 80ch; }

/* договор в дереве рынка: «договор 75,4 млн ₸», под ним — «по актам сдано 58,4 млн из 75,4 млн (77 %)» */
.tn-deal { width: auto; max-width: 340px; padding: 3px 2px; border: 0; background: none; }
.tn-deal b { font-weight: 400; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tn-deal > span { margin-top: 1px; }
a.tn-deal:hover { background: none; }
a.tn-deal:hover b { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
