/* RevLeak — Ultra-Sophisticated Dark Obsidian & Cyber-Glass Design System */
/* Fully Mobile-Responsive (iOS, Android, Tablet, Desktop) */

:root {
  --bg: #07090e;
  --bg-gradient: radial-gradient(circle at 50% -20%, rgba(99, 102, 241, 0.15), transparent 45%),
                 radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.08), transparent 35%),
                 radial-gradient(circle at 90% 60%, rgba(6, 182, 212, 0.08), transparent 40%),
                 #07090e;
  --surface: #0e131f;
  --surface-elevated: #141b2d;
  --surface-glass: rgba(14, 19, 31, 0.78);
  --surface-glass-border: rgba(255, 255, 255, 0.08);
  --surface-subtle: #182238;
  
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --border-focus: #38bdf8;
  
  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;
  --faint: #64748b;
  
  --primary: #ffffff;
  --primary-bg: #f8fafc;
  --primary-text: #07090e;
  
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.25);
  --accent-hover: #059669;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --accent-border: rgba(16, 185, 129, 0.3);
  
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.12);
  --cyan-border: rgba(6, 182, 212, 0.3);
  
  --indigo: #6366f1;
  --indigo-soft: rgba(99, 102, 241, 0.12);
  --indigo-border: rgba(99, 102, 241, 0.3);
  
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.12);
  --warn-border: rgba(245, 158, 11, 0.3);
  
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.3);
  
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px rgba(16, 185, 129, 0.18);
  --shadow-cyan-glow: 0 0 35px rgba(6, 182, 212, 0.18);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

code, pre, .mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 640px) {
  .container {
    padding: 0 14px;
  }
}

/* Glassmorphism utility */
.glass {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-glass-border);
}

/* Top System Ticker */
.system-ticker {
  background: rgba(14, 19, 31, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6px 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.ticker-pulse {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulseAnim 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseAnim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Top Navbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 8px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.45));
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: #07090e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
}

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

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s ease;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-desktop-only {
  display: inline-flex;
}

@media (max-width: 820px) {
  .nav-desktop-only {
    display: none !important;
  }
}

.currency-switch {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  flex-shrink: 0;
}

.currency-switch button {
  border: none;
  background: transparent;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 28px;
}

.currency-switch button.active {
  background: var(--surface-elevated);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Sophisticated Touch-Friendly Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: -0.01em;
  min-height: 40px;
  user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: #ffffff;
  color: #07090e;
  border-color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover:not(:disabled) {
  background: #e2e8f0;
  border-color: #e2e8f0;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
}

.btn-accent {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
}

.btn-accent:hover:not(:disabled) {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-xs);
  min-height: 34px;
}

.btn-lg {
  padding: 13px 24px;
  font-size: 0.98rem;
  border-radius: var(--radius);
  min-height: 48px;
}

/* Badges & Status Indicators */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-good {
  background: var(--accent-soft);
  color: #34d399;
  border: 1px solid var(--accent-border);
}

.badge-medium {
  background: var(--cyan-soft);
  color: #38bdf8;
  border: 1px solid var(--cyan-border);
}

.badge-high {
  background: var(--warn-soft);
  color: #fbbf24;
  border: 1px solid var(--warn-border);
}

.badge-critical {
  background: var(--danger-soft);
  color: #f87171;
  border: 1px solid var(--danger-border);
}

.badge-indigo {
  background: var(--indigo-soft);
  color: #a5b4fc;
  border: 1px solid var(--indigo-border);
}

/* Cards & Surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 640px) {
  .card {
    padding: 16px 14px;
  }
}

.card-elevated {
  background: var(--surface-elevated);
  border-color: var(--border-strong);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr);
  gap: 24px;
  align-items: start;
}

.batch-scanner-grid {
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  align-items: end;
}

@media (max-width: 768px) {
  .batch-scanner-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.sticky-col {
  position: sticky;
  top: 84px;
}

@media (max-width: 980px) {
  .sticky-col {
    position: static;
  }
}

/* Hero Section */
.hero {
  padding: 56px 0 36px;
  text-align: center;
  position: relative;
}

@media (max-width: 640px) {
  .hero {
    padding: 36px 0 24px;
  }
}

.hero-glow-bg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 80%);
  filter: blur(50px);
  pointer-events: none;
  z-index: -1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 18px;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto 16px;
  font-size: clamp(1.75rem, 5.5vw, 3.2rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: #ffffff;
  word-break: break-word;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 70%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  max-width: 720px;
  margin: 0 auto 28px;
  font-size: clamp(0.95rem, 2.5vw, 1.08rem);
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Sophisticated Scan Box (Mobile Stacked) */
.scan-form-container {
  max-width: 760px;
  margin: 0 auto 16px;
  position: relative;
}

.scan-form {
  display: flex;
  gap: 8px;
  background: var(--surface);
  padding: 8px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(6, 182, 212, 0.08);
  transition: all 0.2s ease;
}

@media (max-width: 640px) {
  .scan-form {
    flex-direction: column;
    padding: 10px;
    border-radius: var(--radius);
  }
}

.scan-form:focus-within {
  border-color: #38bdf8;
  box-shadow: var(--shadow-lg), 0 0 35px rgba(56, 189, 248, 0.22);
}

.scan-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  min-width: 0;
}

@media (max-width: 640px) {
  .scan-input-wrapper {
    padding: 4px 6px;
  }
}

.scan-icon {
  color: var(--muted);
  flex-shrink: 0;
}

.scan-form input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px; /* Prevents auto-zoom on iOS */
  padding: 10px 0;
  color: #ffffff;
  background: transparent;
  min-width: 0;
}

.scan-form input::placeholder {
  color: var(--faint);
  font-size: 0.92rem;
}

.sample-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 14px;
}

.chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 30px;
}

.chip:hover {
  border-color: #38bdf8;
  color: #ffffff;
  background: rgba(56, 189, 248, 0.1);
}

/* Live Telemetry Progress Box (During Scan) */
.telemetry-box {
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 18px 20px;
  max-width: 680px;
  margin: 20px auto 0;
  text-align: left;
  box-shadow: var(--shadow-md);
}

.telemetry-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.telemetry-step.active {
  color: #38bdf8;
  font-weight: 600;
}

.telemetry-step.done {
  color: #34d399;
}

.telemetry-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Score Header & Summary Card */
.score-header-card {
  background: linear-gradient(180deg, var(--surface) 0%, #0a0e18 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

@media (max-width: 640px) {
  .score-header-card {
    padding: 18px 14px;
    border-radius: var(--radius);
  }
}

.score-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .score-banner {
    flex-direction: column;
    align-items: stretch;
  }
}

.score-visual-group {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* Circular SVG Score Dial */
.score-gauge-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .score-gauge-wrap {
    width: 76px;
    height: 76px;
  }
}

.score-gauge-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.score-gauge-bg {
  stroke: rgba(255, 255, 255, 0.08);
  fill: none;
  stroke-width: 8;
}

.score-gauge-val {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease;
}

.score-gauge-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-num {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.score-grade {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* 6-Pillar Metric Grid */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 760px) {
  .pillar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.pillar-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.pillar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Live SERP & AI Viewport Simulator */
.simulator-box {
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 22px;
}

.sim-nav {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.sim-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  white-space: nowrap;
  min-height: 32px;
}

.sim-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: var(--border-strong);
}

/* Google SERP Card Preview */
.serp-card {
  background: #202124;
  border-radius: 10px;
  padding: 14px;
  font-family: Arial, sans-serif;
  color: #bdc1c6;
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.08);
  word-break: break-word;
}

.serp-url {
  color: #dadce0;
  font-size: 11px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.serp-title {
  color: #8ab4f8;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 5px;
  line-height: 1.25;
}

.serp-desc {
  color: #bdc1c6;
  font-size: 12px;
}

.serp-stars {
  color: #fbbc04;
  font-size: 11px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Findings Cards */
.finding-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.finding-title {
  font-weight: 700;
  font-size: 0.94rem;
  margin-bottom: 5px;
  color: #ffffff;
  word-break: break-word;
}

.evidence-box {
  background: #06080e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #38bdf8;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 0.76rem;
  margin: 8px 0;
  color: #e2e8f0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre-wrap;
  word-break: break-all;
}

.fix-summary-line {
  font-size: 0.82rem;
  color: #34d399;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  word-break: break-word;
}

/* Code Studio / Vault */
.code-vault-card {
  background: #090c14;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .code-vault-card {
    padding: 16px 12px;
    border-radius: var(--radius);
  }
}

.code-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

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

.code-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  min-height: 32px;
}

.code-tab.active {
  background: var(--surface-elevated);
  color: #ffffff;
  border-color: var(--border-strong);
}

.code-block {
  background: #05070c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #e2e8f0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 320px;
  margin: 0;
}

.blurred-tail {
  position: relative;
  background: #05070c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  overflow: hidden;
}

.blurred-tail pre {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.76rem;
  line-height: 1.5;
  filter: blur(5px);
  user-select: none;
  opacity: 0.45;
}

.blurred-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(14, 19, 31, 0.85) 0%, rgba(9, 12, 20, 0.95) 100%);
  text-align: center;
  padding: 14px;
}

/* Plan Option Radio Card */
.plan-option {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  min-height: 48px;
}

.plan-option:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.plan-option.selected {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.06);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.12);
}

.plan-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
}

/* Form Fields */
.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  background: #06080e;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 16px; /* Prevents auto-zoom on iOS */
  color: #ffffff;
  outline: none;
  min-height: 42px;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

/* Interactive ROI Leak Calculator */
.roi-card {
  background: linear-gradient(145deg, rgba(14, 19, 31, 0.9) 0%, rgba(9, 12, 20, 0.95) 100%);
  border: 1px solid var(--indigo-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 22px;
}

.slider-group {
  margin-bottom: 14px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="range"] {
  width: 100%;
  height: 8px;
  accent-color: #10b981;
  cursor: pointer;
}

/* KPI Boxes for Admin & Storefront */
.kpi-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.kpi-value {
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 5px 0 2px;
  color: #ffffff;
}

/* Tabs Bar */
.tabs-bar {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  min-height: 38px;
}

.tab-btn.active {
  background: var(--surface-elevated);
  color: #ffffff;
  border-color: var(--border-strong);
}

/* Tables & Wrappers */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 680px; /* Ensures table columns don't crush on mobile */
  border-collapse: collapse;
  font-size: 0.85rem;
}

th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-strong);
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  max-width: 420px;
  margin: 0 auto;
  z-index: 999;
  background: #10b981;
  color: #07090e;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(16, 185, 129, 0.4);
  display: none;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

@keyframes toastIn {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Modal Popup */
.modal-overlay,
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.modal-content,
.modal-card {
  background: #0b0f19;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  position: relative;
  z-index: 10000;
}

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

.muted {
  color: var(--muted);
}

.text-accent {
  color: var(--accent);
}

.text-cyan {
  color: var(--cyan);
}

.text-white {
  color: #ffffff;
}

.section-block {
  padding: 52px 0;
}

@media (max-width: 640px) {
  .section-block {
    padding: 36px 0;
  }
}

.section-title {
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  color: #ffffff;
  word-break: break-word;
}
