/* SkillSpector Web - Modern Light Theme (Default) & Dark Mode System */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  /* Light Theme (Default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  
  --border-color: #e2e8f0;
  --border-hover: #0284c7;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --accent-cyan: #0284c7;
  --accent-blue: #2563eb;
  --accent-indigo: #4f46e5;
  --accent-purple: #7c3aed;
  
  --severity-critical: #dc2626;
  --severity-critical-bg: #fef2f2;
  --severity-high: #ea580c;
  --severity-high-bg: #fff7ed;
  --severity-medium: #d97706;
  --severity-medium-bg: #fefce8;
  --severity-low: #2563eb;
  --severity-low-bg: #eff6ff;
  --severity-info: #475569;
  --severity-info-bg: #f8fafc;
  
  --verdict-pass: #059669;
  --verdict-pass-bg: #ecfdf5;
  --verdict-warn: #d97706;
  --verdict-warn-bg: #fffbeb;
  --verdict-fail: #dc2626;
  --verdict-fail-bg: #fef2f2;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.15);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'Fira Code', monospace;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --bg-primary: #0a0d14;
  --bg-secondary: #121722;
  --bg-tertiary: #192030;
  --bg-card: rgba(23, 30, 46, 0.85);
  --bg-glass: rgba(18, 23, 34, 0.85);
  
  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(59, 130, 246, 0.4);
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  
  --severity-critical: #ef4444;
  --severity-critical-bg: rgba(239, 68, 68, 0.15);
  --severity-high: #f97316;
  --severity-high-bg: rgba(249, 115, 22, 0.15);
  --severity-medium: #eab308;
  --severity-medium-bg: rgba(234, 179, 8, 0.15);
  --severity-low: #3b82f6;
  --severity-low-bg: rgba(59, 130, 246, 0.15);
  --severity-info: #64748b;
  --severity-info-bg: rgba(100, 116, 139, 0.15);
  
  --verdict-pass: #10b981;
  --verdict-pass-bg: rgba(16, 185, 129, 0.15);
  --verdict-warn: #f59e0b;
  --verdict-warn-bg: rgba(245, 158, 11, 0.15);
  --verdict-fail: #ef4444;
  --verdict-fail-bg: rgba(239, 68, 68, 0.15);
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.25);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  background: rgba(2, 132, 199, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
}

/* Hero Section */
.hero {
  padding: 3rem 0 2rem 0;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Input Card */
.input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  transition: border-color 0.3s ease;
}

.input-card:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-lg);
}

.input-modes {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mode-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn:hover {
  color: var(--text-secondary);
}

.mode-btn.active {
  background: var(--bg-tertiary);
  color: var(--accent-cyan);
  border-color: var(--border-color);
}

.search-box {
  display: flex;
  gap: 0.75rem;
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.url-input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem 0.85rem 3.2rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.url-input:focus {
  border-color: var(--accent-cyan);
}

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

.code-textarea {
  width: 100%;
  height: 180px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-primary);
  resize: vertical;
  outline: none;
}

.code-textarea:focus {
  border-color: var(--accent-cyan);
}

/* Sample Skill Pills */
.samples-wrapper {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.samples-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sample-pill {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.sample-pill:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

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

.sample-pill .dot.risk-fail { background-color: var(--severity-critical); }
.sample-pill .dot.risk-warn { background-color: var(--severity-medium); }
.sample-pill .dot.risk-pass { background-color: var(--verdict-pass); }

/* Results Section & Tabs */
.results-section {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.results-section.active {
  display: flex;
}

.scan-meta-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.meta-target {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.target-icon {
  color: var(--accent-cyan);
}

.target-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
}

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

.meta-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.meta-item .value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  gap: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 0.25rem;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

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

.tab-btn.active {
  color: var(--accent-cyan);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-cyan);
}

.tab-badge {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
}

.tab-content {
  display: none;
}

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

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
}

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

.score-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.gauge-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 1rem 0;
}

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

.gauge-bg {
  fill: none;
  stroke: var(--bg-tertiary);
  stroke-width: 12;
}

.gauge-fill {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.4s ease;
}

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

.gauge-number {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
}

.gauge-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.verdict-badge.pass {
  background: var(--verdict-pass-bg);
  color: var(--verdict-pass);
  border: 1px solid var(--verdict-pass);
}

.verdict-badge.warn {
  background: var(--verdict-warn-bg);
  color: var(--verdict-warn);
  border: 1px solid var(--verdict-warn);
}

.verdict-badge.fail {
  background: var(--verdict-fail-bg);
  color: var(--verdict-fail);
  border: 1px solid var(--verdict-fail);
}

.summary-cards-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.severity-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.sev-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease;
}

.sev-card:hover {
  transform: translateY(-2px);
}

.sev-card.critical { border-top: 3px solid var(--severity-critical); }
.sev-card.high { border-top: 3px solid var(--severity-high); }
.sev-card.medium { border-top: 3px solid var(--severity-medium); }
.sev-card.low { border-top: 3px solid var(--severity-low); }
.sev-card.info { border-top: 3px solid var(--severity-info); }

.sev-count {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.sev-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.35rem;
}

/* Category List */
.categories-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.categories-header {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.category-item:last-child {
  border-bottom: none;
}

.cat-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cat-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.cat-bar-wrapper {
  width: 140px;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.cat-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-cyan);
}

/* Findings List */
.findings-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.finding-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
}

.finding-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.finding-card.critical::before { background-color: var(--severity-critical); }
.finding-card.high::before { background-color: var(--severity-high); }
.finding-card.medium::before { background-color: var(--severity-medium); }
.finding-card.low::before { background-color: var(--severity-low); }
.finding-card.info::before { background-color: var(--severity-info); }

.finding-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.finding-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.rule-id-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--accent-cyan);
  border: 1px solid var(--border-color);
}

.sev-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

.sev-badge.critical { background: var(--severity-critical-bg); color: var(--severity-critical); }
.sev-badge.high { background: var(--severity-high-bg); color: var(--severity-high); }
.sev-badge.medium { background: var(--severity-medium-bg); color: var(--severity-medium); }
.sev-badge.low { background: var(--severity-low-bg); color: var(--severity-low); }
.sev-badge.info { background: var(--severity-info-bg); color: var(--severity-info); }

.finding-loc {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.finding-body {
  color: var(--text-secondary);
  font-size: 0.925rem;
}

.code-snippet-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: #dc2626;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.remediation-box {
  background: var(--verdict-pass-bg);
  border: 1px solid var(--verdict-pass);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--verdict-pass);
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.remediation-box svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* File Inspector */
.file-inspector-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 500px;
}

@media (max-width: 768px) {
  .file-inspector-layout {
    grid-template-columns: 1fr;
  }
}

.file-tree-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tree-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.tree-file-item {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.tree-file-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.tree-file-item.active {
  background: rgba(2, 132, 199, 0.12);
  color: var(--accent-cyan);
  font-weight: 600;
}

.tree-file-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  background: var(--severity-critical-bg);
  color: var(--severity-critical);
}

.code-viewer-container {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow-x: auto;
}

.viewer-header {
  background: var(--bg-secondary);
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-lines-wrapper {
  padding: 1rem 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
}

.code-line {
  display: flex;
  padding: 0 1rem;
}

.code-line:hover {
  background: rgba(0, 0, 0, 0.03);
}

.code-line.has-finding {
  background: var(--severity-critical-bg);
  border-left: 3px solid var(--severity-critical);
}

.line-num {
  width: 45px;
  color: var(--text-muted);
  user-select: none;
  text-align: right;
  padding-right: 1rem;
  flex-shrink: 0;
}

.line-content {
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-all;
}

/* Ledger */
.ledger-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  overflow-x: auto;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.ledger-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.ledger-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.ledger-outcome {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.ledger-outcome.completed { background: var(--verdict-pass-bg); color: var(--verdict-pass); }
.ledger-outcome.skipped { background: var(--verdict-warn-bg); color: var(--verdict-warn); }
.ledger-outcome.failed { background: var(--verdict-fail-bg); color: var(--verdict-fail); }

/* Export Cards */
.export-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.export-tile {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.export-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
}

.export-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-cyan);
}

/* Loading Overlay */
.loading-box {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 0;
}

.loading-box.active {
  display: flex;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border-color);
  border-left-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--accent-cyan);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}
