/* ============================================================ */
/* LOCAL SELF-HOSTED FONTS: Archivo, IBM Plex Mono & Instrument Sans */
/* ============================================================ */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-mono-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-mono-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-mono-cyrillic-600.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-mono-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/instrument-sans-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/ibm-sans-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: #0b0b0c;
  --bg2: #141417;
  --bg3: #1a1a1f;
  --card-bg: rgba(20, 20, 23, 0.72);
  --card-hover: rgba(26, 26, 31, 0.9);
  --fg: #f1ede6;
  --muted: #8f8a83;
  --line: #26262b;
  --line-light: #38383f;
  --accent: #e9a85a;
  --accent-hover: #f5b974;
  --accent-glow: rgba(233, 168, 90, 0.22);
  --green: #2ecc71;
  --yellow: #f1c40f;
  --red: #e74c3c;
  
  --font-display: 'Archivo', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Instrument Sans', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; min-height: 100%;
  background-color: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
.mono { font-family: var(--font-mono); letter-spacing: 0.06em; }

/* ------------------------------------------------------------- */
/* 🔒 GATEKEEPER LOCKSCREEN (Futuristic Bi-Parting Blast Doors) */
/* ------------------------------------------------------------- */
.gatekeeper-curtain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 10000;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: visibility 1.1s, opacity 0.6s ease;
}

/* Bi-Parting Hydraulic Blast Doors */
.shutter-door {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50.2%;
  background: radial-gradient(circle at 50% 50%, #15151a 0%, #08080a 100%);
  z-index: 5;
  transition: transform 1.05s cubic-bezier(0.77, 0, 0.175, 1);
  overflow: hidden;
  will-change: transform;
  pointer-events: none !important;
}

.door-top {
  top: 0;
  border-bottom: 2px solid rgba(233, 168, 90, 0.4);
  pointer-events: none !important;
}

.door-bottom {
  bottom: 0;
  border-top: 2px solid rgba(233, 168, 90, 0.4);
  pointer-events: none !important;
}

.door-edge-laser {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 5%, #e9a85a 25%, #ffffff 50%, #e9a85a 75%, transparent 95%);
  box-shadow: 0 0 16px #e9a85a, 0 0 32px #e9a85a, 0 0 4px #ffffff;
  z-index: 6;
  pointer-events: none !important;
}
.door-top .door-edge-laser { bottom: 0; }
.door-bottom .door-edge-laser { top: 0; }

.door-stamp {
  position: absolute;
  font-size: 10px;
  color: rgba(233, 168, 90, 0.3);
  letter-spacing: 0.22em;
  pointer-events: none !important;
}
.door-top .door-stamp { bottom: 16px; right: 30px; }
.door-bottom .door-stamp { top: 16px; left: 30px; }

.door-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(233, 168, 90, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 168, 90, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none !important;
}

/* Central Seam Laser Beam */
.shutter-seam-laser {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 2px;
  transform: translateY(-50%);
  background: #ffffff;
  box-shadow: 0 0 20px #e9a85a, 0 0 50px #e9a85a;
  z-index: 7;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none !important;
}

/* Laser Scanner Beam across the Lock Card */
.gate-laser-scanner {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 10%, #e9a85a 30%, #ffffff 50%, #e9a85a 70%, transparent 90%);
  box-shadow: 0 0 20px #e9a85a, 0 0 40px #e9a85a, 0 0 60px rgba(233, 168, 90, 0.8);
  z-index: 20;
  opacity: 0;
  pointer-events: none !important;
}

/* Phase 1: Granting Authorization FX */
.gatekeeper-curtain.granting .gatekeeper-box {
  border-color: #e9a85a;
  box-shadow: 0 0 80px rgba(233, 168, 90, 0.5), inset 0 0 35px rgba(233, 168, 90, 0.2);
  transform: scale(0.97);
  transition: transform 0.35s ease, border-color 0.3s ease, box-shadow 0.35s ease;
}

.gatekeeper-curtain.granting .gatekeeper-badge {
  background: rgba(233, 168, 90, 0.25);
  border-color: #e9a85a;
  color: #ffffff;
}

.gatekeeper-curtain.granting .gate-laser-scanner {
  opacity: 1;
  animation: laserScanDown 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes laserScanDown {
  0% { top: 15%; opacity: 0; }
  25% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 85%; opacity: 0; }
}

/* Phase 2: Hydraulic Doors Parting */
.gatekeeper-curtain.unlocked {
  pointer-events: none;
  visibility: hidden;
  transition: visibility 1.1s, opacity 0.5s ease 0.6s;
}

.gatekeeper-curtain.unlocked .door-top {
  transform: translateY(-102%);
}

.gatekeeper-curtain.unlocked .door-bottom {
  transform: translateY(102%);
}

.gatekeeper-curtain.unlocked .shutter-seam-laser {
  animation: seamLaserFlash 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes seamLaserFlash {
  0% {
    opacity: 0;
    transform: translateY(-50%) scaleX(0.2);
  }
  35% {
    opacity: 1;
    transform: translateY(-50%) scaleX(1);
    box-shadow: 0 0 25px #ffffff, 0 0 50px #e9a85a;
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) scaleX(1.05);
  }
}

.gatekeeper-curtain.unlocked .gatekeeper-box {
  transform: scale(0.88) translateY(15px);
  opacity: 0;
  filter: blur(16px);
  pointer-events: none;
  transition: transform 0.55s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.45s ease, filter 0.45s ease;
}

.gatekeeper-curtain.unlocked .curtain-bg {
  opacity: 0;
  transition: opacity 0.7s ease;
}

/* Full-Screen Holographic Sweep FX during HUD Boot */
.hud-boot-scanline {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 5%, rgba(233, 168, 90, 0.3) 20%, #ffffff 50%, rgba(233, 168, 90, 0.3) 80%, transparent 95%);
  box-shadow: 0 0 25px #e9a85a, 0 0 50px rgba(233, 168, 90, 0.8), 0 0 100px rgba(233, 168, 90, 0.4);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
}

body.hud-booting .hud-boot-scanline {
  animation: hudScanSweep 1.25s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
}

@keyframes hudScanSweep {
  0% { top: -20px; opacity: 1; }
  80% { opacity: 0.9; }
  100% { top: 100vh; opacity: 0; }
}

/* Staggered HUD Element Power-On Sequence */
body.hud-booting .hud-header {
  animation: hudFadeDown 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

body.hud-booting .telemetry-card:nth-child(1) { animation: hudCardSnap 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s backwards; }
body.hud-booting .telemetry-card:nth-child(2) { animation: hudCardSnap 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.35s backwards; }
body.hud-booting .telemetry-card:nth-child(3) { animation: hudCardSnap 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.45s backwards; }
body.hud-booting .telemetry-card:nth-child(4) { animation: hudCardSnap 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.55s backwards; }
body.hud-booting .telemetry-card:nth-child(5) { animation: hudCardSnap 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.65s backwards; }

body.hud-booting .service-card:nth-child(1) { animation: hudCardSnap 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.45s backwards; }
body.hud-booting .service-card:nth-child(2) { animation: hudCardSnap 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.55s backwards; }
body.hud-booting .service-card:nth-child(3) { animation: hudCardSnap 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.65s backwards; }
body.hud-booting .service-card:nth-child(4) { animation: hudCardSnap 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.75s backwards; }
body.hud-booting .service-card:nth-child(5) { animation: hudCardSnap 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.85s backwards; }
body.hud-booting .service-card:nth-child(6) { animation: hudCardSnap 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.95s backwards; }

body.hud-booting .admin-shelf {
  animation: hudFadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.7s backwards;
}

@keyframes hudFadeDown {
  from { opacity: 0; transform: translateY(-24px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes hudFadeUp {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes hudCardSnap {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    filter: brightness(2) blur(4px);
  }
  60% {
    filter: brightness(1.25) blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1) blur(0);
  }
}

.curtain-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.curtain-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 650px;
  height: 650px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.12;
  filter: blur(140px);
}

.gatekeeper-box {
  position: relative;
  z-index: 50 !important;
  width: min(480px, 92vw);
  background: rgba(20, 20, 24, 0.88);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 38px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 50px -10px var(--accent-glow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
  pointer-events: auto !important;
  margin: auto;
}

.gatekeeper-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.gatekeeper-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(233, 168, 90, 0.08);
  border: 1px solid rgba(233, 168, 90, 0.3);
  border-radius: 999px;
  color: var(--accent);
}

.lock-icon-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.5s infinite alternate;
}

.gatekeeper-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--fg);
}

.gatekeeper-title .accent {
  color: var(--accent);
}

.gatekeeper-subtitle {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.field-label {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 6px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  cursor: text;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto !important;
}

.field-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  padding: 14px 14px 14px 44px;
  font-family: var(--font-body);
  font-size: 16px !important;
  color: var(--fg);
  outline: none;
  touch-action: manipulation;
  -webkit-appearance: none;
  pointer-events: auto !important;
  user-select: text;
  -webkit-user-select: text;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 18px -2px var(--accent-glow);
  background: rgba(0, 0, 0, 0.8);
}

.gate-btn {
  width: 100%;
  padding: 12px 20px;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.gate-status-msg {
  font-size: 11.5px;
  color: var(--accent);
  text-align: center;
  min-height: 16px;
}

.gate-status-msg.error {
  color: var(--red);
}

/* OTP 6-Digit Code Screen */
.gate-otp-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.otp-hint {
  font-size: 12px;
  color: #cfcac2;
  line-height: 1.5;
}

.otp-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.otp-digit {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line-light);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.otp-digit:focus {
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
  background: rgba(0, 0, 0, 0.75);
}

.otp-divider {
  color: var(--muted);
  font-size: 20px;
  padding: 0 4px;
}

.gatekeeper-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 10px;
  color: var(--muted);
}

/* ------------------------------------------------------------- */
/* Background Atmosphere & Ambient Grid                         */
/* ------------------------------------------------------------- */
.bg-fx {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.ambient-glow {
  position: absolute; width: 650px; height: 650px; border-radius: 50%; filter: blur(140px); opacity: 0.18;
}
.glow-1 { top: -150px; left: 20%; background: radial-gradient(circle, var(--accent) 0%, transparent 70%); }
.glow-2 { bottom: -200px; right: 15%; background: radial-gradient(circle, #ff6b35 0%, transparent 70%); opacity: 0.1; }
.bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 80%);
}
.film-grain {
  position: absolute; inset: 0; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------- */
/* Main Viewport & HUD Elements                                 */
/* ------------------------------------------------------------- */
.hud-wrapper {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 20px 32px; max-width: 1440px; margin: 0 auto; gap: 20px;
}
.hud-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; border-bottom: 1px solid var(--line); gap: 16px;
}
.hud-brand { display: flex; align-items: center; gap: 14px; }
.brand-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px;
  padding: 4px 10px; background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.25); border-radius: 999px; color: var(--green);
}
.status-pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 6px var(--green); animation: pulse 1.6s infinite alternate;
}
.brand-title { display: flex; align-items: baseline; gap: 6px; }
.brand-main { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.brand-accent { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--accent); }
.brand-tag { font-size: 11px; color: var(--muted); margin-left: 4px; }

.hud-weather {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-light);
  border-radius: var(--radius-sm); padding: 6px 14px; cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.hud-weather:hover {
  background: rgba(233, 168, 90, 0.08); border-color: var(--accent);
  box-shadow: 0 0 16px -2px var(--accent-glow);
}
.weather-icon { color: var(--accent); display: flex; align-items: center; }
.weather-info { display: flex; flex-direction: column; }
.weather-top { display: flex; align-items: baseline; gap: 6px; }
.weather-city { font-size: 11px; color: var(--muted); font-weight: 600; }
.weather-temp { font-size: 14px; font-weight: 700; color: var(--fg); }
.weather-condition {
  font-size: 10px; color: #70a1ff; font-weight: 500;
  background: rgba(112, 161, 255, 0.12); padding: 1px 5px;
  border-radius: 3px; border: 1px solid rgba(112, 161, 255, 0.25);
}
.weather-bottom { font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.weather-precip { color: #70a1ff; font-weight: 600; }
.weather-badge {
  font-size: 9px; padding: 3px 7px; border-radius: 4px;
  font-weight: 700; letter-spacing: 0.04em;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.weather-badge.success {
  background: rgba(46, 204, 113, 0.15); border: 1px solid rgba(46, 204, 113, 0.4); color: var(--green);
}
.weather-badge.warning {
  background: rgba(233, 168, 90, 0.15); border: 1px solid rgba(233, 168, 90, 0.4); color: #e9a85a;
}
.weather-badge.danger {
  background: rgba(239, 68, 68, 0.18); border: 1px solid rgba(239, 68, 68, 0.5); color: #ff5252;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.hud-telemetry { display: flex; align-items: center; gap: 12px; }
.telemetry-item {
  font-size: 12px; display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.02); padding: 6px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.telemetry-item .label { color: var(--muted); }
.telemetry-item .val { color: var(--fg); font-weight: 500; }

.cmd-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--line-light);
  color: var(--fg); padding: 6px 14px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 12px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.cmd-btn:hover { background: var(--bg3); border-color: var(--accent); color: var(--accent); }
.cmd-btn kbd { background: rgba(255, 255, 255, 0.1); padding: 2px 6px; border-radius: 4px; font-size: 10px; }

/* Telemetry Deck */
.telemetry-deck {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 4px;
}
.telemetry-card {
  background: rgba(20, 20, 24, 0.65); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; display: flex;
  flex-direction: column; justify-content: space-between; min-height: 86px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s ease;
}
.telemetry-card:hover { border-color: rgba(233, 168, 90, 0.4); }
.t-header { display: flex; align-items: center; justify-content: space-between; font-size: 10px; margin-bottom: 6px; }
.t-label { color: var(--muted); letter-spacing: 0.08em; }
.t-val { font-weight: 700; font-size: 13px; color: var(--fg); }
.t-val.accent { color: var(--accent); }
.t-progress-track { width: 100%; height: 4px; background: rgba(255, 255, 255, 0.06); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.t-progress-bar { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.4s var(--ease-out-expo); box-shadow: 0 0 8px var(--accent-glow); }
.t-footer { font-size: 10px; color: var(--muted); }

.net-streams { display: flex; align-items: center; justify-content: space-between; font-size: 11px; margin: 2px 0 6px; }
.stream-down { color: var(--green); display: inline-flex; align-items: center; gap: 2px; }
.stream-up { color: #3498db; display: inline-flex; align-items: center; gap: 2px; }

/* Compact 3-Col Bandwidth Grid */
.bw-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 3px 0 6px;
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); border-radius: 4px; padding: 4px 6px;
}
.bw-col { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bw-lbl { font-size: 9px; color: var(--muted); }
.bw-num { font-size: 11px; font-weight: 700; color: var(--fg); white-space: nowrap; }

.retest-btn {
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
  color: var(--fg); border-radius: 4px; padding: 2px 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.retest-btn:hover { background: var(--accent); color: #100b04; }
.retest-btn.spinning svg { animation: spin 1s infinite linear; }
.st-speeds { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; margin: 2px 0 6px; }
.st-down { color: var(--green); }
.st-up { color: #3498db; }

/* Main Content Area */
.hud-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 10px 0; }
.intro-bar { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.intro-text .eyebrow { font-size: 11px; color: var(--accent); display: block; margin-bottom: 2px; }
.intro-text .headline { font-family: var(--font-display); font-size: clamp(24px, 3.2vw, 36px); font-weight: 700; color: var(--fg); }
.quick-hints { font-size: 11px; color: var(--muted); display: flex; gap: 14px; }

/* Services Grid (3x3 Balanced Matrix) */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; width: 100%; }
.service-card {
  position: relative; background: var(--card-bg); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 22px; display: flex; flex-direction: column;
  justify-content: space-between; min-height: 250px; backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px); cursor: pointer; overflow: hidden;
  transition: transform 0.35s var(--ease-out-expo), border-color 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease;
}
.service-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(233, 168, 90, 0.08), transparent 40%);
  opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
.service-card:hover {
  transform: translateY(-4px); border-color: rgba(233, 168, 90, 0.45);
  background: var(--card-hover); box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.6), 0 0 20px -2px var(--accent-glow);
}
.service-card:hover::before { opacity: 1; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.card-icon-frame { width: 50px; height: 50px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease; }
.service-card:hover .card-icon-frame { border-color: var(--accent); background: rgba(233, 168, 90, 0.08); transform: scale(1.06); }
.card-icon-frame svg { width: 26px; height: 26px; }
.card-badges { display: flex; align-items: center; gap: 8px; }
.ping-badge { font-size: 10px; color: var(--green); border: 1px solid rgba(46, 204, 113, 0.25); border-radius: 6px; padding: 3px 8px; background: rgba(46, 204, 113, 0.06); }
.ping-badge.slow { color: var(--yellow); border-color: rgba(241, 196, 15, 0.3); background: rgba(241, 196, 15, 0.06); }
.ping-badge.offline { color: var(--red); border-color: rgba(231, 76, 60, 0.3); background: rgba(231, 76, 60, 0.06); }
.card-index { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; background: rgba(0, 0, 0, 0.3); }
.card-middle { margin-bottom: 16px; }
.card-tag { font-size: 10px; color: var(--accent); text-transform: uppercase; margin-bottom: 4px; letter-spacing: 0.1em; }
.card-title { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin-bottom: 6px; color: var(--fg); }
.card-stat-pill { display: inline-block; font-size: 11px; color: #cfcac2; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; margin-bottom: 8px; }
.card-desc { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.card-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.card-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--fg); background: transparent; border: none; cursor: pointer; transition: color 0.2s ease, transform 0.2s ease; }
.service-card:hover .card-btn { color: var(--accent); transform: translateX(3px); }

/* Admin Shelf */
.admin-shelf {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(14, 14, 17, 0.85); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 18px; backdrop-filter: blur(12px); gap: 16px;
}
.shelf-left { display: flex; align-items: center; gap: 12px; }
.shelf-title { font-size: 11px; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.admin-chip {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-light); border-radius: 6px; padding: 4px 10px; color: var(--fg);
  font-size: 11px; text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.admin-chip:hover { background: rgba(233, 168, 90, 0.12); border-color: var(--accent); color: var(--accent); }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; }
.chip-dot.green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.shelf-center { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.container-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: #cfcac2; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; }
.shelf-right { font-size: 11px; color: var(--muted); }
.shelf-right strong { color: var(--fg); }

/* Footer */
.hud-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.nakyssov-link { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: color 0.2s ease; }
.nakyssov-link .dot { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.nakyssov-link:hover { color: var(--accent); }
.footer-right { display: flex; align-items: center; gap: 12px; }
.separator { color: var(--line-light); }

/* Modals */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11, 11, 12, 0.78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.modal-window {
  position: relative; z-index: 10; width: min(540px, 95vw); background: #141417; border: 1px solid var(--line-light);
  border-radius: var(--radius-lg); padding: 30px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px -10px var(--accent-glow);
  transform: scale(0.95) translateY(14px); transition: transform 0.35s var(--ease-out-expo);
}
.modal-overlay.active .modal-window { transform: scale(1) translateY(0); }
.modal-close-btn {
  position: absolute; top: 22px; right: 22px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  color: var(--muted); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.modal-close-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--fg); border-color: var(--accent); }
.modal-header { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.modal-icon-wrap { width: 62px; height: 62px; border-radius: 16px; background: rgba(233, 168, 90, 0.08); border: 1px solid rgba(233, 168, 90, 0.3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.modal-icon-wrap svg { width: 32px; height: 32px; }
.modal-tag { font-size: 11px; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 4px; }
.modal-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--fg); }
.modal-url { font-size: 12px; color: var(--muted); }
.modal-desc { font-size: 14px; color: #cfcac2; margin-bottom: 22px; line-height: 1.6; }
.modal-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 22px; }
.spec-item { display: flex; flex-direction: column; gap: 4px; }
.spec-label { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; }
.spec-value { font-size: 12px; color: var(--fg); font-weight: 500; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px;
  border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.btn-secondary { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--fg); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--line-light); }
.btn-primary { background: var(--accent); border: 1px solid var(--accent); color: #100b04; box-shadow: 0 4px 14px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-1px); }

/* Windy Modal */
.windy-window { width: min(1080px, 94vw); height: 82vh; display: flex; flex-direction: column; padding: 24px; }
.windy-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.windy-heading { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.windy-frame-wrap { flex: 1; width: 100%; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); }

/* Command Palette */
.palette-box {
  position: relative; z-index: 10; width: min(520px, 92vw); background: #141417; border: 1px solid var(--line-light);
  border-radius: var(--radius-md); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8); overflow: hidden; transform: translateY(-20px); transition: transform 0.3s var(--ease-out-expo);
}
.palette-overlay.active .palette-box { transform: translateY(0); }
.palette-input-wrap { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input-wrap input { flex: 1; background: transparent; border: none; outline: none; font-family: var(--font-body); font-size: 16px; color: var(--fg); }
.palette-input-wrap input::placeholder { color: var(--muted); }
.palette-results { max-height: 280px; overflow-y: auto; padding: 8px; }
.palette-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: var(--radius-sm); color: var(--fg); text-decoration: none; cursor: pointer; transition: background 0.15s ease; }
.palette-item:hover { background: rgba(233, 168, 90, 0.12); }
.palette-item-left { display: flex; align-items: center; gap: 12px; }
.palette-item-left svg { width: 20px; height: 20px; color: var(--accent); }

@keyframes pulse { 0% { opacity: 0.5; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1.05); } }
@keyframes spin { 100% { transform: rotate(360deg); } }

@media (max-width: 1200px) { .telemetry-deck { grid-template-columns: repeat(3, 1fr); } .services-grid { grid-template-columns: repeat(2, 1fr); } .hud-wrapper { height: auto; } }
@media (max-width: 768px) { .hud-wrapper { padding: 16px; } .telemetry-deck { grid-template-columns: repeat(2, 1fr); } .services-grid { grid-template-columns: 1fr; } .admin-shelf { flex-direction: column; align-items: flex-start; } .hud-weather { display: none; } }

.gate-status-msg.error {
  color: #ff5252 !important;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 6px;
  padding: 8px 12px;
}
.gate-status-msg.success {
  color: var(--green) !important;
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.35);
  border-radius: 6px;
  padding: 8px 12px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
