/* PrimaOS — design tokens & componentes (origem: Prima os/styles.css). */
/* ============================================================
   PrimaOS — design tokens & theme
   GitHub-dense infra + Notion-calm notes
   ============================================================ */

:root {
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Geist", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-xl: 14px;

  --accent-h: 205;
  --sidebar-w: 248px;
  --topbar-h: 52px;

  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ---------- DARK (default) ---------- */
[data-theme="dark"] {
  --canvas: #0d1117;
  --surface: #12171f;
  --surface-2: #161b22;
  --surface-3: #1c2230;
  --elevated: #1a2029;
  --border: #2a313c;
  --border-muted: #21262d;
  --border-strong: #3a414c;

  --text: #e6edf3;
  --text-2: #9aa5b1;
  --text-3: #6e7681;
  --text-faint: #4d545e;

  --accent: #2e9dff;
  --accent-hover: #57b2ff;
  --accent-press: #0c7ff2;
  --accent-text: #ffffff;
  --accent-soft: rgba(46, 157, 255, 0.13);
  --accent-soft-2: rgba(46, 157, 255, 0.2);
  --accent-line: rgba(46, 157, 255, 0.38);

  --green: #3fb950;
  --green-soft: rgba(63, 185, 80, 0.15);
  --amber: #d29922;
  --amber-soft: rgba(210, 153, 34, 0.15);
  --red: #f85149;
  --red-soft: rgba(248, 81, 73, 0.15);
  --grey: #6e7681;
  --grey-soft: rgba(110, 118, 129, 0.15);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(1, 4, 9, 0.5);
  --shadow-lg: 0 16px 48px rgba(1, 4, 9, 0.65);
  --overlay: rgba(1, 4, 9, 0.7);

  --term-bg: #0a0e14;
  color-scheme: dark;
}

/* ---------- LIGHT ---------- */
[data-theme="light"] {
  --canvas: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --surface-3: #f3f4f6;
  --elevated: #ffffff;
  --border: #d8dee4;
  --border-muted: #e7ebef;
  --border-strong: #c2cad2;

  --text: #1f2328;
  --text-2: #59636e;
  --text-3: #818b96;
  --text-faint: #aab1ba;

  --accent: #0c7ff2;
  --accent-hover: #2e9dff;
  --accent-press: #0a6fd6;
  --accent-text: #ffffff;
  --accent-soft: rgba(12, 127, 242, 0.1);
  --accent-soft-2: rgba(12, 127, 242, 0.16);
  --accent-line: rgba(12, 127, 242, 0.32);

  --green: #1a7f37;
  --green-soft: rgba(26, 127, 55, 0.12);
  --amber: #9a6700;
  --amber-soft: rgba(154, 103, 0, 0.12);
  --red: #cf222e;
  --red-soft: rgba(207, 34, 46, 0.1);
  --grey: #818b96;
  --grey-soft: rgba(129, 139, 150, 0.14);

  --shadow-sm: 0 1px 2px rgba(31, 35, 40, 0.08);
  --shadow-md: 0 8px 24px rgba(31, 35, 40, 0.12);
  --shadow-lg: 0 16px 48px rgba(31, 35, 40, 0.16);
  --overlay: rgba(31, 35, 40, 0.4);

  --term-bg: #0a0e14;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv01", "cv03", "ss01";
}

#root { height: 100%; }

::selection { background: var(--accent-soft-2); }

/* scrollbars */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 100%;
  height: 100%;
  overflow: hidden;
}
.app.collapsed { --sidebar-w: 60px; }

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 36px 80px;
}
.page--wide { max-width: 100%; }
.page.full { max-width: 100%; padding: 24px 40px 80px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border-muted);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.sb-brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-muted);
  flex-shrink: 0;
}
.sb-logo {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.sb-logo span {
  font-weight: 700; color: var(--accent); font-size: 14px;
  font-family: var(--font-mono); letter-spacing: -0.5px;
}
.sb-wordmark {
  font-weight: 600; font-size: 15px; letter-spacing: -0.3px;
  white-space: nowrap; font-family: var(--font-display);
}
.sb-wordmark b { color: var(--text); }
.sb-wordmark i { color: var(--text-3); font-style: normal; font-weight: 500; }

.sb-scroll { flex: 1; overflow-y: auto; padding: 12px 10px; min-height: 0; }
.sb-section { margin-bottom: 6px; }
.sb-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-3);
  padding: 14px 10px 6px;
  display: flex; align-items: center; justify-content: space-between;
}
.sb-label button {
  background: none; border: none; color: var(--text-3); padding: 2px;
  display: grid; place-items: center; border-radius: 4px;
}
.sb-label button:hover { color: var(--text); background: var(--surface-3); }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 13.5px; font-weight: 500;
  border: none; background: none; width: 100%; text-align: left;
  position: relative;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--text); font-weight: 550; }
.nav-item.active .ico { color: var(--accent); }
.nav-item .ico { color: var(--text-3); flex-shrink: 0; }
.nav-item .count {
  margin-left: auto; font-size: 11px; font-family: var(--font-mono);
  color: var(--text-3); background: var(--surface-3);
  padding: 1px 7px; border-radius: 99px; font-weight: 500;
}
.nav-item.active .count { background: var(--accent-soft-2); color: var(--accent); }

.nav-sub {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 10px 6px 12px;
  margin-left: 14px;
  border-left: 1px solid var(--border);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--text-2); font-size: 13px;
  background: none; border-top: none; border-right: none; border-bottom: none;
  width: calc(100% - 14px); text-align: left;
}
.nav-sub:hover { color: var(--text); background: var(--surface-3); }
.nav-sub.active { color: var(--text); border-left-color: var(--accent); }
.proj-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.sb-foot {
  border-top: 1px solid var(--border-muted);
  padding: 10px; flex-shrink: 0;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-muted);
  background: color-mix(in srgb, var(--canvas) 75%, transparent);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px;
  position: sticky; top: 0; z-index: 40;
}
.tb-collapse {
  background: none; border: none; color: var(--text-3);
  display: grid; place-items: center; padding: 6px; border-radius: var(--r-md);
}
.tb-collapse:hover { background: var(--surface-3); color: var(--text); }

.server-select {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 10px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: 13px; font-weight: 500; color: var(--text);
}
.server-select:hover { border-color: var(--border-strong); }
.server-select .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.server-select .meta { color: var(--text-3); font-family: var(--font-mono); font-size: 11.5px; }

.tb-search {
  flex: 1; max-width: 440px;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 11px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-3); font-size: 13px;
}
.tb-search:hover { border-color: var(--border-strong); }
.tb-search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 13px; }
.tb-search input::placeholder { color: var(--text-3); }
.tb-search kbd {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3);
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px;
  background: var(--canvas);
}
.tb-spacer { flex: 1; }
.tb-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  background: none; border: none; color: var(--text-2);
  display: grid; place-items: center; padding: 7px; border-radius: var(--r-md);
  position: relative; transition: background 0.12s, color 0.12s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .dot-badge {
  position: absolute; top: 6px; right: 6px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--red); border: 1.5px solid var(--canvas);
}
.tb-user {
  display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px;
  border-radius: var(--r-md); border: 1px solid transparent;
}
.tb-user:hover { background: var(--surface-3); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 650;
  color: #fff; flex-shrink: 0;
}

/* ============================================================
   PRIMITIVES
   ============================================================ */
.ico { display: inline-flex; flex-shrink: 0; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.status-dot.running { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.status-dot.warning { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.status-dot.stopped { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.status-dot.idle { background: var(--grey); box-shadow: 0 0 0 3px var(--grey-soft); }
@keyframes livepulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
.status-dot.running.live { animation: livepulse 2s var(--ease) infinite; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px 2px 8px; border-radius: 99px;
  font-size: 11.5px; font-weight: 550; line-height: 1.6;
  border: 1px solid transparent; white-space: nowrap;
}
.pill .status-dot { width: 6px; height: 6px; box-shadow: none; }
.pill.running { color: var(--green); background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.pill.warning { color: var(--amber); background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 25%, transparent); }
.pill.stopped { color: var(--red); background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.pill.idle { color: var(--grey); background: var(--grey-soft); border-color: color-mix(in srgb, var(--grey) 25%, transparent); }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 8px; border-radius: var(--r-sm);
  font-size: 11.5px; font-weight: 500;
  background: var(--surface-3); color: var(--text-2);
  border: 1px solid var(--border-muted);
}
.tag .proj-dot { width: 6px; height: 6px; }

.mono { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: -0.2px; }
.dim { color: var(--text-3); }
.muted { color: var(--text-2); }

.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 7px 13px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 550;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  transition: background 0.12s, border-color 0.12s, transform 0.05s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn:active { transform: translateY(0.5px); }
.btn.primary { background: var(--accent-press); border-color: var(--accent-press); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: none; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.btn.danger:hover { background: var(--red-soft); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface-2);
  border: 1px solid var(--border-muted);
  border-radius: var(--r-lg);
}
.card-pad { padding: 18px 20px; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--border-muted);
}
.card-head h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.card-head .ico { color: var(--text-3); }

.page-head { margin-bottom: 22px; }
.page-head .crumbs { font-size: 12.5px; color: var(--text-3); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -0.4px; }
.page-head .sub { margin: 6px 0 0; color: var(--text-2); font-size: 13.5px; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi {
  background: var(--surface-2); border: 1px solid var(--border-muted);
  border-radius: var(--r-lg); padding: 16px 18px;
  position: relative; overflow: hidden;
}
.kpi .label { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 7px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi .val { font-size: 28px; font-weight: 650; letter-spacing: -0.6px; margin-top: 10px; font-family: var(--font-mono); }
.kpi-sub { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.kpi .val small { font-size: 14px; color: var(--text-3); font-weight: 500; }
.kpi .delta { font-size: 11.5px; margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.kpi .delta.up { color: var(--green); }
.kpi .delta.down { color: var(--red); }
.kpi .spark { position: absolute; right: 14px; bottom: 14px; opacity: 0.9; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap {
  background: var(--surface-2); border: 1px solid var(--border-muted);
  border-radius: var(--r-lg); overflow: hidden;
}
.table-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--border-muted);
  flex-wrap: wrap;
}
.seg {
  display: inline-flex; background: var(--surface-3);
  border: 1px solid var(--border-muted); border-radius: var(--r-md); padding: 2px;
}
.seg button {
  border: none; background: none; color: var(--text-2);
  padding: 4px 11px; border-radius: 4px; font-size: 12.5px; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.filter-input {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 10px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--canvas);
  color: var(--text-3); font-size: 12.5px; min-width: 200px;
}
.filter-input input { background: none; border: none; outline: none; color: var(--text); font-size: 12.5px; width: 100%; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data thead th {
  text-align: left; font-weight: 600; font-size: 11px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-3);
  padding: 9px 14px; border-bottom: 1px solid var(--border-muted);
  background: var(--surface); position: sticky; top: 0; z-index: 1;
  white-space: nowrap; user-select: none;
}
table.data thead th.sortable { cursor: pointer; }
table.data thead th.sortable:hover { color: var(--text); }
table.data thead th .ico { vertical-align: -3px; margin-left: 3px; opacity: 0.5; }
table.data thead th.num, table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tbody tr {
  border-bottom: 1px solid var(--border-muted);
  transition: background 0.1s;
}
table.data tbody tr:last-child { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-3); cursor: pointer; }
table.data td { padding: var(--row-pad, 11px) 14px; color: var(--text); vertical-align: middle; }
table.data td.name { font-weight: 550; }
table.data .cell-flex { display: flex; align-items: center; gap: 9px; }

/* density */
[data-density="1"] { --row-pad: 16px; }
[data-density="2"] { --row-pad: 13px; }
[data-density="3"] { --row-pad: 11px; }
[data-density="4"] { --row-pad: 8px; }
[data-density="5"] { --row-pad: 5px; }

/* micro usage bar */
.ubar { width: 64px; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; display: inline-block; vertical-align: middle; }
.ubar > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.ubar.warn > i { background: var(--amber); }
.ubar.crit > i { background: var(--red); }
.usage-cell { display: flex; align-items: center; gap: 9px; justify-content: flex-end; }
.usage-cell .mono { min-width: 44px; text-align: right; }

.port { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); }
.port b { color: var(--text); font-weight: 500; }

/* ============================================================
   CONTAINER DETAIL
   ============================================================ */
.detail-head {
  display: flex; align-items: flex-start; gap: 16px;
  padding-bottom: 18px; margin-bottom: 0;
}
.detail-head .title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-head h1 { font-size: 21px; font-weight: 650; margin: 0; letter-spacing: -0.4px; }
.detail-meta { display: flex; align-items: center; gap: 16px; margin-top: 10px; color: var(--text-3); font-size: 12.5px; flex-wrap: wrap; }
.detail-meta .mi { display: flex; align-items: center; gap: 6px; }
.detail-meta .mi b { color: var(--text-2); font-weight: 500; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-muted); margin-bottom: 22px; }
.tab {
  background: none; border: none; padding: 10px 14px;
  font-size: 13.5px; font-weight: 550; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: flex; align-items: center; gap: 7px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab .ico { color: var(--text-3); }
.tab.active .ico { color: var(--accent); }
.tab .count { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }

/* terminal / logs */
.terminal {
  background: var(--term-bg); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7;
}
.term-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid #1b212b;
  background: #0d121a; color: #6e7681; font-size: 11.5px;
}
.term-bar .live-tag { display: flex; align-items: center; gap: 6px; color: var(--green); font-weight: 600; }
.term-bar .blink { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: livepulse 1.4s infinite; }
.term-body { padding: 12px 16px; height: 62vh; min-height: 460px; overflow-y: auto; color: #c9d3df; }
.log-line { display: flex; gap: 12px; white-space: pre-wrap; word-break: break-word; padding: 0.5px 0; }
.log-line .ts { color: #4d545e; flex-shrink: 0; }
.log-line .lvl { flex-shrink: 0; width: 44px; font-weight: 600; }
.log-line .lvl.INFO { color: #58a6ff; }
.log-line .lvl.WARN { color: var(--amber); }
.log-line .lvl.ERROR { color: var(--red); }
.log-line .lvl.DEBUG { color: #6e7681; }
.log-line .msg { color: #c9d3df; }
.log-line .msg .hl { color: #d2a8ff; }
.log-line .msg .num { color: #7ee787; }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-card { background: var(--surface-2); border: 1px solid var(--border-muted); border-radius: var(--r-lg); padding: 16px 18px; }
.chart-card .ch-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.chart-card .ch-head h4 { margin: 0; font-size: 13px; font-weight: 600; }
.chart-card .ch-val { font-family: var(--font-mono); font-size: 20px; font-weight: 600; letter-spacing: -0.5px; }
.chart-card .ch-val small { font-size: 12px; color: var(--text-3); }
.chart-card .ch-sub { font-size: 11.5px; color: var(--text-3); }

/* env table */
.env-row .key { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); }
.env-row .val { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); }
.secret-val { display: flex; align-items: center; gap: 10px; }
.secret-mask { letter-spacing: 1px; color: var(--text-3); user-select: none; }
.reveal-btn { background: none; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 2px 7px; color: var(--text-3); display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.reveal-btn:hover { color: var(--text); border-color: var(--border-strong); }
.lock-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--amber); background: var(--amber-soft); padding: 1px 7px; border-radius: 99px; font-weight: 550; }

/* ============================================================
   NOTION-STYLE NOTES
   ============================================================ */
.notes-shell { max-width: 100%; margin: 0; min-width: 0; }
.notes-cover {
  height: 76px; border-radius: var(--r-lg); margin-bottom: -32px;
  background: var(--surface-3);
  border: 1px solid var(--border-muted);
  position: relative; overflow: hidden;
}
.notes-cover::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--accent); opacity: 0.55;
}
.notes-icon {
  width: 54px; height: 54px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--accent);
  position: relative; margin-left: 8px;
}
.notes-title {
  font-size: 32px; font-weight: 700; letter-spacing: -0.8px;
  margin: 16px 0 4px; border: none; background: none; color: var(--text);
  width: 100%; outline: none; padding: 0; font-family: var(--font-display);
}
.notes-props { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 10px 0 8px; font-size: 13px; }
.notes-props .np { display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.notes-props .np b { color: var(--text-2); font-weight: 500; min-width: 78px; display: inline-flex; gap: 6px; align-items: center; }
.notes-divider { height: 1px; background: var(--border-muted); margin: 18px 0; }

.doc { font-size: 15px; line-height: 1.75; color: var(--text); }
.doc h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; margin: 30px 0 6px; }
.doc h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.3px; margin: 28px 0 4px; }
.doc h3 { font-size: 15.5px; font-weight: 650; margin: 20px 0 2px; }
.doc p { margin: 8px 0; color: var(--text); }
.doc p.lead { color: var(--text-2); }
.doc ul, .doc ol { margin: 8px 0; padding-left: 24px; }
.doc li { margin: 4px 0; }
.doc li::marker { color: var(--text-3); }
.doc a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-line); }
.doc code {
  font-family: var(--font-mono); font-size: 0.86em;
  background: var(--surface-3); padding: 2px 6px; border-radius: 5px;
  color: var(--accent); border: 1px solid var(--border-muted);
}
.doc pre {
  background: var(--term-bg); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px 16px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; color: #c9d3df;
  margin: 12px 0;
}
.doc pre code { background: none; border: none; color: inherit; padding: 0; }
.doc blockquote {
  border-left: 3px solid var(--accent); margin: 12px 0; padding: 2px 0 2px 16px;
  color: var(--text-2);
}
.callout {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  margin: 14px 0; font-size: 14px; line-height: 1.6;
}
.callout.warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.callout.danger { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.callout .c-ico { font-size: 18px; flex-shrink: 0; line-height: 1.4; display: flex; align-items: flex-start; color: var(--accent); }
.callout.warn .c-ico { color: var(--amber); }
.callout.danger .c-ico { color: var(--red); }
.doc hr { border: none; border-top: 1px solid var(--border-muted); margin: 22px 0; }

.checklist { list-style: none; padding-left: 0; margin: 10px 0; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0; }
.checkbox {
  width: 17px; height: 17px; border-radius: 4px; border: 1.5px solid var(--border-strong);
  flex-shrink: 0; margin-top: 2px; display: grid; place-items: center; background: var(--surface);
}
.checklist li.done .checkbox { background: var(--accent); border-color: var(--accent); }
.checklist li.done span { color: var(--text-3); text-decoration: line-through; }

.slash-hint {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-faint); font-size: 14px; padding: 6px 0;
  opacity: 0; transition: opacity 0.15s; cursor: text;
}
.doc:hover .slash-hint { opacity: 1; }
.slash-hint kbd {
  font-family: var(--font-mono); font-size: 12px; border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; color: var(--text-3); background: var(--surface-3);
}
.editable:focus { outline: none; }
.block-hover { border-radius: 4px; transition: background 0.1s; padding: 0 4px; margin: 0 -4px; }
.block-hover:hover { background: var(--surface-3); }

/* ============================================================
   LOGIN
   ============================================================ */
.login-stage {
  height: 100%; display: grid; place-items: center;
  background: var(--canvas);
  position: relative; overflow: hidden;
}
.login-grid-bg {
  position: absolute; inset: 0; opacity: 0.4;
  background-image:
    linear-gradient(var(--border-muted) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-muted) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent 75%);
}
.login-card {
  width: 380px; position: relative; z-index: 2;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 32px; box-shadow: var(--shadow-md);
}
.login-logo { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 18px; }
.login-logo span { color: var(--accent); font-family: var(--font-mono); font-weight: 700; font-size: 20px; }
.login-card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 650; letter-spacing: -0.3px; font-family: var(--font-display); }
.login-card p.sub { margin: 0 0 22px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 550; margin-bottom: 6px; color: var(--text-2); }
.field .input-wrap { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--canvas); transition: border-color 0.12s, box-shadow 0.12s; }
.field .input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .input-wrap .ico { color: var(--text-3); }
.field input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 14px; }
.field input::placeholder { color: var(--text-faint); }
.btn-full { width: 100%; padding: 10px; font-size: 14px; }
.login-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--text-3); }
.secure-row { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 14px; color: var(--text-3); font-size: 11.5px; }

.code-inputs { display: flex; gap: 10px; justify-content: space-between; margin: 4px 0 18px; }
.code-box {
  width: 100%; aspect-ratio: 1; max-width: 52px; text-align: center;
  font-family: var(--font-mono); font-size: 22px; font-weight: 600;
  border-radius: var(--r-md); border: 1px solid var(--border); background: var(--canvas); color: var(--text);
  outline: none;
}
.code-box:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.code-box.filled { border-color: var(--accent-line); }

/* ============================================================
   MISC LAYOUT HELPERS
   ============================================================ */
.row { display: flex; align-items: center; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.mb0 { margin-bottom: 0; }
.spread { display: flex; align-items: center; justify-content: space-between; }

.alert-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-muted); }
.alert-item:last-child { border-bottom: none; }
.alert-ico { width: 28px; height: 28px; border-radius: var(--r-md); display: grid; place-items: center; flex-shrink: 0; }
.alert-ico.warn { background: var(--amber-soft); color: var(--amber); }
.alert-ico.err { background: var(--red-soft); color: var(--red); }
.alert-ico.ok { background: var(--green-soft); color: var(--green); }
.alert-item .at { font-size: 13px; font-weight: 500; line-height: 1.4; }
.alert-item .as { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.alert-item .when { margin-left: auto; font-size: 11.5px; color: var(--text-3); white-space: nowrap; font-family: var(--font-mono); }

.proj-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--border-muted); border-radius: var(--r-md);
  background: var(--surface-2); transition: border-color 0.12s, background 0.12s;
}
.proj-card:hover { border-color: var(--border-strong); background: var(--surface-3); }
.proj-emblem { width: 38px; height: 38px; border-radius: var(--r-md); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: #fff; flex-shrink: 0; }
.proj-card .pc-name { font-weight: 600; font-size: 14px; }
.proj-card .pc-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.mini-stats { display: flex; gap: 18px; margin-left: auto; }
.mini-stat { text-align: right; }
.mini-stat .n { font-family: var(--font-mono); font-weight: 600; font-size: 15px; }
.mini-stat .l { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }

/* admin */
.role-builder { display: grid; grid-template-columns: 220px 1fr; gap: 0; border: 1px solid var(--border-muted); border-radius: var(--r-lg); overflow: hidden; }
.role-list { border-right: 1px solid var(--border-muted); background: var(--surface); padding: 8px; }
.role-pill { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--r-md); font-size: 13px; font-weight: 500; color: var(--text-2); }
.role-pill:hover { background: var(--surface-3); }
.role-pill.active { background: var(--accent-soft); color: var(--text); }
.role-pill .rc { width: 9px; height: 9px; border-radius: 3px; }
.role-pill .rn { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.perm-grid { padding: 18px 20px; }
.perm-scope { margin-bottom: 18px; }
.perm-scope h5 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); font-weight: 600; }
.perm-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border-muted); }
.perm-row:last-child { border-bottom: none; }
.perm-row .pl { font-size: 13px; }
.perm-row .pl .pd { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }

.toggle { width: 36px; height: 20px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--border); position: relative; transition: background 0.15s, border-color 0.15s; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: 1px; left: 1px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-3); transition: transform 0.15s, background 0.15s; }
.toggle.on { background: var(--accent); border-color: var(--accent); }
.toggle.on::after { transform: translateX(16px); background: #fff; }

.scope-select { display: inline-flex; gap: 4px; background: var(--surface-3); padding: 3px; border-radius: var(--r-md); border: 1px solid var(--border-muted); }
.scope-select button { border: none; background: none; padding: 4px 10px; border-radius: 4px; font-size: 12px; color: var(--text-2); font-weight: 500; }
.scope-select button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* settings */
.settings-grid { display: grid; grid-template-columns: 200px 1fr; gap: 36px; }
.settings-nav { position: sticky; top: 80px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.settings-nav button { text-align: left; background: none; border: none; padding: 7px 11px; border-radius: var(--r-md); color: var(--text-2); font-size: 13px; font-weight: 500; }
.settings-nav button:hover { background: var(--surface-3); color: var(--text); }
.settings-nav button.active { background: var(--accent-soft); color: var(--text); }
.setting-block { margin-bottom: 30px; }
.setting-block h3 { font-size: 15px; font-weight: 600; margin: 0 0 3px; }
.setting-block .desc { font-size: 13px; color: var(--text-2); margin: 0 0 16px; }
.kv-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--border-muted); gap: 16px; }
.kv-row:last-child { border-bottom: none; }
.kv-row .kl { font-size: 13.5px; font-weight: 500; }
.kv-row .kd { font-size: 12px; color: var(--text-3); margin-top: 2px; max-width: 420px; }
.code-inline { font-family: var(--font-mono); font-size: 12px; background: var(--surface-3); padding: 3px 8px; border-radius: 5px; border: 1px solid var(--border-muted); color: var(--text); }

/* images screen status */
.inuse-yes { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 12px; font-weight: 500; }
.inuse-no { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12px; }

/* dropdown menu */
.menu {
  position: absolute; min-width: 200px; background: var(--elevated);
  border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-md); padding: 5px; z-index: 100;
}
.menu-item { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: var(--r-sm); font-size: 13px; color: var(--text); border: none; background: none; width: 100%; text-align: left; }
.menu-item:hover { background: var(--surface-3); }
.menu-item .ico { color: var(--text-3); }
.menu-item.danger { color: var(--red); }
.menu-sep { height: 1px; background: var(--border-muted); margin: 5px 0; }
.menu-head { padding: 8px 9px 6px; }
.menu-head .mn { font-size: 13px; font-weight: 600; }
.menu-head .me { font-size: 11.5px; color: var(--text-3); font-family: var(--font-mono); }

/* fade in */
@keyframes fadeUp { from { transform: translateY(7px); } to { transform: none; } }
.fade-in { animation: fadeUp 0.28s var(--ease); }

/* sparkbars */
.sparkbars { display: flex; align-items: flex-end; gap: 2px; height: 30px; }
.sparkbars i { width: 4px; background: var(--accent-soft-2); border-radius: 2px 2px 0 0; }
.sparkbars i.hot { background: var(--accent); }

/* brand mark */
.brand-tile {
  width: 54px; height: 54px; border-radius: 13px; flex-shrink: 0;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  display: grid; place-items: center;
}
.brandmark.anim .bm-core { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .brandmark.anim .bm-core { animation: bmCore 3.4s ease-in-out infinite; }
  .brandmark.anim .bm-ghost { animation: bmGhost 3.4s ease-in-out infinite; }
}
@keyframes bmCore { 0%, 100% { opacity: 0.18; } 50% { opacity: 0.42; } }
@keyframes bmGhost { 0%, 100% { opacity: 0.28; } 50% { opacity: 0.5; } }

/* ============================================================
   CODE — GitHub-style source browser
   ============================================================ */
.code-view { border: 1px solid var(--border-muted); border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); }
.code-topbar { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border-muted); flex-wrap: wrap; }
.code-repo { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.branch-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-family: var(--font-mono); background: var(--surface-3); border: 1px solid var(--border); padding: 3px 9px; border-radius: 99px; color: var(--text-2); }
.commit-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.commit-row .mono { color: var(--text-3); }
.code-body { display: grid; grid-template-columns: 246px 1fr; min-height: 60vh; }
.code-tree { border-right: 1px solid var(--border-muted); padding: 8px; background: var(--surface); overflow-y: auto; }
.tree-item { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: var(--r-sm); font-size: 13px; color: var(--text-2); cursor: pointer; width: 100%; border: none; background: none; text-align: left; }
.tree-item:hover { background: var(--surface-3); color: var(--text); }
.tree-item.active { background: var(--accent-soft); color: var(--text); }
.tree-item.active .ico { color: var(--accent); }
.tree-item .ico { color: var(--text-3); flex-shrink: 0; }
.tree-item.folder { color: var(--text); font-weight: 500; cursor: default; }
.code-main { display: flex; flex-direction: column; min-width: 0; }
.code-filebar { display: flex; align-items: center; gap: 9px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--border-muted); font-size: 12.5px; color: var(--text-3); }
.code-filebar .path { font-family: var(--font-mono); color: var(--text-2); }
.code-scroll { overflow: auto; background: var(--term-bg); flex: 1; }
.code-pre { display: flex; min-width: min-content; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; }
.code-gutter { text-align: right; padding: 14px 14px 14px 16px; color: #4d545e; user-select: none; border-right: 1px solid #1b212b; flex-shrink: 0; }
.code-lines { padding: 14px 18px; color: #c9d3df; white-space: pre; flex: 1; }
.tok-k { color: #ff7b72; }
.tok-s { color: #a5d6ff; }
.tok-c { color: #8b949e; font-style: italic; }
.tok-n { color: #79c0ff; }
.tok-f { color: #d2a8ff; }

/* ============================================================
   STACK TOPOLOGY — n8n-style flow
   ============================================================ */
.flow-wrap { border: 1px solid var(--border-muted); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.flow-toolbar { display: flex; align-items: center; gap: 16px; padding: 11px 16px; border-bottom: 1px solid var(--border-muted); flex-wrap: wrap; }
.flow-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-3); }
.flow-legend span { display: inline-flex; align-items: center; gap: 6px; }
.flow-canvas {
  position: relative; overflow: auto; height: 64vh; min-height: 470px;
  background-color: var(--canvas);
  background-image: radial-gradient(var(--border) 1.1px, transparent 1.1px);
  background-size: 22px 22px;
}
.flow-inner { position: relative; }
.flow-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.flow-edge { fill: none; stroke: var(--accent); stroke-width: 1.7; opacity: 0.55; stroke-dasharray: 5 7; animation: flowdash 0.9s linear infinite; }
.flow-edge.faint { opacity: 0.16; stroke: var(--text-3); stroke-dasharray: 2 6; animation: none; }
@keyframes flowdash { to { stroke-dashoffset: -24; } }
@media (prefers-reduced-motion: reduce) { .flow-edge { animation: none; } }

.flow-node {
  position: absolute; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 0 13px 0 16px; display: flex; flex-direction: column; justify-content: center; gap: 7px;
  box-shadow: var(--shadow-sm); transition: border-color 0.12s, transform 0.08s; overflow: hidden;
}
.flow-node::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.flow-node.s-running::before { background: var(--green); }
.flow-node.s-warning::before { background: var(--amber); }
.flow-node.s-stopped::before { background: var(--red); }
.flow-node.s-idle::before { background: var(--grey); }
.flow-node.synthetic { background: var(--surface-3); border-style: dashed; }
.flow-node.synthetic::before { background: var(--accent); }
.flow-node.stopped { opacity: 0.6; }
.flow-node:not(.synthetic):hover { border-color: var(--accent-line); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.fn-ico { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; color: var(--accent); flex-shrink: 0; }
.flow-node.synthetic .fn-ico { background: var(--accent-soft); }
.fn-row { display: flex; align-items: center; gap: 10px; }
.fn-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-meta { font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-num { font-family: var(--font-mono); color: var(--text-2); }
.fn-handle { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent-line); top: 50%; transform: translateY(-50%); z-index: 2; }
.fn-handle.in { left: -5px; }
.fn-handle.out { right: -5px; }

/* ============================================================
   NOTES — wide two-column with outline rail
   ============================================================ */
.notes-layout { display: grid; grid-template-columns: minmax(0, 1fr) 244px; gap: 56px; max-width: 1180px; margin: 0 auto; align-items: start; }
.notes-rail { position: sticky; top: 18px; padding-top: 132px; }
.rail-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); padding: 0 12px 8px; font-family: var(--font-display); }
.rail-toc { display: flex; flex-direction: column; gap: 1px; border-left: 1px solid var(--border-muted); }
.toc-link { text-align: left; background: none; border: none; border-left: 2px solid transparent; margin-left: -1px; padding: 5px 12px; font-size: 12.5px; color: var(--text-3); cursor: pointer; line-height: 1.4; }
.toc-link.sub { padding-left: 24px; font-size: 12px; }
.toc-link:hover, .toc-link.active { color: var(--text); border-left-color: var(--accent); }
@media (max-width: 1080px) { .notes-layout { grid-template-columns: 1fr; } .notes-rail { display: none; } }

/* project single-page section headers */
.sec-head { display: flex; align-items: baseline; gap: 11px; margin: 34px 0 14px; }
.sec-head .ico { color: var(--text-3); align-self: center; }
.sec-head h2 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.2px; font-family: var(--font-display); }
.sec-sub { color: var(--text-3); font-size: 12.5px; }

/* service filter chips + project log service tag */
.svc-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 500; }
.svc-chip .ico { color: var(--text-3); }
.svc-chip:hover { border-color: var(--border-strong); color: var(--text); }
.svc-chip.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }
.svc-chip.active .ico { color: var(--accent); }
.log-svc { color: var(--accent); flex-shrink: 0; width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

/* tech/startup display type — headings + console labels */
.page-head h1, .detail-head h1, .doc h1, .doc h2,
.sb-label, table.data thead th, .kpi .label,
.perm-scope h5, .mini-stat .l, .setting-block h3, .menu-head .mn {
  font-family: var(--font-display);
}
.page-head h1, .detail-head h1 { letter-spacing: -0.6px; }
.sb-label, table.data thead th, .kpi .label, .perm-scope h5, .mini-stat .l { letter-spacing: 0.02em; }
