/* ============================================================
   NodeNorth Mission Control — dark Nordic industrial command UI
   Palette anchored to NodeNorth brand:
     navy   #082858   (background, panels)
     teal   #0898B8   (primary accent)
   With command-center accents:
     aurora cyan/violet/blue for radar + signal animations
     signal green / amber / red for status
   ============================================================ */

:root {
  /* Brand */
  --nn-navy:        #082858;
  --nn-navy-deep:   #050f2b;
  --nn-navy-darker: #030712;
  --nn-teal:        #0898B8;
  --nn-teal-bright: #22d3ee;

  /* Command-center accents */
  --nn-cyan:          #38bdf8;
  --nn-violet:        #8b5cf6;
  --nn-violet-dark:   #7c3aed;
  --nn-blue:          #2563eb;

  /* Status */
  --nn-good:        #22c55e;
  --nn-good-dark:   #16a34a;
  --nn-warning:     #f59e0b;
  --nn-warning-dark:#d97706;
  --nn-critical:    #ef4444;
  --nn-pending:     #64748b;

  /* Surface */
  --nn-panel:       rgba(8, 26, 60, 0.62);
  --nn-text:        #e5e7eb;
  --nn-muted:       #94a3b8;
  --nn-dim:         #64748b;
  --nn-border:      rgba(148, 163, 184, 0.18);

  /* Sizing */
  --nn-radius:       18px;
  --nn-radius-inner: 12px;
  --nn-radius-sm:    6px;
  --nn-pad:          18px;
  --nn-gap:          16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--nn-navy-darker);
  color: var(--nn-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0.005em;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ---------- Critical a11y: focus-visible (C2) ---------- */
:focus-visible {
  outline: 2px solid var(--nn-teal-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Aurora background ---------- */
.nn-aurora-bg {
  background:
    radial-gradient(circle at 18% 12%, rgba(8, 152, 184, 0.18), transparent 32%),
    radial-gradient(circle at 80% 18%, rgba(139, 92, 246, 0.16), transparent 34%),
    radial-gradient(circle at 50% 92%, rgba(37, 99, 235, 0.18), transparent 40%),
    radial-gradient(circle at 92% 78%, rgba(34, 211, 238, 0.14), transparent 36%),
    linear-gradient(180deg, #030712 0%, #050f2b 40%, #030712 100%);
  background-attachment: fixed;
  animation: nn-aurora-shift 18s ease-in-out infinite alternate;
}

@keyframes nn-aurora-shift {
  0%   { filter: hue-rotate(0deg)  saturate(1.05); }
  50%  { filter: hue-rotate(10deg) saturate(1.15); }
  100% { filter: hue-rotate(-6deg) saturate(1.10); }
}

/* Faint grid overlay — industrial feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  z-index: 0;
}

/* ---------- Header ---------- */
.nn-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--nn-border);
  backdrop-filter: blur(10px);
  background: rgba(3, 7, 18, 0.55);
}

.nn-brand { display: flex; align-items: center; gap: 14px; }
.nn-mark  { width: 36px; height: 36px; filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.45)); }
.nn-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.nn-brand-name { font-weight: 700; letter-spacing: 0.04em; font-size: 17px; }
.nn-brand-sub  { color: var(--nn-muted); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }

.nn-header-meta { display: flex; align-items: center; gap: 14px; }
.nn-clock { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--nn-muted); }
.nn-phase { color: var(--nn-teal-bright); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }

.nn-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nn-teal-bright);
}

/* Snapshot pill modifier */
.nn-pill--snapshot {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.08);
  color: var(--nn-warning);
}

.nn-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--nn-good);
  box-shadow: 0 0 10px var(--nn-good);
  animation: nn-pulse 1.6s ease-in-out infinite;
}

/* Snapshot dot — amber, no animation */
.nn-dot--snapshot {
  background: var(--nn-warning);
  box-shadow: none;
  animation: none;
}

/* ---------- Snapshot stale banner ---------- */
.nn-snapshot-banner {
  position: relative;
  z-index: 1;
  padding: 10px 24px;
  background: rgba(245, 158, 11, 0.10);
  border-bottom: 1px solid var(--nn-warning);
  color: var(--nn-warning);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nn-snapshot-banner.crit {
  background: rgba(239, 68, 68, 0.10);
  border-color: var(--nn-critical);
  color: var(--nn-critical);
}

/* ---------- Button component (§2.16) ---------- */
.nn-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--nn-teal);
  background: rgba(8, 152, 184, 0.08);
  color: var(--nn-teal-bright);
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; text-decoration: none;
  transition: border-color 200ms ease, background 200ms ease;
  font-family: inherit;
}
.nn-btn:hover { background: rgba(8, 152, 184, 0.16); border-color: var(--nn-teal-bright); }
.nn-btn:focus-visible { outline: 2px solid var(--nn-teal-bright); outline-offset: 3px; }

/* ---------- Grid ---------- */
.nn-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--nn-gap);
  padding: 22px 24px;
  max-width: 1800px;
  margin-inline: auto;
}

.nn-card {
  position: relative;
  background: var(--nn-panel);
  border: 1px solid var(--nn-border);
  border-radius: var(--nn-radius);
  padding: var(--nn-pad);
  backdrop-filter: blur(8px);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.04) inset,
    0 18px 40px -28px rgba(34, 211, 238, 0.45);
  overflow: hidden;
}

.nn-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), transparent 38%);
  border-radius: var(--nn-radius);
}

.nn-card--wide { grid-column: span 2; }
.nn-card h2 {
  margin: 0 0 12px 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--nn-muted);
  font-weight: 600;
}

.nn-card-head { display: flex; align-items: baseline; justify-content: space-between; }
.nn-card-sub  { color: var(--nn-muted); font-size: 11px; letter-spacing: 0.06em; }

.nn-kpi { min-height: 130px; }

/* ---------- Health ring (conic-gradient) — score-driven color (C5) ---------- */
.health-ring {
  --score: 0;
  --ring-color: var(--nn-teal-bright);
  width: 92px; height: 92px;
  border-radius: 999px;
  display: grid; place-items: center;
  background:
    conic-gradient(var(--ring-color) calc(var(--score) * 1%),
                   rgba(148, 163, 184, 0.16) 0);
  box-shadow:
    0 0 28px rgba(34, 211, 238, 0.22),
    inset 0 0 18px rgba(34, 211, 238, 0.18);
  transition: background 600ms ease;
}
.health-ring__inner {
  width: 72px; height: 72px;
  border-radius: 999px;
  background: var(--nn-navy-deep);
  display: grid; place-items: center;
  line-height: 1;
  text-align: center;
}
.health-ring__score { font-size: 24px; font-weight: 700; color: var(--nn-teal-bright); }
.health-ring__label { font-size: 11px; color: var(--nn-muted); }

.nn-health-row { display: flex; align-items: center; gap: 16px; }
.nn-health-detail { display: flex; flex-direction: column; gap: 4px; }
.nn-health-state {
  font-weight: 600; color: var(--nn-text); font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.nn-health-risk { color: var(--nn-muted); font-size: 12px; line-height: 1.35; }

/* ---------- Progress bar ---------- */
.nn-progress-row { display: flex; align-items: center; gap: 12px; }
.nn-progress {
  flex: 1; height: 10px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.nn-progress__bar {
  --pct: 0;
  height: 100%;
  width: calc(var(--pct) * 1%);
  background: linear-gradient(90deg, var(--nn-teal), var(--nn-teal-bright), var(--nn-cyan));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.55);
  border-radius: 999px;
  transition: width 700ms ease;
}
.nn-progress__num { font-weight: 600; color: var(--nn-teal-bright); }
.nn-progress-phase { margin-top: 6px; color: var(--nn-muted); font-size: 12px; }

/* ---------- Active agent ---------- */
.nn-agent-active { display: flex; align-items: center; gap: 14px; }
.agent-heart {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--nn-violet);
  box-shadow: 0 0 22px var(--nn-violet);
  animation: nn-pulse 1.4s ease-in-out infinite;
}
.nn-agent-active__name  { font-weight: 700; letter-spacing: 0.04em; }
.nn-agent-active__model { display: block; color: var(--nn-muted); font-size: 12px; font-family: "JetBrains Mono", ui-monospace, monospace; }

/* ---------- Infra counts ---------- */
.nn-infra-counts {
  display: flex; gap: 14px; align-items: baseline;
  font-size: 13px;
}
.nn-infra-counts b {
  font-size: 22px;
  color: var(--nn-text);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.nn-muted { color: var(--nn-muted); }

/* ---------- Radar ---------- */
.radar {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-top: 6px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle, transparent 0 18%,
                    rgba(34, 211, 238, 0.06) 19% 20%,
                    transparent 21% 40%,
                    rgba(34, 211, 238, 0.06) 41% 42%,
                    transparent 43% 62%,
                    rgba(34, 211, 238, 0.05) 63% 64%,
                    transparent 65%),
    rgba(3, 16, 32, 0.85);
  border: 1px solid rgba(34, 211, 238, 0.2);
  box-shadow: inset 0 0 60px rgba(8, 152, 184, 0.18);
}
.radar__rings {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle, transparent 50%, transparent 50%);
}
.radar__sweep {
  position: absolute; inset: 0;
  background: conic-gradient(from 0deg,
              rgba(34, 211, 238, 0.32),
              rgba(34, 211, 238, 0.14) 12%,
              transparent 22%);
  animation: nn-radar-sweep 4.5s linear infinite;
  mix-blend-mode: screen;
  filter: blur(0.5px);
}
@keyframes nn-radar-sweep { to { transform: rotate(360deg); } }

.radar__nodes { position: absolute; inset: 0; }
.radar__links {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.radar-link {
  fill: none;
  stroke: rgba(34, 211, 238, 0.55);
  stroke-width: 1.4;
  stroke-dasharray: 4 6;
  animation: nn-link-flow 1.8s linear infinite;
}
.radar-link.pending {
  stroke: rgba(100, 116, 139, 0.4);
  animation: none;
}
@keyframes nn-link-flow { to { stroke-dashoffset: -40; } }

.node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(8, 26, 60, 0.78);
  font-size: 11px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--nn-text);
  white-space: nowrap;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.18);
}
.node__dot {
  width: 9px; height: 9px;
  border-radius: 999px;
  animation: nn-pulse 1.6s ease-in-out infinite;
}
.node--online   .node__dot { background: var(--nn-good);     box-shadow: 0 0 14px var(--nn-good); }
.node--warning  .node__dot { background: var(--nn-warning);  box-shadow: 0 0 14px var(--nn-warning); }
.node--critical .node__dot { background: var(--nn-critical); box-shadow: 0 0 14px var(--nn-critical); }
.node--pending  .node__dot { background: var(--nn-pending);  box-shadow: 0 0 14px var(--nn-pending); animation: none; opacity: 0.7; }

/* ---------- Lists (agents, risks, categories, topics) ---------- */
.nn-agents, .nn-risks, .nn-categories, .nn-topics, .nn-events {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 280px; overflow-y: auto;
}
.nn-agents li, .nn-risks li, .nn-categories li, .nn-topics li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px;
  border: 1px solid var(--nn-border);
  border-radius: var(--nn-radius-inner);
  background: rgba(5, 15, 43, 0.55);
}
.nn-agent-name { font-weight: 600; }
.nn-agent-model {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--nn-muted); font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--nn-border);
  background: rgba(34, 211, 238, 0.05);
}
.nn-state {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 2px 8px;
  border-radius: 999px;
}
.nn-state--active   { color: var(--nn-good);     border: 1px solid var(--nn-good);     background: rgba(34, 197, 94, 0.08); }
.nn-state--idle     { color: var(--nn-muted);    border: 1px solid var(--nn-border);   background: rgba(148, 163, 184, 0.05); }
.nn-state--standby  { color: var(--nn-cyan);     border: 1px solid var(--nn-cyan);     background: rgba(56, 189, 248, 0.06); }
.nn-state--pending  { color: var(--nn-pending);  border: 1px solid var(--nn-pending);  background: rgba(100, 116, 139, 0.08); }
.nn-state--warning  { color: var(--nn-warning);  border: 1px solid var(--nn-warning);  background: rgba(245, 158, 11, 0.06); }
.nn-state--critical { color: var(--nn-critical); border: 1px solid var(--nn-critical); background: rgba(239, 68, 68, 0.08); animation: nn-glow-warn 1.6s ease-in-out infinite; }
.nn-state--info     { color: var(--nn-teal-bright); border: 1px solid var(--nn-teal); background: rgba(8, 152, 184, 0.08); }

@keyframes nn-glow-warn {
  0%, 100% { box-shadow: 0 0 0px rgba(239, 68, 68, 0); }
  50%      { box-shadow: 0 0 18px rgba(239, 68, 68, 0.55); }
}

.nn-risk-title { font-weight: 600; }
.nn-risk-detail { color: var(--nn-muted); font-size: 12px; margin-top: 2px; }

.nn-cat-name { font-weight: 600; min-width: 130px; }
.nn-cat-bar {
  flex: 1; height: 6px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  margin: 0 12px;
  overflow: hidden;
  position: relative;
}
.nn-cat-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--nn-teal), var(--nn-teal-bright));
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
  transition: width 700ms ease;
}

/* ---------- Events ---------- */
.nn-events { max-height: 260px; }
.nn-events li {
  display: grid;
  grid-template-columns: 90px 110px 1fr;
  gap: 10px;
  padding: 6px 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  background: rgba(5, 15, 43, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.08);
  animation: nn-event-in 320ms ease-out;
}
@keyframes nn-event-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.ev-ts    { color: var(--nn-muted); }
.ev-src   { color: var(--nn-teal-bright); }
.ev-msg   { color: var(--nn-text); }
.ev-info     .ev-msg { color: var(--nn-text); }
.ev-warning  .ev-msg { color: var(--nn-warning); }
.ev-error    .ev-msg { color: var(--nn-critical); }

/* ---------- Topics ---------- */
.nn-topics li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.nn-topic-name { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--nn-teal-bright); }
.nn-topic-payload { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: var(--nn-muted); }

/* ---------- Pulse keyframe used by many elements ---------- */
@keyframes nn-pulse {
  0%, 100% { transform: scale(0.85); opacity: 0.6; }
  50%      { transform: scale(1.25); opacity: 1;   }
}

/* ---------- Workspace / Git ---------- */
.nn-workspace-summary {
  display: flex; gap: 14px; align-items: baseline;
  margin: 4px 0 12px 0;
  font-size: 13px;
}
.nn-workspace-summary b {
  font-size: 18px;
  color: var(--nn-text);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.nn-workspace-summary .ws-clean { color: var(--nn-good); }
.nn-workspace-summary .ws-dirty { color: var(--nn-warning); }
.nn-workspace-summary .ws-ahead { color: var(--nn-cyan); }
.nn-workspace-summary .ws-behind{ color: var(--nn-violet); }

.nn-repos { max-height: 280px; }
.nn-repos li {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(160px, 1.2fr) auto auto;
  gap: 10px;
  align-items: center;
}
.nn-repo-name {
  font-weight: 600;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
}
.nn-repo-branch {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--nn-teal-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nn-repo-counts {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--nn-muted);
  white-space: nowrap;
}
.nn-repo-counts b { color: var(--nn-text); }

.nn-branches li {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px;
}
.nn-branch-repo { font-size: 11px; color: var(--nn-muted); }
.nn-branch-name {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--nn-teal-bright);
}

/* ---------- Token / cost supply ---------- */
.nn-tokens-active { margin: 6px 0 12px 0; }
.nn-tokens-active__bar {
  position: relative;
  height: 12px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.nn-tokens-active__fill {
  --pct: 0;
  height: 100%;
  width: calc(var(--pct) * 1%);
  border-radius: 999px;
  transition: width 700ms ease, background 600ms ease;
  background: linear-gradient(90deg, var(--nn-teal), var(--nn-teal-bright), var(--nn-cyan));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.55);
}
.nn-tokens-active__fill.warn {
  background: linear-gradient(90deg, var(--nn-warning), #fbbf24);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.55);
}
.nn-tokens-active__fill.crit {
  background: linear-gradient(90deg, var(--nn-critical), #f87171);
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.6);
  animation: nn-glow-warn 1.6s ease-in-out infinite;
}
.nn-tokens-active__row {
  display: flex; justify-content: space-between;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  margin-top: 6px;
}
.nn-tokens-active__label { color: var(--nn-muted); }
.nn-tokens-active__detail { color: var(--nn-text); }

.nn-tokens-reco {
  margin-top: 6px;
  padding: 9px 12px;
  border-radius: var(--nn-radius-inner);
  border: 1px solid rgba(34, 211, 238, 0.2);
  background: rgba(34, 211, 238, 0.05);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--nn-teal-bright);
}
.nn-tokens-reco.warn {
  border-color: var(--nn-warning);
  background: rgba(245, 158, 11, 0.06);
  color: var(--nn-warning);
}
.nn-tokens-reco.crit {
  border-color: var(--nn-critical);
  background: rgba(239, 68, 68, 0.06);
  color: var(--nn-critical);
}

/* Token state indicator — class-only (refactored from ID+class anti-pattern) */
.nn-mono.green { color: var(--nn-good); }
.nn-mono.warn  { color: var(--nn-warning); }
.nn-mono.crit  { color: var(--nn-critical); }

.nn-providers { max-height: 220px; }
.nn-providers li {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 1.6fr auto;
  gap: 10px;
  align-items: center;
}
.nn-prov-name {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 12px;
  text-transform: capitalize;
}
.nn-prov-bar {
  height: 6px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.nn-prov-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--nn-teal), var(--nn-teal-bright));
  border-radius: 999px;
}
.nn-prov-cost {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--nn-text);
}

/* ---------- GCP fleet ---------- */
.nn-mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 600; color: var(--nn-teal-bright); font-size: 13px; }

/* Generic fleet banner — renamed from nn-gcp-banner for Proxmox reuse */
.nn-gcp-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 10px 0;
  padding: 10px 12px;
  border-radius: var(--nn-radius-inner);
  font-size: 12.5px;
  border: 1px solid var(--nn-warning);
  background: rgba(245, 158, 11, 0.08);
  color: var(--nn-warning);
}
.nn-gcp-banner.crit {
  border-color: var(--nn-critical);
  background: rgba(239, 68, 68, 0.08);
  color: var(--nn-critical);
}
.nn-gcp-banner.info {
  border-color: rgba(34, 211, 238, 0.32);
  background: rgba(34, 211, 238, 0.05);
  color: var(--nn-teal-bright);
}
.nn-gcp-banner code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  padding: 2px 6px;
  border-radius: var(--nn-radius-sm);
  background: rgba(3, 7, 18, 0.5);
  border: 1px solid var(--nn-border);
}

.nn-gcp-summary {
  display: flex; gap: 14px; align-items: baseline;
  margin: 6px 0 12px 0;
  font-size: 13px;
}
.nn-gcp-summary b {
  font-size: 18px;
  color: var(--nn-text);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.nn-gcp-summary .vm-running    { color: var(--nn-good); }
.nn-gcp-summary .vm-terminated { color: var(--nn-pending); }
.nn-gcp-summary .vm-other      { color: var(--nn-warning); }

.nn-vms { max-height: 220px; }
.nn-vms li {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}
.nn-vm-name {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 600; font-size: 12px;
}
.nn-vm-zone {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; color: var(--nn-muted);
}
.nn-vm-machine {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; color: var(--nn-teal-bright);
}

/* ---------- Cloud auth panel ---------- */
.nn-cloud-auth { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.nn-cloud-auth__state {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
}
.nn-cloud-auth__state.ok   { color: var(--nn-good); }
.nn-cloud-auth__state.warn { color: var(--nn-warning); }
.nn-cloud-auth__state.miss { color: var(--nn-pending); }
.nn-cloud-auth__state.err  { color: var(--nn-critical); }
.nn-cloud-auth__hint { font-size: 12px; line-height: 1.4; }

/* ---------- GitHub Projects board ---------- */

/* Column container — horizontal mini-kanban */
.nn-ghp-columns {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin: 6px 0 4px 0;
  flex-wrap: wrap;
}

/* Each column pill */
.nn-ghp-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 58px;
  padding: 10px 8px 8px;
  border-radius: var(--nn-radius-inner);
  border: 1px solid var(--nn-border);
  background: rgba(5, 15, 43, 0.55);
  text-align: center;
  transition: border-color 400ms ease;
}

.nn-ghp-col:hover { border-color: rgba(34, 211, 238, 0.4); }

.nn-ghp-col__count {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--nn-text);
  line-height: 1;
}
.nn-ghp-col__count--total {
  font-size: 20px;
  color: var(--nn-muted);
}

.nn-ghp-col__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--nn-muted);
  white-space: nowrap;
}

/* Proportional height bar inside each column */
.nn-ghp-col__bar {
  width: 100%;
  height: 48px;
  background: rgba(148, 163, 184, 0.08);
  border-radius: var(--nn-radius-sm);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  margin-top: 4px;
}
.nn-ghp-col__bar-fill {
  width: 100%;
  border-radius: var(--nn-radius-sm);
  min-height: 3px;
  transition: height 600ms ease;
  background: linear-gradient(180deg, var(--nn-teal-bright), var(--nn-teal));
}

/* Column accent colours — using design-system tokens */
.nn-ghp-col__bar-fill--ghp-todo       { background: linear-gradient(180deg, var(--nn-muted), var(--nn-dim)); }
.nn-ghp-col__bar-fill--ghp-ready      { background: linear-gradient(180deg, var(--nn-cyan), var(--nn-teal)); }
.nn-ghp-col__bar-fill--ghp-planning   { background: linear-gradient(180deg, var(--nn-violet), var(--nn-violet-dark)); }
.nn-ghp-col__bar-fill--ghp-inprogress { background: linear-gradient(180deg, var(--nn-teal-bright), var(--nn-teal)); box-shadow: 0 0 14px rgba(34, 211, 238, 0.5); }
.nn-ghp-col__bar-fill--ghp-review     { background: linear-gradient(180deg, var(--nn-warning), var(--nn-warning-dark)); }
.nn-ghp-col__bar-fill--ghp-blocked    { background: linear-gradient(180deg, var(--nn-critical), #dc2626); box-shadow: 0 0 14px rgba(239, 68, 68, 0.55); animation: nn-glow-warn 1.6s ease-in-out infinite; }
.nn-ghp-col__bar-fill--ghp-done       { background: linear-gradient(180deg, var(--nn-good), var(--nn-good-dark)); }
.nn-ghp-col__bar-fill--ghp-archived   { background: linear-gradient(180deg, rgba(100, 116, 139, 0.4), rgba(100, 116, 139, 0.2)); }

/* Total column — de-emphasised */
.nn-ghp-col--total {
  border-color: rgba(148, 163, 184, 0.1);
  background: rgba(5, 15, 43, 0.35);
}

/* Board watch list (Blocked / In Progress counts) */
.nn-ghp-watch {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 260px; overflow-y: auto;
}
.nn-ghp-watch-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--nn-border);
  border-radius: var(--nn-radius-inner);
  background: rgba(5, 15, 43, 0.55);
}
.nn-ghp-watch-badge {
  flex-shrink: 0;
  margin-top: 1px;
}
.nn-ghp-watch-title {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--nn-text);
  word-break: break-word;
}

/* ---------- Noscript fallback (replaces inline style in <noscript> block) ---------- */
.nn-noscript-msg {
  padding: 2rem;
  max-width: 600px;
  margin: auto;
  color: #e5e7eb;
  font-family: sans-serif;
  background: #030712;
}

/* ---------- Footer ---------- */
.nn-footer {
  position: relative;
  z-index: 1;
  display: flex; justify-content: space-between;
  padding: 18px 24px;
  color: var(--nn-muted);
  font-size: 12px;
  border-top: 1px solid var(--nn-border);
  background: rgba(3, 7, 18, 0.55);
  backdrop-filter: blur(8px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nn-grid { grid-template-columns: repeat(2, 1fr); }
  .nn-card--wide { grid-column: span 2; }
}
@media (max-width: 640px) {
  .nn-grid { grid-template-columns: 1fr; }
  .nn-card--wide { grid-column: span 1; }
  .nn-events li { grid-template-columns: 70px 90px 1fr; }
}

/* ---------- Critical a11y: prefers-reduced-motion (C1) ---------- */
@media (prefers-reduced-motion: reduce) {
  /* Kill all continuous animations */
  .nn-aurora-bg                          { animation: none; }
  .radar__sweep                          { animation: none; }
  .radar-link                            { animation: none; }
  .nn-dot,
  .node__dot,
  .agent-heart                           { animation: none; transform: none; opacity: 1; }
  .nn-state--critical,
  .nn-tokens-active__fill.crit,
  .nn-ghp-col__bar-fill--ghp-blocked     { animation: none; }

  /* Preserve one-shot transitions at reduced speed */
  .nn-progress__bar,
  .nn-tokens-active__fill,
  .health-ring,
  .nn-cat-bar__fill,
  .nn-prov-bar__fill                     { transition-duration: 100ms; }

  /* Kill entry animation but preserve result state */
  .nn-events li                          { animation: none; opacity: 1; transform: none; }
}
