/* ==========================================================================
   ScamShield Design System & Modern Cyber-Defense CSS
   ========================================================================== */

:root {
  /* Color Palette - Curated Cyber Defense Palette */
  --bg-dark: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-surface-glass: rgba(15, 23, 42, 0.75);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-focus: rgba(6, 182, 212, 0.4);

  /* Primary Accent & Cyber Glows */
  --primary-cyan: #06b6d4;
  --primary-cyan-glow: rgba(6, 182, 212, 0.25);
  --primary-blue: #3b82f6;

  /* Threat Levels */
  --threat-safe: #10b981;
  --threat-safe-glow: rgba(16, 185, 129, 0.25);
  --threat-warning: #f59e0b;
  --threat-warning-glow: rgba(245, 158, 11, 0.25);
  --threat-danger: #ef4444;
  --threat-danger-glow: rgba(239, 68, 68, 0.35);

  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Shadows & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 35px -5px var(--primary-cyan-glow);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  background-image: 
    radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.8) 0px, transparent 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Container */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Header & Top Bar */
/* Header & Top Bar */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.top-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-cyan), #3b82f6, transparent);
  opacity: 0.8;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 0 25px rgba(14, 165, 233, 0.45);
  position: relative;
}

.brand-radar-ring {
  position: absolute;
  top: -3px; left: -3px; right: -3px; bottom: -3px;
  border-radius: calc(var(--radius-md) + 3px);
  border: 1px solid rgba(14, 165, 233, 0.5);
  animation: radar-pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes radar-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 0.2; }
  100% { transform: scale(1); opacity: 0.8; }
}

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

.brand-text h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff 0%, #38bdf8 50%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  font-weight: 500;
}

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

.core-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

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

.core-status-pill.intel-core {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #38bdf8;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.btn-header-integrations {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-header-integrations:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--primary-cyan);
  color: #fff;
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.25);
}

.dot-online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.status-beacon {
  width: 8px;
  height: 8px;
  background-color: #06b6d4;
  border-radius: 50%;
  animation: pulse-beacon 2s infinite;
}

@keyframes pulse-beacon {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.8); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(6, 182, 212, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

/* Navigation Tabs - Command Deck */
.nav-tabs {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

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

.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(59, 130, 246, 0.25));
  border: 1px solid rgba(6, 182, 212, 0.45);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.tab-icon {
  font-size: 16px;
}

/* Main Content Workspace */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 992px) {
  .main-grid.has-result {
    grid-template-columns: 1.05fr 1fr;
  }
}

/* Card Styling */
.panel-card {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  position: relative;
}

.panel-header-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.panel-card h2 {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  margin-bottom: 6px;
}

.cyber-chip-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  white-space: nowrap;
}

.panel-card .subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}


/* Form Inputs & Custom Wrappers */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .field-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.input-with-icon .form-control {
  padding-left: 42px;
}

.form-control {
  width: 100%;
  background: rgba(10, 15, 29, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25), 0 0 20px rgba(6, 182, 212, 0.15);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Laser Cyber Buttons */
.btn-primary.btn-scan-cyber {
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #2563eb 50%, #4f46e5);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  padding: 15px 24px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 24px rgba(2, 132, 199, 0.35);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary.btn-scan-cyber:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(2, 132, 199, 0.55);
  border-color: #38bdf8;
}

.btn-primary.btn-scan-cyber:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-scan-laser {
  position: absolute;
  top: 0; left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-25deg);
  animation: laser-sheen 4s infinite;
}

@keyframes laser-sheen {
  0% { left: -100%; }
  30% { left: 200%; }
  100% { left: 200%; }
}

/* Drag and Drop Zone */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary-cyan);
  background: rgba(6, 182, 212, 0.06);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.15);
}

.dropzone-reticle {
  position: absolute;
  top: 10px; left: 10px; right: 10px; bottom: 10px;
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: calc(var(--radius-md) - 4px);
  pointer-events: none;
}

.dropzone-icon {
  font-size: 44px;
  margin-bottom: 12px;
  color: var(--primary-cyan);
}

.dropzone p {
  color: #e2e8f0;
  font-size: 14px;
}

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

.image-preview-box {
  margin-top: 14px;
  display: none;
  text-align: center;
}

.image-preview-box img {
  max-width: 100%;
  max-height: 220px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}


/* ==========================================================================
   Analysis Result Panel & Risk Gauge
   ========================================================================== */

/* ==========================================================================
   Redesigned ScamShield Result Diagnostic Dashboard
   ========================================================================== */

.result-panel {
  display: none;
}

.result-panel.visible {
  display: block;
  animation: resultSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes resultSlideIn {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Ambient glow on result panel based on threat level */
.result-panel.level-SAFE {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 35px -5px rgba(16, 185, 129, 0.15), 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.result-panel.level-SUSPICIOUS {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 35px -5px rgba(245, 158, 11, 0.2), 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.result-panel.level-HIGH {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 40px -5px rgba(239, 68, 68, 0.25), 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

/* 1. HUD Hero Diagnostic Card */
.result-hud-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.result-hud-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-cyan), transparent);
}

.hud-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hud-target-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 9999px;
  max-width: 380px;
}

.hud-target-icon {
  font-size: 14px;
}

.hud-target-text {
  font-size: 12px;
  color: #e2e8f0;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.btn-copy-target {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  font-size: 12px;
  transition: var(--transition);
}

.btn-copy-target:hover {
  color: var(--primary-cyan);
  transform: scale(1.15);
}

.hud-confidence-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 4px 12px;
  border-radius: 9999px;
}

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

.hud-main-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: center;
}

@media (max-width: 600px) {
  .hud-main-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

/* Modern Radial Tachometer Gauge */
.gauge-wrapper-modern {
  position: relative;
  width: 170px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-svg-modern {
  width: 170px;
  height: 170px;
  transform: rotate(-90deg);
}

.gauge-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 12;
}

.gauge-ticks {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 12;
  stroke-dasharray: 2 12;
}

.gauge-fill-glow {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
  stroke-dasharray: 465;
  stroke-dashoffset: 465;
  opacity: 0.45;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.25, 1, 0.5, 1), stroke 0.4s ease;
}

.gauge-fill-modern {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 465;
  stroke-dashoffset: 465;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.25, 1, 0.5, 1), stroke 0.4s ease;
}

.gauge-core {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gauge-score-value {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  letter-spacing: -1px;
}

.gauge-score-scale {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.gauge-risk-descriptor {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-top: 4px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}

.gauge-risk-descriptor.SAFE {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
}

.gauge-risk-descriptor.SUSPICIOUS {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
}

.gauge-risk-descriptor.HIGH {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
}

/* Right HUD Verdict & Telemetry */
.hud-verdict-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.verdict-banner-modern {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 10px;
  width: fit-content;
  transition: var(--transition);
}

.verdict-banner-modern.SAFE {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.15);
}

.verdict-banner-modern.SAFE .verdict-text {
  color: #34d399;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.verdict-banner-modern.SUSPICIOUS {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
}

.verdict-banner-modern.SUSPICIOUS .verdict-text {
  color: #fbbf24;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.verdict-banner-modern.HIGH {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
  animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
  0%, 100% { border-color: rgba(239, 68, 68, 0.5); }
  50% { border-color: rgba(239, 68, 68, 0.9); }
}

.verdict-banner-modern.HIGH .verdict-text {
  color: #f87171;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
}

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

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

.hud-category-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.3px;
}

.hud-telemetry-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.telemetry-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
}

.tele-val {
  font-size: 12px;
  font-weight: 800;
}

.telemetry-pill.danger .tele-val { color: #f87171; }
.telemetry-pill.warning .tele-val { color: #fbbf24; }
.telemetry-pill.info .tele-val { color: #60a5fa; }
.telemetry-pill.success .tele-val { color: #34d399; }

.tele-lbl {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

/* 2. Directive Recommendation Banner */
.directive-box-modern {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.directive-box-modern.SAFE {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.05));
  border-color: rgba(16, 185, 129, 0.3);
}

.directive-box-modern.SUSPICIOUS {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
  border-color: rgba(245, 158, 11, 0.35);
}

.directive-box-modern.HIGH {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(185, 28, 28, 0.05));
  border-color: rgba(239, 68, 68, 0.45);
}

.directive-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.directive-content {
  flex: 1;
}

.directive-header {
  margin-bottom: 4px;
}

.directive-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
  margin-bottom: 2px;
}

.directive-content h4 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
  text-transform: uppercase;
}

.directive-box-modern.SAFE h4 { color: #34d399; }
.directive-box-modern.SUSPICIOUS h4 { color: #fbbf24; }
.directive-box-modern.HIGH h4 { color: #f87171; }

.directive-content p {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.4;
}

/* 3. Result Sub-Navigation Tabs */
.result-subtabs-bar {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.result-subtabs-bar::-webkit-scrollbar {
  display: none;
}

.res-subtab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.res-subtab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.res-subtab.active {
  color: #fff;
  background: rgba(6, 182, 212, 0.2);
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

/* 4. Subtab Panels */
.result-subtab-panels {
  min-height: 180px;
  margin-bottom: 20px;
}

.res-panel {
  animation: fadeIn 0.25s ease-out;
}

/* Subpanel 1: Overview Grid */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

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

.overview-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.oc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.oc-header h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.quick-signals-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 14px;
}

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

.qs-header h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.quick-signals-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: #e2e8f0;
}

.signal-chip.danger {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.signal-chip.warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: #fde68a;
}

.signal-chip.info {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
  color: #a7f3d0;
}

/* Subpanel 2: Threat Feeds Matrix Grid */
.threat-matrix-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.threat-matrix-header h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.threat-matrix-header p {
  font-size: 12px;
  color: var(--text-dim);
}

.threat-feeds-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 600px) {
  .threat-feeds-result-grid {
    grid-template-columns: 1fr;
  }
}

.feed-matrix-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: var(--transition);
}

.feed-matrix-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.fmc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.fmc-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fmc-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.fmc-badge.clean {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.fmc-badge.threat {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.fmc-badge.optional {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.fmc-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

/* Subpanel 3: Findings List & Filters */
.findings-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.filter-pills-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.filter-pill.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--primary-cyan);
  color: #fff;
}

.findings-list-modern {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.finding-card-modern {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-left: 3px solid #64748b;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: var(--transition);
}

.finding-card-modern:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}

.finding-card-modern.severity-high {
  border-left-color: #ef4444;
}

.finding-card-modern.severity-medium {
  border-left-color: #f59e0b;
}

.finding-card-modern.severity-low {
  border-left-color: #3b82f6;
}

.finding-card-modern.severity-info {
  border-left-color: #10b981;
}

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

.fcm-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fcm-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 6px;
}

.fcm-edu {
  font-size: 11px;
  color: var(--primary-cyan);
  background: rgba(6, 182, 212, 0.08);
  border-left: 2px solid var(--primary-cyan);
  padding: 6px 10px;
  border-radius: 4px;
  line-height: 1.3;
}

/* Subpanel 4: Incident Response Checklist */
.action-checklist-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.checklist-header {
  margin-bottom: 14px;
}

.checklist-header h4 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.checklist-header p {
  font-size: 12px;
  color: var(--text-dim);
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.checklist-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.checklist-item.checked {
  opacity: 0.6;
}

.checklist-item.checked .checklist-text h5 {
  text-decoration: line-through;
  color: var(--text-dim);
}

.checklist-check {
  font-size: 16px;
  line-height: 1;
  color: var(--primary-cyan);
}

.checklist-text h5 {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.checklist-text p {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

/* 5. Bottom Result Utility Toolbar */
.result-footer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border-glass);
  flex-wrap: wrap;
  gap: 10px;
}

.rf-left {
  display: flex;
  gap: 8px;
}

.btn-toolbar {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-toolbar:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.report-hash {
  font-size: 11px;
  color: var(--text-dim);
  font-family: monospace;
}

.edu-icon {
  font-size: 24px;
}

.edu-content h4 {
  font-size: 13px;
  color: var(--primary-cyan);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.edu-content p {
  font-size: 13px;
  color: #e2e8f0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .top-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}


/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-card {
  background: #0f172a;
  border: 1px solid var(--border-glass-focus);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 25px var(--primary-cyan-glow);
  animation: fadeIn 0.25s ease-out;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-glass);
}

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

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
}

.integration-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 14px 18px;
  border-radius: var(--radius-md);
}

.integration-icon {
  font-size: 28px;
}

.integration-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.integration-info p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.integration-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
}

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

.integration-status.disconnected {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}


.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

/* ==========================================================================
   QR Live Camera Scanner HUD
   ========================================================================== */

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

.btn-qr-action {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-main);
  font-family: inherit;
}

.btn-qr-action:hover {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn-qr-action.active-mode {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(59, 130, 246, 0.15));
  border-color: var(--primary-cyan);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
}

.qr-action-icon {
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.qr-action-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qr-action-text strong {
  font-size: 13px;
  color: #fff;
}

.qr-action-text small {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

/* Camera Scanner Viewport Container */
.camera-scanner-box {
  background: #020617;
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: var(--radius-md);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.15), 0 8px 32px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
  animation: cameraFadeIn 0.3s ease-out;
}

@keyframes cameraFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.camera-viewport-wrap {
  position: relative;
  width: 100%;
  height: 320px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#qr-camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

#qr-camera-video.is-mirrored {
  transform: scaleX(-1);
}

.camera-hud-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.camera-reticle-frame {
  width: 200px;
  height: 200px;
  position: relative;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.48);
  transition: all 0.25s ease;
}

.hud-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--primary-cyan);
  border-style: solid;
}

.hud-corner.top-left {
  top: 0;
  left: 0;
  border-width: 3px 0 0 3px;
  border-top-left-radius: 8px;
}

.hud-corner.top-right {
  top: 0;
  right: 0;
  border-width: 3px 3px 0 0;
  border-top-right-radius: 8px;
}

.hud-corner.bottom-left {
  bottom: 0;
  left: 0;
  border-width: 0 0 3px 3px;
  border-bottom-left-radius: 8px;
}

.hud-corner.bottom-right {
  bottom: 0;
  right: 0;
  border-width: 0 3px 3px 0;
  border-bottom-right-radius: 8px;
}

.camera-laser-scan {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #38bdf8, #06b6d4, #38bdf8, transparent);
  box-shadow: 0 0 14px #38bdf8, 0 0 24px #06b6d4;
  animation: laserSweep 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes laserSweep {
  0% { top: 6%; opacity: 0.3; }
  50% { top: 92%; opacity: 1; }
  100% { top: 6%; opacity: 0.3; }
}

.camera-status-pill {
  position: absolute;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
}

.camera-status-pill.detected {
  border-color: #10b981;
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.9);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.45);
}

.camera-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-cam-control {
  font-size: 11px;
  padding: 6px 14px;
}

.camera-hud-overlay.qr-success-flash .camera-reticle-frame {
  box-shadow: 0 0 30px #10b981, inset 0 0 20px rgba(16, 185, 129, 0.4), 0 0 0 9999px rgba(0, 0, 0, 0.35);
  border: 2px solid #10b981;
}

@media (max-width: 640px) {
  .qr-action-row {
    grid-template-columns: 1fr;
  }
  .camera-viewport-wrap {
    height: 260px;
  }
  .camera-reticle-frame {
    width: 170px;
    height: 170px;
  }
}


