/* ==============================================================================
   SERENITY HUB — COMMAND & LIVE BROADCAST CONSOLE
   Ultra-Modern Cyberpunk / Deep Space Aesthetic
   ============================================================================== */

:root {
  /* Color Palette */
  --bg-deep: #05070e;
  --bg-surface: #0a0e1c;
  --bg-card: rgba(14, 20, 38, 0.72);
  --bg-card-hover: rgba(20, 28, 54, 0.85);
  --bg-input: rgba(8, 12, 24, 0.75);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(0, 140, 255, 0.28);
  --border-focus: #0084ff;

  /* Serenity Neon Accents */
  --neon-blue: #0084ff;
  --neon-cyan: #00e5ff;
  --neon-indigo: #5865f2;
  --neon-violet: #8b5cf6;
  --neon-emerald: #10b981;
  --neon-amber: #f59e0b;
  --neon-rose: #f43f5e;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --glow-blue: 0 0 25px rgba(0, 132, 255, 0.35);
  --glow-cyan: 0 0 25px rgba(0, 229, 255, 0.35);
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Reset & Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #060913;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
  border: 2px solid #060913;
}
::-webkit-scrollbar-thumb:hover {
  background: #0084ff;
}

/* Ambient Cosmic Background */
.space-stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 100px 150px, #7dd3fc, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 250px 80px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 400px 300px, #38bdf8, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 600px 200px, #c084fc, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 800px 100px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 950px 450px, #38bdf8, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 1200px 250px, #ffffff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 1000px 600px;
  opacity: 0.35;
  z-index: 0;
}

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.glow-blue {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #0084ff 0%, transparent 70%);
  top: -150px;
  left: -150px;
}

.glow-cyan {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #00e5ff 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  animation-delay: -7s;
}

.glow-violet {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  top: 40%;
  left: 30%;
  opacity: 0.15;
  animation-delay: -12s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.08); }
  100% { transform: translate(-40px, 70px) scale(0.95); }
}

/* App Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

/* ==============================================================================
   GATEWAY LOGIN CARD (Centered Landing Screen)
   ============================================================================== */
.login-gateway-view {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card-glass {
  width: 100%;
  max-width: 480px;
  background: rgba(11, 15, 29, 0.85);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(0, 140, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 44px 38px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 132, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #0084ff, #00e5ff, transparent);
}

.login-logo-wrap {
  position: relative;
  margin-bottom: 18px;
}

.login-logo-glow {
  position: absolute;
  inset: -12px;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(0, 140, 255, 0.6) 0%, transparent 70%);
  filter: blur(14px);
  z-index: 0;
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.5; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1.05); }
}

.login-logo-badge {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  border-radius: 20px;
  background: #090d1a;
  border: 1.5px solid rgba(0, 180, 255, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 140, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-sh-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.brand-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--neon-cyan);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  margin-bottom: 12px;
}

.login-title-shimmer {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #7dd3fc 70%, #0084ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.login-tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.login-form-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-key-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--neon-blue);
  pointer-events: none;
}

.login-password-input {
  width: 100%;
  background: rgba(6, 9, 18, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px 16px 14px 46px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.login-password-input:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.25);
}

.login-error-msg {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: var(--radius-sm);
  color: #fda4af;
  font-size: 0.82rem;
  padding: 10px 14px;
  text-align: left;
}

.btn-login-gradient {
  background: linear-gradient(135deg, #0084ff 0%, #0056b3 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 24px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 132, 255, 0.4);
  transition: all 0.25s ease;
}

.btn-login-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 132, 255, 0.6);
  background: linear-gradient(135deg, #1a90ff 0%, #0066cc 100%);
}

.btn-login-gradient:active {
  transform: translateY(0);
}

.btn-arrow-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.btn-login-gradient:hover .btn-arrow-icon {
  transform: translateX(4px);
}

.login-card-footer {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ==============================================================================
   TOP HEADER NAVIGATION BAR
   ============================================================================== */
.hub-header {
  background: rgba(12, 16, 32, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-card);
}

.header-branding {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hub-logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #090d1a;
  border: 1.5px solid rgba(0, 140, 255, 0.45);
  box-shadow: 0 4px 16px rgba(0, 102, 255, 0.25);
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.hub-logo-badge:hover {
  transform: scale(1.06) rotate(-2deg);
}

.hub-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #ffffff 40%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hub-version-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(0, 132, 255, 0.15);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 132, 255, 0.3);
  border-radius: var(--radius-full);
  padding: 2px 8px;
}

.hub-subtitle {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Status Indicator Pill */
.status-indicator-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: #34d399;
}

.pulse-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseBeacon 2s infinite;
}

@keyframes pulseBeacon {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #10b981; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Endpoint Badge */
.api-endpoint-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(8, 12, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  padding: 5px 8px 5px 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.api-endpoint-badge:hover {
  border-color: var(--neon-blue);
  background: rgba(0, 132, 255, 0.08);
  color: #fff;
}

.btn-copy-chip {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: var(--radius-full);
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-chip:hover {
  background: var(--neon-blue);
  color: #fff;
}

/* Auth Badge */
.auth-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-unlocked {
  background: rgba(0, 132, 255, 0.12);
  border: 1px solid rgba(0, 132, 255, 0.35);
  color: #7dd3fc;
}

.auth-locked {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

.auth-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Logout Button */
.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #fb7185;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: #f43f5e;
  color: #fff;
}

/* ==============================================================================
   TELEMETRY METRICS DECK
   ============================================================================== */
.telemetry-deck {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.telemetry-deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.deck-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deck-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 12px var(--neon-cyan);
}

.deck-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.deck-subtitle {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.deck-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.telemetry-timestamp {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.btn-refresh-telemetry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-refresh-telemetry:hover {
  background: rgba(0, 132, 255, 0.15);
  border-color: var(--neon-blue);
  color: #fff;
}

.btn-refresh-telemetry:hover .spin-hover {
  transform: rotate(180deg);
  transition: transform 0.4s ease;
}

/* Metrics Grid */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.metric-card {
  background: rgba(9, 13, 26, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 140, 255, 0.35);
  background: rgba(14, 20, 40, 0.8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 132, 255, 0.1);
}

.card-active-glow {
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.08);
}

.metric-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
}

.metric-icon-wrap svg {
  width: 20px;
  height: 20px;
}

.icon-cyan {
  background: rgba(0, 229, 255, 0.12);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.icon-blue {
  background: rgba(0, 132, 255, 0.12);
  color: var(--neon-blue);
  border: 1px solid rgba(0, 132, 255, 0.25);
}

.icon-indigo {
  background: rgba(88, 101, 242, 0.12);
  color: #818cf8;
  border: 1px solid rgba(88, 101, 242, 0.25);
}

.icon-violet {
  background: rgba(139, 92, 246, 0.12);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.live-radar-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
}

.metric-body {
  margin-bottom: 12px;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.metric-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
}

.text-glow-cyan {
  color: #38bdf8;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

.text-glow-blue {
  color: #60a5fa;
  text-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
}

.text-glow-violet {
  color: #c084fc;
  text-shadow: 0 0 20px rgba(192, 132, 252, 0.4);
}

.metric-trend-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 2px 8px;
}

.trend-live {
  color: var(--neon-cyan);
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.2);
}

/* ==============================================================================
   MAIN WORKSPACE LAYOUT (2 Columns: Form & Simulator)
   ============================================================================== */
.workspace-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }
}

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
}

.panel-header-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
}

.panel-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.panel-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-icon-badge svg {
  width: 20px;
  height: 20px;
}

.icon-glow-blue {
  background: rgba(0, 132, 255, 0.12);
  color: var(--neon-blue);
  border: 1px solid rgba(0, 132, 255, 0.3);
  box-shadow: 0 0 16px rgba(0, 132, 255, 0.2);
}

.icon-glow-cyan {
  background: rgba(0, 229, 255, 0.12);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.2);
}

.icon-glow-violet {
  background: rgba(139, 92, 246, 0.12);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.2);
}

.panel-title-group h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.panel-sub {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.pill-editing {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

/* ==============================================================================
   FORM CONTROLS (Cyberpunk Styling)
   ============================================================================== */
.form-group-modern {
  margin-bottom: 18px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.form-label-modern {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  display: block;
  margin-bottom: 8px;
}

.required {
  color: var(--neon-rose);
}

.char-count-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  padding: 2px 8px;
}

.form-textarea-modern {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.5;
  resize: vertical;
  transition: all 0.2s ease;
}

.form-textarea-modern:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.2);
  background: rgba(10, 15, 30, 0.9);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.select-wrap-modern {
  position: relative;
}

.form-select-modern,
.form-input-modern {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-select-modern:focus,
.form-input-modern:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.2);
}

.select-wrap-modern::after {
  content: '▼';
  font-size: 0.65rem;
  color: var(--text-dim);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.target-hint-text {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 6px;
  font-style: italic;
}

/* Form Action Buttons */
.form-actions-modern {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.btn-primary-gradient {
  background: linear-gradient(135deg, #0084ff 0%, #0056b3 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 24px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 132, 255, 0.4);
  transition: all 0.25s ease;
}

.btn-primary-gradient svg {
  width: 18px;
  height: 18px;
}

.btn-primary-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 132, 255, 0.6);
  background: linear-gradient(135deg, #1a90ff 0%, #0066cc 100%);
}

.btn-row-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-secondary-glass,
.btn-ghost-glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border-subtle);
  color: #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-secondary-glass svg,
.btn-ghost-glass svg {
  width: 16px;
  height: 16px;
}

.btn-secondary-glass:hover {
  background: rgba(0, 132, 255, 0.12);
  border-color: rgba(0, 132, 255, 0.4);
  color: #fff;
}

.btn-ghost-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-test-action {
  background: rgba(16, 185, 129, 0.08);
  border: 1.5px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.btn-test-action svg {
  width: 16px;
  height: 16px;
}

.btn-test-action:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.25);
}

/* ==============================================================================
   IN-GAME SIMULATOR VIEWPORT (Right Panel)
   ============================================================================== */
.live-realtime-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--neon-cyan);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-full);
  padding: 4px 10px;
}

.beacon-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  animation: pulseBeacon 1.5s infinite;
}

.simulator-viewport-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.roblox-window-frame {
  background: #080c18;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(0, 0, 0, 0.6);
  position: relative;
}

.roblox-window-bar {
  background: #0d1222;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.window-dot-group {
  display: flex;
  gap: 6px;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.window-dot.red { background: #ef4444; }
.window-dot.yellow { background: #f59e0b; }
.window-dot.green { background: #10b981; }

.roblox-client-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.window-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
}

.fps-tag { color: #34d399; }
.ping-tag { color: #38bdf8; }

.roblox-viewport-canvas {
  height: 380px;
  background: #05070f;
  background-image: 
    radial-gradient(rgba(0, 140, 255, 0.12) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.crosshair-center {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.simulator-watermark {
  position: absolute;
  bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.15);
}

/* ==============================================================================
   SERENITY NOTIFICATION POPUP CARD (Exact In-Game Lua Match)
   ============================================================================== */
.Serenity-popup-card-v2,
.infinity-popup-card-v2 {
  width: 100%;
  max-width: 440px;
  background: #121318;
  border: 1px solid rgba(55, 60, 75, 0.9);
  border-radius: 12px;
  padding: 12px 14px 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 132, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: slideDownIn 0.4s ease;
}

@keyframes slideDownIn {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.popup-v2-main {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.popup-v2-logo-holder {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #090b14;
  border: 1.2px solid #008cff;
  box-shadow: 0 2px 10px rgba(0, 140, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.popup-v2-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
}

.popup-v2-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.popup-v2-header {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.popup-v2-message {
  font-size: 0.78rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.popup-v2-dismiss {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-v2-dismiss:hover {
  color: #ffffff;
}

.popup-v2-progress-track {
  width: 100%;
  height: 3px;
  background: #232630;
  border-radius: 2px;
  overflow: hidden;
}

.popup-v2-progress-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #7887ff 0%, #00e5ff 100%);
  border-radius: 2px;
  transition: width 0.1s linear;
}

/* Simulator Info Strip */
.simulator-info-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.info-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--neon-blue);
}

/* ==============================================================================
   BROADCAST HISTORY TABLE
   ============================================================================== */
.history-panel {
  margin-bottom: 24px;
}

.table-responsive-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.history-table th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 12px 14px;
  border-bottom: 1.5px solid var(--border-subtle);
  background: rgba(8, 12, 24, 0.4);
}

.history-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  vertical-align: middle;
}

.history-table tr:hover td {
  background: rgba(0, 132, 255, 0.04);
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.action-btn.btn-toggle:hover {
  background: rgba(0, 132, 255, 0.2);
  border-color: var(--neon-blue);
  color: #7dd3fc;
}

.action-btn.btn-edit:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--neon-amber);
  color: #fde68a;
}

.action-btn.btn-delete:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: var(--neon-rose);
  color: #fda4af;
}

.popup-type-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.badge-announcement {
  background: rgba(0, 132, 255, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(0, 132, 255, 0.3);
}

.badge-update {
  background: rgba(0, 229, 255, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.badge-important {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-warning {
  background: rgba(244, 63, 94, 0.12);
  color: #f87171;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-maintenance {
  background: rgba(139, 92, 246, 0.12);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
}

.status-active {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-inactive {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
}

.btn-action-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.2s ease;
}

.btn-action-icon:hover {
  background: var(--neon-blue);
  color: #fff;
  border-color: var(--neon-blue);
}

.btn-action-delete:hover {
  background: var(--neon-rose);
  border-color: var(--neon-rose);
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 36px !important;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ==============================================================================
   FOOTER
   ============================================================================== */
.hub-footer {
  padding: 24px 0 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a {
  color: var(--neon-cyan);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ==============================================================================
   MODAL DIALOG (Admin Password)
   ============================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 99999;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card-glass {
  width: 100%;
  max-width: 440px;
  background: #0b0f1f;
  border: 1.5px solid rgba(0, 140, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 132, 255, 0.2);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.modal-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(0, 132, 255, 0.15);
  border: 1px solid rgba(0, 132, 255, 0.35);
  color: var(--neon-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon-badge svg {
  width: 22px;
  height: 22px;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.auth-hint {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 8px;
}

.auth-hint code {
  color: var(--neon-cyan);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* ==============================================================================
   TOAST NOTIFICATIONS
   ============================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100000;
}

.toast {
  background: #0d1224;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: #fff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  animation: slideInToast 0.3s ease;
}

@keyframes slideInToast {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-success { border-color: rgba(16, 185, 129, 0.4); }
.toast-error { border-color: rgba(244, 63, 94, 0.4); }
.toast-info { border-color: rgba(0, 140, 255, 0.4); }

.icon-sm {
  width: 16px;
  height: 16px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}
