/* ============================================================
   ПУЛЬС — контроль открытых линий Битрикс24
   Фирменная система One Click Studio
   ============================================================ */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-var-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F;
}
@font-face {
  font-family: "Unbounded";
  src: url("/assets/fonts/Unbounded-var-cyrillic.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  src: url("/assets/fonts/Unbounded-var-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F;
}

:root {
  --paper: #f4f3ee;
  --paper-2: #ecebe3;
  --card: #ffffff;
  --ink: #17211d;
  --ink-soft: #46554d;
  --ink-faint: #6d7a72;
  --dark: #121816;
  --dark-2: #1a231f;
  --light: #f6f7f2;
  --lime: #c8f36a;
  --lime-soft: #eafac6;
  --lime-ink: #1b2a12;
  --signal: #b83a26;
  --signal-soft: #f7e3de;
  --amber: #a86a12;
  --amber-soft: #fbf0dc;
  --teal: #1f6b5c;
  --teal-soft: #e4f2ee;
  --line: rgba(23, 33, 29, 0.10);
  --line-2: rgba(23, 33, 29, 0.18);
  --line-dark: rgba(246, 247, 242, 0.12);
  --r: 16px;
  --r-sm: 11px;
  --shadow: 0 20px 44px -34px rgba(18, 24, 22, 0.42);
  --font: "Inter", -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", "Inter", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
::selection { background: var(--lime); color: var(--lime-ink); }
[hidden] { display: none !important; }

.muted { color: var(--ink-faint); }
.small { font-size: 12.5px; line-height: 1.5; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; }
.right { margin-left: auto; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.text-bad { color: var(--signal); }
.text-warn { color: var(--amber); }
.text-ok { color: var(--teal); }
.link-inline { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.link-inline:hover { border-color: var(--ink); }
.link-x { border: 0; background: none; padding: 0; margin-left: 4px; color: inherit; cursor: pointer; display: inline-flex; vertical-align: middle; }
.link-x svg { width: 12px; height: 12px; }

/* ---------- shell ---------- */
.app { display: flex; min-height: 100vh; }

.rail {
  width: 248px; flex: 0 0 248px;
  background: var(--dark); color: var(--light);
  display: flex; flex-direction: column;
  padding: 22px 14px 18px;
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid rgba(0, 0, 0, 0.35);
}
.rail-brand { display: flex; align-items: center; gap: 8px; padding: 2px 8px 24px; color: var(--light); }
.brand-main { display: flex; align-items: center; gap: 11px; color: inherit; min-width: 0; flex: 1; }
.version-link {
  flex: 0 0 auto; font-size: 9px; letter-spacing: 0.03em;
  color: rgba(246, 247, 242, 0.42); border: 1px solid var(--line-dark);
  border-radius: 999px; padding: 2px 6px; line-height: 1.4;
  transition: color 0.15s, border-color 0.15s;
}
.version-link:hover { color: var(--lime); border-color: rgba(200, 243, 106, 0.45); }
.mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--lime); color: var(--lime-ink);
  display: grid; place-items: center; flex: 0 0 auto;
}
.mark svg { width: 22px; height: 22px; stroke-width: 2; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: 0.10em; }
.brand-sub { font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.5; margin-top: 3px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; border-radius: 9px;
  font-size: 13.5px; color: rgba(246, 247, 242, 0.62);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
  position: relative;
}
.nav a svg { width: 17px; height: 17px; opacity: 0.72; }
.nav a:hover { background: rgba(246, 247, 242, 0.06); color: var(--light); }
.nav a.active { background: rgba(200, 243, 106, 0.13); color: var(--lime); }
.nav a.active svg { opacity: 1; }
.nav a.active::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--lime);
}
.nav-badge {
  margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--signal); color: #fff;
  font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
}

.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.connect-card {
  border: 1px solid var(--line-dark); border-radius: 12px;
  padding: 11px 12px; background: rgba(246, 247, 242, 0.035);
}
.connect-top { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.connect-top b { margin-left: auto; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--lime); font-weight: 600; }
.connect-sub { font-size: 10.5px; color: rgba(246, 247, 242, 0.42); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-link {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; border-radius: 9px; border: 0; background: none;
  color: rgba(246, 247, 242, 0.46); font-size: 12px; text-align: left; cursor: pointer;
}
.rail-link:hover { background: rgba(246, 247, 242, 0.05); color: var(--light); }
.rail-link svg { width: 15px; height: 15px; }
.rail-user { display: flex; align-items: center; gap: 9px; padding: 12px 10px 0; margin-top: 2px; border-top: 1px solid var(--line-dark); }
.rail-user b { display: block; font-size: 12px; color: var(--light); font-weight: 500; }
.rail-user small { display: block; font-size: 10px; color: rgba(246, 247, 242, 0.42); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 64px; flex: 0 0 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px;
  background: rgba(244, 243, 238, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.version-chip {
  font-size: 9.5px; font-weight: 500; color: var(--ink-faint);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 1px 6px; line-height: 1.4; letter-spacing: 0.02em;
  transition: color 0.15s, border-color 0.15s;
}
.version-chip:hover { color: var(--ink); border-color: var(--line-2); }
.crumb-muted { color: var(--ink-faint); font-weight: 500; }
.slash { color: var(--line-2); }
.top-actions { display: flex; align-items: center; gap: 9px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 11px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-soft);
}
.demo-pill {
  height: 22px; padding: 0 8px; border-radius: 5px;
  background: var(--amber-soft); color: var(--amber);
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em;
  display: inline-flex; align-items: center;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); flex: 0 0 auto; }
.dot.live { background: #3d9a5c; box-shadow: 0 0 0 3px rgba(61, 154, 92, 0.15); }
.dot.bad { background: var(--signal); }
.dot.warn { background: var(--amber); }
.dot.ok { background: #3d9a5c; }

.view { padding: 26px 30px 56px; max-width: 1500px; width: 100%; margin: 0 auto; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--ink-faint); padding: 80px 0; justify-content: center; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--ink);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 {
  font-family: var(--display); font-size: 25px; font-weight: 600;
  letter-spacing: -0.03em; margin: 0; line-height: 1.15;
}
.page-head p { margin: 6px 0 0; color: var(--ink-faint); font-size: 13px; max-width: 760px; }
.page-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.eyebrow { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 10px;
  border: 1px solid transparent; background: #fff;
  font-size: 13px; font-weight: 500; color: var(--ink);
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.1s;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-dark { background: var(--dark); color: var(--light); }
.btn-dark:hover { background: #1f2b26; }
.btn-lime { background: var(--lime); color: var(--lime-ink); }
.btn-lime:hover { background: #d4f884; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: #fff; }
.btn-soft { background: var(--paper-2); }
.btn-soft:hover { background: #e5e3d9; }
.btn-danger { background: var(--signal-soft); color: var(--signal); }
.btn-danger:hover { background: #f2d2ca; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 44px; padding: 0 18px; font-size: 14px; border-radius: 11px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink-soft);
}
.icon-btn:hover { background: var(--paper); }
.icon-btn svg { width: 15px; height: 15px; }

/* ---------- cards / grid ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 12px; }
.card-head h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; }
.card-head .muted { font-size: 11.5px; }
.card-head .right { font-size: 11.5px; }
.card-body { padding: 0 22px 20px; }

.grid { display: grid; gap: 16px; align-items: start; }
.grid > *, .hero-grid > *, .kpi-grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-3-2 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-2-1 { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); }

/* ---------- pulse hero ---------- */
.hero-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.pulse-card {
  background: var(--dark); color: var(--light);
  border-radius: 18px; padding: 22px 22px 20px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.pulse-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(200, 243, 106, 0.16), transparent 62%),
    linear-gradient(to right, rgba(246, 247, 242, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(246, 247, 242, 0.03) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
  pointer-events: none;
}
.pulse-card > * { position: relative; }
.pulse-top { display: flex; align-items: center; justify-content: space-between; }
.pulse-top .eyebrow { color: rgba(246, 247, 242, 0.5); }
.pulse-watch { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--lime); letter-spacing: 0.06em; text-transform: uppercase; }
.pulse-watch .dot { background: var(--lime); box-shadow: 0 0 0 3px rgba(200, 243, 106, 0.12); }
.pulse-main { display: flex; align-items: center; gap: 16px; margin: 18px 0 8px; }
.ring { width: 142px; height: 142px; flex: 0 0 auto; position: relative; }
.ring svg { width: 142px; height: 142px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: rgba(246, 247, 242, 0.11); }
.ring .bar { stroke: var(--lime); stroke-linecap: round; transition: stroke-dasharray 0.8s var(--ease); }
.ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1;
}
.ring-center b { font-family: var(--display); font-size: 40px; font-weight: 600; letter-spacing: -0.05em; }
.ring-center small { font-size: 9px; color: rgba(246, 247, 242, 0.45); letter-spacing: 0.1em; margin-top: 6px; text-transform: uppercase; }
.pulse-copy .verdict-line { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.pulse-copy { min-width: 0; }
.pulse-copy .delta { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--lime); margin-top: 5px; }
.pulse-copy .delta.down { color: #ffb4a4; }
.pulse-caption { font-size: 12.5px; color: rgba(246, 247, 242, 0.66); line-height: 1.5; margin: 8px 0 0; }
.split-bar { display: flex; height: 8px; border-radius: 5px; overflow: hidden; background: rgba(246, 247, 242, 0.1); margin-top: auto; }
.split-bar span { display: block; height: 100%; }
.split-bar .ok { background: var(--lime); }
.split-bar .watch { background: #e2b15a; }
.split-bar .critical { background: #e0745f; }
.pulse-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 9px; font-size: 10.5px; color: rgba(246, 247, 242, 0.58); }
.pulse-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pulse-legend i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* ---------- kpi ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 16px 18px; position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 122px; }
.kpi-label { font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-faint); }
.kpi-value { font-family: var(--display); font-size: 29px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; margin-top: 9px; }
.kpi-value small { font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--ink-faint); letter-spacing: 0; margin-left: 3px; }
.kpi-value small.tight { margin-left: 0; }
.kpi-note { font-size: 11px; color: var(--ink-faint); margin-top: auto; padding-top: 8px; }
.kpi.bad { background: linear-gradient(160deg, #fff, #fdf3f0); border-color: rgba(184, 58, 38, 0.18); }
.kpi.bad .kpi-value { color: var(--signal); }
.kpi.warn { background: linear-gradient(160deg, #fff, #fdf8ec); border-color: rgba(168, 106, 18, 0.18); }
.kpi.warn .kpi-value { color: var(--amber); }
.kpi.good .kpi-value { color: var(--teal); }
.kpi-icon { position: absolute; right: 15px; top: 15px; color: var(--ink-faint); opacity: 0.35; }
.kpi-icon svg { width: 18px; height: 18px; }
.hero-grid .kpi-grid .kpi:last-child { grid-column: span 2; }

/* ---------- attention ---------- */
.att-list { display: flex; flex-direction: column; }
.att-row {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 16px;
  gap: 12px; align-items: center;
  padding: 13px 22px; border-top: 1px solid var(--line);
  cursor: pointer; transition: background 0.12s;
}
.att-row:first-child { border-top: 0; }
.att-row:hover { background: rgba(244, 243, 238, 0.7); }
.score-badge {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -0.04em;
  flex: 0 0 auto;
}
.score-badge.critical { background: var(--signal-soft); color: var(--signal); }
.score-badge.watch { background: var(--amber-soft); color: var(--amber); }
.score-badge.ok { background: var(--teal-soft); color: var(--teal); }
.att-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.att-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.att-top b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-sub { font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-reason { font-size: 11.5px; color: var(--signal); display: flex; align-items: center; gap: 5px; }
.att-reason svg { width: 13px; height: 13px; }
.att-right { text-align: right; white-space: nowrap; }
.att-right b { font-size: 12.5px; font-weight: 600; }
.att-right small { display: block; font-size: 10px; color: var(--ink-faint); }
.att-row > svg { color: var(--ink-faint); width: 15px; height: 15px; }
.att-row:hover > svg { color: var(--ink); }
.att-more {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 22px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-faint); cursor: pointer;
}
.att-more:hover { color: var(--ink); background: rgba(244, 243, 238, 0.7); }
.att-more svg { width: 13px; height: 13px; }

/* ---------- plan ---------- */
.plan-list { display: flex; flex-direction: column; }
.plan-item { display: flex; gap: 11px; padding: 12px 22px; border-top: 1px solid var(--line); cursor: pointer; }
.plan-item:first-child { border-top: 0; }
.plan-item:hover { background: rgba(244, 243, 238, 0.7); }
.plan-dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: 0 0 auto; margin-top: 1px; position: relative; }
.plan-item.critical .plan-dot { border-color: var(--signal); }
.plan-item.critical .plan-dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--signal); }
.plan-item.watch .plan-dot { border-color: var(--amber); }
.plan-item.watch .plan-dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--amber); }
.plan-copy { min-width: 0; }
.plan-title { font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.plan-detail { font-size: 11px; color: var(--ink-faint); line-height: 1.45; margin-top: 2px; }
.plan-client { font-size: 10px; color: var(--ink-faint); margin-top: 4px; display: flex; gap: 6px; align-items: center; }

/* ---------- chart ---------- */
.chart-wrap { padding: 4px 18px 18px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); font-size: 9.5px; fill: var(--ink-faint); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .area { fill: url(#pulseFade); }
.chart .line { stroke: var(--ink); stroke-width: 2; fill: none; }
.chart .point { fill: var(--lime); stroke: var(--ink); stroke-width: 1.5; }
.chart .bar { fill: rgba(184, 58, 38, 0.22); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 11px; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }

/* ---------- team ---------- */
.team-list { display: flex; flex-direction: column; }
.team-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 64px; gap: 10px; align-items: center; padding: 10px 22px; border-top: 1px solid var(--line); cursor: pointer; }
.team-row:first-child { border-top: 0; }
.team-row:hover { background: rgba(244, 243, 238, 0.7); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--paper-2); color: var(--ink-soft);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 600; flex: 0 0 auto;
}
.avatar.sm { width: 28px; height: 28px; font-size: 10px; }
.avatar.dark { background: rgba(246, 247, 242, 0.1); color: var(--light); }
.avatar.lime { background: var(--lime-soft); color: var(--lime-ink); }
.team-name { font-size: 12.5px; font-weight: 500; line-height: 1.25; }
.team-role { font-size: 10.5px; color: var(--ink-faint); }
.team-score { text-align: right; }
.team-score b { font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -0.04em; }
.team-score.bad b { color: var(--signal); }
.team-score.warn b { color: var(--amber); }
.team-score.ok b { color: var(--teal); }
.team-score small { display: block; font-size: 9px; color: var(--ink-faint); }
.bar-line { height: 4px; border-radius: 3px; background: var(--paper-2); overflow: hidden; margin-top: 4px; }
.bar-line i { display: block; height: 100%; border-radius: 3px; background: var(--ink); }
.bar-line i.bad { background: var(--signal); }
.bar-line i.warn { background: var(--amber); }
.bar-line i.ok { background: var(--teal); }

/* ---------- findings ---------- */
.findings { display: flex; flex-direction: column; }
.finding { display: flex; gap: 11px; padding: 12px 0; border-top: 1px solid var(--line); }
.finding:first-child { border-top: 0; padding-top: 0; }
.finding-icon {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
  display: grid; place-items: center; margin-top: 1px;
}
.finding-icon svg { width: 14px; height: 14px; }
.finding.good .finding-icon { background: var(--teal-soft); color: var(--teal); }
.finding.bad .finding-icon { background: var(--signal-soft); color: var(--signal); }
.finding-body { min-width: 0; }
.finding-title { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.finding-meta { font-size: 10.5px; color: var(--ink-faint); margin-top: 1px; }
.finding-text { font-size: 11.5px; color: var(--ink-soft); line-height: 1.45; margin-top: 4px; }
.finding-quote { font-size: 11.5px; color: var(--ink-faint); font-style: italic; border-left: 2px solid var(--line-2); padding-left: 8px; margin-top: 6px; }
.finding-rec { font-size: 11px; color: var(--ink-faint); margin-top: 5px; display: flex; gap: 5px; align-items: flex-start; }
.finding-rec svg { width: 12px; height: 12px; margin-top: 2px; color: var(--amber); }

/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 500; white-space: nowrap;
  background: var(--paper-2); color: var(--ink-soft);
}
.chip.lime { background: var(--lime-soft); color: #4a6412; }
.chip.green { background: var(--teal-soft); color: var(--teal); }
.chip.red { background: var(--signal-soft); color: var(--signal); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.ok { background: var(--teal-soft); color: var(--teal); }
.chip.watch { background: var(--amber-soft); color: var(--amber); }
.chip.critical { background: var(--signal-soft); color: var(--signal); }
.chip.dark { background: var(--dark); color: var(--light); }
.chip.outline { background: transparent; border: 1px solid var(--line-2); }
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip svg { width: 11px; height: 11px; }
.chip.tiny { height: 18px; font-size: 10px; padding: 0 6px; }
.sev { font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; padding: 2px 5px; border-radius: 4px; }
.sev.critical { background: var(--signal); color: #fff; }
.sev.high { background: var(--signal-soft); color: var(--signal); }
.sev.medium { background: var(--amber-soft); color: var(--amber); }
.sev.low { background: var(--paper-2); color: var(--ink-faint); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 11.5px; color: var(--ink-faint); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: 9px;
  background: #fff; padding: 9px 11px; font-size: 13px; color: var(--ink);
  font-family: inherit; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 33, 29, 0.08); }
.textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-faint); }
.search .input { padding-left: 32px; min-width: 220px; }
.segmented { display: inline-flex; background: var(--paper-2); border-radius: 9px; padding: 3px; gap: 2px; }
.segmented button {
  border: 0; background: transparent; padding: 5px 11px; border-radius: 7px;
  font-size: 12px; color: var(--ink-soft); cursor: pointer; font-weight: 500;
}
.segmented button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07); }
.switch { position: relative; width: 36px; height: 21px; flex: 0 0 auto; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; border-radius: 11px; background: var(--paper-2);
  transition: background 0.15s; cursor: pointer;
}
.switch span::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: #fff; transition: transform 0.15s var(--ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(15px); }

/* ---------- chats ---------- */
.chat-layout { display: grid; grid-template-columns: 370px minmax(0, 1fr); gap: 16px; height: calc(100vh - 178px); min-height: 640px; }
.chat-list { display: flex; flex-direction: column; overflow: hidden; }
.list-head { padding: 14px 15px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.list-head .segmented { width: 100%; }
.list-head .segmented button { flex: 1; padding: 5px 4px; font-size: 11px; }
.list-head .search .input { min-width: 0; }
.list-scroll { overflow: auto; flex: 1; }
.chat-item {
  display: flex; gap: 10px; padding: 12px 15px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background 0.12s; position: relative;
}
.chat-item:hover { background: rgba(244, 243, 238, 0.7); }
.chat-item.active { background: var(--lime-soft); }
.chat-item.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ink); }
.chat-item-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.chat-item-top { display: flex; align-items: center; gap: 6px; }
.chat-item-top b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-top .score-mini {
  margin-left: auto; font-family: var(--display); font-size: 12px; font-weight: 600;
  min-width: 24px; text-align: right;
}
.score-mini.critical { color: var(--signal); }
.score-mini.watch { color: var(--amber); }
.score-mini.ok { color: var(--teal); }
.chat-item-sub { font-size: 11px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-foot { display: flex; align-items: center; gap: 6px; margin-top: 2px; flex-wrap: wrap; row-gap: 4px; }
.chat-item-foot .chip { height: 18px; font-size: 9.5px; padding: 0 6px; }
.chat-item-time { margin-left: auto; font-size: 9.5px; color: var(--ink-faint); white-space: nowrap; }
.chat-item-main { min-width: 0; }

.chat-view { display: flex; flex-direction: column; overflow: hidden; }
.chat-detail-scroll { overflow: auto; flex: 1; }
.chat-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; }
.chat-title { min-width: 0; flex: 1; }
.chat-title h2 { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -0.025em; margin: 0; line-height: 1.25; }
.chat-title-sub { font-size: 11.5px; color: var(--ink-faint); margin-top: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chat-head-right { text-align: right; flex: 0 0 auto; }
.chat-score { font-family: var(--display); font-size: 27px; font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.chat-score.critical { color: var(--signal); }
.chat-score.watch { color: var(--amber); }
.chat-score.ok { color: var(--teal); }
.chat-head-right small { display: block; font-size: 9.5px; color: var(--ink-faint); margin-top: 3px; }

.chat-meta { display: flex; gap: 18px; flex-wrap: wrap; padding: 11px 22px; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--ink-faint); }
.chat-meta b { color: var(--ink); font-weight: 500; }
.chat-meta .row { gap: 6px; }

.verdict {
  margin: 16px 22px 0; padding: 14px 16px;
  background: var(--dark); color: var(--light); border-radius: 13px;
  position: relative; overflow: hidden;
}
.verdict::before { content: ""; position: absolute; inset: 0; background: radial-gradient(280px 140px at 100% 0%, rgba(200, 243, 106, 0.15), transparent 70%); }
.verdict > * { position: relative; }
.verdict-head { display: flex; align-items: center; gap: 7px; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); }
.verdict-head svg { width: 13px; height: 13px; }
.verdict p { margin: 7px 0 0; font-size: 12.5px; line-height: 1.5; color: rgba(246, 247, 242, 0.84); }
.verdict-actions { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }

.mini-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px 22px 0; }
.mm { background: #fbfbf8; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.mm-label { font-size: 9.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.mm-value { font-size: 14px; font-weight: 600; margin-top: 2px; }
.mm-value.bad { color: var(--signal); }
.mm-value.warn { color: var(--amber); }

.chat-section { padding: 16px 22px 0; }
.chat-section h4 { font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 9px; }
.promise-row {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 7px;
  background: #fbfbf8;
}
.promise-row.overdue { background: var(--signal-soft); border-color: rgba(184, 58, 38, 0.22); }
.promise-row.kept { background: var(--teal-soft); border-color: rgba(31, 107, 92, 0.18); }
.promise-row svg { width: 14px; height: 14px; margin-top: 2px; }
.promise-row.overdue svg { color: var(--signal); }
.promise-row.kept svg { color: var(--teal); }
.promise-row.open svg { color: var(--amber); }
.promise-text { font-size: 11.5px; line-height: 1.4; }
.promise-meta { font-size: 10px; color: var(--ink-faint); margin-top: 2px; }

.thread-scroll { padding: 18px 22px 22px; background: radial-gradient(circle at 1px 1px, rgba(23, 33, 29, 0.045) 1px, transparent 0) 0 0 / 16px 16px; }
.msg-row { display: flex; margin-bottom: 13px; }
.msg-row.client { justify-content: flex-start; }
.msg-row.employee { justify-content: flex-end; }
.msg-row > div { max-width: 78%; min-width: 0; }
.msg-author { font-size: 9.5px; color: var(--ink-faint); margin-bottom: 3px; }
.msg-row.employee .msg-author { text-align: right; }
.msg {
  border-radius: 13px; padding: 9px 12px; font-size: 12.5px; line-height: 1.5;
  white-space: pre-wrap; box-shadow: 0 1px 2px rgba(18, 24, 22, 0.05);
}
.msg.client { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.employee { background: var(--dark); color: var(--light); border-bottom-right-radius: 4px; }
.msg-meta { font-size: 9.5px; color: var(--ink-faint); margin-top: 4px; }
.msg-row.employee .msg-meta { text-align: right; }
.msg-system {
  display: flex; align-items: flex-start; gap: 7px;
  margin: 12px auto; max-width: 88%;
  background: var(--amber-soft); border: 1px dashed rgba(168, 106, 18, 0.35);
  color: var(--amber); border-radius: 9px; padding: 7px 10px;
  font-size: 10.5px; line-height: 1.4;
}
.msg-system svg { width: 13px; height: 13px; margin-top: 1px; }
.msg-notes { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 4px; }
.msg-row.employee .msg-notes { justify-content: flex-end; }
.note { font-size: 9px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.note.bad { background: var(--signal-soft); color: var(--signal); }
.note.good { background: var(--teal-soft); color: var(--teal); }

.chat-actions { border-top: 1px solid var(--line); padding: 12px 22px; display: flex; gap: 8px; flex-wrap: wrap; background: #fff; }
.chat-empty { flex: 1; display: grid; place-items: center; color: var(--ink-faint); font-size: 13px; padding: 40px; text-align: center; }

/* ---------- people ---------- */
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.person-card { padding: 18px; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.person-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.person-top { display: flex; align-items: center; gap: 11px; }
.person-id { min-width: 0; flex: 1; }
.person-name { font-size: 14px; font-weight: 600; }
.person-role { font-size: 11px; color: var(--ink-faint); }
.person-score { text-align: right; }
.person-score b { font-family: var(--display); font-size: 23px; font-weight: 600; letter-spacing: -0.05em; }
.person-score.critical b { color: var(--signal); }
.person-score.watch b { color: var(--amber); }
.person-score.ok b { color: var(--teal); }
.person-score small { display: block; font-size: 9px; color: var(--ink-faint); }
.person-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.ps b { display: block; font-size: 14px; font-weight: 600; }
.ps small { font-size: 9.5px; color: var(--ink-faint); }
.person-note { margin-top: 13px; font-size: 11px; line-height: 1.45; }
.person-note b { font-weight: 600; }
.person-note .plus { color: var(--teal); }
.person-note .minus { color: var(--signal); }
.person-foot { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 10.5px; color: var(--ink-faint); }
.person-foot svg { width: 12px; height: 12px; }

/* ---------- promises ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.tile { padding: 16px 18px; display: flex; align-items: center; gap: 13px; }
.tile-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.tile-icon.bad { background: var(--signal-soft); color: var(--signal); }
.tile-icon.warn { background: var(--amber-soft); color: var(--amber); }
.tile-icon.ok { background: var(--teal-soft); color: var(--teal); }
.tile b { font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: -0.04em; display: block; line-height: 1.1; }
.tile small { font-size: 11px; color: var(--ink-faint); }

.table-wrap { overflow: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
  text-align: left; font-size: 9.5px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600; padding: 0 14px 10px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(244, 243, 238, 0.6); }
.table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .main-cell { min-width: 240px; }
.table .main-cell b { font-weight: 500; display: block; }
.table .main-cell small { font-size: 10.5px; color: var(--ink-faint); }
.table .actions { text-align: right; white-space: nowrap; }

/* ---------- report ---------- */
.report-shell { max-width: 900px; margin: 0 auto; }
.paper {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 30px 70px -50px rgba(18, 24, 22, 0.5);
  padding: 42px 46px 38px;
}
.paper-head { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.paper-brand { display: flex; align-items: center; gap: 10px; }
.paper-brand .mark { width: 34px; height: 34px; border-radius: 10px; }
.paper-brand .mark svg { width: 18px; height: 18px; }
.paper-brand b { font-family: var(--display); font-size: 12px; letter-spacing: 0.1em; display: block; }
.paper-brand small { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.paper-meta { margin-left: auto; text-align: right; font-size: 10.5px; color: var(--ink-faint); line-height: 1.6; }
.paper h1 { font-family: var(--display); font-size: 23px; font-weight: 600; letter-spacing: -0.03em; margin: 24px 0 6px; }
.paper-lead { font-size: 13px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 22px; }
.paper-score {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--dark); color: var(--light); border-radius: 12px;
  padding: 9px 14px; margin-bottom: 22px;
}
.paper-score b { font-family: var(--display); font-size: 21px; color: var(--lime); letter-spacing: -0.04em; }
.paper-score span { font-size: 10.5px; color: rgba(246, 247, 242, 0.6); }
.paper-section { margin-top: 22px; }
.paper-section h3 { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 9px; display: flex; align-items: center; gap: 7px; }
.paper-section h3::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--ink); }
.paper-section.good h3::before { background: var(--teal); }
.paper-section.bad h3::before { background: var(--signal); }
.paper-item { display: flex; gap: 9px; font-size: 12.5px; line-height: 1.55; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.paper-item:last-child { border-bottom: 0; }
.paper-item .bullet { color: var(--ink-faint); flex: 0 0 auto; }
.paper-conclusion {
  margin-top: 26px; padding: 16px 18px; background: var(--paper);
  border-left: 3px solid var(--lime); border-radius: 0 10px 10px 0;
  font-size: 12.5px; line-height: 1.6;
}
.paper-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 9.5px; color: var(--ink-faint); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- version ---------- */
.version-hero {
  background: var(--dark); color: var(--light); border-radius: 18px;
  padding: 24px 26px; position: relative; overflow: hidden;
}
.version-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(200, 243, 106, 0.17), transparent 62%),
    linear-gradient(to right, rgba(246, 247, 242, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(246, 247, 242, 0.03) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
  pointer-events: none;
}
.version-hero > * { position: relative; }
.version-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.version-top .eyebrow { color: rgba(246, 247, 242, 0.5); }
.version-main { display: flex; align-items: flex-end; gap: 26px; margin-top: 18px; flex-wrap: wrap; }
.version-number {
  font-family: var(--display); font-size: 56px; font-weight: 600;
  letter-spacing: -0.06em; line-height: 0.95; color: var(--lime);
}
.version-meta { display: flex; gap: 26px; flex-wrap: wrap; padding-bottom: 4px; }
.version-meta span { display: block; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(246, 247, 242, 0.42); }
.version-meta b { display: block; font-size: 12px; font-weight: 500; color: rgba(246, 247, 242, 0.86); margin-top: 3px; }
.version-hero p { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: rgba(246, 247, 242, 0.65); max-width: 720px; }

.release-list { list-style: none; margin: 0; padding: 0; }
.release-list li {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 9px 0; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.45;
}
.release-list li:first-child { border-top: 0; padding-top: 0; }
.release-list li svg { width: 14px; height: 14px; color: var(--teal); margin-top: 2px; flex: 0 0 auto; }
.tech-grid { display: flex; flex-direction: column; }
.tech-item { display: flex; align-items: flex-start; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line); }
.tech-item:first-child { border-top: 0; padding-top: 0; }
.tech-item b { font-size: 11.5px; font-weight: 500; min-width: 92px; }
.tech-item span { font-size: 11px; color: var(--ink-faint); line-height: 1.45; }
.version-links { display: flex; flex-direction: column; gap: 8px; }
.version-link-row {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 11.5px; color: var(--ink-soft); transition: border-color 0.15s, background 0.15s;
}
.version-link-row:hover { border-color: var(--line-2); background: #fbfbf8; }
.version-link-row svg { width: 14px; height: 14px; color: var(--ink-faint); }
.version-link-row b { margin-left: auto; font-weight: 500; color: var(--ink); font-size: 11px; }
.version-note { background: var(--lime-soft); border-radius: 10px; padding: 10px 12px; font-size: 11px; color: #3f5410; display: flex; gap: 8px; }
.version-note svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.setting-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.setting-row:first-child { border-top: 0; }
.setting-row .grow b { display: block; font-size: 12.5px; font-weight: 500; }
.setting-row .grow small { display: block; font-size: 10.5px; color: var(--ink-faint); margin-top: 2px; line-height: 1.4; }
.conn-status { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.conn-status .chip { margin-left: auto; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; font-size: 12px; }
.kv dt { color: var(--ink-faint); }
.kv dd { margin: 0; }
.mode-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.mode-card {
  border: 1px solid var(--line); border-radius: 11px; padding: 12px; cursor: pointer;
  background: #fbfbf8; transition: border-color 0.15s, background 0.15s;
}
.mode-card:hover { border-color: var(--line-2); }
.mode-card.active { border-color: var(--ink); background: var(--lime-soft); }
.mode-card b { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.mode-card b svg { width: 14px; height: 14px; }
.mode-card small { display: block; font-size: 10px; color: var(--ink-faint); margin-top: 4px; line-height: 1.4; }
.access-row { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 11.5px; }
.access-row:first-child { border-top: 0; }
.access-row b { min-width: 120px; font-weight: 500; }
.access-row span { color: var(--ink-faint); }
.save-bar { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ---------- drawer / modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(18, 24, 22, 0.34); z-index: 60; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 94vw);
  background: var(--paper); z-index: 61; display: flex; flex-direction: column;
  box-shadow: -30px 0 60px -40px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.24s var(--ease);
}
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 18px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: var(--paper); }
.drawer-title { font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.drawer-body { padding: 20px; overflow: auto; flex: 1; }

.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; }
.modal::before { content: ""; position: fixed; inset: 0; background: rgba(18, 24, 22, 0.42); }
.modal-card {
  position: relative; background: var(--paper); border-radius: 16px;
  width: min(520px, 100%); max-height: 88vh; overflow: auto;
  padding: 22px; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.6);
  animation: pop 0.2s var(--ease);
}
@keyframes pop { from { transform: scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { font-family: var(--display); font-size: 17px; margin: 0 0 4px; letter-spacing: -0.02em; }
.modal .modal-sub { color: var(--ink-faint); font-size: 12px; margin-bottom: 15px; line-height: 1.5; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--dark); color: var(--light); border-radius: 10px;
  padding: 10px 14px; font-size: 12.5px; box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.2s var(--ease); max-width: 380px;
}
.toast.err { background: var(--signal); }
@keyframes slideUp { from { transform: translateY(8px); opacity: 0; } }

.empty { padding: 44px 20px; text-align: center; color: var(--ink-faint); font-size: 13px; }
.empty b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 4px; font-weight: 500; }

.hint {
  background: var(--lime-soft); border-radius: 10px; padding: 10px 12px;
  font-size: 11.5px; color: #3f5410; display: flex; gap: 8px; align-items: flex-start;
}
.hint svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 1320px) {
  .hero-grid { grid-template-columns: 330px minmax(0, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { min-height: 110px; }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1120px) {
  .rail { width: 70px; flex-basis: 70px; padding: 18px 9px; }
  .rail-brand { justify-content: center; padding: 2px 0 22px; }
  .rail-brand .brand-copy, .rail-brand .version-link, .nav span:not(.nav-badge), .rail-foot .connect-card, .rail-foot .rail-link, .rail-user span:not(.avatar) { display: none; }
  .nav a { justify-content: center; }
  .nav a.active::before { left: -9px; }
  .rail-user { justify-content: center; padding: 12px 0 0; }
  .topbar { padding: 0 20px; }
  .view { padding: 22px 20px 44px; }
  .g-3-2, .g-2-1, .settings-grid { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 320px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .pulse-card { min-height: 300px; }
  .g2, .g3, .people-grid, .tiles, .mode-cards { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .chat-list { max-height: 46vh; }
  .chat-view { min-height: 560px; }
  .chat-layout .chat-view { height: auto; }
  .mini-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-actions { margin-left: 0; }
  .paper { padding: 26px 22px; }
}
@media (max-width: 620px) {
  .topbar { height: 56px; flex-basis: 56px; padding: 0 12px; }
  .crumbs { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .live-pill { display: none; }
  .kpi-grid { grid-template-columns: 1fr; }
  .hero-grid .kpi-grid .kpi:last-child { grid-column: auto; }
  .view { padding: 18px 14px 40px; }
  .page-head h1 { font-size: 22px; }
  .pulse-card { padding: 18px 16px; }
  .pulse-main { gap: 10px; }
  .pulse-copy .verdict-line { font-size: 17px; }
  .ring, .ring svg { width: 112px !important; height: 112px !important; }
  .ring-center b { font-size: 30px; }
  .hero-grid .kpi-grid .kpi:last-child { grid-column: auto; }
  .att-row { grid-template-columns: 40px minmax(0, 1fr) 14px; padding: 12px 16px; }
  .att-right { display: none; }
  .score-badge { width: 40px; height: 40px; font-size: 14px; }
  .card-head, .att-row, .plan-item, .team-row { padding-left: 16px; padding-right: 16px; }
  .chat-head, .chat-meta, .chat-section, .thread-scroll, .chat-actions, .verdict, .mini-metrics { padding-left: 16px; padding-right: 16px; }
  .verdict { margin-left: 16px; margin-right: 16px; }
  .form-row { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; }
  .rail, .topbar, .page-head .page-actions, .toasts, .chat-actions { display: none !important; }
  .view { padding: 0; max-width: none; }
  .paper { border: 0; box-shadow: none; border-radius: 0; padding: 0; }
  .page-head { margin-bottom: 14px; }
}
