/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #111726;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 34, 53, 0.85);
  --bg-input: #151d30;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --border-glow: rgba(99, 102, 241, 0.3);

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

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-glow: rgba(99, 102, 241, 0.25);

  --sev-critical: #ef4444;
  --sev-critical-bg: rgba(239, 68, 68, 0.12);
  --sev-critical-border: rgba(239, 68, 68, 0.3);

  --sev-high: #f97316;
  --sev-high-bg: rgba(249, 115, 22, 0.12);
  --sev-high-border: rgba(249, 115, 22, 0.3);

  --sev-medium: #f59e0b;
  --sev-medium-bg: rgba(245, 158, 11, 0.12);
  --sev-medium-border: rgba(245, 158, 11, 0.3);

  --sev-low: #94a3b8;
  --sev-low-bg: rgba(148, 163, 184, 0.12);
  --sev-low-border: rgba(148, 163, 184, 0.3);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Global Resets & Layout
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   Slim & Optimized Custom Scrollbars (Sitewide & Cross-Browser)
   ========================================================================== */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

/* Webkit / Chromium / Safari / Edge scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

::-webkit-scrollbar-thumb:active {
  background: rgba(99, 102, 241, 0.8);
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.bg-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.bg-glow-1 {
  top: -100px;
  left: 15%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
}

.bg-glow-2 {
  top: 250px;
  right: 10%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, transparent 70%);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(10, 13, 20, 0.85);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

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

.brand-title {
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

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

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 7px 14px;
  font-size: 0.82rem;
}

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

/* Hero Section */
.hero-section {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 50px 0 36px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 10px #6366f1;
  animation: pulse 2s infinite;
}

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

.hero-title {
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 840px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 32px;
}

/* Input Form */
.audit-card {
  max-width: 760px;
  margin: 0 auto;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: all var(--transition-normal);
}

.input-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--border-glow), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.input-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  margin-right: 12px;
}

.input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-primary);
  padding: 10px 0;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.sample-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pills-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.3);
}

/* Error Banner */
.error-banner {
  max-width: 760px;
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 0.9rem;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 60px 20px;
  max-width: 520px;
  margin: 0 auto;
}

.spinner-ring {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.loading-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.loading-step {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 15%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Results Section */
.results-section {
  position: relative;
  z-index: 1;
  padding-bottom: 80px;
}

.target-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.target-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.target-url {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-all;
}

.target-time {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

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

/* Overview Grid */
.overview-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

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

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

/* Compliance Card */
.score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.score-gauge-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  margin-bottom: 16px;
}

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

.score-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 12;
}

.score-progress {
  fill: none;
  stroke: #10b981;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 1s ease, stroke 0.3s ease;
}

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

.score-number {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.score-out-of {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.grade-badge {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
}

.score-verdict {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Summary Card */
.summary-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.summary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

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

.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.stat-pill:hover {
  transform: translateY(-2px);
}

.stat-critical {
  background: var(--sev-critical-bg);
  border: 1px solid var(--sev-critical-border);
  color: var(--sev-critical);
}

.stat-high {
  background: var(--sev-high-bg);
  border: 1px solid var(--sev-high-border);
  color: var(--sev-high);
}

.stat-medium {
  background: var(--sev-medium-bg);
  border: 1px solid var(--sev-medium-border);
  color: var(--sev-medium);
}

.stat-low {
  background: var(--sev-low-bg);
  border: 1px solid var(--sev-low-border);
  color: var(--sev-low);
}

.stat-icon {
  font-size: 1rem;
}

.stat-count {
  font-size: 1.35rem;
  font-weight: 800;
}

.stat-text {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.9;
}

.metric-tags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.metric-tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
}

.tag-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.tag-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

/* Tabs & Filters */
.tabs-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.tabs-scroll-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding: 0 10px;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.03);
}

.tabs-scroll-wrap::-webkit-scrollbar {
  height: 5px;
}

.tabs-scroll-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-full);
}

.tabs-scroll-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.tabs-scroll-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.65);
}

.tabs-scroll-wrap.is-dragging {
  cursor: grabbing !important;
  scroll-behavior: auto;
}

.tabs-list {
  display: flex;
  align-items: center;
  gap: 6px;
  width: max-content;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

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

.tab-btn.active {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.tab-badge {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.tab-btn.active .tab-badge {
  background: rgba(99, 102, 241, 0.35);
  color: #fff;
}

.status-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-chip.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Rule Check Cards */
.checks-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.check-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  transition: all var(--transition-fast);
}

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

.check-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.check-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rule-id-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.check-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
}

.category-tag {
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.severity-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.severity-critical {
  background: var(--sev-critical-bg);
  color: #f87171;
  border: 1px solid var(--sev-critical-border);
}

.severity-high {
  background: var(--sev-high-bg);
  color: #fb923c;
  border: 1px solid var(--sev-high-border);
}

.severity-medium {
  background: var(--sev-medium-bg);
  color: #fbbf24;
  border: 1px solid var(--sev-medium-border);
}

.severity-low {
  background: var(--sev-low-bg);
  color: #cbd5e1;
  border: 1px solid var(--sev-low-border);
}

.check-rule-text {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.recommendation-box {
  margin-top: 12px;
  background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid var(--sev-medium);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.recommendation-icon {
  color: var(--sev-medium);
  font-size: 0.95rem;
  line-height: 1.4;
}

.recommendation-text {
  font-size: 0.84rem;
  color: #fde68a;
  line-height: 1.5;
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: #10b981;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.modal-body pre {
  background: #090d16;
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  overflow-x: auto;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  margin-top: auto;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Multi-Page Crawler & Page Breakdown Styles
   ========================================================================== */
.target-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.pages-overview-card {
  margin-bottom: 28px;
}

.pages-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Page Selector Pills */
.page-pills-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding: 0 10px;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.03);
}

.page-pills-bar::-webkit-scrollbar {
  height: 5px;
}

.page-pills-bar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-full);
}

.page-pills-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.page-pills-bar::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.65);
}

.page-pills-bar.is-dragging {
  cursor: grabbing !important;
  scroll-behavior: auto;
}

.page-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.page-pill:hover {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}

.page-pill.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.page-pill-badge {
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* Pages Summary Table */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.03);
}

.table-responsive::-webkit-scrollbar {
  height: 5px;
}

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

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.65);
}

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

.pages-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.pages-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  white-space: nowrap;
}

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

.pages-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.page-path-cell {
  font-family: var(--font-mono);
  color: #a5b4fc;
  font-weight: 600;
}

.page-status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.page-status-200 {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.page-status-400 {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.page-score-pill {
  font-weight: 700;
  color: var(--text-primary);
}

/* Tabs Header Top Indicator */
.tabs-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.active-page-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.active-page-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
}

/* Affected Pages in Rule Card */
.affected-pages-box {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.affected-pages-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.affected-page-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.affected-page-tag:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.3);
}

/* ==========================================================================
   Strictly Negative Cases Focused Styling
   ========================================================================== */
.badge-negative-focus {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.hero-badge-negative {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.pulse-red {
  background: #ef4444 !important;
  box-shadow: 0 0 10px #ef4444 !important;
}

.badge-negative-pill {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.score-card-negative {
  border-color: rgba(239, 68, 68, 0.2);
}

.score-progress-negative {
  stroke: #ef4444 !important;
}

.score-number-negative {
  color: #f87171 !important;
}

.grade-badge-negative {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
}

.pages-filter-section {
  margin-bottom: 20px;
}

.pages-filter-header {
  margin-bottom: 10px;
}

.pages-filter-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.negative-case-header-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  text-transform: uppercase;
}
