/* Dashboard preview styles — mirrors the actual Umbrella dashboard so
   the demo page shows what users will see in production. Lives only on
   the /demo page; the rest of the site is pure B&W. */

.dash {
  --bg:        #0a0b0e;
  --bg-card:   #0e1014;
  --bg-lift:   #13161c;
  --border:    #1a1d24;
  --border-2:  #232732;
  --text:      #e6e4df;
  --muted:     #777b86;
  --dim:       #4d525c;
  --accent:    #ff6b35;
  --ok:        #6cdf95;
  --warn:      #ffb547;
  --bad:       #ff4658;

  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-feature-settings: "ss01", "zero", "tnum";
  font-size: 12.5px;
  letter-spacing: -0.005em;
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 720px;
  border-top: 0;
}

/* ── sidebar ───────────────────────────────────────────────── */
.dash-aside {
  border-right: 1px solid var(--border);
  padding: 28px 0;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.dash-aside .brand {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 22px;
  padding: 0 22px;
}
.dash-aside .brand .dot { color: var(--accent); font-style: normal; }
.dash-aside .sub {
  margin-top: 6px;
  padding: 0 22px;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.dash-aside nav { margin-top: 22px; display: flex; flex-direction: column; }
.dash-nav-item {
  padding: 8px 22px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: color 100ms, border-color 100ms;
}
.dash-nav-item:hover { color: var(--text); }
.dash-nav-item.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
}
.dash-aside .footer {
  margin-top: auto;
  padding: 0 22px 4px;
}
.dash-aside .footer .who {
  font-size: 10.5px;
  color: var(--text);
  margin-bottom: 1px;
}
.dash-aside .footer .role {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ── main ──────────────────────────────────────────────────── */
.dash-main {
  padding: 36px 40px;
  min-width: 0;
}
.dash-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px;
}
.dash-hero h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0;
}
.dash-hero h1 .acc { color: var(--accent); font-style: normal; }
.dash-hero .sub {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.6;
}
.dash-snap {
  text-align: right;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.dash-snap-num {
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-top: 5px;
}
.dash-snap-num .v { color: var(--accent); }

/* ── KPI tiles ─────────────────────────────────────────────── */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.dash-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.dash-eyebrow {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.dash-kpi { padding: 20px; }
.dash-kpi .label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.dash-kpi .num { margin-top: 12px; font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.dash-kpi .live {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ok);
  font-size: 13px;
  font-weight: 500;
}
.dash-kpi .live::before {
  content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--ok);
  animation: dashPulse 2s ease-out infinite;
}
@keyframes dashPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108,223,149,0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(108,223,149,0); }
}

/* ── topology (SVG) ────────────────────────────────────────── */
.dash-topology {
  margin-bottom: 28px;
}
.dash-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.topo-svg-wrap {
  position: relative;
  background:
    radial-gradient(900px 200px at 50% -10%, rgba(255,107,53,0.05), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.025) 1px, transparent 0);
  background-size: auto, 14px 14px;
}
.topo-svg-wrap svg {
  display: block; width: 100%; height: auto;
}
.topo-col-label {
  fill: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.topo-col-divider { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 4; }
.topo-node rect { fill: var(--bg-lift); stroke: var(--border-2); stroke-width: 1; }
.topo-node.is-route rect   { fill: #11141a; }
.topo-node.is-pool  rect   { fill: #161a22; }
.topo-node.is-backend rect { fill: #0f1218; }
.topo-node text { font-family: 'IBM Plex Mono', monospace; }
.topo-node .name { fill: var(--text); font-size: 12px; font-weight: 500; }
.topo-node .meta { fill: var(--muted); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.topo-node .num  { fill: var(--accent); font-size: 9.5px; font-variant-numeric: tabular-nums; }
.topo-node .state-dot.healthy   { fill: var(--ok); }
.topo-node .state-dot.unhealthy { fill: var(--bad); }
.topo-node .state-dot.unknown   { fill: var(--muted); }

.topo-link { fill: none; stroke: var(--border-2); stroke-width: 1.2; }
.topo-link.is-active { stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 5 5; animation: topoFlow 1.4s linear infinite; }
.topo-link.is-bad    { stroke: var(--bad); stroke-width: 1.2; stroke-dasharray: 3 3; opacity: 0.85; }
@keyframes topoFlow { to { stroke-dashoffset: -10; } }

.topo-particle { fill: var(--accent); filter: drop-shadow(0 0 3px rgba(255,107,53,0.7)); }
.topo-particle.is-bad { fill: var(--bad); }

.topo-legend {
  display: flex; align-items: center; gap: 18px;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.topo-legend i {
  display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px;
  background: var(--accent);
}
.topo-legend i.bad { background: var(--bad); }
.topo-legend i.idle { background: var(--border-2); }

/* ── analytics chart ───────────────────────────────────────── */
.dash-analytics {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.dash-chart-svg { width: 100%; height: 260px; display: block; padding: 12px; }
.dash-chart-axis-line { stroke: var(--border); }
.dash-chart-grid { stroke: var(--border); stroke-dasharray: 2 4; opacity: 0.5; }
.dash-chart-axis text { fill: var(--dim); font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; }
.dash-chart-line { fill: none; stroke-width: 1.5; }
.dash-chart-line.req { stroke: var(--accent); }
.dash-chart-line.err { stroke: var(--bad); }
.dash-chart-line.p95 { stroke: #5cd6ff; }
.dash-chart-area.req { fill: var(--accent); opacity: 0.06; }

.dash-side-tile { padding: 22px; }
.dash-side-tile .row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 11px;
}
.dash-side-tile .row:last-child { border-bottom: 0; }
.dash-side-tile .name { color: var(--accent); font-size: 12px; }
.dash-side-tile .value { color: var(--text); font-variant-numeric: tabular-nums; }

/* ── tables ────────────────────────────────────────────────── */
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'IBM Plex Mono', monospace;
}
.dash-table thead th {
  text-align: left;
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.dash-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  vertical-align: middle;
}
.dash-table tbody tr:last-child td { border-bottom: 0; }
.dash-table .pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 7px 2px 6px;
  border: 1px solid currentColor;
  font-weight: 500;
}
.dash-table .pill::before {
  content: ''; display: inline-block; width: 5px; height: 5px; background: currentColor;
}
.dash-table .pill.healthy { color: var(--ok); }
.dash-table .pill.unhealthy { color: var(--bad); }
.dash-table .acc { color: var(--accent); }
.dash-table .muted { color: var(--muted); }
.dash-table .right { text-align: right; }
.dash-table .tn { font-variant-numeric: tabular-nums; }
