/* АПК AI. Без сторонних шрифтов и библиотек: работает без интернета и под строгой CSP. */
:root {
  --bg: #f5f4f0; --surface: #ffffff; --surface-2: #faf9f6; --ink: #17191d; --ink-2: #5d626b; --ink-3: #8b9099;
  --line: #e6e3dc; --side: #15171b; --side-ink: #c9ccd2; --side-line: #262a31;
  --accent: #a67c3d; --accent-ink: #ffffff; --accent-soft: #f4ecdf;
  --ok: #2f7d5b; --ok-soft: #e4f2eb; --warn: #a8690a; --warn-soft: #fbf0d9; --bad: #b3372f; --bad-soft: #fbe6e3;
  --info: #2f5f9e; --info-soft: #e4edf9;
  --radius: 12px; --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 8px 24px rgba(20, 22, 26, .05);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216; --surface: #181b20; --surface-2: #1d2026; --ink: #eceef1; --ink-2: #b4b9c2; --ink-3: #8a909a;
    --line: #2a2e36; --side: #0b0c0f; --side-ink: #b9bdc5; --side-line: #1d2026;
    --accent: #c9a063; --accent-ink: #15171b; --accent-soft: #2c2619;
    --ok: #5cc095; --ok-soft: #16281f; --warn: #e0a84a; --warn-soft: #2d2412; --bad: #ee7a70; --bad-soft: #331a18;
    --info: #7fa8e6; --info-soft: #17233a; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.45;
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.25rem; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 14px; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 22px 0 8px; }
p { margin: 0 0 10px; } small { color: var(--ink-2); font-size: .875rem; }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
code { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; color: var(--ink-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.boot, .empty { color: var(--ink-3); padding: 18px 0; } .empty.small { padding: 4px 0; }
.note { color: var(--ink-2); font-size: .9rem; }
.ok-text { color: var(--ok); } .warn-text { color: var(--warn); } .bad-text { color: var(--bad); }

/* каркас */
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 22px 14px;
  position: sticky; top: 0; height: 100vh; }
.brand { font-size: 1.15rem; letter-spacing: .14em; color: #fff; padding: 0 10px 22px; font-weight: 300; }
.brand b { font-weight: 700; color: var(--accent); } .brand.big { font-size: 1.6rem; color: var(--ink); padding: 0 0 6px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 8px;
  text-decoration: none; color: var(--side-ink); font-size: .95rem; }
.sidebar nav a:hover { background: var(--side-line); color: #fff; }
.sidebar nav a.active { background: var(--side-line); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.nav-badge { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: .75rem; font-weight: 600;
  min-width: 20px; text-align: center; padding: 1px 6px; }
.me { border-top: 1px solid var(--side-line); padding: 14px 10px 0; display: flex; flex-direction: column; gap: 2px; }
.me strong { color: #fff; font-weight: 500; } .me small { color: var(--side-ink); } .sidebar .me .btn { margin-top: 10px; align-self: flex-start; color: var(--side-ink); border-color: #3a3f48; background: transparent; }
.sidebar .me .btn:hover { color: #fff; border-color: var(--side-ink); }
.content { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 34px 6px; flex-wrap: wrap; }
main { padding: 16px 34px 60px; max-width: 1480px; } main:focus { outline: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: .78rem; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; background: var(--surface); }
.chip.warn { color: var(--warn); border-color: transparent; background: var(--warn-soft); }

/* карточки и сетки */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow); margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grid2 > * { min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px;
  text-decoration: none; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.kpi:hover { transform: translateY(-1px); border-color: var(--accent); }
.kpi-value { font-size: 2rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.kpi-title { color: var(--ink-2); font-size: .84rem; }
.kpi.accent .kpi-value { color: var(--accent); } .kpi.bad .kpi-value { color: var(--bad); } .kpi.warn .kpi-value { color: var(--warn); }
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar { display: grid; grid-template-columns: 190px 1fr 28px; gap: 12px; align-items: center; font-size: .9rem; }
.bar b { text-align: right; font-weight: 600; }
.track { height: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.track i { display: block; height: 100%; background: var(--accent); border-radius: 999px; min-width: 0; }

/* таблицы */
.table-wrap { overflow-x: auto; margin: -4px -8px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.4; }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
tr:last-child td { border-bottom: 0; }
td small { display: block; } td .badge + .badge { margin-left: 6px; }
.num { text-align: right; white-space: nowrap; } th.num { text-align: right; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--surface-2); }

/* значки, кнопки, поля */
.badge { display: inline-block; font-size: .8rem; padding: 2px 9px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.muted { color: var(--ink-3); }
.btn { font: inherit; font-size: .9rem; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; white-space: nowrap; transition: border-color .12s, background .12s; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); } .btn.primary:hover { opacity: .88; }
.btn.primary.dim { opacity: .55; }
.btn.ghost { background: transparent; color: var(--ink-2); } .btn.small { padding: 5px 10px; font-size: .82rem; }
.btn.wide { width: 100%; padding: 11px; } .btn:disabled { opacity: .5; cursor: default; }
.btn.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.icon { font: inherit; font-size: 1.5rem; line-height: 1; background: none; border: 0; color: var(--ink-2); cursor: pointer; padding: 0 6px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; width: 100%; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); padding: 0; flex: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: .8rem; color: var(--ink-2); }
.form.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.check.strong { color: var(--ink); font-weight: 500; margin-top: 14px; align-items: flex-start; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar select, .toolbar input[type=search] { width: auto; min-width: 170px; } .spacer { flex: 1; }
.tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; } .actions.tight { margin: 0; gap: 4px; }
.row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

/* списки */
.kv { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 8px 18px; margin: 0 0 12px; font-size: .95rem; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; overflow-wrap: anywhere; }
ul.plain, ul.tasks, ul.signals, ul.messages, ul.timeline, ul.cars, ul.checklist { list-style: none; margin: 0; padding: 0; }
ul.plain li, ul.cars li { padding: 8px 0; border-bottom: 1px solid var(--line); } ul.plain li:last-child, ul.cars li:last-child { border: 0; }
ul.plain small, ul.cars small { display: block; } ul.cars .badge { margin-top: 4px; }
ul.tasks li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
ul.tasks li:last-child { border: 0; } ul.tasks strong { font-weight: 500; display: block; } ul.tasks input { margin-top: 3px; }
ul.tasks li.done strong { color: var(--ink-3); text-decoration: line-through; } ul.tasks li.overdue small { color: var(--bad); }
ul.signals li { padding: 9px 0 9px 14px; border-left: 2px solid var(--line); margin-bottom: 6px; font-size: .92rem; }
ul.signals li.critical { border-color: var(--bad); } ul.signals li.warning { border-color: var(--warn); }
ul.checklist li { padding: 4px 0 4px 20px; position: relative; } ul.checklist li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 8px; height: 8px; border: 1.5px solid var(--ink-3); border-radius: 2px; }
.blockers { background: var(--warn-soft); border-radius: 8px; padding: 12px 14px; margin: 12px 0; font-size: .92rem; } .blockers ul { margin: 6px 0 0; padding-left: 18px; }
ul.messages li { padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; background: var(--surface-2); border: 1px solid var(--line); max-width: 92%; }
ul.messages li.out { margin-left: auto; background: var(--accent-soft); border-color: transparent; } ul.messages p { margin: 0 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
ul.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
ul.timeline li:last-child { border: 0; } ul.timeline time { color: var(--ink-3); } ul.timeline strong { font-weight: 500; }
.quote { background: var(--surface-2); border-left: 2px solid var(--accent); padding: 10px 14px; border-radius: 0 8px 8px 0; white-space: pre-wrap;
  overflow-wrap: anywhere; margin: 10px 0; font-size: .93rem; }
.lint p { margin: 0 0 4px; font-size: .87rem; }
pre.doc { white-space: pre-wrap; font-family: var(--font); font-size: .92rem; margin: 0; }

/* доска сделок */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(172px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.column { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 120px; }
.column h3 { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: .72rem; }
.count { color: var(--ink-3); }
.deal-card { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; margin-bottom: 8px; text-decoration: none; font-size: .9rem; transition: border-color .12s, transform .12s; }
.deal-card:hover { border-color: var(--accent); transform: translateY(-1px); } .deal-card strong { font-weight: 600; }
.deal-head { margin-bottom: 16px; }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; padding: 0; margin: 0 0 20px; }
.stepper li { display: flex; flex-direction: column; gap: 6px; font-size: .74rem; color: var(--ink-3); border-top: 3px solid var(--line); padding-top: 8px; }
.stepper i { font-style: normal; font-weight: 600; } .stepper li.past { border-color: var(--ink-3); color: var(--ink-2); }
.stepper li.current { border-color: var(--accent); color: var(--ink); font-weight: 600; } .stepper li.current i { color: var(--accent); }

/* логистика, подтверждения */
.trucks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 4px; }
.truck { display: flex; flex-direction: column; gap: 6px; } .truck .track { margin-top: 6px; }
.approvals { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; align-items: start; }
.approval header { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; } .approval header small { width: 100%; }

/* боковая панель заявки, окна, уведомления */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(0, 0, 0, .12); display: flex; flex-direction: column; z-index: 20; }
.drawer header, .modal header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 18px 22px 40px; overflow-y: auto; }
.overlay { position: fixed; inset: 0; background: rgba(12, 13, 16, .45); display: grid; place-items: center; padding: 16px; z-index: 30; }
.modal { background: var(--surface); border-radius: 14px; width: min(540px, 100%); max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.modal-body { padding: 18px 22px; overflow-y: auto; } .modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); }
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 40; align-items: center; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: .9rem; box-shadow: var(--shadow); max-width: 80vw; }
.toast.bad { background: var(--bad); color: #fff; }

/* вход */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: min(380px, 100%); padding: 32px 30px; }

@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; gap: 8px; min-width: 0; }
  .brand { padding: 0 8px 0 4px; } .sidebar nav { flex-direction: row; overflow-x: auto; flex: 1 1 100%; order: 3; min-width: 0; max-width: 100%; flex: 0 0 100%; }
  .sidebar nav a { white-space: nowrap; gap: 6px; } .sidebar nav a.active { box-shadow: inset 0 -2px 0 var(--accent); }
  .me { border: 0; padding: 0; margin-left: auto; flex-direction: row; align-items: center; gap: 8px; } .me small { display: none; } .sidebar .me .btn { margin: 0; }
  .topbar { padding: 16px 16px 0; } main { padding: 12px 16px 50px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bar { grid-template-columns: 120px 1fr 24px; }
  .form.cols { grid-template-columns: 1fr; } .stepper span { display: none; } .approvals { grid-template-columns: 1fr; }
  ul.timeline li { grid-template-columns: 1fr; gap: 0; }
}

/* ===== Этап 3: сообщения и каналы ===== */
main.wide { max-width: none; }
.inbox { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.inbox-side { position: sticky; top: 12px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; min-width: 0; }
.toolbar.tight { margin-bottom: 8px; gap: 6px; } .toolbar.tight select, .toolbar.tight input { min-width: 0; flex: 1 1 110px; width: auto; }
.conv-list { overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.conv { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; border-left: 3px solid transparent; }
.conv:last-child { border-bottom: 0; } .conv:hover { background: var(--surface-2); }
.conv.current { background: var(--surface-2); border-left-color: var(--accent); }
.conv-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.conv-top strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .conv.unread .conv-top strong { font-weight: 700; }
.conv-top time { color: var(--ink-3); font-size: .8rem; white-space: nowrap; }
.conv p { margin: 3px 0 7px; color: var(--ink-2); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.conv.unread p { color: var(--ink); }
.conv-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .conv-meta small { margin-left: auto; }
.badge.ch { border-color: var(--line); color: var(--ink); }
.thread-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 320px); gap: 18px; align-items: start; }
.thread-main { padding: 0; display: flex; flex-direction: column; margin: 0; }
.thread-head { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.thread-head .back { display: none; }
ul.thread { padding: 18px 20px; max-height: 56vh; overflow-y: auto; display: flex; flex-direction: column; }
ul.thread li { max-width: 82%; font-size: .97rem; } ul.thread li.in { align-self: flex-start; }
ul.thread li.out { align-self: flex-end; margin-left: 0; }
ul.thread li.note { align-self: center; max-width: 92%; background: var(--warn-soft); border-color: transparent; }
.tag { display: block; color: var(--warn); font-weight: 600; margin-bottom: 4px; }
ul.atts { list-style: none; padding: 0; margin: 6px 0; } ul.atts li { padding: 6px 10px; border: 1px dashed var(--line); border-radius: 8px; margin: 0 0 6px; background: transparent; max-width: none; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.small { font-size: .875rem; margin-top: 6px; }
.composer { border-top: 1px solid var(--line); padding: 16px 20px 18px; } .composer .actions { margin-top: 10px; }
.thread-info .card { padding: 16px 18px; margin-bottom: 14px; }
.channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; margin-bottom: 18px; }
.channel header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; } .channel { margin: 0; }
.channel code { overflow-wrap: anywhere; }
table.matrix td, table.matrix th { text-align: center; } table.matrix td:first-child, table.matrix th:first-child { text-align: left; }
.muted-cell { color: var(--ink-3); }
details { border-bottom: 1px solid var(--line); padding: 10px 0; } details:last-child { border: 0; }
summary { cursor: pointer; font-weight: 500; } details .kv { margin-top: 12px; }

@media (max-width: 1280px) { .thread-wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) {
  html { font-size: 16px; }
  .btn { padding: 10px 14px; } .btn.small { padding: 8px 12px; font-size: .875rem; }
  input, select, textarea { padding: 10px 12px; font-size: 1rem; }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox-side { position: static; max-height: none; } .inbox-side.has-open { display: none; }
  .inbox-pane:not(.has-open) { display: none; }
  .thread-head .back { display: inline-block; flex-basis: 100%; }
  ul.thread { max-height: none; padding: 14px; } ul.thread li { max-width: 94%; }
  .composer, .thread-head { padding: 14px; }
  /* таблицы превращаются в карточки: каждая строка — блок, у значения подпись колонки */
  .table-wrap { overflow: visible; margin: 0; }
  table, tbody, tr, td { display: block; width: 100%; } thead { display: none; }
  tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; background: var(--surface); }
  td, tbody tr:nth-child(even) td { border: 0; padding: 6px 0; background: transparent; text-align: left; display: grid; grid-template-columns: 38% 1fr; gap: 10px; }
  td[data-label] > * { grid-column: 2; }
  td::before { content: attr(data-label); color: var(--ink-3); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
  td[data-label=""]::before, td:not([data-label])::before { content: none; } td:not([data-label]) { display: block; }
  .num, table.matrix td { text-align: left; }
}

/* диагностика */
.kpis.diag .kpi-value { font-size: 1.35rem; letter-spacing: -.01em; line-height: 1.2; overflow-wrap: anywhere; }
.diag-table td { vertical-align: top; } .diag-table details { margin-top: 6px; } .diag-table summary { font-weight: 400; color: var(--ink-2); font-size: .88rem; }
ul.checks li { padding: 8px 0; border-bottom: 1px solid var(--line); } ul.checks li:last-child { border-bottom: 0; }
@media (max-width: 1180px) { .kpis.diag { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kpis.diag { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* сотрудники */
tr.muted-row td { color: var(--ink-3); }
.sidebar .me .btn + .btn { margin-top: 6px; }
