/* ═══════════════════════════════════════════════════════════════════
   5G Core Lab — React Flow skin (CT-RFSKIN 2026-07-03)
   Loaded LAST: flips the GitHub-dark theme to the reactflow.dev look —
   white dot-grid canvas, ink text, #ff0071 accent, soft white cards,
   dashed gray wires. Token flip first, surgical overrides after.
   Revert: remove the single <link> in index.html.
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --primary: #ff0071;
  --primary-dark: #d60060;
  --primary-glow: rgba(255, 0, 113, 0.20);
  --secondary: #10b981;
  --secondary-glow: rgba(16, 185, 129, 0.18);
  --accent: #f59e0b;
  --accent-glow: rgba(245, 158, 11, 0.18);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.15);
  --bg-dark: #ffffff;
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.94);
  --bg-hover: #f7f7f8;
  --bg-elevated: #f4f4f6;
  --text-primary: #0a0a0c;
  --text-secondary: #52525b;
  --text-muted: #9c9ca6;
  --border: #e4e4e9;
  --border-light: rgba(228, 228, 233, 0.85);
  /* CafeTele signature re-tuned toward React Flow pink */
  --ct-grad: linear-gradient(135deg, #ff0071, #ec4899 55%, #7c3aed);
  --ct-pink: #ff0071;
  /* lab-shell.css tokens */
  --grad: linear-gradient(120deg, #ff0071 0%, #ec4899 55%, #7c3aed 100%);
  --grad-soft: linear-gradient(120deg, rgba(255, 0, 113, 0.10), rgba(124, 58, 237, 0.07));
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.80));
  --ring: 0 1px 0 rgba(10, 10, 12, 0.03) inset;
}

/* ── canvas: white with the signature React Flow dot grid ── */
html, body {
  background: #ffffff !important;
  color: var(--text-primary);
}
body {
  background-image:
    radial-gradient(ellipse 780px 520px at 78% -6%, rgba(255, 0, 113, 0.05), transparent 65%),
    radial-gradient(ellipse 640px 460px at 8% 108%, rgba(124, 58, 237, 0.05), transparent 68%),
    radial-gradient(rgba(10, 10, 12, 0.10) 1.1px, transparent 1.1px) !important;
  background-size: auto, auto, 22px 22px !important;
  background-attachment: fixed !important;
}

/* ── cards: white, rounded, soft-shadow (React Flow node look) ── */
[class*="card"], [class*="panel"], .modal, .tab-content > div > .box {
  box-shadow: 0 3px 14px rgba(10, 10, 12, 0.05);
}
::selection { background: #ff0071; color: #fff; }

/* ── inputs ── */
input, select, textarea {
  background: #ffffff !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}
input::placeholder, textarea::placeholder { color: var(--text-muted) !important; }
input:focus, select:focus, textarea:focus {
  border-color: #ff0071 !important;
  box-shadow: 0 0 0 3px rgba(255, 0, 113, 0.14) !important;
  outline: none;
}

/* ── logs / terminals stay dark (readable + intentional contrast island) ── */
pre, code, .xterm, [class*="terminal"], [class*="console"], [id*="logStream"],
[class*="log-body"], [class*="logbox"], [class*="log-pane"] {
  background: #101014 !important;
  color: #e7e7ee !important;
  border-radius: 12px;
}
pre code { background: transparent !important; }

/* ── scrollbars, light ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f4f4f6; }
::-webkit-scrollbar-thumb { background: #d6d6dd; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #ff0071; }

/* ── wires: dashed light-gray beziers, pink when active (SVG fabric) ── */
svg [class*="wire"], svg [class*="link"], svg [class*="edge"] {
  stroke: #c9c9d2;
  stroke-dasharray: 6 6;
}
svg [class*="wire"][class*="active"], svg [class*="link"][class*="active"],
svg [class*="edge"][class*="active"], svg [class*="hot"] {
  stroke: #ff0071;
}
svg [class*="handle"] { fill: #ffffff; stroke: #b9b9c3; }
svg text { fill: var(--text-secondary); }
svg [class*="node"] rect, svg rect[class*="node"] {
  fill: #ffffff;
  stroke: var(--border);
  filter: drop-shadow(0 3px 8px rgba(10, 10, 12, 0.07));
}

/* ── tables ── */
table { color: var(--text-primary); }
th { color: var(--text-muted) !important; }
tr:hover td { background: var(--bg-hover); }

/* ── badges/pills that hardcoded white text on translucent dark ── */
[style*="color: rgba(255"], [style*="color:rgba(255"] { color: var(--text-secondary) !important; }

/* ── buttons: pink pill primary (token-driven ones pick this up automatically) ── */
button, .btn { border-radius: 999px !important; }
[class*="btn-primary"], [class*="button-primary"] {
  background: #ff0071 !important;
  border-color: #ff0071 !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(255, 0, 113, 0.28);
}
[class*="btn-primary"]:hover, [class*="button-primary"]:hover {
  background: #d60060 !important;
  transform: translateY(-1px);
}

/* ── fix (user report): terminal HUD chips were ink-on-dark = invisible ── */
.terminal-header { color: #c9c9d4; }
.term-hud span { color: #c9c9d4 !important; border-color: rgba(255,255,255,.15) !important; background: rgba(255,255,255,.05) !important; }
.term-hud span:has(#term-conn-dot) { color: #34d399 !important; border-color: rgba(52,211,153,.35) !important; background: rgba(52,211,153,.08) !important; }

/* ── fix (user report): sidebar PLMN/IMSI card — pink wash + overflow ── */
.lab-info { background: #ffffff !important; border: 1px solid #e4e4e9 !important; border-radius: 14px; box-shadow: 0 3px 12px rgba(10,10,12,.05); }
.lab-info-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
.lab-info-item { min-width: 0; }
.lab-info-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.lab-info-item span:first-child { color: #9c9ca6 !important; }
.lab-info-item span:last-child, .lab-info-item b { color: #d60060 !important; }

/* refinement pass 2 */
.term-hud span, .term-hud span * { color: #c9c9d4 !important; }
.term-hud span:has(#term-conn-dot), .term-hud span:has(#term-conn-dot) * { color: #34d399 !important; }
.lab-info-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
.lab-info-item { display: flex !important; flex-direction: column; gap: 1px; }
.lab-info-item span:first-child { font-size: .62rem !important; letter-spacing: .08em; }
.lab-info-item span:last-child, .lab-info-item b { font-size: .78rem !important; }
.term-hud span:first-child, .term-hud span:first-child * { color: #34d399 !important; border-color: rgba(52,211,153,.35) !important; }
