/* ==========================================================================
   EndpointTrace - Design System & Modern Cyber/Telemetry Stylesheet
   ========================================================================== */

:root {
  --bg-dark: #070b12;
  --bg-surface: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-card-active: rgba(30, 41, 59, 0.95);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.28);
  --border-colo: rgba(245, 158, 11, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-highlight: #38bdf8;

  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-amber: #f59e0b;
  --accent-orange: #f97316;
  --accent-emerald: #10b981;
  --accent-purple: #8b5cf6;
  --accent-rose: #f43f5e;

  --glow-cyan: 0 0 25px rgba(6, 182, 212, 0.35);
  --glow-amber: 0 0 25px rgba(245, 158, 11, 0.35);
  --glow-emerald: 0 0 25px rgba(16, 185, 129, 0.35);

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-panel: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.08);
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Background Atmosphere Grid */
.bg-mesh {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 15% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(245, 158, 11, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* Navigation Header */
.app-header {
  height: 64px;
  min-height: 64px;
  background: rgba(10, 15, 26, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  position: relative;
}

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

.logo-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 50%, #f59e0b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-cyan);
}

.logo-icon {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #ffffff 0%, #38bdf8 60%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-emerald);
  transition: var(--transition-smooth);
}

.status-pill.warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent-amber);
}

.status-pill.local {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: pulse-ring 2s infinite ease-in-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Header Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.btn:hover {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

.btn-icon-only {
  padding: 8px;
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* Main Workspace Area */
.main-workspace {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
  height: calc(100vh - 64px);
}

/* Floating / Docked Sidebar Panel */
.telemetry-sidebar {
  width: 440px;
  min-width: 380px;
  max-width: 480px;
  height: 100%;
  background: rgba(10, 15, 26, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 500;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.telemetry-sidebar::-webkit-scrollbar {
  width: 6px;
}
.telemetry-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sidebar-header {
  padding: 20px 22px 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-title-group h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-title-group p {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Endpoint Shifting Summary Card */
.verdict-banner {
  border-radius: var(--radius-md);
  padding: 16px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid var(--border-glow);
  position: relative;
  overflow: hidden;
}

.verdict-banner.vpn-active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(139, 92, 246, 0.4);
}

.verdict-banner.warp-active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: var(--border-colo);
}

.verdict-banner.leak-active {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.18) 0%, rgba(15, 23, 42, 0.94) 100%);
  border-color: rgba(244, 63, 94, 0.55);
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.18);
}

.verdict-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-cyan);
}

.verdict-banner.vpn-active::before {
  background: var(--accent-purple);
}

.verdict-banner.warp-active::before {
  background: var(--accent-amber);
}

.verdict-banner.leak-active::before {
  background: var(--accent-rose);
}

.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.verdict-banner.vpn-active .verdict-badge {
  color: var(--accent-purple);
}
.verdict-banner.warp-active .verdict-badge {
  color: var(--accent-amber);
}
.verdict-banner.leak-active .verdict-badge {
  color: #fb7185;
}

.verdict-headline {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.verdict-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Telemetry Card Containers */
.telemetry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: var(--transition-smooth);
}

.telemetry-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--bg-card-hover);
}

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

.card-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.card-label svg {
  width: 15px;
  height: 15px;
}

.card-tag {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-weight: 600;
}

.card-tag-with-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: help;
  outline: none;
  transition: var(--transition-smooth);
}

.card-tag-with-info:hover,
.card-tag-with-info:focus-visible {
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.info-point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  color: var(--accent-amber);
  opacity: 0.9;
}

.info-point-icon svg {
  width: 13px;
  height: 13px;
}

.info-tooltip-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: rgba(10, 15, 26, 0.96);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.65);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 60;
}

.card-tag-with-info:hover .info-tooltip-popover,
.card-tag-with-info:focus-visible .info-tooltip-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Endpoint Identity Display */
.endpoint-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.endpoint-ip {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  word-break: break-all;
}

.endpoint-loc {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

.colo-code-large {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--accent-amber);
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.colo-airport-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  margin-top: 2px;
}

.colo-place-name {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Key Value Grid */
.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.grid-item {
  background: rgba(10, 15, 26, 0.5);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  min-width: 0;
  overflow: hidden;
}

.grid-item.full-width {
  grid-column: 1 / -1;
}

.item-key {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
}

.item-val.highlight-cyan {
  color: var(--accent-cyan);
}
.item-val.highlight-amber {
  color: var(--accent-amber);
}
.item-val.highlight-emerald {
  color: var(--accent-emerald);
}

/* Trace Arc Metrics Row */
.trace-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric-stat-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.metric-stat-box::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.metric-stat-box.colo-accent::after {
  background: linear-gradient(90deg, transparent, var(--accent-amber), transparent);
}

.metric-stat-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}

.metric-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

/* Raw Trace Toggle & Viewer */
.raw-trace-card {
  margin-top: auto;
}

.raw-trace-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.raw-trace-toggle:hover {
  color: var(--text-primary);
}

.raw-trace-body {
  margin-top: 10px;
  background: #050810;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #38bdf8;
  max-height: 180px;
  overflow-y: auto;
  line-height: 1.5;
  border: 1px solid var(--border-subtle);
  white-space: pre-wrap;
  word-break: break-all;
}

/* Map / 3D Globe Container Section */
.map-viewport {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  height: 100%;
  background: radial-gradient(circle at 50% 45%, #0c162b 0%, #050811 100%);
  overflow: hidden;
}

#globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
  z-index: 10;
}

#globe-canvas:active {
  cursor: grabbing;
}

.globe-hud-panel {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(10, 16, 30, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  max-width: calc(100% - 88px);
}

.globe-hud-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.globe-hud-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  min-width: 50px;
}

.globe-hud-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #cbd5e1;
  min-width: 34px;
  text-align: right;
}

.segmented-control {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seg-btn:hover {
  color: #e2e8f0;
}

.seg-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.globe-opacity-slider {
  width: 96px;
  accent-color: #38bdf8;
  cursor: pointer;
}

.globe-wave-status {
  font-size: 0.72rem;
  color: #7dd3fc;
  font-family: 'JetBrains Mono', monospace;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 6px;
}

.globe-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 800;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  background: rgba(10, 16, 30, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.16);
  max-width: calc(100% - 32px);
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.69rem;
  font-weight: 500;
  color: #cbd5e1;
}

.legend-chip i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

.globe-tooltip {
  position: fixed;
  z-index: 2000;
  pointer-events: none;
  background: rgba(9, 14, 28, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 0.76rem;
  line-height: 1.4;
  color: #e2e8f0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  max-width: 260px;
}

.globe-tooltip.hidden {
  display: none;
}

.globe-tooltip .tt-cell {
  font-family: 'JetBrains Mono', monospace;
  color: #38bdf8;
  font-weight: 600;
}

.globe-tooltip .tt-region {
  color: #cbd5e1;
  font-weight: 600;
}

.globe-tooltip .tt-role {
  color: #f8fafc;
  margin-top: 3px;
}

.globe-tooltip .tt-rtt {
  color: #34d399;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 3px;
}

@media (max-width: 768px) {
  .globe-hud-panel {
    top: 10px;
    left: 10px;
    padding: 8px 10px;
    gap: 6px;
  }
  .globe-legend {
    bottom: 10px;
    left: 10px;
  }
}

/* Floating Map Overlay HUD Controls */
.map-hud-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-control-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: var(--transition-smooth);
}

.map-control-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.map-control-btn svg {
  width: 20px;
  height: 20px;
}

/* Midpoint Distance Badge on Map */
.trace-badge-container {
  pointer-events: none;
}

.trace-badge {
  background: rgba(10, 15, 26, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glow);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

/* Leaflet Custom Marker Styles */
.custom-beacon-origin {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.beacon-core {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #06b6d4;
  border: 2px solid #ffffff;
  box-shadow: 0 0 16px #06b6d4, 0 0 30px #06b6d4;
  z-index: 2;
}

.beacon-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #06b6d4;
  opacity: 0.8;
  animation: beacon-ping 2s infinite ease-out;
}

.beacon-wave:nth-child(2) {
  animation-delay: 0.8s;
}

@keyframes beacon-ping {
  0% { transform: scale(0.5); opacity: 0.9; }
  100% { transform: scale(2.8); opacity: 0; }
}

.custom-beacon-colo {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.colo-radar-core {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid #ffffff;
  box-shadow: 0 0 18px #f59e0b, 0 0 35px #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.colo-radar-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #f59e0b;
  opacity: 0.8;
  animation: beacon-ping 2s infinite ease-out;
}

/* Leaflet Popup Overrides */
.leaflet-popup-content-wrapper {
  background: rgba(10, 15, 26, 0.92) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7) !important;
  padding: 4px;
}

.leaflet-popup-tip {
  background: rgba(10, 15, 26, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.popup-container {
  padding: 8px 6px;
  min-width: 200px;
}

.popup-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  margin-bottom: 4px;
}

.popup-tag.colo {
  color: var(--accent-amber);
}

.popup-heading {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.popup-meta {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Scenario Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  width: 90%;
  max-width: 580px;
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9);
  padding: 26px;
  position: relative;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-window {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.modal-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.scenario-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.scenario-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.scenario-item:hover {
  background: rgba(51, 65, 85, 0.7);
  border-color: var(--accent-cyan);
  transform: translateX(4px);
}

.scenario-info {
  display: flex;
  flex-direction: column;
}

.scenario-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
}

.scenario-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.scenario-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.textarea-custom {
  width: 100%;
  height: 120px;
  background: #090e17;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #38bdf8;
  resize: vertical;
  margin-bottom: 16px;
}

.textarea-custom:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-glow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3000;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notice.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Mobile View Mode Navigation & Responsive Adjustments */
.mobile-view-tabs {
  display: none;
}

.mobile-only-btn {
  display: none;
}

@media (max-width: 900px) {
  .brand-subtitle {
    display: none;
  }

  .app-header {
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .header-actions {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    gap: 8px;
    padding-bottom: 2px;
  }

  .header-actions::-webkit-scrollbar {
    display: none;
  }

  /* Mobile Mode Switcher Tabs */
  .mobile-view-tabs {
    display: flex;
    align-items: center;
    background: #080d16;
    border-bottom: 1px solid var(--border-subtle);
    padding: 6px 10px;
    gap: 6px;
    position: sticky;
    top: 0;
    z-index: 600;
  }

  .mobile-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.07);
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
  }

  .mobile-tab-btn .tab-icon {
    width: 14px;
    height: 14px;
  }

  .mobile-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
  }

  .mobile-tab-btn.active {
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.18);
  }

  .mobile-only-btn {
    display: inline-flex;
  }

  .main-workspace {
    flex-direction: column;
    height: calc(100vh - 108px);
  }

  /* Mode 1: Telemetry View (Default on mobile — Map is completely hidden!) */
  .main-workspace.view-telemetry .map-viewport {
    display: none !important;
  }

  .main-workspace.view-telemetry .telemetry-sidebar {
    height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    display: flex !important;
    border-top: none;
    border-right: none;
  }

  /* Mode 2: Full-screen Map View */
  .main-workspace.view-map .telemetry-sidebar {
    display: none !important;
  }

  .main-workspace.view-map .map-viewport {
    height: 100% !important;
    width: 100% !important;
    display: block !important;
    flex: 1;
  }

  /* Mode 3: Split 50/50 View */
  .main-workspace.view-split {
    flex-direction: column-reverse;
  }

  .main-workspace.view-split .telemetry-sidebar {
    height: 50% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    display: flex !important;
    border-top: 1px solid var(--border-subtle);
    border-right: none;
  }

  .main-workspace.view-split .map-viewport {
    height: 50% !important;
    width: 100% !important;
    display: block !important;
  }
}

@media (max-width: 600px) {
  .btn span {
    font-size: 0.72rem;
  }
  .status-pill {
    padding: 5px 10px;
    font-size: 0.72rem;
  }
  .telemetry-grid {
    grid-template-columns: 1fr;
  }
  .grid-item.full-width {
    grid-column: 1;
  }
}

/* ==========================================================================
   Zero Hop (Physical Device Origin) - Stealth Subdued Styles
   ========================================================================== */

.zero-hop-card {
  background: rgba(15, 23, 42, 0.45);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  transition: var(--transition-smooth);
}

.zero-hop-card:hover {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(30, 41, 59, 0.55);
}

.tag-zero-hop {
  background: rgba(148, 163, 184, 0.12) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Stealth Zero Hop Marker (Non-pulsing, quiet, dull/slate) */
.custom-beacon-zero-hop {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zero-hop-core {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
  z-index: 2;
}

.zero-hop-inner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
}

/* Subdued Midpoint Tunnel Badge */
.tunnel-badge-container {
  pointer-events: none;
}

.tunnel-badge {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  border: 1px dashed rgba(148, 163, 184, 0.45);
  color: #94a3b8;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

/* Interactive Pin Drop Mode Banner */
.pin-drop-banner {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), var(--glow-cyan);
  border-radius: var(--radius-full);
  padding: 8px 20px 8px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1500;
  animation: banner-slide-down 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pin-drop-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #ffffff;
}

.pin-drop-pulse {
  font-size: 1.1rem;
  animation: pulse-ring 1.5s infinite ease-in-out;
}

@keyframes banner-slide-down {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* Crosshair cursor when in pin drop mode */
#globe-canvas.pin-drop-active {
  cursor: crosshair !important;
}

.city-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.city-select-item:hover {
  background: rgba(51, 65, 85, 0.6);
  border-color: var(--accent-cyan);
  transform: translateX(3px);
}

.city-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: #f1f5f9;
}

.city-country {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Total Latency Estimator & Network Configuration Styles
   ========================================================================== */

.latency-estimator-card {
  background: var(--bg-card);
  border: 1px solid rgba(56, 189, 248, 0.2);
  position: relative;
  overflow: hidden;
}

.latency-estimator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 35%, #8b5cf6 70%, #f59e0b 100%);
}

.latency-main-stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.latency-headline-val {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.latency-headline-val span:first-child {
  background: linear-gradient(135deg, #ffffff 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.latency-badge-pill {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.latency-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.live-ping-box {
  text-align: right;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
}

.live-ping-label {
  font-size: 0.64rem;
  text-transform: uppercase;
  color: var(--accent-emerald);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.live-ping-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #10b981;
}

/* Waterfall Budget Bar */
.waterfall-progress-container {
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  margin: 12px 0 10px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.waterfall-bar {
  display: flex;
  width: 100%;
  height: 100%;
}

.waterfall-seg {
  height: 100%;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.seg-lan { background: #10b981; }
.seg-isp { background: #06b6d4; }
.seg-tunnel { background: #8b5cf6; }
.seg-edge { background: #f59e0b; }

/* Latency Breakdown Pills Grid */
.latency-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.breakdown-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(10, 15, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
}

.breakdown-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-lan { background: #10b981; box-shadow: 0 0 6px #10b981; }
.dot-isp { background: #06b6d4; box-shadow: 0 0 6px #06b6d4; }
.dot-tunnel { background: #8b5cf6; box-shadow: 0 0 6px #8b5cf6; }
.dot-edge { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }

.pill-title {
  color: var(--text-muted);
  font-weight: 600;
}

.pill-ms {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
  margin-left: auto;
}

/* Latency Network Profile Form Controls */
.latency-controls-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.latency-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

.control-label-wrap {
  display: flex;
  flex-direction: column;
  min-width: 130px;
}

.config-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #e2e8f0;
}

.config-hint {
  font-size: 0.64rem;
  color: var(--text-muted);
}

.config-input-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
}

.select-custom {
  background: #080c14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 0.72rem;
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  max-width: 100%;
  min-width: 0;
}

.select-custom:focus {
  border-color: var(--accent-cyan);
}

.manual-ms-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.input-ms {
  width: 48px;
  background: #080c14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #38bdf8;
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  text-align: right;
  outline: none;
  transition: var(--transition-smooth);
}

.input-ms:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.ms-suffix {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.route-distances-summary {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
  font-family: var(--font-mono);
}

.seg-tls { background: #f43f5e; }
.dot-tls { background: #f43f5e; box-shadow: 0 0 6px #f43f5e; }

.full-width-pill {
  grid-column: 1 / -1;
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.2);
}

.live-ping-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.live-accuracy-pill {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.live-ping-stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.cold-probe-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cold-probe-tag strong {
  color: #f59e0b;
}

/* ==========================================================================
   Major Cloud Regional Probes (AWS / GCP / Azure)
   ========================================================================== */
.cloud-probes-card {
  position: relative;
  overflow: hidden;
}

.cloud-controls-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-top: 10px;
}

.cloud-config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.cloud-config-row .control-label-wrap {
  flex: 1 1 auto;
  min-width: 140px;
}

.cloud-config-row .config-input-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.provider-pill-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
}

.provider-toggle-label {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
}

.provider-toggle-label input[type="checkbox"] {
  display: none;
}

.provider-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 15, 25, 0.6);
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

/* Collapsible Latency Factors Dropdown */
.latency-factors-dropdown {
  margin: 10px 0 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(10, 16, 28, 0.45);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.latency-factors-dropdown[open] {
  border-color: rgba(6, 182, 212, 0.3);
  background: rgba(10, 16, 28, 0.7);
}

.factors-dropdown-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  cursor: pointer;
  user-select: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  list-style: none;
}

.factors-dropdown-summary::-webkit-details-marker {
  display: none;
}

.factors-dropdown-summary:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.factors-summary-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.factors-dropdown-arrow {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
  color: var(--text-muted);
}

.latency-factors-dropdown[open] .factors-dropdown-arrow {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

.factors-dropdown-body {
  padding: 8px 10px 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.provider-toggle-label input[type="checkbox"]:checked + .chip-cf {
  background: rgba(246, 130, 31, 0.15);
  border-color: rgba(246, 130, 31, 0.45);
  color: #f6821f;
  box-shadow: 0 0 10px rgba(246, 130, 31, 0.15);
}

.provider-toggle-label input[type="checkbox"]:checked + .chip-cf .dot-cf {
  background: #f6821f;
  box-shadow: 0 0 6px #f6821f;
}

.badge-cloudflare {
  background: rgba(246, 130, 31, 0.15);
  color: #f6821f;
  border: 1px solid rgba(246, 130, 31, 0.3);
}

.cloud-marker-cloudflare {
  background: #f6821f;
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(246, 130, 31, 0.7);
}

.provider-toggle-label input[type="checkbox"]:checked + .chip-aws {
  background: rgba(255, 153, 0, 0.15);
  border-color: rgba(255, 153, 0, 0.45);
  color: #ff9900;
  box-shadow: 0 0 10px rgba(255, 153, 0, 0.15);
}

.provider-toggle-label input[type="checkbox"]:checked + .chip-gcp {
  background: rgba(66, 133, 244, 0.15);
  border-color: rgba(66, 133, 244, 0.45);
  color: #60a5fa;
  box-shadow: 0 0 10px rgba(66, 133, 244, 0.15);
}

.provider-toggle-label input[type="checkbox"]:checked + .chip-azure {
  background: rgba(0, 120, 212, 0.15);
  border-color: rgba(0, 120, 212, 0.45);
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(0, 120, 212, 0.15);
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.provider-toggle-label input[type="checkbox"]:checked + .chip-aws .dot-aws {
  background: #ff9900;
  box-shadow: 0 0 6px #ff9900;
}

.provider-toggle-label input[type="checkbox"]:checked + .chip-gcp .dot-gcp {
  background: #4285f4;
  box-shadow: 0 0 6px #4285f4;
}

.provider-toggle-label input[type="checkbox"]:checked + .chip-azure .dot-azure {
  background: #0078d4;
  box-shadow: 0 0 6px #0078d4;
}

.cloud-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.68rem;
}

.map-layer-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.map-layer-label input[type="checkbox"] {
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.candidate-summary-text {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

/* Probing Progress Bar */
.probing-progress-wrap {
  margin-top: 10px;
}

.probing-bar {
  height: 4px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.probing-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff9900, #4285f4, #0078d4);
  transition: width 0.3s ease;
}

.probing-status-label {
  font-size: 0.66rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-top: 4px;
  text-align: right;
}

/* Cloud Results List */
.cloud-results-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

.cloud-placeholder-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 12px;
  text-align: center;
  line-height: 1.5;
  background: rgba(10, 15, 25, 0.3);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.cloud-result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 16, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.cloud-result-card:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}

.cloud-result-card.is-active {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
}

.cloud-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cloud-provider-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

.badge-aws {
  background: rgba(255, 153, 0, 0.15);
  color: #ff9900;
  border: 1px solid rgba(255, 153, 0, 0.3);
}

.badge-gcp {
  background: rgba(66, 133, 244, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(66, 133, 244, 0.3);
}

.badge-azure {
  background: rgba(0, 120, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(0, 120, 212, 0.3);
}

.cloud-card-info {
  display: flex;
  flex-direction: column;
}

.cloud-region-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: #f1f5f9;
}

.cloud-region-meta {
  font-size: 0.63rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.cloud-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.cloud-ping-val {
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #ffffff;
}

.cloud-ping-val.speed-fast { color: #10b981; }
.cloud-ping-val.speed-good { color: #06b6d4; }
.cloud-ping-val.speed-medium { color: #f59e0b; }
.cloud-ping-val.speed-slow { color: #a78bfa; }

.cloud-cold-tag {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.cloud-reused-tag {
  font-size: 0.6rem;
  color: #38bdf8;
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.1);
  padding: 0 4px;
  border-radius: 3px;
}

.cf-ingress-tag {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(246, 130, 31, 0.2);
  color: #fb923c;
  border: 1px solid rgba(246, 130, 31, 0.4);
  text-transform: uppercase;
}

/* Leaflet Cloud Markers */
.cloud-leaflet-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 800;
  font-size: 11px;
  font-family: var(--font-mono);
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.cloud-leaflet-marker:hover {
  transform: scale(1.25);
  z-index: 1000 !important;
}

.cloud-marker-aws {
  background: #ff9900;
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(255, 153, 0, 0.7);
}

.cloud-marker-gcp {
  background: #4285f4;
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(66, 133, 244, 0.7);
}

.cloud-marker-azure {
  background: #0078d4;
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(0, 120, 212, 0.7);
}

/* Real-time Marker Pop-in Animation */
@keyframes markerPopIn {
  0% {
    transform: scale(0.1);
    opacity: 0;
  }
  65% {
    transform: scale(1.35);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.marker-pop-in {
  animation: markerPopIn 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Real-time Card Slide-in Animation */
@keyframes cardSlideIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.cloud-result-card {
  animation: cardSlideIn 0.22s ease-out forwards;
}

/* Multilateration & Likely Endpoint Region Box */
.multilateration-box {
  background: rgba(139, 92, 246, 0.07);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  margin-bottom: 8px;
  animation: cardSlideIn 0.3s ease-out forwards;
}

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

.multi-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #c4b5fd;
}

.multi-header-icon {
  width: 15px;
  height: 15px;
  color: #a78bfa;
}

.multi-verdict-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.multi-verdict-badge.valid {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
}

.multi-verdict-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.4);
}

.multi-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.multi-stat-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 6px 9px;
  display: flex;
  flex-direction: column;
}

.multi-stat-k {
  font-size: 0.64rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.multi-stat-v {
  font-size: 1.05rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
  margin: 2px 0;
}

.multi-stat-sub {
  font-size: 0.61rem;
  color: #94a3b8;
}

.multi-verdict-banner {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 0.72rem;
  color: #e2e8f0;
  line-height: 1.4;
  margin-bottom: 8px;
}

.multi-verdict-icon {
  font-size: 0.92rem;
  line-height: 1;
}

.multi-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-xs {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Centroid Radar Pulse on Map */
.centroid-pulse-pin {
  display: flex;
  align-items: center;
  justify-content: center;
}

.centroid-dot-wrap {
  position: relative;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.centroid-radar-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #8b5cf6;
  animation: radarPing 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radarPing {
  0% { transform: scale(0.6); opacity: 1; }
  75%, 100% { transform: scale(2.6); opacity: 0; }
}

.centroid-inner-dot {
  width: 11px;
  height: 11px;
  background: #a78bfa;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 12px #8b5cf6;
}

/* Egress Tag in probe card */
.cloud-egress-tag {
  font-size: 0.6rem;
  color: #c4b5fd;
  font-family: var(--font-mono);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 0 4px;
  border-radius: 3px;
}

.anchor-probe-tag {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(139, 92, 246, 0.22);
  color: #ddd6fe;
  border: 1px solid rgba(139, 92, 246, 0.45);
  text-transform: uppercase;
}

/* ==========================================================================
   Server-Side Path Traceroute (MTR) & Hop Geolocation Styles
   ========================================================================== */

.traceroute-card {
  position: relative;
  border: 1px solid rgba(16, 185, 129, 0.22);
  overflow: hidden;
}

.traceroute-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 50%, #3b82f6 100%);
}

.traceroute-controls-wrap {
  margin-top: 6px;
  margin-bottom: 8px;
}

.traceroute-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-traceroute-target {
  flex: 1;
  background: #080c14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.73rem;
  font-family: var(--font-mono);
  outline: none;
  transition: var(--transition-smooth);
}

.input-traceroute-target:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.input-traceroute-target::placeholder {
  color: var(--text-muted);
  font-family: var(--font-body);
}

.traceroute-meta-box {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 8px;
  padding: 9px 10px;
  margin-bottom: 10px;
}

.traceroute-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.traceroute-meta-item {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
}

.traceroute-meta-k {
  font-size: 0.61rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.traceroute-meta-v {
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #f8fafc;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tr-ip-mismatch-banner {
  margin-top: 7px;
  padding: 6px 8px;
  border-radius: 5px;
  font-size: 0.7rem;
  line-height: 1.4;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

.traceroute-hops-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}

.tr-hop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tr-hop-row:hover {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateX(2px);
}

.tr-hop-row.timed-out {
  opacity: 0.55;
  cursor: default;
}

.tr-hop-row.is-estimated {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.32);
}

.tr-hop-row.is-estimated:hover {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(251, 191, 36, 0.55);
}

.tr-hop-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.tr-hop-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #06101e;
  background: #10b981;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.45);
}

.tr-hop-badge.estimated {
  background: #f59e0b;
  color: #1c1102;
  box-shadow: 0 0 9px rgba(245, 158, 11, 0.55);
}

.tr-hop-badge.timeout {
  background: rgba(100, 116, 139, 0.3);
  color: #94a3b8;
  box-shadow: none;
}

.tr-hop-est-pill {
  font-size: 0.56rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.tr-hop-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tr-hop-host-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tr-hop-asn {
  font-size: 0.58rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
  flex-shrink: 0;
}

.tr-hop-geo-line {
  font-size: 0.66rem;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}

.tr-hop-geo-line.estimated {
  color: #fcd34d;
}

.tr-hop-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.tr-hop-rtt {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: #34d399;
}

.tr-hop-rtt.estimated {
  color: #fbbf24;
}

.tr-hop-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}

.raw-traceroute-pre {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #cbd5e1;
  background: rgba(5, 8, 15, 0.8);
  padding: 8px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 0;
  line-height: 1.45;
}

/* Map Hop Pin Marker */
.tr-map-hop-pin {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tr-map-hop-bubble {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid #10b981;
  color: #34d399;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.65), inset 0 0 4px rgba(16, 185, 129, 0.3);
  animation: markerPopIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.tr-map-hop-bubble.vantage {
  width: 26px;
  height: 26px;
  background: #10b981;
  color: #04130d;
  border: 2px solid #ffffff;
}

.tr-map-hop-bubble.estimated {
  border-color: #f59e0b;
  color: #fbbf24;
  background: #1c1306;
  box-shadow: 0 0 13px rgba(245, 158, 11, 0.75), inset 0 0 5px rgba(245, 158, 11, 0.35);
}

.tr-map-hop-bubble.tr-cluster {
  cursor: pointer;
  width: auto !important;
  min-width: 38px;
  height: 26px !important;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border-width: 2.2px;
  box-shadow:
    0 0 0 3.5px rgba(16, 185, 129, 0.24),
    0 0 16px rgba(16, 185, 129, 0.8),
    inset 0 0 5px rgba(16, 185, 129, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tr-map-hop-bubble.tr-cluster.estimated {
  box-shadow:
    0 0 0 3.5px rgba(245, 158, 11, 0.26),
    0 0 16px rgba(245, 158, 11, 0.85),
    inset 0 0 5px rgba(245, 158, 11, 0.45);
}

.tr-map-hop-bubble.tr-cluster:hover {
  transform: scale(1.12);
}

/* ==========================================================================
   Authoritative DNS Leak Test Styles
   ========================================================================== */

.dns-leak-card {
  position: relative;
  border: 1px solid rgba(56, 189, 248, 0.24);
  overflow: hidden;
}

.dns-leak-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
}

.dns-meta-box {
  background: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.24);
}

.tr-hop-row.is-dns-leak {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.42);
}

.tr-hop-row.is-dns-leak:hover {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(251, 113, 133, 0.65);
}

.tr-hop-badge.dns-ok {
  background: #38bdf8;
  color: #04131d;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  font-size: 0.6rem;
}

.tr-hop-badge.dns-leak {
  background: #f43f5e;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.65);
  font-size: 0.6rem;
}

.tr-map-hop-bubble.dns-ok {
  width: 28px;
  height: 28px;
  border-color: #38bdf8;
  color: #7dd3fc;
  background: #081c29;
  font-size: 0.58rem;
  box-shadow: 0 0 13px rgba(56, 189, 248, 0.7), inset 0 0 4px rgba(56, 189, 248, 0.35);
}

.tr-map-hop-bubble.dns-leak {
  width: 28px;
  height: 28px;
  border-color: #f43f5e;
  color: #fda4af;
  background: #280911;
  font-size: 0.58rem;
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.85), inset 0 0 5px rgba(244, 63, 94, 0.45);
}

.tr-map-hop-bubble.dns-cluster {
  cursor: pointer;
  width: auto !important;
  min-width: 44px;
  height: 28px !important;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tr-map-hop-bubble.dns-cluster.dns-ok {
  border-width: 2.5px;
  box-shadow:
    0 0 0 4px rgba(56, 189, 248, 0.24),
    0 0 18px rgba(56, 189, 248, 0.85),
    inset 0 0 6px rgba(56, 189, 248, 0.45);
}

.tr-map-hop-bubble.dns-cluster.dns-leak {
  border-width: 2.5px;
  box-shadow:
    0 0 0 4px rgba(244, 63, 94, 0.28),
    0 0 20px rgba(244, 63, 94, 0.9),
    inset 0 0 6px rgba(244, 63, 94, 0.5);
}

.tr-map-hop-bubble.dns-cluster:hover {
  transform: scale(1.12);
}

/* ==========================================================================
   Dual-Stack (IPv4 / IPv6) Connectivity & Leak Inspector Styles
   ========================================================================== */

.dual-stack-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.dual-stack-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dual-stack-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.dual-stack-pill {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dual-stack-pill.ds-ok {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.dual-stack-pill.ds-single {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.dual-stack-pill.ds-leak {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.45);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.25);
}

.dual-stack-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dual-stack-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(10, 15, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}

.dual-stack-row.is-interactive {
  cursor: pointer;
}

.dual-stack-row.is-interactive:hover {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(255, 255, 255, 0.15);
}

.dual-stack-row.is-leaking {
  background: rgba(244, 63, 94, 0.11);
  border-color: rgba(244, 63, 94, 0.42);
}

.dual-stack-row.is-leaking:hover {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(251, 113, 133, 0.6);
}

.dual-stack-row.is-inactive {
  opacity: 0.6;
}

.ds-stack-left {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.ds-family-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.ds-tag-v4 {
  background: rgba(6, 182, 212, 0.16);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.32);
}

.ds-tag-v6 {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.ds-pref-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.ds-status-badge {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

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

.ds-status-badge.status-leak {
  background: rgba(244, 63, 94, 0.22);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.5);
  font-weight: 700;
}

.ds-stack-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  text-align: right;
}

.ds-ip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 195px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-meta {
  font-size: 0.66rem;
  color: var(--text-secondary);
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}

.dual-stack-alert-banner {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fecdd3;
  font-size: 0.72rem;
  line-height: 1.45;
}

.dual-stack-alert-banner strong {
  color: #ffffff;
}

/* Map Beacon for Secondary / Leaking Dual-Stack Exit */
.custom-beacon-leak {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leak-wave {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #f43f5e;
  animation: beacon-ripple 2.1s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

.leak-wave:nth-child(2) {
  animation-delay: 0.7s;
}

.leak-core {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #f43f5e;
  border: 2px solid #ffffff;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.95);
  z-index: 2;
}

.tunnel-badge.leak-badge {
  background: rgba(40, 9, 17, 0.92);
  border-color: rgba(244, 63, 94, 0.65);
  color: #fda4af;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
}

/* =========================================================================
   Copy All Trace Data / Export & Report Telemetry Modal
   ========================================================================= */
.modal-window.modal-window-wide {
  max-width: 640px;
}

.export-sections-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.export-section-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.export-section-pill.is-present {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.35);
  color: #67e8f9;
}

.export-section-pill.is-empty {
  opacity: 0.55;
}

.export-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

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

.export-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.export-field-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.export-select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.export-notes-input {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  background: rgba(5, 8, 15, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.export-notes-input:focus {
  border-color: var(--accent-cyan);
}

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

.export-size-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 1px 7px;
  border-radius: 999px;
}

.export-json-textarea {
  height: 220px;
  font-size: 0.72rem;
  line-height: 1.45;
  margin-bottom: 14px;
  white-space: pre;
  overflow: auto;
}

.export-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Browser Fingerprinting & Home Origin Detection Styles
   ========================================================================== */

.fingerprint-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(168, 85, 247, 0.28);
  box-shadow: 0 4px 20px -2px rgba(168, 85, 247, 0.08);
  transition: var(--transition-smooth);
}

.fingerprint-card:hover {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 4px 24px -2px rgba(168, 85, 247, 0.16);
}

.tag-fingerprint {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
  transition: var(--transition-smooth);
}

.tag-fingerprint.is-discrepancy {
  background: rgba(244, 63, 94, 0.16);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.4);
}

.tag-fingerprint.is-moderate {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.4);
}

.tag-fingerprint.is-aligned {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.fingerprint-verdict-box {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 4px;
}

.fingerprint-home-label {
  font-size: 0.65rem;
  color: #c084fc;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.fp-discrepancy-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 500;
  margin-top: 8px;
  transition: var(--transition-smooth);
}

.fp-discrepancy-strip.is-discrepancy {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.32);
  color: #fecdd3;
}

.fp-discrepancy-strip.is-moderate {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.32);
  color: #fef08a;
}

.fp-discrepancy-strip.is-aligned {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #a7f3d0;
}

.fp-detailed-table {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.72rem;
  padding: 10px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 6px;
  font-family: var(--font-mono);
  max-height: 280px;
  overflow-y: auto;
}

.fp-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.fp-detail-row:last-child {
  border-bottom: none;
}

.fp-detail-key {
  color: var(--text-muted);
  font-size: 0.7rem;
  white-space: nowrap;
}

.fp-detail-val {
  color: #e2e8f0;
  font-size: 0.72rem;
  text-align: right;
  word-break: break-all;
}

.btn-accent {
  background: rgba(168, 85, 247, 0.16);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.btn-accent:hover {
  background: rgba(168, 85, 247, 0.28);
  color: #f3e8ff;
  border-color: rgba(168, 85, 247, 0.6);
}







