:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #16161f;
  --fg: #e8e8ed;
  --fg-muted: #8a8a9a;
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --green: #22c55e;
  --border: rgba(255, 255, 255, 0.06);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- HERO ---- */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 32px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--fg-muted);
  max-width: 600px;
  line-height: 1.7;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 60px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---- SECTION LABEL ---- */
.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
}

/* ---- PROBLEM ---- */
.problem {
  padding: 120px 40px;
  background: var(--bg-elevated);
}

.problem-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.problem h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  max-width: 700px;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
}

.problem-icon {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 10px;
  margin-bottom: 20px;
}

.problem-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.problem-card p {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ---- HOW ---- */
.how {
  padding: 120px 40px;
}

.how-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.how h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.how-sub {
  font-size: 1.1rem;
  color: var(--fg-muted);
  margin-bottom: 56px;
  max-width: 560px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: flex;
  gap: 32px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
  align-items: flex-start;
}

.step:last-child {
  border-bottom: 1px solid var(--border);
}

.step-num {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 40px;
  padding-top: 2px;
}

.step-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-content p {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.65;
  max-width: 540px;
}

/* ---- VERTICALS ---- */
.verticals {
  padding: 120px 40px;
  background: var(--bg-elevated);
}

.verticals-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.verticals h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

.vert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.vert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  transition: border-color 0.2s;
}

.vert-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.vert-tag {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.vert-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.vert-card p {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ---- CLOSING ---- */
.closing {
  padding: 140px 40px;
  text-align: center;
}

.closing-inner {
  max-width: 800px;
  margin: 0 auto;
}

.closing h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.closing-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

/* ---- FOOTER ---- */
.site-footer {
  padding: 40px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--fg-muted);
}

/* ========================================
   APP SHELL — Dashboard, Form, Detail
   ======================================== */

:root {
  --accent-hover: #4f52d6;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --border-accent: rgba(99, 102, 241, 0.3);
  --red: #ef4444;
  --yellow: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
}

/* ---- NAV ---- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links { display: flex; gap: 4px; align-items: center; }

.nav-link {
  font-size: 0.875rem;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover { color: var(--fg); background: var(--bg-elevated); }
.nav-link.active { color: var(--fg); background: var(--bg-card); }

.nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 8px;
  transition: background 0.15s;
  margin-left: 8px;
}
.nav-cta:hover { background: var(--accent-hover); }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-secondary {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s;
}
.btn-secondary:hover { border-color: var(--border-accent); }

/* ---- APP CONTAINER ---- */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
}

.page-header {
  margin-bottom: 40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-subtitle { font-size: 0.95rem; color: var(--fg-muted); margin-top: 6px; }

/* ---- STATS STRIP ---- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.stats-strip .stat-card { padding: 20px 24px; }
.stats-strip .stat-num { font-size: 1.75rem; }

/* ---- STATUS BADGE ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-pending { color: var(--yellow); background: rgba(245, 158, 11, 0.12); }
.badge-processing { color: var(--accent); background: var(--accent-glow); }
.badge-processed { color: var(--green); background: rgba(34, 197, 94, 0.12); }
.badge-failed { color: var(--red); background: rgba(239, 68, 68, 0.12); }
.badge-low { color: var(--green); background: rgba(34, 197, 94, 0.12); }
.badge-medium { color: var(--yellow); background: rgba(245, 158, 11, 0.12); }
.badge-high { color: #f97316; background: rgba(249, 115, 22, 0.12); }
.badge-critical { color: var(--red); background: rgba(239, 68, 68, 0.12); }

/* ---- CLAIMS TABLE ---- */
.claims-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.claims-table {
  width: 100%;
  border-collapse: collapse;
}

.claims-table th {
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  text-transform: uppercase;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  white-space: nowrap;
}

.claims-table td {
  padding: 14px 20px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.claims-table tr:last-child td { border-bottom: none; }
.claims-table tr:hover td { background: rgba(255,255,255,0.02); }

.claims-table a { color: var(--fg); text-decoration: none; }
.claims-table a:hover { color: var(--accent); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--fg-muted);
}

.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state p { margin-bottom: 24px; }

/* ---- FORM ---- */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 720px;
}

.form-row { margin-bottom: 22px; }

.form-row label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.form-row .req { color: var(--accent); }

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus { border-color: var(--border-accent); }

.form-row textarea { resize: vertical; min-height: 130px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-hint { font-size: 0.8rem; color: var(--fg-muted); margin-top: 6px; }

.form-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 0.9rem;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.form-submit {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.form-submit .btn-primary { font-size: 0.95rem; padding: 13px 28px; }
.form-note { font-size: 0.82rem; color: var(--fg-muted); }

/* ---- DETAIL PAGES ---- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.detail-card h3 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 20px;
}

.detail-field { margin-bottom: 14px; }

.detail-field-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.detail-field-value { font-size: 0.93rem; }

.recommendation-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 20px;
}

.recommendation-card h3 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recommendation-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--fg);
}

.facts-list { list-style: none; padding: 0; margin: 0; }

.facts-list li {
  font-size: 0.88rem;
  color: var(--fg-muted);
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.facts-list li:last-child { border-bottom: none; }
.facts-list li::before { content: '→'; color: var(--accent); flex-shrink: 0; }

/* ---- CONFIDENCE BAR ---- */
.confidence-wrap { margin-top: 8px; }

.confidence-bar-track {
  height: 5px;
  background: var(--bg-elevated);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 8px;
}

.confidence-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
}

/* ---- PROCESSING PAGE ---- */
.processing-container {
  max-width: 560px;
  margin: 100px auto;
  padding: 40px;
  text-align: center;
}

.processing-spinner {
  width: 56px;
  height: 56px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  margin: 0 auto 32px;
}

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

.processing-container h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.processing-container p { color: var(--fg-muted); margin-bottom: 8px; font-size: 0.95rem; }

.processing-id {
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--fg-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  display: inline-block;
  margin-top: 24px;
}

/* ---- ERROR PAGE ---- */
.error-page {
  text-align: center;
  padding: 100px 40px;
  max-width: 500px;
  margin: 0 auto;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.error-page p { color: var(--fg-muted); margin-bottom: 32px; }

/* ---- MOBILE ---- */
@media (max-width: 768px) {
  .hero {
    padding: 60px 24px 40px;
    min-height: 80vh;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
  }

  .problem,
  .how,
  .verticals,
  .closing {
    padding: 80px 24px;
  }

  .problem-grid,
  .vert-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .step {
    flex-direction: column;
    gap: 12px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  /* App shell mobile */
  .app-container { padding: 20px; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .form-card { padding: 24px; }
  .claims-table-wrap { overflow-x: auto; }
  .site-nav { padding: 14px 20px; }
  .nav-links { gap: 2px; }
}