/* ══════════════════════════════════════════════
   QOSE BRUTAL MODE — style.css
   Qontra brand: Deep Navy #0B1C2C | Graphite #2A2F36
   Cyan #00C2FF | Near Black #05070A | Soft White #E6EDF3
   v1.45 — visual reskin (polish pass, no logic changes)
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&family=Rajdhani:wght@500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #0B1C2C;
  --graph:  #2A2F36;
  --cyan:   #00C2FF;
  --black:  #05070A;
  --white:  #E6EDF3;
  --green:  #00FF88;
  --amber:  #FF8C00;
  --red:    #FF4444;
  --purple: #8B5CF6;
  --gold:   #FFD700;
  --border: rgba(0,194,255,0.18);
  --panel-bg: rgba(5,7,10,0.94);
  --row-bg:   rgba(11,28,44,0.6);

  /* — reskin additions (surfaces / glow / motion — same palette, refined use) — */
  --cyan-dim:    rgba(0,194,255,0.08);
  --cyan-soft:   rgba(0,194,255,0.35);
  --glass:       rgba(8,14,22,0.72);
  --glass-hi:    rgba(14,24,36,0.88);
  --hairline:    rgba(0,194,255,0.14);
  --glow-cyan:   0 0 24px rgba(0,194,255,0.25);
  --glow-cyan-lg:0 0 48px rgba(0,194,255,0.22);
  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 12px;
  --ease: cubic-bezier(0.22,0.9,0.32,1);
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
  background: var(--black);
  color: var(--white);
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
}

/* Faint fixed grid + vignette wash behind the whole app — visible through
   any transparent/black surface (splash, panel gaps). Purely decorative,
   z-index below everything functional. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0,194,255,0.05), transparent 55%),
    linear-gradient(rgba(0,194,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,194,255,0.035) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
}

/* ── SPLASH ── */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(ellipse at 50% 38%, #0a141f 0%, var(--black) 62%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease);
  overflow: hidden;
}

/* Animated grid floor + drifting scanline — decorative only, no JS hooks */
#splash::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,194,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,194,255,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 0%, transparent 72%);
          mask-image: radial-gradient(ellipse at 50% 45%, #000 0%, transparent 72%);
  animation: splashGridDrift 18s linear infinite;
}
#splash::after {
  content: ''; position: absolute; left: 0; right: 0; height: 120px; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(0,194,255,0.06), transparent);
  animation: splashScan 6s ease-in-out infinite;
}
@keyframes splashGridDrift { from { background-position: 0 0, 0 0; } to { background-position: 48px 48px, 48px 48px; } }
@keyframes splashScan { 0% { top: -10%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 105%; opacity: 0; } }

.splash-logo {
  width: 180px; margin-bottom: 32px; opacity: 0.95;
  position: relative; z-index: 1;
  filter: drop-shadow(0 0 22px rgba(0,194,255,0.35));
  animation: splashLogoIn 1s var(--ease) both, splashLogoFloat 5s ease-in-out 1s infinite;
}
@keyframes splashLogoIn { from { opacity: 0; transform: scale(0.85); filter: drop-shadow(0 0 0 rgba(0,194,255,0)); } to { opacity: 0.95; transform: scale(1); filter: drop-shadow(0 0 22px rgba(0,194,255,0.35)); } }
@keyframes splashLogoFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

#splash-line1, #splash-line2, #splash-line3 {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  position: relative; z-index: 1;
}

#splash-line1 {
  font-family: 'Rajdhani', 'JetBrains Mono', monospace;
  font-size: 50px; font-weight: 700; letter-spacing: 0.16em;
  color: var(--cyan); text-shadow: 0 0 40px rgba(0,194,255,0.55), 0 0 90px rgba(0,194,255,0.2);
  margin-bottom: 6px;
}
#splash-line2 {
  font-size: 14px; letter-spacing: 0.42em;
  color: var(--white); opacity: 0.7; margin-bottom: 4px;
  font-weight: 500;
}
#splash-line3 {
  font-size: 11px; letter-spacing: 0.3em;
  color: rgba(230,237,243,0.4);
  margin-bottom: 40px;
}

/* Access gate */
#splash-gate {
  display: none;
  flex-direction: column; align-items: center; gap: 12px;
  position: relative; z-index: 1;
  padding: 26px 30px 24px;
  background: var(--glass);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px);
  box-shadow: var(--glow-cyan), 0 20px 60px rgba(0,0,0,0.5);
  animation: gateIn 0.5s var(--ease) both;
}
@keyframes gateIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.gate-label {
  font-family: 'Rajdhani', monospace;
  font-size: 11px; letter-spacing: 0.35em; color: rgba(230,237,243,0.6);
  text-transform: uppercase; margin-bottom: 4px; font-weight: 600;
}

#gate-input {
  background: rgba(0,194,255,0.06);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: inherit; font-size: 18px;
  letter-spacing: 0.3em; text-align: center;
  padding: 10px 24px; width: 260px;
  outline: none; border-radius: var(--r-sm);
  transition: box-shadow 0.2s var(--ease);
}
#gate-input:focus { box-shadow: 0 0 22px rgba(0,194,255,0.35); }

.gate-btn {
  background: linear-gradient(135deg, var(--cyan), #0091c2);
  color: var(--black);
  border: none; font-family: 'Rajdhani', monospace;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.25em; padding: 11px 32px;
  cursor: pointer; transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), opacity 0.15s;
  border-radius: var(--r-sm);
  box-shadow: 0 4px 18px rgba(0,194,255,0.3);
}
.gate-btn:hover { opacity: 0.95; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(0,194,255,0.42); }
.gate-btn:active { transform: translateY(0); }

#gate-error {
  color: var(--red); font-size: 10px; letter-spacing: 0.2em;
  display: none;
}

/* QDI Auth fields — text-left variant of the gate-input look */
.qdi-input {
  background: rgba(0,194,255,0.055);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: inherit; font-size: 13px;
  letter-spacing: 0.05em; text-align: left;
  padding: 10px 14px; width: 260px;
  outline: none; box-sizing: border-box;
  border-radius: var(--r-sm);
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.qdi-input:focus { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,194,255,0.3); }
.qdi-input::placeholder { color: rgba(230,237,243,0.32); }
.qdi-row { width: 260px; }
.qdi-show-pw {
  font-size: 9px; color: rgba(230,237,243,0.45); letter-spacing: 0.1em;
  cursor: pointer; width: 260px; text-align: left; margin-top: -4px;
  display: flex; align-items: center; transition: color 0.15s;
}
.qdi-show-pw:hover { color: var(--cyan); }
.ui-icon { width: 13px; height: 13px; object-fit: contain; vertical-align: -2px; margin-right: 3px; }
.qdi-switch {
  font-size: 10px; color: rgba(230,237,243,0.5); letter-spacing: 0.1em;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
  margin-top: 4px; transition: color 0.15s;
}
.qdi-switch:hover { color: var(--cyan); }
.qdi-note {
  font-size: 9px; color: rgba(230,237,243,0.35); letter-spacing: 0.05em;
  line-height: 1.5; width: 260px; text-align: center;
}
.qdi-consent { width: 260px; margin-top: 8px; font-size: 9px; color: rgba(230,237,243,0.55); line-height: 1.5; }
.qdi-consent label { display: flex; align-items: flex-start; gap: 6px; cursor: pointer; text-align: left; }
.qdi-consent input[type="checkbox"] { margin-top: 1px; flex-shrink: 0; accent-color: var(--cyan); cursor: pointer; }
.qdi-consent a { color: var(--cyan); text-decoration: none; }
.qdi-consent a:hover { text-decoration: underline; }

/* Boot progress */
#splash-boot {
  display: none;
  flex-direction: column; align-items: center; gap: 14px;
  min-width: 340px;
  position: relative; z-index: 1;
}
#boot-msg {
  font-size: 10px; letter-spacing: 0.25em;
  color: var(--cyan); text-align: center; min-height: 18px;
  text-shadow: 0 0 12px rgba(0,194,255,0.4);
}
.boot-bar-bg {
  width: min(340px, 60vw); height: 4px;
  background: rgba(0,194,255,0.1);
  border: 1px solid rgba(0,194,255,0.22);
  border-radius: 3px; overflow: hidden;
  position: relative;
}
#boot-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #0091c2, var(--cyan));
  box-shadow: 0 0 14px rgba(0,194,255,0.7);
  transition: width 0.35s var(--ease);
  position: relative;
}
#boot-bar-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  width: 40px; animation: bootSheen 1.4s linear infinite;
}
@keyframes bootSheen { from { transform: translateX(-40px); } to { transform: translateX(340px); } }
#boot-pct {
  font-size: 9px; color: rgba(0,194,255,0.65);
  letter-spacing: 0.2em;
}

/* Shake animation */
@keyframes shake {
  0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}
}
.shake { animation: shake 0.4s ease; }

/* ── SIMULATION ROOT ── */
#sim-root {
  display: none; opacity: 0;
  position: fixed; inset: 0;
  flex-direction: row;
  transition: opacity 0.5s var(--ease);
}

#canvas {
  position: absolute; inset: 0;
  width: 100% !important; height: 100% !important;
  z-index: 0;
}

/* ── HUD ── */
#hud {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 0;
  background: linear-gradient(to bottom, rgba(5,7,10,0.85) 0%, rgba(5,7,10,0.6) 55%, transparent 100%);
  backdrop-filter: blur(6px);
  padding: 10px 16px 16px;
  pointer-events: none;
  border-bottom: 1px solid rgba(0,194,255,0.08);
}

#hud-logo { height: 22px; opacity: 0.9; pointer-events: all; transition: filter 0.2s, transform 0.2s; }
#hud-logo:hover { filter: drop-shadow(0 0 8px rgba(0,194,255,0.6)); transform: scale(1.05); }

.hud-div {
  width: 1px; height: 24px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
  margin: 0 13px;
}

.hud-stat { display: flex; flex-direction: column; pointer-events: none; }
.hud-stat .hs-label {
  font-size: 7.5px; letter-spacing: 0.25em;
  color: rgba(230,237,243,0.42); margin-bottom: 2px;
  font-weight: 500;
}
.hud-stat .hs-val {
  font-family: 'Rajdhani', monospace;
  font-size: 15px; font-weight: 700;
  color: var(--cyan); letter-spacing: 0.04em;
  text-shadow: 0 0 10px rgba(0,194,255,0.25);
  /* v1.3.6 fix: hud-clock/hud-speed text length changes constantly (sim
     time ticking, unit changing from "…h" to "…d" to "…wk" etc. at fast
     sim speeds) — without a fixed box, every update reflowed this whole
     flex row and everything after it visibly shifted, which read as the
     HUD "shaking". Pinning a min-width per stat stops the reflow without
     needing to touch the (frequently-called) update logic itself. */
  display: inline-block; min-width: 30px;
  font-variant-numeric: tabular-nums;
}
#hud-clock, #hud-speed { min-width: 84px; }
#hud-user-sats, #hud-cat-sats, #hud-conjunctions, #hud-collisions { min-width: 22px; }
#hud-flare, #hud-drag-mult { min-width: 44px; }

#hud-title {
  margin-left: auto;
  font-size: 13px; font-weight: 900;
  letter-spacing: 0.3em; color: var(--cyan);
  text-shadow: 0 0 20px rgba(0,194,255,0.4);
  pointer-events: none;
}
.hud-tagline {
  font-size: 7px; letter-spacing: 0.3em;
  color: rgba(230,237,243,0.3); text-align: right;
  margin-left: 6px; pointer-events: none;
}

/* ── BOTTOM TOOLBAR ── */
#toolbar {
  position: absolute; bottom: 28px; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  background: linear-gradient(to top, rgba(5,7,10,0.92) 0%, rgba(5,7,10,0.65) 60%, transparent 100%);
  backdrop-filter: blur(6px);
  padding: 14px 16px 12px;
  border-top: 1px solid rgba(0,194,255,0.08);
}

.tb-btn {
  background: rgba(11,28,44,0.72);
  border: 1px solid var(--border);
  color: var(--white); font-family: inherit;
  font-size: 9.5px; letter-spacing: 0.15em;
  padding: 7px 13px; cursor: pointer;
  border-radius: var(--r-sm);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease), transform 0.12s var(--ease), box-shadow 0.15s var(--ease);
}
.tb-btn:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0,194,255,0.08); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,194,255,0.15); }
.tb-btn:active { transform: translateY(0); }
.tb-btn.active { background: linear-gradient(135deg, var(--cyan), #0091c2); color: var(--black); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.tb-btn.locked-free, #dd-panels button.locked-free { opacity: 0.55; }
.tb-btn.locked-free:hover { opacity: 0.85; border-color: rgba(0,194,255,0.15); background: transparent; }
.lock-badge { font-size: 8px; }

.speed-btn {
  background: rgba(11,28,44,0.8);
  border: 1px solid var(--border);
  color: var(--white); font-family: inherit;
  font-size: 9px; letter-spacing: 0.1em;
  padding: 5px 9px; cursor: pointer;
  border-radius: var(--r-sm);
  transition: all 0.15s var(--ease);
}
.speed-btn.active { background: var(--cyan); color: var(--black); }

.tb-sep { flex: 1; }

.export-btn {
  background: rgba(42,47,54,0.85);
  border: 1px solid rgba(139,92,246,0.4);
  color: var(--purple); font-family: inherit;
  font-size: 9px; letter-spacing: 0.12em;
  padding: 6px 12px; cursor: pointer;
  border-radius: var(--r-sm);
  transition: all 0.15s var(--ease);
}
.export-btn:hover { border-color: var(--purple); background: rgba(139,92,246,0.16); transform: translateY(-1px); }

/* ── PANELS ── */
.panel {
  position: absolute; top: 52px; bottom: 28px;
  width: 320px; z-index: 20;
  background: var(--glass-hi);
  border: 1px solid var(--hairline);
  display: none; flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: 0 0 60px rgba(0,0,0,0.45);
}
.panel.open { display: flex; animation: panelIn 0.28s var(--ease) both; }

.panel-left  { left: 0; border-left: none; border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.panel-right { right: 0; border-right: none; border-radius: var(--r-lg) 0 0 var(--r-lg); }
.panel-left.panel  { transform-origin: left center; }
.panel-right.panel { transform-origin: right center; }

@keyframes panelIn {
  from { opacity: 0; transform: translateX(var(--panel-slide, -14px)); }
  to   { opacity: 1; transform: translateX(0); }
}
.panel-right.open { --panel-slide: 14px; }

/* Bridge needs real room now — 3-column layout (sidebar/chat/members),
   same as Reborn's rebuild. 620px fit the old single-column channel
   list; the new layout needs much more. ID-specific override, so no
   other panel changes. */
#panel-bridge { width: min(95vw, 1140px); }

/* Ground Track needs more room than the standard 320px sidebar now that
   its canvas is higher-resolution (matches Reborn's same resize, v7.32) —
   ID-specific, so only this panel changes. */
#panel-groundtrack { width: min(90vw, 640px); }

.panel-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(0,194,255,0.07), rgba(11,28,44,0.5));
  flex-shrink: 0;
  position: relative;
}
.panel-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-soft), transparent);
  opacity: 0.5;
}
.panel-title {
  font-family: 'Rajdhani', monospace;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.3em; color: var(--cyan);
  text-shadow: 0 0 10px rgba(0,194,255,0.3);
}
.panel-close {
  background: none; border: none; color: rgba(230,237,243,0.45);
  font-size: 14px; cursor: pointer; padding: 2px 6px;
  border-radius: var(--r-sm); transition: color 0.15s, background 0.15s;
}
.panel-close:hover { color: var(--white); background: rgba(255,68,68,0.12); }

.panel-body {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 12px 11px;
}
.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── LAUNCH PANEL ── */
.tech-label {
  font-size: 8px; letter-spacing: 0.3em;
  color: rgba(0,194,255,0.65); margin: 10px 0 5px;
  font-weight: 600;
}
.tech-label:first-child { margin-top: 0; }

.tech-btn-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 2px; }

.tech-btn {
  background: var(--row-bg);
  border: 1px solid var(--border);
  color: rgba(230,237,243,0.7);
  font-family: inherit; font-size: 9px;
  letter-spacing: 0.08em; padding: 5px 9px;
  cursor: pointer; transition: all 0.14s var(--ease);
  flex: 0 0 auto; border-radius: var(--r-sm);
}
.tech-btn:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-1px); }
.tech-btn.active { background: rgba(0,194,255,0.2); border-color: var(--cyan); color: var(--cyan); font-weight: 700; box-shadow: 0 0 12px rgba(0,194,255,0.2); }

/* Tech selectors wrap */
#tech-bus, #tech-propulsion, #tech-power, #tech-comms,
#tech-mission, #tech-shielding, #tech-autonomy, #orbit-selector {
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
  margin-bottom: 4px;
}

.launch-inputs { display: flex; gap: 8px; margin: 10px 0 6px; }
.launch-input-group { display: flex; flex-direction: column; flex: 1; }
.liq-label { font-size: 8px; letter-spacing: 0.2em; color: rgba(0,194,255,0.55); margin-bottom: 3px; }
.launch-input-group input {
  background: rgba(0,194,255,0.055);
  border: 1px solid var(--border);
  color: var(--cyan); font-family: inherit; font-size: 11px;
  padding: 6px 8px; width: 100%; outline: none;
  border-radius: var(--r-sm); transition: border-color 0.15s, box-shadow 0.15s;
}
.launch-input-group input:focus { border-color: var(--cyan); box-shadow: 0 0 12px rgba(0,194,255,0.2); }

.name-input-group { margin-bottom: 8px; }
.name-input-group input {
  width: 100%;
  background: rgba(0,194,255,0.055);
  border: 1px solid var(--border);
  color: var(--white); font-family: inherit; font-size: 11px;
  padding: 6px 8px; outline: none; border-radius: var(--r-sm);
}

.scale-btn {
  background: rgba(0,194,255,0.12); border: 1px solid var(--border);
  color: var(--cyan); font-family: inherit; font-size: 16px;
  width: 30px; height: 26px; line-height: 1; cursor: pointer;
  padding: 0; pointer-events: all; border-radius: var(--r-sm);
  transition: background 0.15s, transform 0.12s;
}
.scale-btn:hover { background: rgba(0,194,255,0.28); transform: translateY(-1px); }

.qty-hint {
  font-size: 7.5px; color: rgba(230,237,243,0.42);
  margin: -4px 0 8px; line-height: 1.4;
}

#launch-preview {
  background: var(--row-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 11px; margin: 8px 0;
  font-size: 9px;
}
.preview-row { display: flex; justify-content: space-between; padding: 2px 0; }
.preview-row span:first-child { color: rgba(230,237,243,0.5); }
.preview-warn {
  color: var(--red); font-size: 8.5px; margin-top: 5px;
  padding: 6px; border: 1px solid rgba(255,68,68,0.3);
  background: rgba(255,68,68,0.07); border-radius: var(--r-sm);
}

.launch-fire-btn {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, rgba(0,194,255,0.22), rgba(0,194,255,0.1));
  border: 1px solid var(--cyan);
  color: var(--cyan); font-family: 'Rajdhani', monospace;
  font-size: 12px; font-weight: 700; letter-spacing: 0.25em;
  cursor: pointer; transition: all 0.15s var(--ease); margin-top: 4px;
  border-radius: var(--r-sm);
}
.launch-fire-btn:hover { background: rgba(0,194,255,0.3); box-shadow: var(--glow-cyan); transform: translateY(-1px); }

/* ── ORBIT COUNTERS ── */
#orbit-counters { margin-bottom: 10px; }
.orbit-counter { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.oc-label { font-size: 9px; font-weight: 700; width: 36px; }
.oc-val { font-size: 8.5px; color: rgba(230,237,243,0.5); min-width: 48px; text-align: right; }

/* ── FLEET PANEL ── */
.fleet-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.fleet-tab {
  background: var(--row-bg); border: 1px solid var(--border);
  color: rgba(230,237,243,0.6); font-family: inherit;
  font-size: 8.5px; letter-spacing: 0.12em; padding: 5px 9px; cursor: pointer;
  border-radius: var(--r-sm); transition: all 0.14s var(--ease);
}
.fleet-tab.active { background: rgba(0,194,255,0.18); border-color: var(--cyan); color: var(--cyan); }

.fleet-empty {
  color: rgba(230,237,243,0.35); font-size: 10px;
  text-align: center; padding: 30px 10px; line-height: 1.8;
}

.fleet-row {
  background: var(--row-bg); border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 9px; margin-bottom: 5px;
  cursor: pointer; transition: border-color 0.14s var(--ease), transform 0.14s var(--ease), box-shadow 0.14s var(--ease);
}
.fleet-row:hover { border-color: var(--cyan); transform: translateX(2px); box-shadow: -2px 0 0 var(--cyan); }

.fleet-row-top { display: flex; justify-content: space-between; margin-bottom: 2px; }
.fleet-name { font-size: 10px; font-weight: 700; color: var(--white); }
.fleet-orbit { font-size: 9px; font-weight: 700; }

.fleet-row-mid { display: flex; gap: 10px; margin-bottom: 3px; }
.fleet-alt, .fleet-inc, .fleet-mission {
  font-size: 8.5px; color: rgba(230,237,243,0.6);
}

.fleet-row-tech { font-size: 8px; color: rgba(0,194,255,0.5); margin-bottom: 4px; letter-spacing: 0.05em; }

.fleet-row-bars { display: flex; align-items: center; gap: 4px; }
.bar-label { font-size: 7px; color: rgba(230,237,243,0.4); width: 28px; }
.bar-bg { flex: 1; height: 4px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; transition: width 0.5s var(--ease); }
.bar-val { font-size: 7.5px; color: rgba(230,237,243,0.5); width: 28px; text-align: right; }

.fleet-row-reentry { font-size: 8px; color: var(--red); margin-top: 3px; letter-spacing: 0.1em; }

/* ── CONJUNCTION PANEL ── */
.conj-empty { color: rgba(0,194,255,0.4); font-size: 10px; text-align: center; padding: 30px 10px; }

.conj-row {
  padding: 9px 11px; margin-bottom: 5px;
  border: 1px solid; border-radius: var(--r-sm);
}
.conj-crit { border-color: var(--red); background: rgba(255,68,68,0.09); }
.conj-warn { border-color: var(--amber); background: rgba(255,140,0,0.07); }
.conj-low  { border-color: var(--border); background: var(--row-bg); }

.conj-names { font-size: 9.5px; font-weight: 700; color: var(--white); margin-bottom: 3px; }
.conj-stats { font-size: 8.5px; color: rgba(230,237,243,0.6); margin-bottom: 5px; }
.conj-actions { display: flex; gap: 5px; }
.conj-actions button {
  background: none;
  border: 1px solid var(--border);
  color: var(--white); font-family: inherit;
  font-size: 8px; letter-spacing: 0.15em;
  padding: 4px 10px; cursor: pointer; border-radius: var(--r-sm);
  transition: all 0.14s var(--ease);
}
.conj-actions button:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── WORLD PANEL ── */
.world-summary {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 12px;
}
.ws-stat {
  background: var(--row-bg); border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 10px; text-align: center;
}
.ws-n { display: block; font-family: 'Rajdhani', monospace; font-size: 17px; font-weight: 700; color: var(--cyan); }
.ws-l { font-size: 7.5px; letter-spacing: 0.15em; color: rgba(230,237,243,0.5); }

.world-section-title {
  font-size: 8px; letter-spacing: 0.3em; color: var(--cyan);
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px; margin: 12px 0 8px; font-weight: 600;
}

.world-nation {
  padding: 7px 0; border-bottom: 1px solid rgba(0,194,255,0.08);
}
.wn-top { display: flex; align-items: center; gap: 7px; margin-bottom: 2px; }
.wn-flag { font-size: 14px; }
.wn-name { font-size: 9.5px; font-weight: 700; flex: 1; }
.wn-count { font-size: 11px; font-weight: 700; color: var(--cyan); }
.wn-note { font-size: 8px; color: rgba(230,237,243,0.5); margin-bottom: 2px; line-height: 1.5; }
.wn-ops { font-size: 7.5px; color: rgba(0,194,255,0.5); }

.world-orbit-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 4px; padding: 5px 0;
  border-bottom: 1px solid rgba(0,194,255,0.06);
}
.wor-label { font-size: 8.5px; color: var(--white); }
.wor-count { font-size: 9px; font-weight: 700; color: var(--cyan); text-align: right; }
.wor-note  { grid-column: 1/-1; font-size: 7.5px; color: rgba(230,237,243,0.4); }

.world-purpose-row {
  display: flex; align-items: center; gap: 7px;
  padding: 3px 0;
}
.wpr-name { font-size: 8px; color: rgba(230,237,243,0.7); width: 130px; flex-shrink: 0; }
.wpr-bar  { flex: 1; }
.wpr-pct  { font-size: 8px; color: var(--cyan); width: 30px; text-align: right; }

.world-debris .wd-row {
  display: flex; justify-content: space-between;
  padding: 3px 0; font-size: 8.5px;
  border-bottom: 1px solid rgba(0,194,255,0.06);
}
.wd-row span:first-child { color: rgba(230,237,243,0.6); }
.wd-row span:last-child  { color: var(--white); font-weight: 700; }

/* ── LOG PANEL ── */
.log-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.log-tab {
  background: var(--row-bg); border: 1px solid var(--border);
  color: rgba(230,237,243,0.5); font-family: inherit;
  font-size: 8px; letter-spacing: 0.15em; padding: 5px 10px; cursor: pointer;
  border-radius: var(--r-sm); transition: all 0.14s var(--ease);
}
.log-tab.active { background: rgba(0,194,255,0.14); border-color: var(--cyan); color: var(--cyan); }

/* ── QOSE BRIDGE ── */
.bridge-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.bridge-tab {
  background: var(--row-bg); border: 1px solid var(--border);
  color: rgba(230,237,243,0.5); font-family: inherit;
  font-size: 8px; letter-spacing: 0.15em; padding: 4px 9px; cursor: pointer;
  border-radius: var(--r-sm);
}
.bridge-tab.active { background: rgba(0,194,255,0.12); border-color: var(--cyan); color: var(--cyan); }
.bridge-list { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; padding-right: 2px; }
.bridge-empty { font-size: 9px; color: rgba(230,237,243,0.35); text-align: center; padding: 20px 0; }
.bridge-msg { background: var(--row-bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 7px 9px; }
.bridge-msg.mine { background: rgba(0,194,255,0.1); border-color: rgba(0,194,255,0.3); }
.bridge-msg-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 3px; flex-wrap: wrap; }
.bridge-msg-author { font-size: 9px; font-weight: 700; color: var(--cyan); }
.bridge-msg-org { font-size: 7px; color: rgba(230,237,243,0.4); letter-spacing: 0.05em; }
.bridge-msg-time { font-size: 7px; color: rgba(230,237,243,0.3); margin-left: auto; }
.bridge-msg-body { font-size: 11px; color: var(--white); line-height: 1.4; word-break: break-word; white-space: pre-wrap; }
.bridge-inputrow { display: flex; gap: 6px; flex-shrink: 0; border-top: 1px solid var(--border); padding-top: 8px; }
.bridge-input { flex: 1; resize: none; background: rgba(0,194,255,0.045); border: 1px solid var(--border); color: var(--white); font-family: inherit; font-size: 11px; padding: 7px 9px; max-height: 60px; border-radius: var(--r-sm); transition: border-color 0.15s; }
.bridge-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 10px rgba(0,194,255,0.18); }
.bridge-send { background: rgba(0,194,255,0.12); border: 1px solid var(--cyan); color: var(--cyan); font-family: inherit; font-size: 9px; letter-spacing: 0.1em; padding: 0 14px; cursor: pointer; border-radius: var(--r-sm); transition: all 0.15s var(--ease); }
.bridge-send:hover { background: var(--cyan); color: #000; box-shadow: var(--glow-cyan); }

/* ── Bridge: avatars, profile modal, Directory, DMs, Groups (ported from Reborn v7.31) ── */
.bridge-avatar-tiny { width: 16px; height: 16px; object-fit: contain; vertical-align: -3px; margin-right: 2px; border-radius: 2px; }
.bridge-msg-avatar { width: 14px; height: 14px; cursor: pointer; }
.bridge-msg-author { cursor: pointer; }
.bridge-msg-author:hover { text-decoration: underline; }
.bridge-myprofile-link { font-size: 8px; letter-spacing: 0.1em; color: rgba(0,194,255,0.6); cursor: pointer; white-space: nowrap; transition: color 0.15s; }
.bridge-myprofile-link:hover { color: var(--cyan); }

.bridge-profile-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px); z-index: 700; display: none; align-items: center; justify-content: center; }
.bridge-profile-backdrop.active { display: flex; }
.bridge-profile-modal { position: relative; width: min(90vw,380px); max-height: 80vh; background: var(--glass-hi); border: 1px solid var(--hairline); border-radius: var(--r-lg); display: flex; flex-direction: column; overflow: hidden; backdrop-filter: blur(16px); box-shadow: var(--glow-cyan-lg), 0 20px 60px rgba(0,0,0,0.5); animation: gateIn 0.3s var(--ease) both; }
.bp-field { margin-bottom: 12px; }
.bp-label { display: block; font-size: 8px; letter-spacing: 0.15em; color: rgba(0,194,255,0.4); margin-bottom: 3px; }
.bp-value { font-size: 13px; color: var(--white); }
.bp-bio-text { font-size: 12px; color: var(--white); line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.bp-avatar-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.bp-avatar-option { width: 44px; height: 44px; object-fit: contain; padding: 4px; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; background: rgba(0,194,255,0.03); transition: all 0.15s; }
.bp-avatar-option:hover { border-color: rgba(0,194,255,0.4); }
.bp-avatar-option.selected { border-color: var(--cyan); background: rgba(0,194,255,0.1); box-shadow: 0 0 0 1px var(--cyan); }
#bp-avatar-picker img { width: 44px; height: 44px; object-fit: contain; padding: 4px; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; background: rgba(0,194,255,0.03); transition: all 0.15s; }
#bp-avatar-picker img:hover { border-color: rgba(0,194,255,0.4); }
#bp-avatar-picker img.selected { border-color: var(--cyan); background: rgba(0,194,255,0.1); box-shadow: 0 0 0 1px var(--cyan); }

.bridge-mode-toggle { display: flex; gap: 4px; margin-bottom: 8px; flex-shrink: 0; }
.bridge-mode-btn { flex: 1; text-align: center; padding: 6px; font-size: 9px; letter-spacing: 0.1em; border: 1px solid var(--border); color: rgba(230,237,243,0.4); cursor: pointer; border-radius: var(--r-sm); transition: all 0.15s var(--ease); }
.bridge-mode-btn.active { border-color: var(--cyan); color: var(--cyan); background: rgba(0,194,255,0.08); }
.bridge-direct-actions { display: flex; gap: 6px; margin-bottom: 8px; flex-shrink: 0; }
.bridge-direct-action-btn { flex: 1; padding: 6px; font-size: 8px; letter-spacing: 0.1em; background: rgba(0,194,255,0.08); border: 1px solid var(--cyan); color: var(--cyan); cursor: pointer; border-radius: var(--r-sm); transition: all 0.15s; }
.bridge-direct-action-btn:hover { background: var(--cyan); color: #000; }
.bridge-direct-list { flex: 1; overflow-y: auto; min-height: 0; margin-bottom: 8px; }
.bridge-direct-row { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
.bridge-direct-row:hover { background: rgba(0,194,255,0.06); }
.bridge-direct-row-name { font-size: 11px; color: var(--white); }
.bridge-direct-row-sub { font-size: 7px; letter-spacing: 0.1em; color: rgba(230,237,243,0.35); margin-left: auto; }
.bridge-direct-back { font-size: 8px; letter-spacing: 0.1em; color: rgba(0,194,255,0.6); cursor: pointer; padding: 2px 0 8px; flex-shrink: 0; transition: color 0.15s; }
.bridge-direct-back:hover { color: var(--cyan); }
.bridge-group-check { width: 14px; height: 14px; accent-color: var(--cyan); flex-shrink: 0; }
.bridge-group-name-input { width: 100%; margin-bottom: 8px; box-sizing: border-box; }
.bridge-create-btn { width: 100%; margin-top: 6px; padding: 8px; }
.bridge-inline-error { background: rgba(255,68,68,0.1); border: 1px solid rgba(255,68,68,0.4); color: #ff8080; font-size: 9px; line-height: 1.4; padding: 8px; border-radius: var(--r-sm); margin-bottom: 8px; word-break: break-word; }
.bridge-thread-title { display: flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: 0.1em; color: var(--cyan); padding: 4px 2px 8px; flex-shrink: 0; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.bridge-thread-title .bridge-thread-badge { font-size: 7px; color: rgba(230,237,243,0.4); border: 1px solid var(--border); border-radius: 2px; padding: 1px 5px; letter-spacing: 0.1em; }

.log-row {
  padding: 4px 0; border-bottom: 1px solid rgba(0,194,255,0.05);
  display: flex; gap: 6px;
}
.log-t { font-size: 8px; color: rgba(0,194,255,0.5); flex-shrink: 0; width: 56px; }
.log-m { font-size: 8.5px; color: rgba(230,237,243,0.75); line-height: 1.4; }
.log-alert .log-m { color: var(--red); }
.log-warn  .log-m { color: var(--amber); }
.log-info  .log-m { color: rgba(230,237,243,0.7); }

/* ── API STATUS PANEL ── */
.api-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(0,194,255,0.06); }
.api-name { font-size: 8.5px; flex: 1; color: rgba(230,237,243,0.7); letter-spacing: 0.05em; }
.api-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.api-dot.ok      { background: var(--green); box-shadow: 0 0 8px rgba(0,255,136,0.7); animation: dotPulse 2s ease-in-out infinite; }
.api-dot.loading { background: var(--amber); }
.api-dot.err     { background: var(--red); }
@keyframes dotPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── SATELLITE TOOLTIP ── */
#sat-tip {
  position: fixed; z-index: 999;
  background: rgba(6,9,14,0.97);
  border: 1px solid var(--cyan);
  border-radius: var(--r-md);
  padding: 9px 13px; min-width: 180px;
  display: none; pointer-events: none;
  box-shadow: var(--glow-cyan), 0 12px 30px rgba(0,0,0,0.5);
}
#sat-tip.show { display: block; animation: gateIn 0.15s var(--ease) both; }

.st-row { display: flex; justify-content: space-between; gap: 14px; padding: 2px 0; }
.st-label { font-size: 8px; color: rgba(230,237,243,0.4); letter-spacing: 0.15em; }
.st-val   { font-size: 8.5px; color: var(--white); font-weight: 700; }

/* ── SCROLLBARS ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-soft); }

/* ── RESPONSIVE ── */
/* ── TOOLBAR DROPDOWNS ── */
.tb-dropdown {
  position: relative;
  display: inline-block;
}
.tb-drop-btn {
  display: flex; align-items: center; gap: 4px;
}
.tb-drop-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: var(--glass-hi);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  min-width: 170px;
  z-index: 999;
  flex-direction: column;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(0,0,0,0.5), var(--glow-cyan);
  overflow: hidden;
}
.tb-drop-menu.open { display: flex; animation: menuIn 0.16s var(--ease) both; }
@keyframes menuIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.tb-drop-menu button {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(0,194,255,0.08);
  color: rgba(230,237,243,0.75);
  font-family: inherit;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: background 0.12s, color 0.12s, padding-left 0.12s;
}
.tb-drop-menu button:last-child { border-bottom: none; }
.tb-drop-menu button:hover { background: rgba(0,194,255,0.10); color: var(--cyan); padding-left: 17px; }
.tb-drop-menu button.dd-active { color: var(--cyan); font-weight: 700; }
.dd-sep { height: 1px; background: rgba(0,194,255,0.15); margin: 3px 0; }

/* ── SIM FOOTER ── */
#sim-footer {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 28px; z-index: 9;
  display: flex; align-items: center; gap: 14px;
  padding: 0 14px;
  background: rgba(5,7,10,0.85);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(0,194,255,0.14);
  pointer-events: none;
}
.footer-brand {
  font-family: 'Rajdhani', monospace;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.3em;
  color: var(--cyan); pointer-events: none;
}
.footer-tag {
  font-size: 7.5px; letter-spacing: 0.2em;
  color: rgba(230,237,243,0.3); pointer-events: none;
}
.footer-scale {
  display: flex; align-items: center; gap: 5px;
  margin-left: auto; pointer-events: all;
}
.footer-label {
  font-size: 7.5px; letter-spacing: 0.18em;
  color: rgba(230,237,243,0.4);
}
#sat-scale-val {
  font-size: 9px; color: var(--cyan); min-width: 30px; text-align: center;
}
.footer-version {
  font-size: 7.5px; color: rgba(230,237,243,0.22);
  letter-spacing: 0.15em; pointer-events: none;
  margin-left: auto;
}

/* Astronaut list in feeds panel */
.astro-row {
  display: flex; justify-content: space-between;
  padding: 4px 0; border-bottom: 1px solid rgba(0,194,255,0.06);
  font-size: 8px; color: rgba(230,237,243,0.7);
}
.astro-craft {
  color: var(--cyan); font-size: 7.5px;
}

/* ── Shared form styling for ported panels (Cloud Sync, TLE Track, etc.) ── */
.cs-sec { font-size: 9px; letter-spacing: 0.15em; color: var(--cyan); font-weight: 700; margin: 12px 0 6px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.cs-sec:first-child { margin-top: 0; }
.cs-label { font-size: 8px; letter-spacing: 0.15em; color: rgba(230,237,243,0.5); margin: 6px 0 3px; }
.cs-input { width: 100%; background: var(--row-bg); border: 1px solid var(--border); color: var(--white); font-family: inherit; font-size: 10px; padding: 7px 9px; border-radius: var(--r-sm); box-sizing: border-box; transition: border-color 0.15s, box-shadow 0.15s; }
.cs-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 10px rgba(0,194,255,0.18); }
textarea.cs-input { font-family: 'JetBrains Mono', 'Share Tech Mono', monospace; }
.cs-btn { width: 100%; background: rgba(0,194,255,0.1); border: 1px solid var(--border); color: var(--cyan); font-size: 9px; letter-spacing: 0.1em; padding: 8px; margin-top: 6px; border-radius: var(--r-sm); cursor: pointer; transition: all 0.15s var(--ease); }
.cs-btn:hover { background: rgba(0,194,255,0.22); border-color: var(--cyan); transform: translateY(-1px); }
.cs-toggle { padding: 7px 4px; text-align: center; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 8px; letter-spacing: 0.1em; color: var(--white); cursor: pointer; transition: all 0.15s; }
.cs-toggle.sel { background: rgba(0,194,255,0.2); color: var(--cyan); border-color: var(--cyan); }
.cs-row { display: flex; justify-content: space-between; align-items: center; font-size: 8px; margin-top: 4px; }
.cs-row .k { color: rgba(230,237,243,0.5); letter-spacing: 0.1em; }
.cs-row .v { color: var(--white); }
.cs-row .v.ok { color: var(--green); }
.cs-row .v.crit { color: var(--red); }
.cs-row .v.warn { color: var(--amber); }
.cs-hint { font-size: 8px; color: rgba(230,237,243,0.4); line-height: 1.5; margin-bottom: 8px; }

/* ══ BRIDGE v2 — 3-column layout ══ */
.b2-layout { display: flex; min-height: 0; flex: 1; }
.b2-sidebar { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); padding: 10px; box-sizing: border-box; }
.b2-search { margin: 0 0 8px; flex-shrink: 0; height: 30px; max-height: 30px; }
.b2-new-btn { width: 100%; padding: 8px; text-align: center; margin-bottom: 4px; }
.b2-sidebar-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.b2-sidebar-section { font-size: 7.5px; letter-spacing: 0.2em; color: rgba(0,194,255,0.4); margin: 10px 0 4px; padding-bottom: 2px; border-bottom: 1px solid var(--border); font-weight: 600; }
.b2-sidebar-section:first-child { margin-top: 2px; }
.b2-item { display: flex; align-items: center; gap: 7px; padding: 7px; cursor: pointer; font-size: 11px; color: rgba(230,237,243,0.75); transition: background 0.14s, transform 0.14s; border-radius: var(--r-sm); }
.b2-item:hover { background: rgba(0,194,255,0.06); }
.b2-item.active { background: rgba(0,194,255,0.12); color: var(--white); box-shadow: inset 2px 0 0 var(--cyan); }
.b2-item-icon { width: 14px; text-align: center; flex-shrink: 0; color: rgba(0,194,255,0.5); }
.b2-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b2-badge { background: var(--cyan); color: #000; font-size: 8px; font-weight: 700; border-radius: 10px; padding: 1px 6px; flex-shrink: 0; }
.b2-empty-hint { font-size: 8.5px; color: rgba(230,237,243,0.3); padding: 6px 4px; text-align: center; }
.b2-avatar { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; background: rgba(0,194,255,0.05); border-radius: 3px; }
.b2-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.b2-chat-header { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.b2-chat-title { font-size: 11px; letter-spacing: 0.05em; color: var(--white); }
.b2-pill { font-size: 7px; letter-spacing: 0.1em; color: rgba(0,194,255,0.7); border: 1px solid var(--border); padding: 2px 7px; border-radius: 8px; }
.b2-messages { flex: 1; overflow-y: auto; min-height: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.b2-empty-state { font-size: 9px; color: rgba(230,237,243,0.3); text-align: center; padding: 30px 0; }
.b2-msg { display: flex; gap: 9px; align-items: flex-start; }
.b2-msg .b2-avatar { width: 28px; height: 28px; cursor: pointer; }
.b2-msg-body { flex: 1; min-width: 0; }
.b2-msg-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; flex-wrap: wrap; }
.b2-msg-author { font-size: 10px; font-weight: 700; color: var(--cyan); cursor: pointer; }
.b2-msg-author:hover { text-decoration: underline; }
.b2-msg-org { font-size: 7.5px; color: rgba(230,237,243,0.4); }
.b2-msg-time { font-size: 7.5px; color: rgba(230,237,243,0.3); margin-left: auto; }
.b2-msg-content { font-size: 12px; color: var(--white); line-height: 1.45; word-break: break-word; white-space: pre-wrap; }
.b2-inputrow { margin: 0 14px 12px; flex-shrink: 0; }
.b2-rightpanel { width: 200px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--border); padding: 10px; box-sizing: border-box; }
.b2-rp-tabs { margin-bottom: 8px; }
.b2-rp-content { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.b2-rp-member { display: flex; align-items: center; gap: 8px; padding: 7px; cursor: pointer; transition: background 0.14s; border-radius: var(--r-sm); }
.b2-rp-member:hover { background: rgba(0,194,255,0.06); }
.b2-rp-member-name { font-size: 11px; color: var(--white); }
.b2-rp-member-org { font-size: 7.5px; color: rgba(230,237,243,0.4); }
.b2-userlist { max-height: 280px; overflow-y: auto; margin: 4px 0 8px; }
.b2-userpick { display: flex; align-items: center; gap: 8px; padding: 8px 6px; cursor: pointer; transition: background 0.14s; border-radius: var(--r-sm); }
.b2-userpick:hover { background: rgba(0,194,255,0.06); }
.b2-userpick.selected { background: rgba(0,194,255,0.12); }
.b2-userpick-name { font-size: 11px; color: var(--white); flex: 1; }
.b2-userpick-check { width: 16px; text-align: center; color: var(--cyan); font-size: 12px; flex-shrink: 0; }
.b2-error { background: rgba(255,68,68,0.1); border: 1px solid rgba(255,68,68,0.4); color: var(--red); font-size: 9px; line-height: 1.4; padding: 8px; margin-top: 4px; word-break: break-word; border-radius: var(--r-sm); }

/* ══ RELAY — duration picker + pending/approved rows ══ */
#relay-duration-row button{background:rgba(0,194,255,0.05);border:1px solid var(--border);color:var(--white);font-family:inherit;font-size:9px;letter-spacing:0.05em;padding:7px 11px;cursor:pointer;border-radius:var(--r-sm);transition:all 0.15s var(--ease);}
#relay-duration-row button:hover{border-color:var(--cyan);}
#relay-duration-row button.dd-active{background:rgba(0,194,255,0.18);border-color:var(--cyan);color:var(--cyan);font-weight:700;}
.relay-pill{display:inline-block;font-size:9px;letter-spacing:0.1em;padding:3px 8px;border-radius:4px;font-weight:700;}
.relay-pill.pending{background:rgba(255,193,7,0.12);color:#ffc107;border:1px solid #ffc107;}
.relay-pill.approved{background:rgba(0,194,255,0.12);color:var(--cyan);border:1px solid var(--cyan);}
.relay-pill.denied,.relay-pill.expired{background:rgba(239,68,68,0.12);color:#ff8080;border:1px solid var(--red);}
.relay-join-status{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;font-size:10px;margin-bottom:12px;}
.relay-join-status .k{color:rgba(230,237,243,0.4);letter-spacing:0.1em;}
.relay-join-status .v{color:var(--white);}

/* ══ RELAY LIVE BANNER ══ */
#relay-live-banner{position:absolute;top:60px;left:12px;z-index:250;background:rgba(5,7,10,0.9);border:1px solid var(--red);border-radius:8px;padding:6px 10px;display:flex;align-items:center;gap:7px;backdrop-filter:blur(10px);box-shadow:0 0 12px rgba(239,68,68,0.2);font-family:inherit;font-size:9px;font-weight:700;color:#ff8080;letter-spacing:1px;}
#relay-live-banner .dot{width:7px;height:7px;border-radius:50%;background:var(--red);animation:relayLivePulse 1.4s ease-in-out infinite;}
#relay-live-banner #relay-live-host{color:var(--white);}
@keyframes relayLivePulse{0%,100%{opacity:1;}50%{opacity:0.25;}}

/* ══ RELAY — hide edit-capable controls during watching/observer-only mode ══
   Functional rule — unchanged from prior version, do not remove. */
body.relay-observer-only #panel-launch,
body.relay-live-watching #panel-launch,
body.relay-observer-only #panel-sandbox,
body.relay-live-watching #panel-sandbox,
body.relay-observer-only #dd-launch-btn,
body.relay-live-watching #dd-launch-btn,
body.relay-observer-only #dd-sandbox-btn,
body.relay-live-watching #dd-sandbox-btn{display:none!important;}
body.relay-observer-only .tb-btn:not([onclick*="bridge"]),
body.relay-live-watching .tb-btn:not([onclick*="bridge"]){display:none!important;}
