


:root {
  --background: #ffffff;
  --foreground: #171717;
}



@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

.landing-glow {
  position: fixed;
  border-radius: 9999px;
  filter: blur(48px);
  pointer-events: none;
  opacity: 0.36;
  will-change: transform;
  animation: drift 16s ease-in-out infinite;
}

.landing-glow-a {
  height: 22rem;
  width: 22rem;
  top: -6rem;
  left: -5rem;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.45), rgba(34, 211, 238, 0));
}

.landing-glow-b {
  height: 24rem;
  width: 24rem;
  bottom: -9rem;
  right: -7rem;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.38), rgba(251, 146, 60, 0));
  animation-delay: -6s;
}

.landing-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: radial-gradient(rgba(255, 255, 255, 0.6) 0.6px, transparent 0.6px);
  background-size: 4px 4px;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0.45rem, -0.6rem, 0) scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-glow {
    animation: none;
  }
}

/* ============================================================
   Routant Console — Design System (from console.css)
   ============================================================ */

:root {
  --canvas: #f7f9fc; --surface: #ffffff; --surface-2: #f1f5fa; --surface-3: #e9eef6;
  --line: #dde5ef; --line-2: #e6ecf3; --line-strong: #c3cedd;
  --ink-1: #0b1220; --ink-2: #4a586b; --ink-3: #8190a3;
  --accent: #1d4ed8; --accent-deep: #1a43b8; --accent-soft: rgba(29,78,216,0.08);
  --accent-line: rgba(29,78,216,0.26); --cyan: #0e7490; --cyan-bright: #06b6d4;
  --cyan-soft: rgba(8,145,178,0.10); --cyan-line: rgba(8,145,178,0.26);
  --allow: #15803d; --deny: #dc2626; --hold: #b45309; --info: #0e7490;
  --allow-soft: rgba(21,128,61,0.11); --deny-soft: rgba(220,38,38,0.10);
  --hold-soft: rgba(180,83,9,0.12); --info-soft: rgba(14,116,144,0.11);
  --dk: #0b1322; --dk2: #0e1830; --dk-line: rgba(255,255,255,0.10);
  --dk-ink: #e7eef7; --dk-mut: #93a3b8; --dk-faint: #5d6b80; --dk-accent: #22d3ee;
  --side-bg: #eef2f8; --side-line: #dbe3ee;
  --shadow-sm: 0 1px 2px rgba(11,18,32,0.05), 0 1px 3px rgba(11,18,32,0.04);
  --shadow-md: 0 6px 22px rgba(11,18,32,0.08), 0 2px 6px rgba(11,18,32,0.05);
  --shadow-lg: 0 24px 60px rgba(11,18,32,0.16), 0 6px 16px rgba(11,18,32,0.07);
  --r-sm: 7px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px;
  --fs: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fm: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --side-w: 252px; --top-h: 56px;
}

::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 20px; border: 3px solid var(--canvas); }

.mono { font-family: var(--fm); }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.accent { color: var(--accent); }

/* ---- App frame ---- */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ---- top bar (dark) ---- */
.topbar {
  height: var(--top-h); flex: none; display: flex; align-items: stretch;
  background: var(--dk); color: var(--dk-ink); border-bottom: 1px solid var(--dk-line);
  position: relative; z-index: 20;
}
.topbar-brand {
  width: var(--side-w); flex: none; display: flex; align-items: center; gap: 11px;
  padding: 0 18px; border-right: 1px solid var(--dk-line);
}
.brand-tile {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: #0e1a2c; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}
.brand-tile svg { width: 18px; height: 20px; overflow: visible; }
.brand-tile path { stroke: var(--dk-accent); stroke-width: 2.3; stroke-linecap: round; fill: none; }
.brand-wm { font-weight: 800; font-size: 15px; letter-spacing: -0.035em; color: #fff; }
.brand-wm .labs { color: var(--dk-faint); font-weight: 600; margin-left: 5px; letter-spacing: 0.01em; }
.topbar-main { flex: 1; display: flex; align-items: center; gap: 16px; padding: 0 22px; min-width: 0; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dk-mut); min-width: 0; flex-wrap: nowrap; white-space: nowrap; }
.crumb .sep { color: var(--dk-faint); display: inline-flex; }
.crumb .cur { color: #fff; font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar .health-chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--dk-mut); font-weight: 500;
  padding: 5px 11px; border-radius: 20px; border: 1px solid var(--dk-line); background: rgba(255,255,255,0.04); white-space: nowrap;
}
.topbar .icon-btn { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--dk-mut); }
.topbar .icon-btn:hover { background: rgba(255,255,255,0.06); color: #fff; }
.topbar .icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topbar .avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--cyan-bright)); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.topbar .account-trigger { border: none; cursor: pointer; font-family: inherit; }
.topbar .account-trigger:hover { box-shadow: 0 0 0 3px rgba(34,211,238,.18); }
.account-menu {
  position: absolute; right: 18px; top: calc(var(--top-h) - 5px); width: 244px; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); color: var(--ink-1); overflow: hidden;
}
.account-menu-head { padding: 13px 14px; border-bottom: 1px solid var(--line); }
.account-name { display: block; font-size: 13.5px; font-weight: 700; }
.account-email { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 11px 14px;
  font-size: 13px; font-weight: 600; color: var(--ink-2); background: transparent; border: none; cursor: pointer; text-align: left;
}
.account-menu-item:hover { background: var(--surface-2); color: var(--ink-1); }
.account-menu-item svg { stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; flex: none; box-shadow: 0 0 0 3px rgba(52,211,153,.16); animation: livepulse 2.4s infinite; }
.live-dot.down { background: var(--deny); box-shadow: 0 0 0 3px var(--deny-soft); animation: none; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.3); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---- body grid ---- */
.body { flex: 1; display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 0; }

/* ---- sidebar (light) ---- */
.side { background: var(--side-bg); border-right: 1px solid var(--side-line); display: flex; flex-direction: column; min-height: 0; }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px 6px; }
.side-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-color: var(--side-bg); }
.nav-section { margin-bottom: 2px; }
.nav-label {
  font-family: var(--fm); font-size: 9.5px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-3); padding: 14px 10px 6px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 8.5px 11px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
  color: var(--ink-2); position: relative; text-align: left; margin-bottom: 1px;
  transition: background .14s ease, color .14s ease; white-space: nowrap;
}
.nav-item svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: rgba(11,18,32,0.045); color: var(--ink-1); }
.nav-item.on { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.nav-item.on svg { stroke: var(--accent); }
.nav-item.on::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 3px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-chev { margin-left: auto; transition: transform .18s ease; opacity: .55; }
.nav-chev.open { transform: rotate(180deg); }
.nav-badge {
  margin-left: auto; background: var(--hold); color: #fff; border-radius: 20px;
  min-width: 19px; height: 18px; font-size: 10.5px; font-weight: 800;
  display: grid; place-items: center; padding: 0 6px; font-family: var(--fm);
}
.nav-children { margin: 1px 0 4px; padding-left: 11px; margin-left: 19px; border-left: 1px solid var(--side-line); display: flex; flex-direction: column; gap: 1px; }
.nav-sub {
  display: flex; align-items: center; gap: 8px; padding: 6.5px 10px; border-radius: 7px;
  font-size: 13px; color: var(--ink-2); font-weight: 500; transition: background .14s, color .14s;
}
.nav-sub:hover { background: rgba(11,18,32,0.04); color: var(--ink-1); }
.nav-sub.on { color: var(--accent-deep); font-weight: 600; }
.dot-rail { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); flex: none; }
.side-foot { flex: none; padding: 10px 12px 14px; border-top: 1px solid var(--side-line); }
.org-switch {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--line); width: 100%; transition: border-color .14s; box-shadow: var(--shadow-sm);
}
.org-switch:hover { border-color: var(--line-strong); }
.org-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--allow); flex: none; box-shadow: 0 0 0 3px var(--allow-soft); }
.org-name { flex: 1; min-width: 0; text-align: left; }
.org-name .n { display: block; font-size: 13px; font-weight: 600; color: var(--ink-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-name .r { display: block; font-size: 11px; color: var(--ink-3); }
.org-switch .chev { color: var(--ink-3); }

/* ---- main column ---- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; }
.page { max-width: 1340px; margin: 0 auto; padding: 28px 30px 64px; }

/* ---- page header ---- */
.page-head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.page-head .ph-text { min-width: 0; }
.page-head h1 { font-size: 24px; letter-spacing: -0.035em; }
.page-head .sub { margin-top: 6px; font-size: 14px; color: var(--ink-2); max-width: 76ch; }
.page-head .ph-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s, box-shadow .2s, transform .1s;
  cursor: pointer; font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-deep); box-shadow: 0 6px 18px rgba(29,78,216,.26); }
.btn-ink { background: var(--ink-1); color: #fff; }
.btn-ink:hover { opacity: .9; }
.btn-ghost { background: var(--surface); color: var(--ink-1); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-3); background: var(--surface-2); }
.btn-quiet { background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--surface-3); color: var(--ink-1); }
.btn-allow { background: var(--allow); color: #fff; } .btn-allow:hover { filter: brightness(.95); }
.btn-deny { background: var(--surface); color: var(--deny); border-color: color-mix(in oklab, var(--deny) 32%, transparent); }
.btn-deny:hover { background: var(--deny-soft); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 6px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 14.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---- Cards & layout ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.card-head .ch-meta { margin-left: auto; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 10px; }
.card-title-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.card-title-ico svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  padding: 11px 16px; text-align: left; color: var(--ink-3); font-family: var(--fm);
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.grid { display: grid; gap: 16px; }
.g-12 { grid-template-columns: repeat(12, 1fr); }
.section-label {
  font-family: var(--fm); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; white-space: nowrap;
}
.section-label .ln { height: 1px; flex: 1; background: var(--line); }

/* ---- stat tiles ---- */
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat .s-top { display: flex; align-items: center; gap: 8px; }
.stat .s-label { font-size: 12px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.stat .s-ico { margin-left: auto; color: var(--ink-3); }
.stat .s-ico svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat .s-val { font-size: 30px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.stat .s-val .u { font-size: 15px; font-weight: 600; color: var(--ink-3); letter-spacing: -0.02em; margin-left: 3px; }
.stat .s-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-3); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-family: var(--fm); font-size: 11px; }
.delta.up { color: var(--allow); } .delta.down { color: var(--deny); } .delta.flat { color: var(--ink-3); }
.stat.attn { border-color: var(--accent-line); }
.stat.attn .s-val { color: var(--accent); }
.stat-spark { position: absolute; right: 0; bottom: 0; left: 0; height: 30px; opacity: .9; pointer-events: none; }

/* ---- Pills / badges ---- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--fm); font-size: 10.5px;
  font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 8px 3px 7px;
  border-radius: 5px; border: 1px solid transparent; white-space: nowrap;
}
.pill .d { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.pill.allow { color: var(--allow); background: var(--allow-soft); border-color: color-mix(in oklab, var(--allow) 26%, transparent); }
.pill.deny { color: var(--deny); background: var(--deny-soft); border-color: color-mix(in oklab, var(--deny) 28%, transparent); }
.pill.hold { color: var(--hold); background: var(--hold-soft); border-color: color-mix(in oklab, var(--hold) 28%, transparent); }
.pill.info { color: var(--info); background: var(--info-soft); border-color: color-mix(in oklab, var(--info) 26%, transparent); }
.pill.accent { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.pill.neutral { color: var(--ink-2); background: var(--surface-3); border-color: var(--line-2); }
.risk {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 5px;
  font-family: var(--fm); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.risk.critical { background: var(--deny-soft); color: var(--deny); }
.risk.high { background: var(--hold-soft); color: var(--hold); }
.risk.medium { background: var(--info-soft); color: var(--info); }
.risk.low { background: var(--allow-soft); color: var(--allow); }
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--fm); font-size: 11px;
  padding: 3px 8px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface-2);
  white-space: nowrap;
}
.tag.new { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.tag.cyan { color: var(--cyan); border-color: var(--cyan-line); background: var(--cyan-soft); }

/* ---- Lists / rows ---- */
.row-list { display: flex; flex-direction: column; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--line); }
.lrow:last-child { border-bottom: none; }
.lrow:hover { background: var(--surface-2); }
.lrow .mk { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.lrow .mk.allow { background: var(--allow); } .lrow .mk.deny { background: var(--deny); } .lrow .mk.hold { background: var(--hold); }
.call { font-family: var(--fm); font-size: 12.5px; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call b { color: var(--ink-1); font-weight: 600; }
.call .arw { color: var(--ink-3); margin: 0 5px; }
.ago { font-family: var(--fm); font-size: 11.5px; color: var(--ink-3); text-align: right; flex: none; }

/* approvals queue cards */
.appr {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.appr:hover { border-color: var(--accent-line); box-shadow: var(--shadow-sm); }
.appr .ag { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line-2);
  display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--ink-2); flex: none; font-family: var(--fm); }
.appr .meta { min-width: 0; flex: 1; }
.appr .meta .t { font-weight: 700; font-size: 14px; letter-spacing: -0.02em; }
.appr .meta .s { font-size: 12px; color: var(--ink-3); margin-top: 2px; font-family: var(--fm); }

/* health */
.health-relay { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.health-relay .big { font-size: 15px; font-weight: 700; }
.ginst { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.ginst:last-child { border-bottom: none; }
.ginst .gn { font-weight: 600; font-size: 13.5px; }
.ginst .gid { font-family: var(--fm); font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.uptag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.uptag.up { color: var(--allow); } .uptag.down { color: var(--deny); }
.instdot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.instdot.on { background: var(--allow); } .instdot.off { background: var(--line-strong); }

/* ---- empty state ---- */
.empty { text-align: center; padding: 48px 24px; color: var(--ink-3); }
.empty svg { width: 36px; height: 36px; margin: 0 auto 12px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.empty p { font-size: 13.5px; }

/* ---- Two-column master/detail ---- */
.md-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.list-card { overflow: hidden; }
.list-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 12px 16px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; transition: background .12s;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--surface-2); }
.list-row.on { background: var(--accent-soft); border-left-color: var(--accent); }
.list-row .lr-ico { width: 32px; height: 32px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.list-row .lr-ico svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.list-row.on .lr-ico { background: var(--accent-soft); color: var(--accent); }
.list-row .lr-main { min-width: 0; flex: 1; }
.list-row .lr-title { font-size: 13.5px; font-weight: 600; }
.list-row.on .lr-title { color: var(--accent-deep); }
.list-row .lr-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; font-family: var(--fm); }

/* detail panel */
.dp-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dp-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.dp-ico svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dp-ttl { font-size: 16px; font-weight: 700; letter-spacing: -0.025em; }
.dp-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.dp-tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.dp-tab { padding: 11px 14px; font-size: 13px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .14s, border-color .14s; white-space: nowrap; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; }
.dp-tab:hover { color: var(--ink-1); }
.dp-tab.on { color: var(--accent-deep); border-bottom-color: var(--accent); }

/* ---- detail key/value ---- */
.kv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
.kv .k { font-size: 11px; font-family: var(--fm); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.kv .v { font-size: 13.5px; margin-top: 3px; }
.kv .v.mono { font-family: var(--fm); font-size: 12.5px; }

/* ---- banner ---- */
.banner {
  display: flex; align-items: flex-start; gap: 11px; padding: 13px 16px; border-radius: var(--r-md);
  font-size: 13px; line-height: 1.5; margin-bottom: 18px;
}
.banner svg { width: 17px; height: 17px; flex: none; margin-top: 1px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.banner.info { background: var(--info-soft); color: #0b5a72; border: 1px solid color-mix(in oklab, var(--info) 22%, transparent); }
.banner.warn { background: var(--hold-soft); color: #8a5a0a; border: 1px solid color-mix(in oklab, var(--hold) 26%, transparent); }
.banner.accent { background: var(--accent-soft); color: var(--accent-deep); border: 1px solid var(--accent-line); }

/* ---- search / input ---- */
.searchbox { position: relative; }
.searchbox svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-3); stroke: currentColor; fill: none; stroke-width: 1.8; }
.searchbox .inp { padding-left: 34px; height: 36px; }
.inp {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 13.5px; color: var(--ink-1); transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* toast */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--ink-1); color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); z-index: 100; display: flex; align-items: center; gap: 9px;
  animation: toastin .25s ease;
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  .nav-item, .nav-chev, .btn, .list-row, .appr { transition: none; }
}

/* ============================================================
   Routant Landing — Design System
   ============================================================ */

/* Design tokens */
:root {
  --canvas: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #f1f5fa;
  --line: #d8e0ea;
  --line-2: #e2e9f1;
  --line-strong: #c3cedd;
  --ink-1: #0b1220;
  --ink-2: #526070;
  --ink-3: #8a96a6;
  --ink-btn: #0b1220;
  --accent: #1d4ed8;
  --accent-deep: #1a43b8;
  --accent2: #06b6d4;
  --accent-soft: rgba(29, 78, 216, 0.08);
  --accent-line: rgba(29, 78, 216, 0.28);
  --accent2-soft: rgba(6, 182, 212, 0.14);
  --allow: #16a34a;
  --hold: #d97706;
  --deny: #dc2626;
  --allow-soft: rgba(22, 163, 74, 0.12);
  --hold-soft: rgba(217, 119, 6, 0.13);
  --deny-soft: rgba(220, 38, 38, 0.11);
  --r-sm: 7px;
  --r-md: 11px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.05), 0 1px 3px rgba(11, 18, 32, 0.04);
  --shadow-lg: 0 24px 60px rgba(11, 18, 32, 0.14), 0 6px 16px rgba(11, 18, 32, 0.06);
  --fm: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

/* Dark section overrides */
.section-dark {
  --canvas: #08111f;
  --surface: #0e1a2c;
  --surface-2: #0b1524;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.17);
  --ink-1: #eaf1fa;
  --ink-2: #93a3b8;
  --ink-3: #5e6e82;
  --ink-btn: #eaf1fa;
  --accent-soft: rgba(6, 182, 212, 0.16);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.5);
}

/* Packet animation along wires */
@keyframes pktSlide {
  0%   { left: 0%;   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Reveal on scroll */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Inspector fade-step animation */
@keyframes fadeStep {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: none; }
}

.fade-step {
  animation: fadeStep 0.45s ease both;
}

/* Offset anchor scroll for sticky nav (68px height + buffer) */
#value, #path, #capabilities, #loop, #threats {
  scroll-margin-top: 80px;
}

/* Pulse animation for live dot */
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--allow) 55%, transparent); }
  70%  { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ============================================================
   Routant Console — Design System (short-alias tokens)
   ============================================================ */

:root {
  /* short aliases matching mockup */
  --cv: #f6f8fb;
  --sf: #ffffff;
  --s2: #eef2f7;
  --ln: #e2e8f0;
  --l2: #eef2f7;
  --i1: #0b1220;
  --i2: #526070;
  --i3: #93a0b0;
  --ac: #1d4ed8;
  --ad: #1a43b8;
  --a2: #0891b2;
  --as: rgba(29, 78, 216, .07);
  --gn: #15803d;
  --gns: rgba(21, 128, 61, .1);
  --am: #b45309;
  --ams: rgba(180, 83, 9, .1);
  --dn: #dc2626;
  --dns: rgba(220, 38, 38, .09);
  /* dark chrome */
  --dk: #0b1322;
  --dk2: #0e1830;
  --dkln: rgba(255, 255, 255, .07);
  --dktx: #e7eef7;
  --dkmut: #8a99ad;
  --dkfaint: #5d6b80;
  --dkac: #22d3ee;
  /* semantic aliases */
  --info: #0891b2;
  --surface-3: #e4eaf3;
}

/* ── console utility classes ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 20px;
  font-family: var(--fm);
  font-size: 10.5px;
  font-weight: 600;
}
.p-allow { background: var(--gns); color: var(--gn); }
.p-hold  { background: var(--ams); color: var(--am); }
.p-deny  { background: var(--dns); color: var(--dn); }

.risk {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: var(--fm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.rk-c { background: var(--dns); color: var(--dn); }
.rk-h { background: var(--ams); color: var(--am); }
.rk-m { background: rgba(8, 145, 178, .1); color: var(--a2); }
.rk-l { background: var(--gns); color: var(--gn); }

.c-mono { font-family: var(--fm); font-size: 12px; }

.bigdot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, .14);
  flex-shrink: 0;
  display: inline-block;
}

/* console sidebar nav */
.console-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--dkmut);
  text-decoration: none;
  position: relative;
  margin-bottom: 1px;
  transition: background .1s, color .1s;
}
.console-nav-item:hover {
  background: rgba(255, 255, 255, .04);
  color: var(--dktx);
}
.console-nav-item.nav-on {
  background: rgba(34, 211, 238, .1);
  color: #fff;
  font-weight: 600;
}
.console-nav-item.nav-on::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  background: var(--dkac);
  border-radius: 0 3px 3px 0;
}

/* pulse node styles */
.c-pnode {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  padding: 18px 20px;
  min-width: 140px;
  text-align: center;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.c-pnode.gw {
  background: rgba(34, 211, 238, .08);
  border-color: rgba(34, 211, 238, .35);
  min-width: 160px;
  padding: 22px;
}
.c-pwire {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, rgba(34,211,238,.1), rgba(34,211,238,.4), rgba(34,211,238,.1));
  position: relative;
  margin: 0 -4px;
}
.c-pwire .dot {
  position: absolute;
  top: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dkac);
  box-shadow: 0 0 8px var(--dkac);
  animation: pktSlide 2.8s linear infinite;
}
.c-pulse-hero {
  background: linear-gradient(180deg, #0e1830, #0b1322);
  border-radius: 18px;
  padding: 26px 28px;
  color: #e7eef7;
  position: relative;
  overflow: hidden;
}
.c-pulse-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  position: relative;
}

/* ============================================================
   Console dashboard implementation utilities
   ============================================================ */

.console-loading {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-range {
  width: 150px;
  flex: none;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-stat-grid .stat {
  min-height: 154px;
}

.dashboard-stat-grid .s-foot {
  display: block;
  min-height: 34px;
  line-height: 1.35;
}

.dashboard-stat-grid .s-foot .delta {
  margin-right: 6px;
}

.dashboard-main-grid > .span-4 { grid-column: span 4; }
.dashboard-main-grid > .span-5 { grid-column: span 5; }
.dashboard-main-grid > .span-7 { grid-column: span 7; }
.dashboard-main-grid > .span-8 { grid-column: span 8; }
.dashboard-main-grid > .span-12 { grid-column: span 12; }

.chart-legend {
  display: flex;
  gap: 18px;
  padding: 4px 20px 0;
  flex-wrap: wrap;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-2);
}

.lg-sw {
  width: 18px;
  height: 8px;
  border-radius: 2px;
  flex: none;
}

.chart-wrap {
  padding: 20px;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-family: var(--fm);
  font-size: 10.5px;
  color: var(--ink-3);
}

.mbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, 120px) 42px;
  gap: 10px;
  align-items: center;
  min-height: 32px;
}

.mbar .nm {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--ink-2);
}

.mbar .track {
  height: 7px;
  background: var(--surface-3);
  border-radius: 20px;
  overflow: hidden;
}

.mbar .fill {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
}

.mbar .ct {
  text-align: right;
  color: var(--ink-3);
  font-size: 11.5px;
}

.chg {
  display: flex;
  gap: 11px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
}

.chg:last-child {
  border-bottom: none;
}

.chg .ci {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex: none;
}

.chg .ci svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.chg .ci.add {
  background: var(--allow-soft);
  color: var(--allow);
}

.chg .ci.agent {
  background: var(--info-soft);
  color: var(--info);
}

.chg .body {
  min-width: 0;
  flex: 1;
}

.chg .body .m {
  font-size: 13px;
  color: var(--ink-1);
}

.chg .body .tools {
  margin-top: 3px;
  font-family: var(--fm);
  font-size: 11.5px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chg .body .tm {
  margin-top: 3px;
  font-size: 11px;
  color: var(--ink-3);
}

.gateway-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gateway-status-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}

.gateway-status-cell:last-child {
  border-right: none;
}

.gateway-status-cell span {
  font-family: var(--fm);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.gateway-status-cell b {
  font-size: 13.5px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-color .14s, background .14s, box-shadow .14s;
}

.choice:hover {
  border-color: var(--ink-3);
}

.choice.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.choice .ck {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--line-strong);
  flex: none;
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 12px;
  font-weight: 800;
}

.choice.on .ck {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.choice .c-main {
  min-width: 0;
  flex: 1;
}

.choice .c-title {
  font-size: 13.5px;
  font-weight: 600;
}

.choice .c-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
  font-family: var(--fm);
}

.pill.allow,
.pill.hold,
.pill.deny {
  border-radius: 5px;
  border: 1px solid transparent;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.pill.allow {
  background: var(--allow-soft);
  color: var(--allow);
  border-color: color-mix(in oklab, var(--allow) 26%, transparent);
}

.pill.hold {
  background: var(--hold-soft);
  color: var(--hold);
  border-color: color-mix(in oklab, var(--hold) 28%, transparent);
}

.pill.deny {
  background: var(--deny-soft);
  color: var(--deny);
  border-color: color-mix(in oklab, var(--deny) 28%, transparent);
}

.risk.critical {
  background: var(--deny-soft);
  color: var(--deny);
}

.risk.high {
  background: var(--hold-soft);
  color: var(--hold);
}

.risk.medium {
  background: var(--info-soft);
  color: var(--info);
}

.risk.low {
  background: var(--allow-soft);
  color: var(--allow);
}

.appr {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 1180px) {
  .dashboard-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-main-grid > .span-4,
  .dashboard-main-grid > .span-5,
  .dashboard-main-grid > .span-7,
  .dashboard-main-grid > .span-8 {
    grid-column: span 6;
  }

  .gateway-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gateway-status-cell:nth-child(2n) {
    border-right: none;
  }

  .gateway-status-cell:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 860px) {
  :root {
    --side-w: 218px;
  }

  .page {
    padding: 22px 18px 48px;
  }

  .page-head {
    flex-direction: column;
  }

  .page-head .ph-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .dashboard-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-main-grid > .span-4,
  .dashboard-main-grid > .span-5,
  .dashboard-main-grid > .span-7,
  .dashboard-main-grid > .span-8,
  .dashboard-main-grid > .span-12 {
    grid-column: span 12;
  }
}

@media (max-width: 680px) {
  .topbar-brand {
    width: auto;
    min-width: 0;
  }

  .body {
    grid-template-columns: 1fr;
  }

  .side {
    display: none;
  }

  .dashboard-stat-grid,
  .gateway-status-grid {
    grid-template-columns: 1fr;
  }

  .gateway-status-cell,
  .gateway-status-cell:nth-child(2n) {
    border-right: none;
  }

  .gateway-status-cell:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }

  .topbar .health-chip,
  .crumb {
    display: none;
  }

  .mbar {
    grid-template-columns: minmax(0, 1fr) 52px;
  }

  .mbar .track {
    grid-column: 1 / -1;
    order: 3;
  }
}

/* Admin console helpers */
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.form-grid label, .card label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.form-grid input, .form-grid select, .card input, .card select, .card textarea {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 10px; background: var(--surface); color: var(--ink-1);
}
.row-card { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.row-card:first-child { border-top: none; }
@media (max-width: 900px) { .grid.two, .form-grid { grid-template-columns: 1fr; } }
