/* ============================================================
   SynthMarket — Design System & Styles
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --primary: #6366F1;
  --primary-dark: #4F46E5;
  --primary-light: rgba(99,102,241,0.15);
  --secondary: #10B981;
  --secondary-light: rgba(16,185,129,0.15);
  --accent: #F59E0B;
  --accent-light: rgba(245,158,11,0.15);
  --bg: #0F172A;
  --bg-alt: #1E293B;
  --surface: #1E293B;
  --surface-light: #334155;
  --border: #334155;
  --text: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --error: #EF4444;
  --success: #22C55E;
  --warning: #F59E0B;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 150ms ease;
  --max-width: 1200px;
  --nav-height: 68px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

button { cursor: pointer; font-family: inherit; }

input, textarea, select { font-family: inherit; font-size: inherit; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; }
h1 { font-size: 48px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }

.mono { font-family: 'JetBrains Mono', monospace; font-size: 13px; }

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-accent { color: var(--accent); }

/* ---------- Layout ---------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  height: 100%;
  display: flex; align-items: center; gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--text);
  flex-shrink: 0;
}
.nav-logo svg { flex-shrink: 0; }
.nav-links {
  display: flex; align-items: center; gap: 4px;
  margin-left: 16px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px; font-weight: 500;
  transition: all var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-spacer { flex: 1; }
.nav-toggle {
  display: none;
  background: none; border: none;
  color: var(--text);
  padding: 8px;
  border-radius: var(--radius);
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--surface); padding: 16px; border-bottom: 1px solid var(--border); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  border: none; transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.4); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-success { background: var(--secondary); color: white; }
.btn-success:hover { background: #0EA572; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-xl { padding: 16px 36px; font-size: 18px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}
.card:hover { border-color: var(--surface-light); box-shadow: var(--shadow-md); }
.card-sm { padding: 16px; border-radius: var(--radius); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--secondary-light); color: var(--secondary); }
.badge-accent { background: var(--accent-light); color: var(--accent); }
.badge-muted { background: var(--surface-light); color: var(--text-secondary); }
.badge-error { background: rgba(239,68,68,0.15); color: var(--error); }
.badge-purple { background: rgba(168,85,247,0.15); color: #A855F7; }

/* Quality Badges */
.badge-human-validated { background: rgba(59,130,246,0.15); color: #3B82F6; }
.badge-benchmark-tested { background: var(--secondary-light); color: var(--secondary); }
.badge-domain-expert { background: rgba(168,85,247,0.15); color: #A855F7; }
.badge-community-verified { background: var(--accent-light); color: var(--accent); }

/* ---------- Form Elements ---------- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 14px; font-weight: 600; color: var(--text); }
.form-input, .form-select, .form-textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--transition);
  outline: none;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-hint { font-size: 12px; color: var(--text-muted); }
.form-error { font-size: 12px; color: var(--error); }
.form-checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-checkbox input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

/* Range Slider */
.range-slider { width: 100%; accent-color: var(--primary); cursor: pointer; }

/* ---------- Search ---------- */
.search-wrap {
  position: relative;
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px 12px 44px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: all var(--transition);
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--text-muted); background: var(--surface-light); padding: 2px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; }

/* ---------- Stars / Rating ---------- */
.stars { display: flex; align-items: center; gap: 2px; }
.star { color: var(--accent); font-size: 14px; }
.star.empty { color: var(--surface-light); }

/* ---------- Tables ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px;
  border: none; background: none;
  color: var(--text-muted);
  font-size: 14px; font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- Stats ---------- */
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.stat-value { font-size: 36px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.stat-change { font-size: 12px; font-weight: 600; margin-top: 8px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--error); }

/* ---------- Grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-secondary); font-size: 18px; max-width: 600px; margin: 0 auto; }

/* ---------- Divider ---------- */
.divider { height: 1px; background: var(--border); margin: 0; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 200ms ease;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp 200ms ease;
}
.modal-header { padding: 24px 24px 0; display: flex; justify-content: space-between; align-items: flex-start; }
.modal-body { padding: 24px; }
.modal-footer { padding: 0 24px 24px; display: flex; gap: 12px; justify-content: flex-end; }
.modal-close { background: none; border: none; color: var(--text-muted); padding: 4px; border-radius: var(--radius-sm); }
.modal-close:hover { color: var(--text); background: var(--surface-light); }

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

/* ---------- Toast ---------- */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  min-width: 280px; max-width: 400px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 300ms ease;
}
.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast-content { flex: 1; }
.toast-title { font-size: 14px; font-weight: 600; }
.toast-message { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--error); }
.toast.info { border-left: 3px solid var(--primary); }

@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ---------- Skeleton ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-light) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Spinner ---------- */
.spinner { width: 20px; height: 20px; border: 2px solid var(--surface-light); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 0 64px;
  text-align: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99,102,241,0.25), transparent);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-light);
  border: 1px solid rgba(99,102,241,0.3);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 13px; font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
}
.hero h1 { font-size: 56px; font-weight: 800; line-height: 1.1; margin-bottom: 20px; background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { color: var(--text-secondary); font-size: 20px; max-width: 600px; margin: 0 auto 36px; }
.hero-search { max-width: 600px; margin: 0 auto 32px; }
.hero-stats { display: flex; justify-content: center; gap: 48px; margin-top: 48px; }
.hero-stat { text-align: center; }
.hero-stat-value { font-size: 28px; font-weight: 800; }
.hero-stat-label { font-size: 13px; color: var(--text-muted); }
@media (max-width: 640px) { .hero h1 { font-size: 36px; } .hero-stats { gap: 24px; } .hero-stat-value { font-size: 22px; } }

/* ---------- Domain Categories ---------- */
.domain-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.domain-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 16px;
  text-align: center; cursor: pointer;
  transition: all var(--transition);
}
.domain-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.domain-icon { font-size: 28px; margin-bottom: 8px; }
.domain-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.domain-count { font-size: 12px; color: var(--text-muted); }
@media (max-width: 1024px) { .domain-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .domain-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- How It Works ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.steps-grid::before { content: ''; position: absolute; top: 32px; left: 16%; right: 16%; height: 2px; background: linear-gradient(90deg, var(--primary), var(--secondary)); opacity: 0.3; }
.step { text-align: center; }
.step-number { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: white; font-size: 24px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; position: relative; z-index: 1; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-secondary); font-size: 14px; }
@media (max-width: 640px) { .steps-grid { grid-template-columns: 1fr; } .steps-grid::before { display: none; } }

/* ---------- Dataset Card ---------- */
.dataset-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.dataset-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.dataset-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dataset-name { font-size: 15px; font-weight: 700; line-height: 1.3; }
.dataset-domain { flex-shrink: 0; }
.dataset-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dataset-meta-item { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); }
.dataset-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.dataset-price { font-size: 20px; font-weight: 800; color: var(--text); }
.dataset-price.free { color: var(--secondary); }
.dataset-stats { display: flex; align-items: center; gap: 12px; }
.dataset-quality { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }
.dataset-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* ---------- Provenance Panel ---------- */
.provenance-panel { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.provenance-header { padding: 16px 20px; background: var(--surface); border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.provenance-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.provenance-item { padding: 14px 20px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.provenance-item:last-child, .provenance-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.provenance-item:nth-child(even) { border-right: none; }
.provenance-key { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.provenance-value { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text); }

/* ---------- Preview Table ---------- */
.preview-table-wrap { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; max-height: 300px; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.preview-table th { position: sticky; top: 0; background: var(--surface); padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; border-bottom: 1px solid var(--border); white-space: nowrap; }
.preview-table td { padding: 9px 16px; border-bottom: 1px solid var(--border); color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; font-size: 12px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-table tr:last-child td { border-bottom: none; }
.preview-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ---------- Sidebar ---------- */
.layout-with-sidebar { display: grid; grid-template-columns: 280px 1fr; gap: 32px; }
.sidebar { flex-shrink: 0; }
.filter-section { margin-bottom: 24px; }
.filter-title { font-size: 13px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.filter-options { display: flex; flex-direction: column; gap: 8px; }
.filter-option { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--text-secondary); }
.filter-option:hover { color: var(--text); }
.filter-option input[type="checkbox"] { accent-color: var(--primary); cursor: pointer; }
.filter-count { color: var(--text-muted); font-size: 12px; margin-left: auto; }
.filter-range { display: flex; flex-direction: column; gap: 8px; }
.filter-range-values { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.clear-filters { font-size: 13px; color: var(--primary); background: none; border: none; cursor: pointer; padding: 0; }
.clear-filters:hover { text-decoration: underline; }
@media (max-width: 1024px) { .layout-with-sidebar { grid-template-columns: 1fr; } .sidebar { display: none; } }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 40px; }
.page-btn { min-width: 36px; height: 36px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); font-size: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition); padding: 0 12px; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Pricing Cards ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pricing-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 32px; position: relative; transition: all var(--transition); }
.pricing-card:hover { border-color: var(--surface-light); box-shadow: var(--shadow-md); }
.pricing-card.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.pricing-card.featured::before { content: 'Most Popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; padding: 4px 16px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pricing-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.pricing-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.pricing-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.pricing-amount { font-size: 48px; font-weight: 800; }
.pricing-period { font-size: 14px; color: var(--text-muted); }
.pricing-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
.pricing-feature { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-secondary); }
.pricing-feature-check { color: var(--success); flex-shrink: 0; margin-top: 2px; }
@media (max-width: 768px) { .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; } }

/* ---------- Dashboard ---------- */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 40px 0; }
.dashboard-nav { flex-shrink: 0; }
.dashboard-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius); color: var(--text-secondary); font-size: 14px; font-weight: 500; transition: all var(--transition); cursor: pointer; }
.dashboard-nav-item:hover { background: var(--surface); color: var(--text); }
.dashboard-nav-item.active { background: var(--primary-light); color: var(--primary); }
.dashboard-nav-divider { height: 1px; background: var(--border); margin: 12px 0; }
.dashboard-content { flex: 1; }
@media (max-width: 768px) { .dashboard-layout { grid-template-columns: 1fr; } .dashboard-nav { display: flex; gap: 8px; flex-wrap: wrap; } }

/* ---------- Upload Wizard ---------- */
.wizard-steps { display: flex; align-items: center; gap: 0; margin-bottom: 40px; }
.wizard-step { display: flex; align-items: center; gap: 8px; }
.wizard-step-num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.wizard-step.done .wizard-step-num { background: var(--success); color: white; }
.wizard-step.active .wizard-step-num { background: var(--primary); color: white; }
.wizard-step.pending .wizard-step-num { background: var(--surface-light); color: var(--text-muted); }
.wizard-step-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.wizard-step.active .wizard-step-label { color: var(--text); }
.wizard-step-line { flex: 1; height: 2px; background: var(--border); margin: 0 12px; }
.wizard-step.done .wizard-step-line { background: var(--success); }
.wizard-panel { display: none; }
.wizard-panel.active { display: block; }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 48px 0 24px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand { }
.footer-brand p { color: var(--text-secondary); font-size: 14px; margin-top: 12px; max-width: 280px; }
.footer-col h5 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text); margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links li a { font-size: 14px; color: var(--text-secondary); transition: color var(--transition); }
.footer-links li a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-muted); }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-bottom { flex-direction: column; gap: 8px; text-align: center; } }

/* ---------- Auth ---------- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 40px; width: 100%; max-width: 420px; }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header h1 { font-size: 24px; margin-bottom: 8px; }
.auth-header p { color: var(--text-secondary); font-size: 14px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-secondary); }
.auth-footer a { color: var(--primary); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
.auth-oauth { display: flex; gap: 12px; }
.auth-oauth button { flex: 1; justify-content: center; }

/* ---------- Chart placeholder ---------- */
.chart-bar { height: 40px; background: var(--primary-light); border-radius: var(--radius-sm); margin-bottom: 4px; }

/* ---------- Empty State ---------- */
.empty-state { text-align: center; padding: 64px 24px; }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); font-size: 14px; max-width: 400px; margin: 0 auto 24px; }

/* ---------- Quality Meter ---------- */
.quality-meter { display: flex; flex-direction: column; gap: 12px; }
.quality-dim { display: flex; align-items: center; gap: 12px; }
.quality-dim-label { font-size: 12px; color: var(--text-muted); width: 80px; flex-shrink: 0; }
.quality-bar { flex: 1; height: 6px; background: var(--surface-light); border-radius: 3px; overflow: hidden; }
.quality-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.quality-fill.high { background: var(--success); }
.quality-fill.medium { background: var(--accent); }
.quality-fill.low { background: var(--error); }
.quality-dim-score { font-size: 12px; font-weight: 700; font-family: 'JetBrains Mono', monospace; width: 28px; text-align: right; }

/* ---------- Tooltip ---------- */
.tooltip-wrap { position: relative; display: inline-flex; }
.tooltip-wrap:hover .tooltip { opacity: 1; pointer-events: auto; }
.tooltip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 6px 10px; border-radius: var(--radius-sm); font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--transition); z-index: 50; }

/* ---------- Stripe Banner ---------- */
.stripe-banner { background: linear-gradient(135deg, #635BFF 0%, #7C3AED 100%); border-radius: var(--radius-lg); padding: 32px; text-align: center; }
.stripe-banner h3 { color: white; margin-bottom: 8px; }
.stripe-banner p { color: rgba(255,255,255,0.8); font-size: 14px; }

/* ---------- Background Grid ---------- */
.bg-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 60px 60px; opacity: 0.3; pointer-events: none; }

/* ---------- Utility ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
