/* ==========================================================================
   AETHERIS CYBER FORENSICS - MODERN DESIGN SYSTEM & STYLESHEET
   Aesthetics: Deep Obsidian Glassmorphism, Cyberpunk SOC, Neon Telemetry
   ========================================================================== */

:root {
  --bg-main: #06090e;
  --bg-panel: rgba(13, 19, 33, 0.85);
  --bg-card: rgba(18, 26, 43, 0.7);
  --bg-card-hover: rgba(24, 35, 58, 0.9);
  --bg-input: #0a0f1d;
  --border-subtle: rgba(56, 189, 248, 0.12);
  --border-glow: rgba(56, 189, 248, 0.35);
  --border-danger: rgba(239, 68, 68, 0.35);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --cyan-bright: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.3);
  --emerald-bright: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.3);
  --amber-bright: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.3);
  --red-bright: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.35);
  --violet-bright: #a855f7;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7), 0 0 1px 1px var(--border-subtle);
  --shadow-glow-cyan: 0 0 20px -3px var(--cyan-glow);
  --shadow-glow-red: 0 0 25px -3px var(--red-glow);
}

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

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(239, 68, 68, 0.04) 0%, transparent 40%),
    linear-gradient(to bottom, #06090e 0%, #090d16 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Typography Helpers */
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.text-cyan { color: var(--cyan-bright); }
.text-emerald { color: var(--emerald-bright); }
.text-amber { color: var(--amber-bright); }
.text-red { color: var(--red-bright); }
.text-muted { color: var(--text-muted); }
.text-xs { font-size: 11px; }

/* Top Navigation */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-shield {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(59, 130, 246, 0.2));
  border: 1px solid var(--cyan-bright);
  box-shadow: 0 0 15px var(--cyan-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shield-icon {
  width: 24px;
  height: 24px;
  color: var(--cyan-bright);
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.5px;
  display: block;
}

.accent-cyan {
  color: var(--cyan-bright);
  text-shadow: 0 0 10px var(--cyan-glow);
}

.brand-subtitle {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--text-dim);
  font-weight: 600;
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.soc-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--emerald-bright);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: var(--emerald-bright);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-bright);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px var(--emerald-bright); }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Dropdown Menu */
.sample-dropdown-container {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #0d1424;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  box-shadow: 0 15px 35px rgba(0,0,0,0.8), 0 0 15px var(--cyan-glow);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1100;
  backdrop-filter: blur(20px);
}

.dropdown-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(0, 240, 255, 0.1);
  border-left: 3px solid var(--cyan-bright);
}

.dropdown-item-title {
  font-weight: 600;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-item-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
  color: #050b14;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-1px);
}

.btn-glow {
  box-shadow: 0 0 20px var(--cyan-glow);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(56, 189, 248, 0.25);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: var(--cyan-bright);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.btn-icon-only {
  width: 38px;
  height: 38px;
  padding: 0;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.btn-icon-only:hover {
  color: var(--cyan-bright);
  border-color: var(--cyan-bright);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-group-sm {
  display: flex;
  gap: 6px;
}

/* Main Content Layout */
.main-content {
  flex: 1;
  padding: 24px 32px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* Panels & Cards */
.panel, .card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  padding: 24px;
  transition: border-color 0.2s ease;
}

.panel:hover, .card:hover {
  border-color: rgba(56, 189, 248, 0.25);
}

.panel-header, .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-title-group, .card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-icon, .card-icon {
  width: 22px;
  height: 22px;
  color: var(--cyan-bright);
}

.panel-header h2, .card-header h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.card-header-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Input Station Tabs */
.tab-triggers {
  display: flex;
  gap: 6px;
  background: rgba(10, 15, 29, 0.6);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  background: rgba(0, 240, 255, 0.15);
  color: var(--cyan-bright);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.input-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.input-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.cyber-textarea {
  width: 100%;
  height: 190px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cyber-textarea:focus {
  border-color: var(--cyan-bright);
  box-shadow: 0 0 12px var(--cyan-glow);
}

/* Dropzone */
.file-dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 40px;
  text-align: center;
  background: rgba(10, 15, 29, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--cyan-bright);
  background: rgba(0, 240, 255, 0.05);
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  color: var(--cyan-bright);
  margin-bottom: 12px;
}

.file-dropzone h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.file-dropzone p {
  color: var(--text-muted);
  font-size: 12px;
}

.selected-file-badge {
  margin-top: 14px;
  padding: 6px 14px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--cyan-bright);
  border-radius: var(--radius-full);
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan-bright);
}

/* Manual Form Grid */
.manual-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-field.full-col {
  grid-column: span 2;
}

.input-field label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.input-field input, .input-field textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}

.input-field input:focus, .input-field textarea:focus {
  border-color: var(--cyan-bright);
}

/* Station Footer */
.station-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.divider {
  color: var(--text-dim);
}

/* Pulse animation */
.pulse-animation {
  animation: pulse-radar 2s infinite ease-in-out;
}

@keyframes pulse-radar {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 6px var(--cyan-bright)); }
  100% { transform: scale(1); }
}

/* Loading Overlay */
.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

.scanner-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--cyan-bright);
  box-shadow: var(--shadow-glow-cyan);
  padding: 40px 60px;
  border-radius: var(--radius-lg);
}

.radar-scan {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 2px solid var(--cyan-bright);
  border-top-color: transparent;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Results Banner */
.threat-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 30px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  backdrop-filter: blur(16px);
}

.banner-critical {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--red-bright);
  box-shadow: var(--shadow-glow-red);
}

.banner-clean {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--emerald-bright);
  box-shadow: 0 0 25px -3px var(--emerald-glow);
}

.banner-suspicious {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--amber-bright);
  box-shadow: 0 0 25px -3px var(--amber-glow);
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.banner-icon-box {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.2);
  color: var(--red-bright);
}

.banner-clean .banner-icon-box {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-bright);
}

.banner-icon-box i {
  width: 32px;
  height: 32px;
}

.banner-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.badge-threat {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.badge-critical { background: var(--red-bright); color: #fff; }
.badge-high { background: #f97316; color: #fff; }
.badge-moderate { background: var(--amber-bright); color: #000; }
.badge-low { background: var(--emerald-bright); color: #fff; }

.badge-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.banner-text h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.banner-text p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

.banner-location-spotlight {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(10, 15, 29, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: var(--radius-md);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.location-pin-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid var(--cyan-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-bright);
  flex-shrink: 0;
}

.location-pin-icon i {
  width: 20px;
  height: 20px;
}

.location-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.location-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.location-primary {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.location-secondary {
  font-size: 11px;
  color: var(--text-muted);
}

.banner-actions {
  display: flex;
  gap: 12px;
}

/* Dashboard Grids */
.dashboard-grid-3 {
  display: grid;
  grid-template-columns: 320px 1.2fr 1fr;
  gap: 20px;
}

.dashboard-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.mt-4 { margin-top: 24px; }
.mt-3 { margin-top: 16px; }
.mt-2 { margin-top: 8px; }

/* Score Gauge Card */
.score-card {
  display: flex;
  flex-direction: column;
}

.gauge-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.circular-gauge {
  position: relative;
  width: 160px;
  height: 160px;
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.8s ease, stroke 0.4s ease;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.gauge-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-val {
  font-size: 42px;
  font-weight: 800;
  font-family: var(--font-mono);
  display: block;
  line-height: 1;
}

.score-max {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.score-rating-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-top: 8px;
}

.risk-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.risk-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.risk-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-red { background: var(--red-bright); box-shadow: 0 0 8px var(--red-bright); }
.fill-orange { background: #f97316; }
.fill-amber { background: var(--amber-bright); }
.fill-cyan { background: var(--cyan-bright); }
.fill-emerald { background: var(--emerald-bright); }

/* Identity Card */
.identity-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.data-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-label {
  color: var(--text-dim);
  font-size: 12px;
}

.data-val {
  font-size: 12px;
  text-align: right;
  max-width: 60%;
  word-break: break-all;
}

.alert-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-top: 14px;
  font-size: 12px;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #86efac;
}

/* Auth Matrix */
.auth-matrix {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-block {
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.auth-title {
  font-weight: 700;
  font-size: 13px;
}

.auth-status-pill {
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
}

.pill-pass { background: rgba(16, 185, 129, 0.2); color: var(--emerald-bright); border: 1px solid var(--emerald-bright); }
.pill-fail { background: rgba(239, 68, 68, 0.2); color: var(--red-bright); border: 1px solid var(--red-bright); }
.pill-softfail { background: rgba(245, 158, 11, 0.2); color: var(--amber-bright); border: 1px solid var(--amber-bright); }
.pill-none { background: rgba(100, 116, 139, 0.2); color: var(--text-muted); border: 1px solid var(--text-dim); }

.auth-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.record-box {
  background: #050810;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  overflow-x: auto;
  white-space: nowrap;
}

/* Geo Section & Map Layout */
.geo-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  height: 520px;
}

.map-wrapper {
  position: relative;
  height: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

#world-map {
  width: 100%;
  height: 100%;
  background: #0a0e1a;
}

.map-overlay-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  gap: 14px;
  z-index: 1000;
  font-size: 11px;
  font-family: var(--font-mono);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-origin { background: var(--red-bright); box-shadow: 0 0 6px var(--red-bright); }
.dot-relay { background: var(--cyan-bright); box-shadow: 0 0 6px var(--cyan-bright); }
.dot-dest { background: var(--emerald-bright); box-shadow: 0 0 6px var(--emerald-bright); }

/* Origin Telemetry */
.origin-telemetry {
  display: flex;
  flex-direction: column;
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  overflow-y: auto;
}

.telemetry-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.telemetry-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--cyan-bright);
}

.telemetry-ip {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.telemetry-source {
  font-size: 11px;
  color: var(--text-dim);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
}

.item-label {
  font-size: 11px;
  color: var(--text-dim);
}

.item-val {
  font-size: 12px;
  margin-top: 2px;
}

/* Hops Timeline */
.hops-timeline-container h5 {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.hops-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  padding-left: 20px;
}

.hops-timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 6px;
  width: 2px;
  background: rgba(56, 189, 248, 0.2);
}

.hop-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(18, 26, 43, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 11px;
}

.hop-item::before {
  content: '';
  position: absolute;
  top: 12px;
  left: -18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan-bright);
  box-shadow: 0 0 6px var(--cyan-bright);
}

.hop-item.hop-origin::before {
  background: var(--red-bright);
  box-shadow: 0 0 8px var(--red-bright);
}

.hop-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.hop-route {
  color: var(--text-dim);
  font-size: 10px;
}

/* Tables */
.table-scroll {
  max-height: 320px;
  overflow-y: auto;
}

.cyber-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.cyber-table th {
  background: rgba(10, 15, 29, 0.9);
  color: var(--text-dim);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
}

.cyber-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: top;
}

.cyber-table tr:hover td {
  background: rgba(0, 240, 255, 0.03);
}

/* AI SOC Section */
.soc-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.soc-briefing h4, .soc-playbook h4 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.ai-summary-text {
  font-size: 13px;
  line-height: 1.7;
  color: #cbd5e1;
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.infra-box {
  padding: 12px;
  background: rgba(0, 240, 255, 0.05);
  border-left: 3px solid var(--cyan-bright);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  color: var(--cyan-bright);
}

.mitre-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mitre-card {
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.mitre-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.mitre-id {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--cyan-bright);
}

.mitre-tactic {
  font-size: 11px;
  color: var(--text-dim);
}

.mitre-tech {
  font-weight: 600;
  font-size: 12px;
}

.mitre-evid {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.playbook-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.playbook-step {
  display: flex;
  gap: 10px;
  background: rgba(10, 15, 29, 0.6);
  border-left: 3px solid var(--emerald-bright);
  padding: 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.step-phase {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  color: var(--emerald-bright);
  white-space: nowrap;
}

.step-action {
  font-size: 12px;
  color: #e2e8f0;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-card {
  background: #0d1424;
  border: 1px solid var(--border-glow);
  box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 20px var(--cyan-glow);
  width: 480px;
  border-radius: var(--radius-lg);
  padding: 24px;
}

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

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-body input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  color: #fff;
  font-family: var(--font-mono);
}

.field-hint {
  font-size: 11px;
  color: var(--text-dim);
}

.modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

/* Utility */
.hidden { display: none !important; }

/* Responsive adjustments */
@media (max-width: 1200px) {
  .dashboard-grid-3 { grid-template-columns: 1fr; }
  .dashboard-grid-2 { grid-template-columns: 1fr; }
  .geo-layout { grid-template-columns: 1fr; height: auto; }
  .map-wrapper { height: 400px; }
  .soc-layout { grid-template-columns: 1fr; }
}

/* Footer */
.app-footer {
  display: flex;
  justify-content: space-between;
  padding: 20px 32px;
  font-size: 11px;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

/* Print & Export Dossier Stylesheet */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .top-nav, .input-station, .app-footer, .map-controls, .banner-actions, #settings-modal {
    display: none !important;
  }

  .panel, .card, .threat-banner, .origin-telemetry {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    color: #000000 !important;
    page-break-inside: avoid;
  }

  .threat-banner {
    border-left: 6px solid #dc2626 !important;
  }

  .banner-text h1, .banner-text p, .card-header h3, .data-label, .item-label {
    color: #000000 !important;
  }

  .cyber-table th {
    background: #f1f5f9 !important;
    color: #000000 !important;
  }

  .cyber-table td {
    color: #111827 !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }

  .geo-layout {
    display: block !important;
    height: auto !important;
  }

  .map-wrapper {
    height: 250px !important;
    margin-bottom: 20px;
  }
}

/* ==========================================================================
   PHONE NUMBER INTELLIGENCE SECTION
   ========================================================================== */

.phone-intel-section {
  margin-top: 1.5rem;
}

/* Lookup Bar */
.phone-lookup-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin: 1rem 0;
  flex-wrap: wrap;
}

.phone-lookup-input-group {
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  transition: border-color 0.2s;
}

.phone-lookup-input-group:focus-within {
  border-color: var(--emerald-bright);
  box-shadow: 0 0 0 3px var(--emerald-glow);
}

.phone-search-icon {
  width: 16px;
  height: 16px;
  color: var(--emerald-bright);
  flex-shrink: 0;
}

.phone-lookup-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.phone-lookup-input::placeholder {
  color: var(--text-dim);
  font-family: var(--font-sans);
}

.phone-region-select {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}

.btn-sm-phone {
  padding: 0.6rem 1.2rem;
  font-size: 0.82rem;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}

.btn-sm-phone:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 0 16px var(--emerald-glow);
  transform: translateY(-1px);
}

/* Phone Lookup Inline Result */
.phone-lookup-result {
  margin: 0 0 1rem 0;
  animation: fadeSlideIn 0.3s ease;
}

/* Auto-extracted list */
.phone-extracted-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.phone-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--text-dim);
  text-align: center;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}

.phone-empty-state svg {
  width: 32px;
  height: 32px;
  opacity: 0.4;
}

.phone-empty-state p {
  font-size: 0.85rem;
  max-width: 380px;
  line-height: 1.6;
}

/* Individual Phone Card */
.phone-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.25rem;
  background: rgba(18, 28, 48, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, box-shadow 0.2s;
  animation: fadeSlideIn 0.3s ease;
}

.phone-card:hover {
  border-color: var(--emerald-bright);
  box-shadow: 0 0 14px -4px var(--emerald-glow);
}

.phone-card.risk-critical {
  border-color: rgba(220, 38, 38, 0.4);
}

.phone-card.risk-critical:hover {
  box-shadow: 0 0 18px -4px var(--red-glow);
}

.phone-card.risk-high {
  border-color: rgba(239, 68, 68, 0.3);
}

.phone-card.risk-moderate {
  border-color: rgba(245, 158, 11, 0.3);
}

.phone-flag-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(30, 41, 59, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.phone-details {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.phone-number-formatted {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--emerald-bright);
  letter-spacing: 0.05em;
}

.phone-geo-line {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.phone-meta-line {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.phone-flags-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.4rem;
}

.phone-flag-item {
  font-size: 0.75rem;
  color: var(--amber-bright);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.phone-flag-item::before {
  content: '⚠';
  font-size: 0.7rem;
}

.phone-card-risk {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

.phone-validity-tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-bright);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.phone-validity-tag.invalid {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-bright);
  border-color: rgba(239, 68, 68, 0.3);
}

.phone-type-tag {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.1);
  color: var(--cyan-bright);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Phone timezone pills */
.phone-tz-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.3rem;
}

.phone-tz-pill {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  padding: 0.1rem 0.4rem;
  background: rgba(168, 85, 247, 0.12);
  color: #c4b5fd;
  border-radius: var(--radius-full);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

@media (max-width: 600px) {
  .phone-lookup-bar {
    flex-direction: column;
  }

  .phone-lookup-input-group {
    width: 100%;
  }

  .phone-card {
    grid-template-columns: auto 1fr;
  }

  .phone-card-risk {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
  }
}
