/* ==========================================================================
   Nodescape DMARC — design system
   Ink rail · cool canvas · cobalt accent (overridable in Settings)
   Signature: the enforcement track (none → quarantine → reject) and the domain map
   ========================================================================== */

@font-face { font-family: "Plex Sans"; src: url("../fonts/plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("../fonts/plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("../fonts/plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("../fonts/plex-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --accent: #2d5bff;
  --accent-ink: #fff;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --accent-text: color-mix(in srgb, var(--accent) 88%, #000);

  --ink: #14263a;          /* rail, headings */
  --ink-2: #1d3349;
  --canvas: #f2f4f6;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --line: #e1e5ea;
  --line-soft: #edf0f3;
  --text: #17222e;
  --text-2: #4a5868;
  --muted: #7d8a99;

  --pass: #14805e;  --pass-bg: #e3f4ec;  --pass-fill: #1f9d72;
  --ok: #4b7d12;    --ok-bg: #edf5e1;    --ok-fill: #86b33a;
  --warn: #b86e00;  --warn-bg: #fdf1dd;  --warn-fill: #e59a1c;
  --fail: #c93a4e;  --fail-bg: #fbe8eb;  --fail-fill: #d64a5f;
  --info: #2552c7;  --info-bg: #e7edfd;
  --none-fill: #c5ccd4;

  --rail: #14263a;
  --rail-text: #b8c4d1;
  --rail-dim: #6f8296;
  --rail-hover: rgba(255,255,255,.06);
  --rail-active: rgba(255,255,255,.1);

  --r-panel: 14px; --r-ctrl: 9px; --r-chip: 999px;
  --shadow-float: 0 12px 32px -12px rgba(20,38,58,.28), 0 2px 6px rgba(20,38,58,.08);
  --sans: "Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6ecf2; --ink-2: #c9d3dd;
    --canvas: #0e1620; --surface: #15202c; --surface-2: #1a2633; --line: #263445; --line-soft: #1f2c3a;
    --text: #e3e9ef; --text-2: #aab6c3; --muted: #758597;
    --accent-text: color-mix(in srgb, var(--accent) 55%, #fff);
    --accent-soft: color-mix(in srgb, var(--accent) 20%, transparent);
    --pass: #4fd1a1; --pass-bg: #123528; --ok: #a8d46c; --ok-bg: #1f3214;
    --warn: #f5b84d; --warn-bg: #36280e; --fail: #f2788a; --fail-bg: #3b1820; --info: #8eaaff; --info-bg: #17284d;
    --none-fill: #3a4a5c;
    --rail: #0a121b; --rail-hover: rgba(255,255,255,.05); --rail-active: rgba(255,255,255,.08);
    --shadow-float: 0 12px 32px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.55 var(--sans); background: var(--canvas); color: var(--text); font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1 { font-size: 26px; line-height: 1.2; margin: 0; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
h2 { font-size: 15px; margin: 0 0 14px; font-weight: 600; color: var(--ink); }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 600; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--surface-2); border: 1px solid var(--line-soft); padding: 1px 5px; border-radius: 5px; word-break: break-word; }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctrl); padding: 11px 13px; overflow: auto; white-space: pre-wrap; word-break: break-all; margin: 0; line-height: 1.6; }
pre code, .kv code { background: none; border: 0; padding: 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- App frame ---------- */
body.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--rail); color: var(--rail-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 11px; align-items: center; padding: 22px 22px 18px; color: #fff; font-weight: 600; font-size: 15.5px; letter-spacing: -.01em; }
.brand img { max-height: 30px; max-width: 150px; }
.brand:hover { text-decoration: none; }
.brand .sub { display: block; font-size: 11.5px; color: var(--rail-dim); font-weight: 500; letter-spacing: 0; }
.sidebar nav { display: flex; flex-direction: column; gap: 1px; padding: 6px 12px; flex: 1; }
.sidebar nav a { color: var(--rail-text); padding: 8px 10px; border-radius: 8px; display: flex; gap: 11px; align-items: center; font-weight: 500; }
.sidebar nav a .icon { color: var(--rail-dim); }
.sidebar nav a:hover { background: var(--rail-hover); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: var(--rail-active); color: #fff; }
.sidebar nav a.active .icon { color: color-mix(in srgb, var(--accent) 70%, #fff); }
.sidebar nav a .grow { flex: 1; }
.navhead { color: var(--rail-dim); font-size: 12px; font-weight: 500; padding: 18px 10px 6px; }
.badge { background: var(--fail-fill); color: #fff; border-radius: var(--r-chip); font-size: 11px; padding: 0 7px; font-weight: 600; line-height: 18px; min-width: 20px; text-align: center; }
.badge.muted { background: rgba(255,255,255,.14); color: var(--rail-text); }
.me { margin: 12px; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.04); display: flex; align-items: center; gap: 10px; font-size: 13px; }
.me .avatar { width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 60%, #14263a); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12.5px; flex: none; }
.me .who { flex: 1; min-width: 0; line-height: 1.3; }
.me .who a { color: #fff; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.me .who span { color: var(--rail-dim); font-size: 12px; }
.me form { margin: 0; }
.linkbtn { background: none; border: 0; color: var(--rail-dim); cursor: pointer; font: inherit; padding: 4px; border-radius: 6px; display: grid; }
.linkbtn:hover { color: #fff; background: var(--rail-hover); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 12px 36px; position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--canvas) 86%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line-soft); }
.crumbs { flex: 1; color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; min-width: 0; }
.crumbs a { color: var(--text-2); }
.search { position: relative; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.topbar .search input { width: 280px; padding-left: 34px; padding-right: 36px; background: var(--surface); }
.search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 500 11px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; background: var(--surface-2); }
.iconbtn { background: none; border: 0; cursor: pointer; color: var(--text); padding: 6px; border-radius: 8px; display: grid; }
.menu { display: none; }
.content { padding: 28px 36px 56px; max-width: 1480px; width: 100%; }
body.bare { background: var(--canvas); }

/* ---------- Page header ---------- */
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.pagehead .sub { color: var(--muted); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px 22px; margin-bottom: 20px; min-width: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush > h2, .panel.flush > .panelhead { padding: 18px 22px 4px; }
.panelhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.panelhead h2 { margin: 0; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.chartbox { position: relative; height: 290px; }
.chartbox.sm { height: 210px; }

/* KPI strip: one surface, divided — not a row of floating cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); margin-bottom: 20px; overflow: hidden; }
.kpi { padding: 16px 22px 18px; border-left: 1px solid var(--line-soft); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi .label { color: var(--text-2); font-size: 13px; font-weight: 500; }
.kpi .value { font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; margin: 4px 0 3px; color: var(--ink); }
.kpi .delta { font-size: 12.5px; color: var(--muted); }
.kpi .delta.up { color: var(--pass); } .kpi .delta.down { color: var(--fail); }
.kpi.good .value { color: var(--pass); } .kpi.bad .value { color: var(--fail); } .kpi.warn .value { color: var(--warn); }

/* ---------- Tables ---------- */
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t th a { color: inherit; }
table.t th a:hover { color: var(--text); }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: var(--surface-2); }
table.t td:first-child, table.t th:first-child { padding-left: 22px; }
table.t td:last-child, table.t th:last-child { padding-right: 22px; }
table.t .num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t td.wrap { word-break: break-all; }
table.t.compact td, table.t.compact th { padding-top: 8px; padding-bottom: 8px; }
table.t strong { font-weight: 600; }
details > summary { cursor: pointer; color: var(--accent-text); }

/* ---------- Status vocabulary ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 1px 9px; border-radius: var(--r-chip); background: var(--surface-2); color: var(--text-2); white-space: nowrap; border: 1px solid var(--line-soft); line-height: 19px; }
.tag.good { background: var(--pass-bg); color: var(--pass); border-color: transparent; } .tag.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.tag.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; } .tag.bad { background: var(--fail-bg); color: var(--fail); border-color: transparent; }
.tag.info { background: var(--info-bg); color: var(--info); border-color: transparent; } .tag.muted { color: var(--muted); }
.pct { font-weight: 600; font-variant-numeric: tabular-nums; }
.pct.good, .res.good { color: var(--pass); } .pct.ok { color: var(--ok); } .pct.warn, .res.warn { color: var(--warn); } .pct.bad, .res.bad { color: var(--fail); }
.res { font-weight: 600; font-size: 12.5px; }
.score { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 7px; font-weight: 600; font-size: 12.5px; }
.score.good { background: var(--pass-bg); color: var(--pass); } .score.warn { background: var(--warn-bg); color: var(--warn); } .score.bad { background: var(--fail-bg); color: var(--fail); }
.bar { height: 6px; background: var(--line-soft); border-radius: 3px; overflow: hidden; min-width: 64px; flex: 1; max-width: 120px; }
.bar span { display: block; height: 100%; background: var(--pass-fill); border-radius: 3px; }
.bar span.ok { background: var(--ok-fill); } .bar span.warn { background: var(--warn-fill); } .bar span.bad { background: var(--fail-fill); }
.spark { color: var(--accent); vertical-align: middle; }

/* Enforcement track — mini (tables) */
.track { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.track .steps { display: inline-grid; grid-template-columns: repeat(3, 12px); gap: 2px; }
.track .steps i { height: 6px; border-radius: 2px; background: var(--line); }
.track.s1 .steps i:nth-child(-n+1) { background: var(--warn-fill); }
.track.s2 .steps i:nth-child(-n+2) { background: var(--ok-fill); }
.track.s3 .steps i { background: var(--pass-fill); }
.track.s0 { color: var(--muted); }

/* Enforcement track — full (domain header) */
.journey { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); margin-bottom: 20px; overflow: hidden; }
.journey .stop { padding: 16px 20px 16px 22px; position: relative; border-left: 1px solid var(--line-soft); }
.journey .stop:first-child { border-left: 0; }
.journey .stop::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--line-soft); }
.journey .stop.done::before { background: var(--pass-fill); }
.journey .stop.here::before { background: var(--accent); }
.journey .stop .k { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.journey .stop .t { font-weight: 600; color: var(--ink); margin: 2px 0 2px; display: flex; align-items: center; gap: 8px; }
.journey .stop .d { font-size: 12.5px; color: var(--text-2); }
.journey .stop.here { background: var(--accent-soft); }
.journey .stop.here .t::after { content: "Current"; font-size: 11px; font-weight: 600; color: var(--accent-ink); background: var(--accent); border-radius: var(--r-chip); padding: 0 8px; line-height: 18px; }
.journey .stop.next .t::after { content: "Next step"; font-size: 11px; font-weight: 600; color: var(--accent-text); border: 1px solid currentColor; border-radius: var(--r-chip); padding: 0 7px; line-height: 16px; }
.journey .stop.locked .t, .journey .stop.locked .d { color: var(--muted); }

/* Domain map (overview hero) */
.estate { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); margin-bottom: 20px; overflow: hidden; }
.estate .map { padding: 20px 22px; min-width: 0; }
.estate .map h2 { margin-bottom: 4px; }
.estate .map .lede { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.estate .rows { display: grid; gap: 10px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.estate .row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: start; }
.estate .row .who { font-size: 13px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-top: 3px; }
.estate .row .who a { color: inherit; }
.tiles { display: flex; flex-wrap: wrap; gap: 5px; }
.tile { width: 26px; height: 26px; border-radius: 7px; display: block; position: relative; border: 2px solid var(--c, var(--none-fill)); background: transparent; transition: transform .12s; }
.tile.f2 { background: linear-gradient(135deg, var(--c) 0 50%, transparent 50%); }
.tile.f3 { background: var(--c); }
.tile:hover { transform: scale(1.15); text-decoration: none; z-index: 1; }
.tile.c-good { --c: var(--pass-fill); } .tile.c-ok { --c: var(--ok-fill); } .tile.c-warn { --c: var(--warn-fill); } .tile.c-bad { --c: var(--fail-fill); } .tile.c-none { --c: var(--none-fill); }
.tile.alert::after { content: ""; position: absolute; top: -4px; right: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--fail-fill); border: 2px solid var(--surface); }
.estate .side { border-left: 1px solid var(--line-soft); padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; background: var(--surface-2); }
.estate .big { font-size: 48px; font-weight: 600; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.estate .big small { font-size: 22px; letter-spacing: -.02em; }
.estate .side .cap { color: var(--text-2); font-size: 13px; margin-top: 6px; }
.estate .side dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 13px; }
.estate .side dt { color: var(--text-2); } .estate .side dd { margin: 0; font-weight: 600; text-align: right; }
.maplegend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--text-2); }
.maplegend span { display: inline-flex; align-items: center; gap: 6px; }
.maplegend .tile { width: 14px; height: 14px; border-radius: 4px; border-width: 2px; }
.maplegend .tile:hover { transform: none; }

/* ---------- Callouts & flash ---------- */
.callout { border-radius: var(--r-panel); padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 20px; display: flex; gap: 14px; align-items: flex-start; }
.callout > .icon, .callout > svg { margin-top: 2px; }
.callout.ok { background: var(--pass-bg); border-color: transparent; } .callout.ok > svg { color: var(--pass); }
.callout.warning { background: var(--warn-bg); border-color: transparent; } .callout.warning > svg { color: var(--warn); }
.callout.info { background: var(--info-bg); border-color: transparent; } .callout.info > svg { color: var(--info); }
.callout.critical { background: var(--fail-bg); border-color: transparent; } .callout.critical > svg { color: var(--fail); }
.callout > div > strong:first-child { display: block; margin-bottom: 2px; color: var(--ink); }
.callout .icon:not(svg) { display: none; } /* legacy text glyph icons */
.flash { background: var(--pass-bg); color: var(--pass); padding: 11px 16px; border-radius: var(--r-ctrl); margin-bottom: 18px; font-weight: 500; animation: flashin .35s ease-out; }
.flash.error { background: var(--fail-bg); color: var(--fail); }
@keyframes flashin { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- Forms ---------- */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input:not([type]), select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctrl); padding: 8px 11px; width: 100%; transition: border-color .12s, box-shadow .12s; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--line) 50%, var(--muted)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=color] { padding: 3px; height: 38px; cursor: pointer; }
textarea { min-height: 88px; font-family: var(--mono); font-size: 12.5px; }
label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 5px; color: var(--text); }
.field { margin-bottom: 16px; }
.field .hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; font-weight: 400; }
.check { display: flex; gap: 9px; align-items: center; font-weight: 400; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 500; font-size: 13.5px; padding: 7px 14px; border-radius: var(--r-ctrl); border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--line) 50%, var(--muted)); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.danger { color: var(--fail); }
.btn.danger:hover { background: var(--fail-bg); border-color: transparent; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn .icon { width: 16px; height: 16px; }
.inline { display: inline; margin: 0; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctrl); padding: 3px; gap: 2px; }
.seg a { padding: 4px 11px; color: var(--text-2); font-size: 13px; border-radius: 6px; font-weight: 500; }
.seg a:hover { color: var(--text); text-decoration: none; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20,38,58,.12), 0 0 0 1px var(--line); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs a { padding: 9px 12px 11px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 18px; }
.filters .field { margin: 0; min-width: 170px; }
.dropzone { border: 1.5px dashed color-mix(in srgb, var(--line) 40%, var(--muted)); border-radius: var(--r-panel); padding: 44px 24px; text-align: center; color: var(--text-2); background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone .icon { width: 30px; height: 30px; color: var(--accent); margin-bottom: 8px; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 9px 16px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
.empty { text-align: center; padding: 44px 18px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; font-weight: 600; }
.pager { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; align-items: center; color: var(--muted); border-top: 1px solid var(--line-soft); }
.step { display: flex; gap: 14px; margin-bottom: 16px; }
.step .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 600; font-size: 13px; }

/* ---------- Sign-in ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.auth-brand { background: var(--rail); color: #dbe4ee; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-brand .brand { padding: 0; }
.auth-brand h2 { color: #fff; font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; max-width: 19ch; margin: 0 0 14px; }
.auth-brand p { color: #9fb0c2; max-width: 40ch; margin: 0; }
.auth-brand .art { margin: 32px 0; max-width: 420px; }
.auth-brand .foot { font-size: 12.5px; color: #6f8296; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.authcard { width: 100%; max-width: 380px; }
.authcard h1 { margin-bottom: 6px; }
.authcard .sub { color: var(--muted); margin-bottom: 26px; }
.authcard .btn.primary { width: 100%; padding: 10px; font-size: 14px; }

@media (max-width: 1180px) { .g3, .g-2-1 { grid-template-columns: 1fr; } .estate { grid-template-columns: 1fr; } .estate .side { border-left: 0; border-top: 1px solid var(--line-soft); } }
@media (max-width: 900px) {
  body.app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -270px; width: 256px; z-index: 20; transition: left .2s ease; }
  body.nav-open .sidebar { left: 0; box-shadow: var(--shadow-float); }
  .menu { display: grid; }
  .g2 { grid-template-columns: 1fr; }
  .content { padding: 18px 16px 40px; }
  .topbar { padding: 10px 16px; }
  .topbar .search input { width: 170px; }
  .search kbd { display: none; }
  .kv { grid-template-columns: 1fr; }
  .crumbs { display: none; }
  .topbar .search { flex: 1; } .topbar .search input { width: 100%; }
  .journey .stop { padding: 12px 12px 10px; }
  .journey .stop .k, .journey .stop .d { display: none; }
  .journey .stop .t { font-size: 13px; flex-wrap: wrap; gap: 4px; }
  .journey .stop.here .t::after, .journey .stop.next .t::after { font-size: 10px; }
  .estate .row { grid-template-columns: 1fr; gap: 6px; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 28px 24px; }
  .auth-brand .art, .auth-brand p, .auth-brand .foot { display: none; }
  .auth-brand h2 { font-size: 22px; margin: 18px 0 0; }
  h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  .sidebar, .topbar, .actions, .noprint, .tabs { display: none !important; }
  body.app { display: block; background: #fff; }
  .panel, .kpis, .journey { break-inside: avoid; }
  .content { padding: 0; }
}
