/* =============================================================================
   CYBERGAZE — Mobile Responsiveness & PWA Styles
   Supplements Tailwind CDN. Never overrides core layout logic.
   ============================================================================= */


/* =============================================================================
   1. GLOBAL — Prevent horizontal scroll
   ============================================================================= */

html,
body {
  overflow-x: hidden;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}


/* =============================================================================
   2. MOBILE NAVIGATION — Slide-down menu
   ============================================================================= */

/* Hidden by default; toggled via JS .mobile-menu-open class */
#mobile-menu {
  display: none;
  overflow: hidden;
}

#mobile-menu.mobile-menu-open {
  display: block;
  animation: mobileMenuSlide 0.25s ease forwards;
}

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

/* Never show mobile menu on large screens regardless of JS state */
@media (min-width: 1024px) {
  #mobile-menu {
    display: none !important;
  }
}


/* =============================================================================
   3. HAMBURGER ICON — Animated to ✕ on open
   ============================================================================= */

#hamburger-icon span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #9ca3af;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
  transform-origin: center;
}

/* Top bar — rotates to \ */
#mobile-menu-btn[aria-expanded="true"] #hamburger-icon span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background-color: #00ff9d;
}

/* Middle bar — fades out */
#mobile-menu-btn[aria-expanded="true"] #hamburger-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

/* Bottom bar — rotates to / */
#mobile-menu-btn[aria-expanded="true"] #hamburger-icon span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background-color: #00ff9d;
}


/* =============================================================================
   4. TOUCH TARGETS — Minimum 44px per WCAG 2.1 SC 2.5.5
   ============================================================================= */

/* Key interactive elements */
.cyber-btn,
#scan-btn,
#mobile-menu-btn,
#auth-submit-btn,
.domain-btn {
  min-height: 44px;
}

/* Mobile menu links and buttons */
#mobile-menu a,
#mobile-menu button {
  min-height: 48px;
  display: flex;
  align-items: center;
}

/* Auth modal submit */
#auth-modal button[type="submit"],
#auth-modal .cyber-btn {
  min-height: 48px;
}


/* =============================================================================
   5. MODALS — Full mobile treatment
   ============================================================================= */

/* Add horizontal padding to auth modal overlay so card never touches edges */
#auth-modal {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Auth modal card */
#auth-modal > div {
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Reduce inner padding on small screens */
@media (max-width: 480px) {
  #auth-modal > div {
    padding: 1.5rem;
  }
}

/* Result + ethics modals — ensure 90vh max */
#result-modal > div {
  max-height: 90vh;
}

.ethics-modal-box {
  max-height: 90vh !important;
}

/* Bigger close buttons (min 44×44 touch target) */
#auth-modal button[aria-label="Close"],
#result-modal button[aria-label="Close"],
#ethics-modal button[aria-label="Close"] {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 0.375rem;
}


/* =============================================================================
   6. SECURITY SCAN INPUT — Stack vertically on tiny screens
   ============================================================================= */

@media (max-width: 479px) {
  #security-scan-row {
    flex-direction: column;
  }

  #website-url {
    border-radius: 0.375rem 0.375rem 0 0 !important;
  }

  #scan-btn {
    border-radius: 0 0 0.375rem 0.375rem !important;
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
}


/* =============================================================================
   7. CARDS — Responsive grid
   Tailwind already uses grid-cols-1 / md:grid-cols-2 / lg:grid-cols-3 which
   covers all breakpoints. These rules handle fine-tuning only.
   ============================================================================= */

/* Ensure cards in OSINT section don't overflow on tiny screens */
.cyber-card {
  min-width: 0;
  word-break: break-word;
}

/* Disable 3D hover effects on touch devices to save GPU */
@media (hover: none) {
  .cyber-card:hover {
    transform: none;
    box-shadow: none;
  }
  .cyber-card:hover::before {
    opacity: 0;
  }
  .cyber-card:hover .card-icon {
    transform: none;
    filter: none;
  }
}


/* =============================================================================
   8. HERO — Responsive text sizing
   ============================================================================= */

@media (max-width: 360px) {
  .cyber-logo-text {
    font-size: 18px !important;
  }
}

/* Terminal box — responsive */
.terminal {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 95%;
  margin-left: auto;
  margin-right: auto;
}

.terminal-body {
  min-width: 0;
  word-break: break-word;
  white-space: normal;
}

@media (max-width: 640px) {
  .terminal-body {
    font-size: 13px !important;
    padding: 16px 18px !important;
  }
  .terminal-header {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}


/* =============================================================================
   9. FOOTER — 2-column on small screens
   ============================================================================= */

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

  footer .grid > div:first-child {
    grid-column: 1 / -1;
  }
}


/* =============================================================================
   10. PWA — iOS Safe Area Insets (notch / home bar)
   ============================================================================= */

nav {
  /* Push nav content below the iOS status bar */
  padding-top: env(safe-area-inset-top, 0px);
}

body {
  /* Prevent content hiding behind iOS home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Standalone PWA mode — slightly more breathing room */
@media (display-mode: standalone) {
  nav {
    padding-top: max(env(safe-area-inset-top, 0px), 8px);
  }
}


/* =============================================================================
   11. PERFORMANCE — Respect user motion preferences
   ============================================================================= */

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

  /* Kill glitch animation on logo */
  .cyber-glitch::before,
  .cyber-glitch::after {
    display: none;
  }

  /* Hide matrix canvas */
  #matrix-canvas,
  #matrix-overlay {
    display: none;
  }
}


/* =============================================================================
   12. MOBILE SCROLLBAR CLEANUP
   ============================================================================= */

@media (max-width: 768px) {
  .custom-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .custom-scrollbar::-webkit-scrollbar {
    display: none;
  }
}


/* =============================================================================
   13. BUTTONS — No text overflow, proper wrapping
   ============================================================================= */

button,
.cyber-btn,
[role="button"] {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Hero CTAs should wrap on tiny screens */
.hero-cta-group {
  flex-wrap: wrap;
}

/* Domain analyzer input group */
.domain-input-row {
  display: flex;
  flex-wrap: nowrap;
}

.domain-input-row input {
  min-width: 0;
  flex: 1 1 0%;
}


/* =============================================================================
   14. INPUT FIELDS — Mobile keyboard / font-size
   Prevents iOS from zooming in on focus (font-size must be >= 16px)
   ============================================================================= */

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  font-size: 16px;
}

/* Scale back down visually on larger screens where 16px is too big */
@media (min-width: 640px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  textarea {
    font-size: 14px;
  }
}


/* =============================================================================
   AI SECURITY REPORT PANEL
   ============================================================================= */

.ai-report-panel {
  background: rgba(0, 5, 18, 0.88);
  border: 1px solid rgba(0, 234, 255, 0.22);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 0 24px rgba(0, 234, 255, 0.04);
}

.ai-report-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(0, 234, 255, 0.12);
}

.ai-section-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00eaff;
  margin-bottom: 8px;
  margin-top: 14px;
}
.ai-section-heading:first-child { margin-top: 0; }
.ai-section-heading.rec { color: #00ff9d; }

.ai-bullet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #d1d5db;
  line-height: 1.55;
  margin-bottom: 5px;
}
.ai-bullet-dot { color: #00ff9d; flex-shrink: 0; margin-top: 2px; }

.ai-risk-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: #4b5563;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
}

.ai-spin {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 234, 255, 0.2);
  border-top-color: #00eaff;
  border-radius: 50%;
  animation: cyberSpin 0.8s linear infinite;
  flex-shrink: 0;
}

/* ── Intel Summary Cards (IP / SSL / Ports / Subdomains / Techs) ── */
.intel-card {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.intel-card .ic-value {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2px;
  word-break: break-all;
}
.intel-card .ic-label {
  font-size: 10px;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =============================================================================
   SCAN PROGRESS PANEL
   ============================================================================= */

/* Active stage bar colour (cannot use Tailwind JIT for dynamic JS toggles) */
.stage-bar.stage-active {
  background-color: #00ff9d;
}

/* Smooth animated pulse on the progress bar when running */
#scan-progress-panel:not(.hidden) #scan-progress-bar {
  transition: width 0.7s ease-out;
}

/* Indeterminate shimmer when progress=0 and status is queued */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
#scan-progress-panel.queued #scan-progress-bar {
  background-size: 200% auto;
  animation: shimmer 1.8s linear infinite;
}

/* =============================================================================
   DOMAIN INTELLIGENCE DASHBOARD — Premium SaaS UI
   ============================================================================= */

@keyframes da-fadein {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes da-pulse-ring {
  0%, 100% { transform: scale(1);    opacity: 0.18; }
  50%       { transform: scale(1.07); opacity: 0.40; }
}

/* ── Header stat row ── */
.da-header-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 640px) {
  .da-header-stats { grid-template-columns: repeat(2, 1fr); }
}

.da-stat-card {
  background: rgba(8, 9, 14, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px 14px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  animation: da-fadein 0.45s ease-out both;
  cursor: default;
}

.da-stat-card:hover {
  border-color: rgba(0, 255, 150, 0.28);
  box-shadow: 0 0 22px rgba(0, 255, 150, 0.07);
  transform: translateY(-2px);
}

.da-stat-val {
  font-size: 20px;
  font-weight: 700;
  font-family: monospace;
  line-height: 1.15;
  margin-bottom: 5px;
  letter-spacing: -0.02em;
}

.da-stat-lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #374151;
}

/* ── Risk Hero ── */
.da-risk-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  background: rgba(8, 9, 14, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 18px;
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  animation: da-fadein 0.5s 0.08s ease-out both;
}

.da-risk-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 18% 50%, var(--risk-glow, rgba(0,255,136,0.05)) 0%, transparent 65%);
  pointer-events: none;
}

@media (max-width: 500px) {
  .da-risk-hero { flex-direction: column; gap: 18px; padding: 22px 20px; }
}

.da-risk-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  font-family: monospace;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 28px currentColor;
}

.da-risk-circle::before {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.18;
  animation: da-pulse-ring 2.6s ease-in-out infinite;
}

.da-risk-circle::after {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.07;
  animation: da-pulse-ring 2.6s 0.6s ease-in-out infinite;
}

.da-risk-meta { flex: 1; }

.da-risk-hero-level {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}

.da-risk-hero-desc {
  color: #4b5563;
  font-size: 13px;
  margin-bottom: 14px;
}

.da-risk-bar-track {
  width: 100%;
  max-width: 300px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
}

.da-risk-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Risk colour tokens */
.da-clr-low    { color: #00ff88; --risk-glow: rgba(0,255,136,0.06); }
.da-clr-medium { color: #ffaa00; --risk-glow: rgba(255,170,0,0.06); }
.da-clr-high   { color: #ff3b3b; --risk-glow: rgba(255,59,59,0.06); }

/* ── Main 2-column grid ── */
.da-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .da-main-grid { grid-template-columns: 1fr; }
}

.da-col { display: flex; flex-direction: column; gap: 14px; }

/* ── Generic card ── */
.da-card {
  background: rgba(8, 9, 14, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  padding: 18px;
  backdrop-filter: blur(10px);
  transition: border-color 0.25s, box-shadow 0.25s;
  animation: da-fadein 0.5s ease-out both;
}

.da-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
}

.da-card-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #374151;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.da-card-title .da-ct-count {
  color: #1f2937;
  font-weight: 400;
  font-size: 9px;
}

/* ── Active Hosts ── */
.da-host-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px;
  border-radius: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s;
  font-size: 11px;
}

.da-host-row:last-child { border-bottom: none; }
.da-host-row:hover { background: rgba(0, 255, 150, 0.03); }

.da-http-badge {
  font-family: monospace;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  min-width: 34px;
  text-align: center;
}

.da-http-2xx { color: #00ff88; background: rgba(0,255,136,0.1); }
.da-http-3xx { color: #00b4ff; background: rgba(0,180,255,0.1); }
.da-http-4xx { color: #ffaa00; background: rgba(255,170,0,0.1); }
.da-http-5xx { color: #ff3b3b; background: rgba(255,59,59,0.1); }
.da-http-unk { color: #6b7280; background: rgba(107,114,128,0.1); }

.da-host-link {
  color: #00b4ff;
  font-family: monospace;
  font-size: 11px;
  flex: 1;
  word-break: break-all;
  text-decoration: none;
  transition: color 0.15s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.da-host-link:hover { color: #7dd3fc; text-decoration: underline; }

.da-host-page-title {
  color: #374151;
  font-size: 10px;
  font-style: italic;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

/* ── Panels danger card ── */
.da-card-danger {
  border-color: rgba(255, 59, 59, 0.18) !important;
  background: rgba(255, 59, 59, 0.025) !important;
}

.da-card-danger .da-card-title { color: #f87171; }

.da-panel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
  font-size: 11px;
  color: #fca5a5;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 59, 59, 0.07);
  word-break: break-all;
}

.da-panel-row:last-child { border-bottom: none; }

.da-panel-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff3b3b;
  box-shadow: 0 0 6px #ff3b3b;
  flex-shrink: 0;
  animation: da-pulse-ring 1.4s ease-in-out infinite;
}

/* ── Directories ── */
.da-dir-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}

.da-dir-chip {
  font-family: monospace;
  font-size: 10px;
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 3px 9px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  cursor: default;
}

.da-dir-chip:hover {
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

/* ── Technologies ── */
.da-tech-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}

.da-tech-chip {
  font-size: 10px;
  color: #00b4ff;
  background: rgba(0, 180, 255, 0.07);
  border: 1px solid rgba(0, 180, 255, 0.18);
  border-radius: 99px;
  padding: 3px 10px;
  transition: background 0.15s, box-shadow 0.15s;
  cursor: default;
}

.da-tech-chip:hover {
  background: rgba(0, 180, 255, 0.14);
  box-shadow: 0 0 10px rgba(0, 180, 255, 0.14);
}

/* ── Open Ports ── */
.da-ports-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.da-port-chip {
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 6px;
  padding: 4px 11px;
  cursor: default;
  transition: box-shadow 0.2s;
}

.da-port-chip:hover {
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
}

/* ── Subdomains ── */
.da-sub-scroll {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 210px;
  overflow-y: auto;
  padding-right: 4px;
}

.da-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
  font-size: 11px;
  padding: 3px 4px;
  border-radius: 4px;
  transition: background 0.12s;
}

.da-sub-row:hover { background: rgba(255,255,255,0.03); }

.da-sub-indicator {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.da-sub-alive .da-sub-indicator { background: #00ff88; box-shadow: 0 0 5px #00ff88; }
.da-sub-dead  .da-sub-indicator { background: #1f2937; }
.da-sub-alive { color: #d1fae5; }
.da-sub-dead  { color: #374151; }

/* ── DNS records ── */
.da-dns-tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: monospace;
  font-size: 11px;
}

.da-dns-tbl td {
  padding: 4px 10px 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}

.da-dns-type { color: #00b4ff; font-weight: 700; min-width: 52px; }
.da-dns-val  { color: #6b7280; word-break: break-all; }

/* ── Error box ── */
.da-error-box {
  background: rgba(255, 59, 59, 0.06);
  border: 1px solid rgba(255, 59, 59, 0.28);
  border-radius: 10px;
  color: #f87171;
  padding: 18px 20px;
  font-size: 14px;
  animation: da-fadein 0.35s ease-out;
}

/* =============================================================================
   DOMAIN — AI Security Analysis Card
   ============================================================================= */

.da-ai-card {
  background: rgba(8, 9, 14, 0.96);
  border: 1px solid rgba(0, 255, 136, 0.1);
  border-radius: 14px;
  padding: 22px 24px;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  animation: da-fadein 0.5s 0.18s ease-out both;
  position: relative;
  overflow: hidden;
  margin-bottom: 4px;
}

/* Top shimmer line */
.da-ai-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0,255,136,0.35) 50%, transparent 100%);
}

.da-ai-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.da-ai-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(0, 255, 136, 0.07);
  border: 1px solid rgba(0, 255, 136, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.da-ai-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #00ff88;
}

.da-ai-badge {
  margin-left: auto;
  font-size: 9px;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.07);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: 99px;
  padding: 2px 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.da-ai-summary {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.6;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Findings list */
.da-ai-findings {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.da-ai-finding {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  cursor: default;
}

.da-ai-finding:hover { background: rgba(255, 255, 255, 0.025); }

.da-fc-critical { border-left: 2px solid #ff3b3b; }
.da-fc-high     { border-left: 2px solid #f97316; }
.da-fc-medium   { border-left: 2px solid #ffaa00; }
.da-fc-info     { border-left: 2px solid #374151; }

.da-fi-icon { font-size: 12px; flex-shrink: 0; line-height: 1; }
.da-fi-text { color: #d1d5db; flex: 1; line-height: 1.4; }

.da-fi-sev {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.da-s-critical { color: #ff3b3b; background: rgba(255, 59, 59, 0.1); }
.da-s-high     { color: #f97316; background: rgba(249,115,22, 0.1); }
.da-s-medium   { color: #ffaa00; background: rgba(255,170, 0, 0.1); }
.da-s-info     { color: #4b5563; background: rgba(75, 85, 99, 0.1); }

/* Recommendations toggle button */
.da-ai-rec-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid rgba(0, 255, 136, 0.16);
  color: #00ff88;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
}

.da-ai-rec-btn:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.1);
}

/* Recommendations panel */
.da-ai-recs {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.da-ai-recs.open {
  display: block;
  animation: da-fadein 0.3s ease-out;
}

.da-ai-rec-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
  line-height: 1.55;
}

.da-ai-rec-row:last-child { border-bottom: none; }

.da-ai-rec-num {
  color: #1f2937;
  font-family: monospace;
  font-size: 10px;
  min-width: 22px;
  padding-top: 2px;
  flex-shrink: 0;
}

.da-ai-rec-text { color: #9ca3af; flex: 1; }

/* =============================================================================
   DOMAIN — Unified Infrastructure Analysis Card
   ============================================================================= */

.infra-card {
  background: rgba(8, 9, 14, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(10px);
  animation: da-fadein 0.5s ease-out both;
  transition: border-color 0.25s, box-shadow 0.25s;
  width: 100%;
}

.infra-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
}

.infra-card-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #374151;
  margin-bottom: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.infra-section {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.infra-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.infra-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #8fffd1;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.infra-count {
  color: #1f2937;
  font-weight: 400;
  font-size: 10px;
}

.infra-alive {
  color: #00ff88;
  font-size: 10px;
  font-weight: 400;
}

/* Tags (technologies) — tighter than default */
.infra-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Ports — inline chips */
.infra-ports {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Subdomains — scrollable list */
.infra-subs {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-right: 4px;
}

/* ============================================================
   PREMIUM SCAN REPORT UI — v3
   ============================================================ */

/* ── Skeleton shimmer ─────────────────────────────────────── */
@keyframes cgShimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.cg-skeleton {
  background: linear-gradient(90deg,#0d1220 25%,#1a2035 50%,#0d1220 75%);
  background-size: 600px 100%;
  animation: cgShimmer 1.6s infinite;
  border-radius: 4px;
}

/* ── Slide-down reveal ───────────────────────────────────── */
@keyframes cgSlideDown {
  from { opacity:0; transform:translateY(-10px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes cgFadeIn {
  from { opacity:0; }
  to   { opacity:1; }
}

/* ── Inline result preview bar ───────────────────────────── */
#scan-inline-result {
  display: none;
  margin-top: 14px;
  border-radius: 10px;
  border: 1px solid #1f2937;
  background: #060810;
  overflow: hidden;
  animation: cgSlideDown .35s ease;
}
.cg-inline-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; cursor: pointer;
  justify-content: space-between;
  transition: background .15s;
}
.cg-inline-bar:hover { background: rgba(255,255,255,.02); }
.cg-inline-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.cg-chip {
  background: #0a0f1a; border: 1px solid #1f2937;
  border-radius: 8px; padding: 7px 14px; text-align: center;
}
.cg-chip-val { font-size:18px; font-weight:700; line-height:1; font-family:monospace; }
.cg-chip-lbl { font-size:9px; color:#6b7280; letter-spacing:.08em; margin-top:3px; text-transform:uppercase; }

/* ── Progress panel — 6-stage pipe ──────────────────────── */
.cg-stage-pipe {
  display: flex; align-items: flex-start; gap: 0;
  margin-top: 14px;
}
.cg-stage-node {
  flex: 1; text-align: center; position: relative;
}
.cg-stage-node:not(:last-child)::after {
  content: ''; position: absolute;
  top: 9px; left: 50%; right: -50%;
  height: 2px; background: #1f2937; z-index: 0;
  transition: background .5s;
}
.cg-stage-node.done::after  { background: #00ff9d44; }
.cg-stage-node.active::after { background: linear-gradient(90deg,#00eaff44,#1f2937); }
.cg-stage-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: #0d1220; border: 2px solid #374151;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative; z-index: 1; margin-bottom: 7px;
  transition: all .4s ease;
}
.cg-stage-node.active .cg-stage-dot {
  border-color: #00eaff;
  box-shadow: 0 0 12px #00eaff55;
  background: #00eaff18;
}
.cg-stage-node.active .cg-stage-dot::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #00eaff; animation: cgPulse .9s ease-in-out infinite;
}
@keyframes cgPulse {
  0%,100% { transform:scale(1); opacity:1; }
  50%      { transform:scale(1.5); opacity:.6; }
}
.cg-stage-node.done .cg-stage-dot {
  border-color: #00ff9d; background: #00ff9d;
}
.cg-stage-node.done .cg-stage-dot::after {
  content: '✓'; color: #000; font-size: 8px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.cg-stage-lbl { font-size: 9px; color: #4b5563; letter-spacing: .05em; transition: color .4s; }
.cg-stage-node.active .cg-stage-lbl { color: #00eaff; }
.cg-stage-node.done   .cg-stage-lbl { color: #00ff9d66; }

/* ── Report modal action buttons ─────────────────────────── */
.cg-modal-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cg-mbtn {
  padding: 5px 13px; border-radius: 5px; font-size: 10px;
  font-family: 'Courier New', monospace; cursor: pointer;
  border: 1px solid; transition: filter .2s, transform .1s;
  white-space: nowrap; line-height: 1.6;
}
.cg-mbtn:hover  { filter: brightness(1.35); transform: translateY(-1px); }
.cg-mbtn:active { transform: translateY(0); }
.cg-mbtn--pdf  { color:#a855f7; border-color:#a855f733; background:rgba(168,85,247,.09); }
.cg-mbtn--json { color:#00eaff; border-color:#00eaff33; background:rgba(0,234,255,.08); }
.cg-mbtn--copy { color:#00ff9d; border-color:#00ff9d33; background:rgba(0,255,157,.08); }

/* ── Report body layout ──────────────────────────────────── */
.cg-report { font-family:'Courier New',monospace; color:#d1d5db; animation: cgFadeIn .4s ease; }

.cg-report-top {
  display: flex; gap: 18px; align-items: flex-start;
  background: #060810; border: 1px solid #00eaff1a;
  border-radius: 10px; padding: 18px 20px; margin-bottom: 18px;
  flex-wrap: wrap;
}
.cg-gauge-wrap { flex-shrink: 0; text-align: center; }
.cg-gauge-lbl  { font-size: 8px; color: #4b5563; letter-spacing: .1em; margin-top: 4px; }
.cg-report-meta { flex: 1; min-width: 180px; }
.cg-risk-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 4px; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 8px;
}
.cg-summary-txt { font-size: 11px; color: #9ca3af; line-height: 1.7; }
.cg-stat-chips { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; flex-shrink: 0; }

.cg-section { margin-bottom: 18px; }
.cg-section-hd {
  font-size: 9px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; padding-bottom: 7px;
  border-bottom: 1px solid #1f2937; margin-bottom: 11px;
}

/* ── Finding cards ───────────────────────────────────────── */
.cg-finding-card {
  border-left: 3px solid; border-radius: 6px;
  padding: 11px 14px; margin-bottom: 7px;
  transition: transform .15s, box-shadow .15s;
}
.cg-finding-card:hover { transform: translateX(3px); }
.cg-fc--critical { background:rgba(239,68,68,.07);  border-color:#ef4444; }
.cg-fc--high     { background:rgba(249,115,22,.07); border-color:#f97316; }
.cg-fc--medium   { background:rgba(234,179,8,.07);  border-color:#eab308; }
.cg-fc--low      { background:rgba(34,197,94,.06);  border-color:#22c55e; }
.cg-fc--info     { background:rgba(59,130,246,.05); border-color:#3b82f6; }
.cg-finding-hd { display:flex; align-items:center; gap:8px; margin-bottom:5px; }
.cg-finding-name { font-size:12px; font-weight:600; color:#e5e7eb; }
.cg-finding-desc { font-size:11px; color:#9ca3af; line-height:1.6; }

/* ── Severity badge pills ─────────────────────────────────── */
.cg-sev {
  font-size: 8px; font-weight: 700; letter-spacing: .1em;
  padding: 2px 7px; border-radius: 3px; text-transform: uppercase;
  display: inline-block; flex-shrink: 0;
}
.cg-sev--critical { background:rgba(239,68,68,.2);  color:#f87171; }
.cg-sev--high     { background:rgba(249,115,22,.2); color:#fb923c; }
.cg-sev--medium   { background:rgba(234,179,8,.2);  color:#fbbf24; }
.cg-sev--low      { background:rgba(34,197,94,.15); color:#4ade80; }
.cg-sev--info     { background:rgba(59,130,246,.15);color:#60a5fa; }

/* ── Badge pills ─────────────────────────────────────────── */
.cg-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 10px; font-family: 'Courier New', monospace;
  margin: 3px; white-space: nowrap; border: 1px solid;
  transition: filter .15s;
}
.cg-badge:hover { filter: brightness(1.2); }
.cg-badge--tech { background:rgba(0,234,255,.07);  color:#67e8f9; border-color:#00eaff2a; }
.cg-badge--port { background:rgba(250,204,21,.07); color:#fde68a; border-color:#fbbf242a; }
.cg-badge--sub  { background:rgba(168,85,247,.07); color:#d8b4fe; border-color:#a855f72a; }
.cg-badge--ep   { background:rgba(56,189,248,.06); color:#7dd3fc; border-color:#38bdf82a; }
.cg-badge--sec  { background:rgba(248,113,113,.07);color:#fca5a5; border-color:#f871712a; }

/* ── Recommendation items ────────────────────────────────── */
.cg-rec { display:flex; gap:12px; padding:9px 0; border-bottom:1px solid #0d1220; }
.cg-rec:last-child { border-bottom:none; }
.cg-rec-num { color:#00ff9d; font-size:10px; flex-shrink:0; margin-top:1px; font-weight:700; }
.cg-rec-txt { color:#d1d5db; font-size:11px; line-height:1.65; }

/* ── Screenshots gallery ─────────────────────────────────── */
.cg-shots { display:flex; flex-wrap:wrap; gap:10px; }
.cg-shot {
  width:200px; height:120px; object-fit:cover;
  border-radius:6px; border:1px solid #374151; cursor:pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.cg-shot:hover { border-color:#00eaff; transform:scale(1.04); box-shadow:0 0 14px #00eaff33; }

/* ── 2-col grid for tech+ports ───────────────────────────── */
.cg-2col { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:18px; }
@media(max-width:540px) { .cg-2col { grid-template-columns:1fr; } }

/* ── My Scans table upgrade ──────────────────────────────── */
.cg-mst th { cursor:pointer; user-select:none; transition:color .15s; }
.cg-mst th:hover { color:#00eaff !important; }
.cg-mst th.cg-sort-asc::after  { content:' ↑'; color:#00ff9d; }
.cg-mst th.cg-sort-desc::after { content:' ↓'; color:#00ff9d; }

/* ── Widened result modal ────────────────────────────────── */
.cg-result-modal-box {
  max-width: min(900px, 95vw) !important;
  width: 100%;
}
@media(max-width:640px) { .cg-result-modal-box { max-height:95vh !important; } }

/* =============================================================================
   PREMIUM SCAN REPORT v2.3.0
   ============================================================================= */

/* ── Quick stats strip ───────────────────────────────────── */
.cg-stat-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.cg-stat-chip {
  flex: 1;
  min-width: 72px;
  background: #060810;
  border-radius: 6px;
  padding: 8px 10px;
  text-align: center;
  transition: border-color .2s, transform .2s;
}
.cg-stat-chip:hover { transform: translateY(-2px); }
.cg-stat-chip-val {
  font-family: 'JetBrains Mono','Fira Code',monospace;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.cg-stat-chip-lbl {
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #4b5563;
  margin-top: 3px;
}

/* ── Vuln severity cards ─────────────────────────────────── */
.cg-vuln-card {
  border-left-width: 3px;
  border-left-style: solid;
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 8px;
  transition: background .15s;
}

/* ── Subdomain table ─────────────────────────────────────── */
.cg-sub-table { width: 100%; border-collapse: collapse; font-size: 10px; font-family: monospace; }
.cg-sub-table th { position: sticky; top: 0; background: #060810; text-align: left; padding: 5px 10px; color: #6b7280; border-bottom: 1px solid #1f2937; letter-spacing: .06em; }
.cg-sub-table td { padding: 5px 10px; border-bottom: 1px solid #0d1220; }
.cg-sub-table tr:hover td { background: rgba(168,85,247,.04); }

/* ── Recommendation card ─────────────────────────────────── */
.cg-rec-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-left-width: 3px;
  border-left-style: solid;
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 8px;
  transition: background .15s;
}

/* ── Export button row ───────────────────────────────────── */
.cg-export-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid #0d1220;
  margin-top: 4px;
}
.cg-export-btn {
  font-size: 10px;
  font-family: monospace;
  padding: 7px 14px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid;
  transition: background .15s;
}

/* ── My Scans dashboard stats ────────────────────────────── */
#my-scans-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* ── Delete scan button pulse on hover ───────────────────── */
@keyframes cg-pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248,113,113,0); }
  50%       { box-shadow: 0 0 0 4px rgba(248,113,113,.15); }
}

/* ── Screenshot gallery hover zoom ──────────────────────── */
.cg-screenshot-img {
  max-width: 220px;
  max-height: 140px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #374151;
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.cg-screenshot-img:hover {
  transform: scale(1.06);
  border-color: #00eaff;
  box-shadow: 0 0 12px rgba(0,234,255,.3);
}

/* ── Progress stage pipeline (mobile-friendly) ───────────── */
@media(max-width:480px) {
  .cg-stage-pipe { gap: 4px !important; }
  .cg-stage-lbl  { font-size: 8px !important; }
}

/* ── Result modal mobile responsive ─────────────────────── */
@media(max-width:640px) {
  #result-modal .result-modal-box {
    max-width: 100vw !important;
    margin: 0 !important;
    border-radius: 12px 12px 0 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    max-height: 92vh !important;
  }
}

/* ── Live Cyber Intel Panel ─────────────────────────────── */
.cyber-intel-panel {
  background: #060c16;
  border: 1px solid #00eaff1a;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}
.cyber-intel-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00eaff33, transparent);
}
.cyber-intel-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Courier New', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: #00eaff66;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.cyber-intel-blink {
  width: 6px; height: 6px; border-radius: 50%;
  background: #00eaff;
  animation: ciBlink 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes ciBlink {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.3; transform:scale(0.7); }
}
.cyber-intel-tip {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.65;
  font-family: 'Courier New', monospace;
  min-height: 40px;
  transition: opacity 0.35s ease;
}
.cyber-intel-tip.ci-fade { opacity: 0; }
.cyber-intel-footer {
  margin-top: 8px;
  font-size: 9px;
  color: #1f2937;
  font-family: monospace;
  display: flex;
  justify-content: space-between;
}
@media(max-width:480px) {
  .cyber-intel-panel { padding: 10px 12px; }
  .cyber-intel-tip   { font-size: 11px; }
}

/* ── Scan Terminal Log ──────────────────────────────────── */
.scan-terminal {
  margin-top: 12px;
  background: #040a13;
  border: 1px solid #1f2937;
  border-radius: 8px;
  overflow: hidden;
}
.scan-terminal-hdr {
  background: #0a1120;
  padding: 5px 12px;
  font-size: 9px;
  font-family: monospace;
  color: #374151;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}
.sth-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.scan-terminal-body {
  padding: 8px 12px;
  max-height: 108px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.75;
  scrollbar-width: none;
}
.scan-terminal-body::-webkit-scrollbar { display: none; }
.st-line {
  color: #4b5563;
  animation: stAppear 0.18s ease-out;
}
.st-line.ok   { color: #6ee7b7; }
.st-line.warn { color: #fbbf24; }
.st-line.err  { color: #f87171; }
@keyframes stAppear {
  from { opacity:0; transform:translateX(-4px); }
  to   { opacity:1; transform:translateX(0);    }
}
.st-ok   { color: #00ff9d; margin-right: 5px; }
.st-warn { color: #fbbf24; margin-right: 5px; }
.st-err  { color: #f87171; margin-right: 5px; }

/* ── Scan panel success / fail pulse ────────────────────── */
@keyframes scanOkPulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,255,157,0.45); border-color:#00ff9d; }
  60%  { box-shadow: 0 0 0 16px rgba(0,255,157,0);  }
  100% { box-shadow: 0 0 0 0 rgba(0,255,157,0);  border-color:#1f2937; }
}
@keyframes scanErrPulse {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.45);  border-color:#ef4444; }
  60%  { box-shadow: 0 0 0 16px rgba(239,68,68,0);  }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0);  border-color:#1f2937; }
}
.scan-ok-pulse  { animation: scanOkPulse  0.85s ease-out 2; }
.scan-err-pulse { animation: scanErrPulse 0.85s ease-out 2; }

/* ── Scan retry button ──────────────────────────────────── */
#scan-retry-btn {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px;
  padding: 5px 14px;
  background: transparent;
  border: 1px solid #ef4444;
  color: #f87171;
  border-radius: 5px;
  font-size: 11px;
  font-family: monospace;
  cursor: pointer;
  transition: background .2s, color .2s;
  letter-spacing: .03em;
}
#scan-retry-btn:hover { background: rgba(239,68,68,.12); color: #fca5a5; }

/* ───────────────────────────────────────────────────────────────
   SOCIAL TRACKER DASHBOARD  (.st-)
   ─────────────────────────────────────────────────────────────── */
.st-header-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
@media (max-width: 760px) { .st-header-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .st-header-stats { grid-template-columns: repeat(2, 1fr); } }

.st-stat-card {
  background: rgba(8,9,14,0.92);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 16px 14px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: border-color .25s, box-shadow .25s, transform .2s;
  animation: da-fadein .45s ease-out both;
  cursor: default;
}
.st-stat-card:hover {
  border-color: rgba(0,180,255,0.28);
  box-shadow: 0 0 22px rgba(0,180,255,0.07);
  transform: translateY(-2px);
}
.st-stat-val { font-size: 20px; font-weight: 700; font-family: monospace; line-height: 1.15; margin-bottom: 5px; letter-spacing: -.02em; }
.st-stat-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: .13em; color: #374151; }

/* accounts grid */
.st-section-header {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: #374151; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.st-accounts-section { margin-bottom: 16px; }
.st-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
}
.st-account-card {
  background: rgba(8,9,14,0.9);
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 12px;
  padding: 18px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  text-align: center;
  transition: border-color .25s, box-shadow .25s, transform .2s;
  animation: da-fadein .4s ease-out both;
}
.st-account-card:hover {
  border-color: rgba(0,180,255,0.25);
  box-shadow: 0 4px 24px rgba(0,180,255,0.06);
  transform: translateY(-2px);
}
.st-platform-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; font-family: monospace;
  flex-shrink: 0; letter-spacing: 0;
}
.st-platform-name { font-size: 11px; font-weight: 600; color: #d1d5db; letter-spacing: .03em; }
.st-username { font-size: 10px; font-family: monospace; color: #6b7280; word-break: break-all; }
.st-visit-btn {
  padding: 5px 14px; border-radius: 6px;
  background: rgba(0,180,255,0.08); border: 1px solid rgba(0,180,255,0.22);
  color: #00b4ff; font-size: 10px; font-weight: 600; letter-spacing: .04em;
  cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s, box-shadow .2s;
  display: inline-block;
}
.st-visit-btn:hover {
  background: rgba(0,180,255,0.18);
  border-color: rgba(0,180,255,0.45);
  box-shadow: 0 0 12px rgba(0,180,255,0.12);
}

/* executive summary */
.st-exec-card {
  background: rgba(8,9,14,0.9);
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 12px; padding: 18px; margin-bottom: 14px;
  animation: da-fadein .5s .1s ease-out both;
}
.st-exec-summary { font-size: 12px; color: #9ca3af; line-height: 1.7; }
.st-exposure-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; margin-top: 10px;
}

/* analysis 2-col */
.st-analysis { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 640px) { .st-analysis { grid-template-columns: 1fr; } }
.st-analysis-card {
  background: rgba(8,9,14,0.9);
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 12px; padding: 16px;
  animation: da-fadein .5s ease-out both;
}
.st-analysis-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: #374151; margin-bottom: 12px;
}
.st-risk-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 11px; color: #9ca3af;
}
.st-risk-item:last-child { border-bottom: none; }
.st-risk-icon { flex-shrink: 0; margin-top: 1px; font-weight: 700; font-size: 12px; }
.st-rec-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 11px; color: #9ca3af;
}
.st-rec-item:last-child { border-bottom: none; }
.st-rec-num { color: #00b4ff; font-family: monospace; font-size: 10px; min-width: 18px; flex-shrink: 0; margin-top: 1px; }

/* live header */
.st-live-header {
  background: rgba(8,9,14,0.9);
  border: 1px solid rgba(0,255,136,0.15);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
  animation: da-fadein .4s ease-out both;
}
.st-live-title {
  font-size: 13px; font-weight: 700; color: #e2e8f0;
  letter-spacing: .02em; margin-bottom: 6px;
}
.st-live-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: #6b7280; font-family: monospace;
}
.st-live-sep { color: #374151; }

/* progress bar */
.st-progress-wrap {
  margin-bottom: 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.st-progress-track {
  height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}
.st-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #00ff88, #00b4ff);
  box-shadow: 0 0 8px rgba(0,255,136,0.4);
  transition: width .6s ease-out;
}
.st-progress-label {
  font-size: 10px; font-family: monospace;
  color: #6b7280; text-align: right;
}

/* account url inside card */
.st-account-url {
  font-size: 9px; font-family: monospace;
  color: #4b5563; word-break: break-all;
  text-align: center; line-height: 1.4;
  max-width: 100%;
}

/* 2-column accounts grid on desktop */
.st-accounts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 520px) { .st-accounts-grid { grid-template-columns: 1fr; } }

/* no results state */
.st-no-results {
  padding: 28px 0; text-align: center;
  font-size: 12px; font-family: monospace; color: #374151;
}

/* bottom summary */
.st-bottom-summary {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px;
  border: 1px solid transparent;
  font-size: 12px; font-family: monospace;
  margin-bottom: 14px;
  animation: da-fadein .5s .2s ease-out both;
}
.st-summary-icon { font-size: 14px; flex-shrink: 0; }

/* raw debug block */
.st-raw-debug {
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px; overflow: hidden;
  margin-top: 4px; animation: da-fadein .5s .3s ease-out both;
}
.st-raw-debug summary {
  padding: 8px 14px; font-size: 10px; font-family: monospace;
  color: #374151; cursor: pointer; letter-spacing: .06em;
  text-transform: uppercase; user-select: none;
}
.st-raw-debug summary:hover { color: #6b7280; }
.st-raw-pre {
  padding: 12px 14px; margin: 0;
  font-size: 9.5px; font-family: monospace;
  color: #4b5563; line-height: 1.5;
  white-space: pre-wrap; word-break: break-all;
  background: rgba(0,0,0,0.4);
  max-height: 280px; overflow-y: auto;
}

/* ── Social Tracker — clean list layout ──────────────────────── */
.st-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.st-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(12,18,28,.92), rgba(10,14,22,.92));
  border: 1px solid rgba(0,255,140,.14);
  backdrop-filter: blur(10px);
  transition: .18s ease;
  animation: da-fadein .35s ease-out both;
}
.st-row:hover {
  transform: translateY(-1px);
  border-color: rgba(0,255,140,.35);
  box-shadow: 0 0 18px rgba(0,255,140,.08);
}
.st-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.st-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  font-size: 20px;
  flex-shrink: 0;
}
.st-info { min-width: 0; }
.st-platform {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
.st-url {
  color: rgba(255,255,255,.42);
  font-size: 12px;
  font-family: monospace;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}
.st-btn {
  flex-shrink: 0;
  background: #00ff9c;
  color: #000;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  transition: .15s ease;
  white-space: nowrap;
}
.st-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 0 14px rgba(0,255,156,.35);
}
@media (max-width: 520px) {
  .st-url      { max-width: 160px; }
  .st-btn      { padding: 6px 10px; font-size: 11px; }
  .st-platform { font-size: 13px; }
}

/* ── Score Breakdown Block ─────────────────────────────────────── */
.da-score-breakdown {
  background: rgba(0, 255, 136, 0.03);
  border: 1px solid rgba(0, 255, 136, 0.12);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 14px;
  font-family: monospace;
  animation: da-fadein 0.5s 0.1s ease-out both;
  position: relative;
  overflow: hidden;
}

.da-score-breakdown::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,136,0.3), transparent);
}

.da-sb-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(0, 255, 136, 0.5);
  margin-bottom: 16px;
}

.da-sb-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.da-sb-row {
  display: grid;
  grid-template-columns: 80px 1fr 60px;
  align-items: center;
  gap: 12px;
}

.da-sb-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.da-sb-bar-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  overflow: hidden;
}

.da-sb-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: #00ff88;
  box-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.da-sb-val {
  font-size: 13px;
  font-weight: 700;
  color: #00ff88;
  text-align: right;
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.da-sb-max {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 400;
}

.da-sb-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin: 10px 0 12px;
}

.da-sb-total {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: right;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.da-sb-total span {
  color: #00ff88;
  font-size: 13px;
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

@media (max-width: 480px) {
  .da-sb-row { grid-template-columns: 70px 1fr 50px; gap: 8px; }
  .da-score-breakdown { padding: 16px 18px; }
}

/* ── Geolocation Dashboard ──────────────────────────────────────── */
.geo-dashboard {
  background: rgba(8, 9, 14, 0.95);
  border: 1px solid rgba(0, 180, 255, 0.15);
  border-radius: 14px;
  overflow: hidden;
  animation: da-fadein 0.4s ease-out both;
}

.geo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 180, 255, 0.04);
  flex-wrap: wrap;
}

.geo-header-icon { font-size: 18px; }

.geo-header-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(0, 180, 255, 0.8);
  flex: 1;
}

.geo-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.geo-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}

.geo-badge-ok   { background: rgba(0,255,136,0.1); color: #00ff88; border: 1px solid rgba(0,255,136,0.25); }
.geo-badge-warn { background: rgba(255,170,0,0.1); color: #ffaa00; border: 1px solid rgba(255,170,0,0.25); }
.geo-badge-info { background: rgba(0,180,255,0.1); color: #00b4ff; border: 1px solid rgba(0,180,255,0.25); }

.geo-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

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

.geo-rows {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

@media (max-width: 640px) {
  .geo-rows { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.04); }
}

.geo-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: baseline;
  gap: 10px;
}

.geo-row-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.25);
}

.geo-row-val {
  font-size: 12px;
  font-family: monospace;
  color: rgba(255, 255, 255, 0.85);
  word-break: break-all;
}

.geo-map-wrap {
  min-height: 260px;
  background: #0a0b10;
}

.geo-map-iframe {
  width: 100%;
  height: 100%;
  min-height: 260px;
  border: none;
  display: block;
  filter: saturate(0.6) brightness(0.85);
}

.geo-notice {
  font-size: 10px;
  font-family: monospace;
  color: rgba(255, 170, 0, 0.55);
  letter-spacing: 0.06em;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  margin-top: 4px;
}

.geo-empty {
  text-align: center;
  padding: 48px 20px;
  color: rgba(255, 255, 255, 0.2);
}

.geo-empty-icon { font-size: 36px; margin-bottom: 10px; }

.geo-empty-text {
  font-size: 13px;
  font-family: monospace;
  letter-spacing: 0.06em;
}

/* Payment modal upload drag-over state */
#cg-payment-modal .cg-upload-area.dragover {
  border-color: #00eaff;
  background: rgba(0, 234, 255, 0.06);
}
