@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Colors */
  --bg-dark: #060813;
  --bg-main: #0b0f19;
  --bg-card: rgba(17, 24, 39, 0.65);
  --bg-sidebar: rgba(10, 14, 26, 0.95);
  
  --border-light: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(99, 102, 241, 0.25);
  
  --color-primary: #6366f1; /* Indigo */
  --color-primary-hover: #4f46e5;
  --color-secondary: #a855f7; /* Violet */
  --color-cyan: #06b6d4; /* Cyan */
  
  --color-success: #10b981; /* Emerald */
  --color-warning: #f59e0b; /* Amber */
  --color-error: #ef4444; /* Red */
  --color-info: #3b82f6; /* Blue */
  
  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout Metrics */
  --sidebar-width: 260px;
  --header-height: 70px;
}

body.light-theme {
  --bg-dark: #eef2ff;
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-sidebar: rgba(255, 255, 255, 0.96);
  --border-light: rgba(15, 23, 42, 0.11);
  --text-primary: #172033;
  --text-secondary: #536176;
  --text-muted: #708096;
}

/* Reset and Core Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
}

.preview-heading { display:flex; justify-content:space-between; gap:24px; align-items:flex-end; margin-bottom:16px; }
.preview-heading h2 { font-size:1.35rem; margin:6px 0; }
.preview-heading p { color:var(--text-secondary); font-size:.88rem; }
.eyebrow { color:var(--color-secondary); font-size:.75rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em; display:flex; gap:6px; align-items:center; }
.eyebrow svg { width:14px; }
.preview-controls { display:flex; gap:8px; flex-wrap:wrap; }
.preview-device { padding:8px 10px; font-size:.76rem; }
.preview-device.active { color:#fff; background:var(--color-primary); border-color:var(--color-primary); }
.heatmap-legend { display:flex; flex-wrap:wrap; gap:18px; font-size:.76rem; color:var(--text-secondary); padding:10px 0 16px; }
.heat-dot { width:9px; height:9px; display:inline-block; border-radius:50%; margin-right:5px; }.heat-dot.critical { background:var(--color-error); }.heat-dot.serious { background:var(--color-warning); }.heat-dot.moderate { background:var(--color-secondary); }.heat-dot.passed { background:var(--color-success); }
.preview-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.preview-card { overflow:hidden; transition:var(--transition-normal); }.preview-card.improved { border-color:rgba(16,185,129,.35); }
.preview-card-header { display:flex; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--border-light); font-size:.82rem; font-weight:700; }.preview-card-header span { display:flex; gap:8px; align-items:center; }.preview-card-header svg { width:16px; color:var(--color-primary); }.improved .preview-card-header svg { color:var(--color-success); }.preview-card-header small { color:var(--text-muted); font-weight:600; }
.preview-frame-wrap { background:#fff; min-height:400px; display:flex; justify-content:center; overflow:auto; }.preview-frame-wrap iframe { border:0; width:100%; min-height:400px; background:#fff; transition:width .35s ease; }
.heatmap-card { margin-top:18px; padding:18px; }.heatmap-row { display:grid; grid-template-columns:14px minmax(150px,1fr) 105px 1.5fr; gap:12px; align-items:center; padding:11px 0; border-bottom:1px solid var(--border-light); font-size:.8rem; }.heatmap-row:last-child { border:0; }.heatmap-selector { font-family:'JetBrains Mono',monospace; color:var(--text-secondary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.heatmap-wcag { color:var(--text-muted); font-size:.73rem; }
.ai-coach { border-top:1px solid var(--border-light); margin-top:18px; padding-top:16px; }.ai-coach label { display:block; color:var(--text-primary); font-size:.8rem; font-weight:700; margin-bottom:8px; }.ai-question-row { display:flex; gap:8px; }.ai-question-row input { min-width:0; flex:1; border:1px solid var(--border-light); background:rgba(99,102,241,.06); color:var(--text-primary); border-radius:8px; padding:9px 10px; outline:none; }.ai-question-row input:focus { border-color:var(--color-primary); }.ai-question-row .btn { padding:8px 12px; font-size:.78rem; }.ai-answer { margin-top:10px; padding:10px; border-radius:8px; background:rgba(99,102,241,.08); color:var(--text-secondary); font-size:.78rem; line-height:1.55; }
@media (max-width: 900px) { .preview-heading { align-items:flex-start; flex-direction:column; }.preview-grid { grid-template-columns:1fr; }.heatmap-row { grid-template-columns:14px 1fr; }.heatmap-wcag,.heatmap-selector { grid-column:2; } }

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Glassmorphism utility */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
  border-radius: 12px;
}

/* Base Layout */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
  transition: transform var(--transition-normal);
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
  font-weight: 800;
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text span {
  background: linear-gradient(to right, var(--color-cyan), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-menu {
  list-style: none;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  overflow-y: auto;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.menu-item a i {
  font-size: 1.05rem;
}

.menu-item a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.menu-item.active a {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.09);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: inset 0 0 10px rgba(99, 102, 241, 0.05);
}

.menu-item.active a i {
  color: var(--color-primary);
  text-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.15);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 0.85rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

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

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

/* Main Content Area */
.main-content {
  flex-grow: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-main);
  position: relative;
}

/* Header */
.main-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
  background: rgba(11, 15, 25, 0.35);
  backdrop-filter: blur(10px);
  z-index: 50;
}

.header-title-section h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

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

.header-scan-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 4px 6px 4px 14px;
  width: 320px;
  transition: all var(--transition-fast);
}

.header-scan-bar:focus-within {
  width: 380px;
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.header-scan-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  width: 100%;
}

.header-scan-bar input::placeholder {
  color: var(--text-muted);
}

.header-scan-bar button {
  background: var(--color-primary);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-scan-bar button:hover {
  background: var(--color-primary-hover);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-icon:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* Page Panels */
.tab-panel {
  display: none;
  flex-grow: 1;
  padding: 32px;
  overflow-y: auto;
  animation: fadeIn var(--transition-normal) forwards;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
}

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

/* Hero Section */
.hero-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 40px;
  margin-bottom: 24px;
  min-height: 0;
  flex-shrink: 0;
  background: radial-gradient(95% 150% at 0% 0%, rgba(99, 102, 241, 0.30) 0%, rgba(99, 102, 241, 0.08) 42%, transparent 74%), linear-gradient(135deg, #111a33 0%, #0d111e 62%, #151029 100%);
  border-radius: 20px;
  border: 1px solid rgba(129, 140, 248, 0.30);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 12, 28, 0.25) 0%, rgba(8, 12, 28, 0.06) 58%, transparent 100%);
}

.hero-premium {
  min-height: 340px;
  border: 1px solid rgba(129, 140, 248, 0.42);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(99, 102, 241, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Background Animated Glow Spheres */
.hero-glow-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 1;
  pointer-events: none;
  opacity: 0.22;
  animation: spherePulse 7s ease-in-out infinite alternate;
}

.sphere-1 {
  top: -40px;
  left: -40px;
  width: 280px;
  height: 280px;
  background: var(--color-primary);
}

.sphere-2 {
  bottom: -60px;
  right: -40px;
  width: 280px;
  height: 280px;
  background: var(--color-secondary);
  animation-delay: -3.5s;
}

@keyframes spherePulse {
  0% { transform: scale(0.9) translate(0, 0); opacity: 0.25; }
  100% { transform: scale(1.25) translate(20px, 15px); opacity: 0.5; }
}

/* Floating Accessibility Icons */
.floating-icon {
  position: absolute;
  width: 46px;
  height: 46px;
  background: rgba(13, 17, 29, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 4;
  transition: all var(--transition-fast);
  cursor: help;
}

.floating-icon i {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-fast);
}

.floating-icon:hover {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.45);
  transform: scale(1.18) translateY(-6px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.3);
  color: white;
}

.floating-icon:hover i {
  transform: rotate(15deg) scale(1.12);
}

/* Float timings and coordinates */
.float-1 { top: 15%; right: 12%; animation: floatUpDown 5.2s ease-in-out infinite; color: var(--color-cyan); }
.float-2 { bottom: 15%; right: 26%; animation: floatUpDown 6.5s ease-in-out infinite; animation-delay: -1.8s; color: var(--color-warning); }
.float-3 { top: 45%; right: 6%; animation: floatUpDown 4.8s ease-in-out infinite; animation-delay: -3.2s; color: var(--color-secondary); }
.float-4 { bottom: 38%; right: 14%; animation: floatUpDown 7.2s ease-in-out infinite; animation-delay: -0.6s; color: var(--color-success); }
.float-5 { top: 10%; right: 32%; animation: floatUpDown 5.8s ease-in-out infinite; animation-delay: -2.4s; color: var(--color-primary); }

@keyframes floatUpDown {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(4deg); }
}

.hero-content {
  max-width: 640px;
  position: relative;
  z-index: 6;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-indigo {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

.hero-content h2 {
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 12px;
  background: linear-gradient(to right, #ffffff, #e0e7ff 58%, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 590px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
}

/* Premium Shimmering CTA Button */
.btn-premium {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  box-shadow: 0 4px 22px rgba(99, 102, 241, 0.4);
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: none;
  padding: 11px 22px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.btn-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-25deg);
  z-index: -1;
  transition: 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium:hover::before {
  left: 150%;
}

.btn-premium:hover {
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6), 0 0 14px rgba(168, 85, 247, 0.35);
}

.btn-premium i {
  transition: transform var(--transition-fast);
}

.btn-premium:hover i {
  transform: translateX(4px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Metric Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.dashboard-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.dashboard-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 24px rgba(99, 102, 241, 0.04);
}

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

.card-title-inner {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.card-icon-inner {
  color: var(--text-muted);
}

/* Score Circle Styling */
.score-circle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  position: relative;
}

.radial-progress-svg {
  width: 160px;
  height: 160px;
  transform: rotate(-90deg);
}

.radial-progress-svg circle {
  fill: none;
  stroke-width: 12px;
}

.radial-progress-svg circle.bg-ring {
  stroke: rgba(255, 255, 255, 0.03);
}

.radial-progress-svg circle.progress-bar {
  stroke: url(#score-gradient);
  stroke-dasharray: 440;
  stroke-dashoffset: 440; /* Updated via JS */
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.3));
}

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

.score-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}

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

.score-status {
  margin-top: 16px;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  padding: 4px 12px;
  border-radius: 12px;
}

/* Issue Severity Breakdown */
.severity-breakdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.severity-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.severity-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 500;
}

.severity-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.dot-critical { background-color: var(--color-error); box-shadow: 0 0 8px var(--color-error); }
.dot-serious { background-color: var(--color-warning); box-shadow: 0 0 8px var(--color-warning); }
.dot-moderate { background-color: var(--color-info); box-shadow: 0 0 8px var(--color-info); }
.dot-minor { background-color: var(--text-muted); }

.severity-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.severity-bar {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-critical { background: var(--color-error); }
.bar-serious { background: var(--color-warning); }
.bar-moderate { background: var(--color-info); }
.bar-minor { background: var(--text-muted); }

/* Quick Auditor Scan Panel */
.audit-input-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scan-tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  gap: 20px;
  margin-bottom: 20px;
}

.scan-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 0;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}

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

.scan-tab-btn.active {
  color: var(--text-primary);
}

.scan-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary);
}

.scan-tab-content {
  display: none;
}

.scan-tab-content.active {
  display: block;
}

.input-field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.input-field-wrapper label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-text {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.input-text:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.04);
}

.select-input {
  background: #0d121f;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.select-input:focus {
  border-color: var(--color-primary);
}

/* Custom Code Editor Block */
.code-editor-mockup {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  background: #090c15;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.editor-header {
  height: 38px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.editor-dots {
  display: flex;
  gap: 6px;
}

.editor-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.editor-dot.red { background-color: #ff5f56; }
.editor-dot.yellow { background-color: #ffbd2e; }
.editor-dot.green { background-color: #27c93f; }

.editor-title-file {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.editor-body-container {
  display: flex;
  position: relative;
  min-height: 250px;
}

.editor-line-numbers {
  width: 44px;
  background: rgba(255, 255, 255, 0.01);
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  user-select: none;
}

.code-textarea {
  flex-grow: 1;
  background: transparent;
  border: none;
  resize: none;
  outline: none;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 12px 16px;
  min-height: 250px;
  tab-size: 2;
}

/* Scanner Loading Logs Overlay */
.scan-progress-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 8, 19, 0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.scan-progress-overlay.active {
  display: flex;
}

.scanner-loader-glow {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid rgba(99, 102, 241, 0.1);
  border-top-color: var(--color-primary);
  border-bottom-color: var(--color-secondary);
  animation: spin 1.2s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.scanner-radar-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 1; }
}

.scanner-terminal-log {
  width: 100%;
  max-width: 550px;
  background: #060914;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  height: 160px;
  overflow-y: auto;
  margin-bottom: 24px;
}

.log-line {
  margin-bottom: 6px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.4;
  animation: slideLog 0.2s ease-out forwards;
}

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

.log-success { color: var(--color-success); }
.log-warning { color: var(--color-warning); }
.log-info { color: var(--color-info); }
.log-prompt { color: var(--color-secondary); font-weight: bold; }

.scan-progress-bar-container {
  width: 100%;
  max-width: 550px;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.scan-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
  width: 0%;
  transition: width 0.25s linear;
}

/* Issues Table Panel */
.issues-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.issues-filter-group {
  display: flex;
  gap: 8px;
}

.btn-filter {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.btn-filter.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.issues-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.issue-accordion-card {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.35);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.issue-accordion-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(17, 24, 39, 0.5);
}

.issue-accordion-card.active {
  border-color: var(--border-glow);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.06);
}

.issue-accordion-trigger {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  user-select: none;
}

.issue-chevron {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  margin-left: auto;
}

.issue-accordion-card.active .issue-chevron {
  transform: rotate(180deg);
  color: var(--text-primary);
}

.badge-severity {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-severity.critical { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.25); color: #fecaca; }
.badge-severity.serious { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.25); color: #fef3c7; }
.badge-severity.moderate { background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.25); color: #dbeafe; }
.badge-severity.minor { background: rgba(148, 163, 184, 0.12); border: 1px solid rgba(148, 163, 184, 0.25); color: #f1f5f9; }

.issue-title-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.issue-title-text {
  font-size: 0.92rem;
  font-weight: 600;
}

.issue-meta-info {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.issue-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.issue-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out;
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid transparent;
}

.issue-accordion-card.active .issue-accordion-content {
  max-height: 800px;
  border-top: 1px solid var(--border-light);
}

.issue-detail-inner {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.issue-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.issue-offending-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  background: #090c14;
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 14px;
  border-radius: 8px;
  color: #ef4444;
  position: relative;
  overflow-x: auto;
  white-space: pre;
}

.issue-offending-code::before {
  content: 'Offending Code';
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.issue-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wcag-reference-pill {
  font-size: 0.72rem;
  color: var(--color-cyan);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}

/* Split Pane View for Code Fixer */
.split-code-container {
  display: flex;
  gap: 24px;
  height: 520px;
  min-height: 400px;
}

.code-pane-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.code-pane-body {
  flex-grow: 1;
  overflow: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 16px;
  background: #070911;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.code-line-item {
  display: flex;
  gap: 16px;
}

.code-line-num {
  width: 24px;
  color: var(--text-muted);
  text-align: right;
  user-select: none;
}

.code-line-text {
  white-space: pre;
}

.code-pane-body.original-pane .diff-deleted {
  background: rgba(239, 68, 68, 0.15);
  border-left: 3px solid var(--color-error);
  color: #fecaca;
  display: flex;
  width: 100%;
}

.code-pane-body.fixed-pane .diff-added {
  background: rgba(16, 185, 129, 0.15);
  border-left: 3px solid var(--color-success);
  color: #a7f3d0;
  display: flex;
  width: 100%;
}

/* AI Suggestions Side Panel */
.ai-panel-card {
  border-left: 3px solid var(--color-primary);
  background: radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 60%), rgba(17, 24, 39, 0.45);
}

.ai-recommendation-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.ai-reason-bubble {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  padding: 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.ai-code-suggestion {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  background: #090c14;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-left: 4px solid var(--color-success);
  padding: 14px;
  border-radius: 8px;
  color: #a7f3d0;
  white-space: pre-wrap;
  word-break: break-all;
  position: relative;
}

.ai-code-suggestion::before {
  content: 'Suggested Fix';
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 0.65rem;
  color: var(--color-success);
  text-transform: uppercase;
}

/* Scan History Table */
.history-table-container {
  overflow-x: auto;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.history-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.history-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.history-table tr:last-child td {
  border-bottom: none;
}

.history-table tr {
  transition: background-color var(--transition-fast);
}

.history-table tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

.history-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.78rem;
}

.history-score-badge.high { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: #a7f3d0; }
.history-score-badge.mid { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); color: #fef3c7; }
.history-score-badge.low { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #fecaca; }

/* Settings Toggles */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.25);
  border: 1px solid var(--border-light);
}

.settings-info-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-label-text {
  font-size: 0.95rem;
  font-weight: 600;
}

.settings-sub-text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Switch Toggle Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid var(--border-light);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Empty States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.88rem;
  max-width: 320px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Category Circle Metrics */
.category-dials-container {
  display: flex;
  justify-content: space-around;
  gap: 16px;
  margin-top: 10px;
}

.cat-dial-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cat-dial-svg {
  width: 70px;
  height: 70px;
  transform: rotate(-90deg);
}

.cat-dial-svg circle {
  fill: none;
  stroke-width: 6px;
}

.cat-dial-svg circle.bg-ring {
  stroke: rgba(255, 255, 255, 0.03);
}

.cat-dial-svg circle.progress-bar {
  stroke-width: 6px;
  stroke-linecap: round;
}

.cat-dial-svg.perceivable circle.progress-bar { stroke: var(--color-primary); }
.cat-dial-svg.operable circle.progress-bar { stroke: var(--color-secondary); }
.cat-dial-svg.understandable circle.progress-bar { stroke: var(--color-cyan); }
.cat-dial-svg.robust circle.progress-bar { stroke: var(--color-success); }

.cat-dial-text {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

.cat-dial-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Detail Split View Layout */
.layout-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

/* Alert Notification Panel */
.alert-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.alert-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Utility Helper Layouts */
.flex-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.margin-top-24 {
  margin-top: 24px;
}

/* Footer & Status Indicators */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
  animation: pulseLight 1.5s infinite;
}

@keyframes pulseLight {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Responsive Rules */
@media (max-width: 1024px) {
  .layout-split {
    grid-template-columns: 1fr;
  }
  .col-4, .col-5, .col-7, .col-8 {
    grid-column: span 12;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }
  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
    padding: 12px;
  }
  .sidebar-footer {
    display: none;
  }
  .app-container {
    flex-direction: column;
  }
  .main-header {
    padding: 0 16px;
  }
  .header-scan-bar {
    width: 180px;
  }
  .header-scan-bar:focus-within {
    width: 220px;
  }
  .tab-panel {
    padding: 16px;
  }
  .hero-section {
    min-height: auto;
    padding: 28px 24px;
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-premium { min-height: auto; }
  .hero-section::before { background: rgba(8, 12, 28, 0.18); }
  .hero-content h2 { font-size: 1.9rem; }
  .hero-content p { font-size: 0.93rem; }
  .hero-actions-container { flex-wrap: wrap; }
  .floating-icon { display: none; }
  .split-code-container {
    flex-direction: column;
    height: auto;
  }
  .code-pane-card {
    height: 300px;
  }
}
