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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #7d8590;
  --accent: #58a6ff;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --orange: #db6d28;
  --radius: 8px;
}

body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.6; }

.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }

/* Header */
.header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 1.5rem; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.tagline { color: var(--muted); font-size: 0.875rem; margin-top: 2px; }

/* Nav tabs */
.nav-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.tab { padding: 0.5rem 1rem; border-radius: var(--radius); color: var(--muted); cursor: pointer; font-size: 0.875rem; font-weight: 500; background: none; border: none; transition: all 0.15s; }
.tab:hover { color: var(--text); background: var(--surface); }
.tab.active { color: var(--accent); background: var(--surface); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; }
.card-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.75rem; }
.card-meta { color: var(--muted); font-size: 0.75rem; }

/* Stats row */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { color: var(--muted); font-size: 0.75rem; margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* Severity badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; }
.badge-normal { background: rgba(63,185,80,0.15); color: var(--green); }
.badge-elevated { background: rgba(210,153,34,0.15); color: var(--yellow); }
.badge-high { background: rgba(219,109,40,0.15); color: var(--orange); }
.badge-critical { background: rgba(248,81,73,0.15); color: var(--red); }

/* Signal list */
.signal-item { padding: 0.75rem 0; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 0.75rem; }
.signal-item:last-child { border-bottom: none; }
.signal-body { flex: 1; }
.signal-title { font-size: 0.9rem; font-weight: 500; margin-bottom: 2px; }
.signal-meta { font-size: 0.75rem; color: var(--muted); }
.signal-source { color: var(--accent); text-transform: uppercase; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.5px; min-width: 80px; text-align: right; }

/* Reports */
.report-summary { font-size: 0.9rem; line-height: 1.7; color: var(--text); white-space: pre-wrap; }
.flagged-list { display: flex; flex-direction: column; gap: 0.5rem; }
.flagged-item { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem; background: var(--bg); border-radius: 6px; border: 1px solid var(--border); font-size: 0.875rem; }
.flagged-name { font-weight: 600; }
.flagged-sector { color: var(--muted); font-size: 0.75rem; }

/* Forms */
.form-row { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 0.375rem; }
.form-group label { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.form-group input, .form-group select { padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-size: 0.875rem; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.875rem; font-weight: 500; border: none; cursor: pointer; transition: all 0.15s; }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-danger { background: rgba(248,81,73,0.15); color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: rgba(248,81,73,0.25); }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.75rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th { text-align: left; padding: 0.75rem 1rem; border-bottom: 2px solid var(--border); color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; }
td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
tr:hover td { background: var(--bg); }

/* Actions bar */
.actions-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }

/* Loading */
.loading { text-align: center; padding: 3rem; color: var(--muted); font-size: 0.875rem; }
.loading::after { content: '...'; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Error */
.error-msg { background: rgba(248,81,73,0.1); border: 1px solid var(--red); border-radius: var(--radius); padding: 0.75rem 1rem; color: var(--red); font-size: 0.875rem; margin-bottom: 1rem; }

/* Empty state */
.empty-state { text-align: center; padding: 3rem; color: var(--muted); }
.empty-state p { font-size: 0.875rem; }

/* Toast/notification */
.toast { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem 1.25rem; font-size: 0.875rem; z-index: 1000; animation: slideIn 0.3s ease; }
.toast-success { border-color: var(--green); color: var(--green); }
.toast-error { border-color: var(--red); color: var(--red); }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Responsive */
@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .form-row { flex-direction: column; }
  .form-group { min-width: 100%; }
}

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-title { font-size: 1.125rem; font-weight: 600; }

/* Early Access */
.ea-hero { margin-bottom: 2.5rem; }
.ea-eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); font-weight: 600; margin-bottom: 0.75rem; }
.ea-headline { font-size: 2.25rem; font-weight: 700; color: var(--text); line-height: 1.2; letter-spacing: -0.5px; margin-bottom: 1rem; max-width: 680px; }
.ea-sub { color: var(--muted); font-size: 1rem; line-height: 1.7; max-width: 580px; }

.ea-layout { display: grid; grid-template-columns: 420px 1fr; gap: 2rem; align-items: start; }

.ea-form-wrap .form-group { min-width: 100%; margin-bottom: 0.875rem; }
.ea-form-wrap .form-row { flex-direction: column; }
.ea-opt { font-weight: 400; color: var(--muted); font-size: 0.7rem; }

.ea-features { display: flex; flex-direction: column; gap: 1.5rem; padding-top: 0.5rem; }
.ea-feature { display: flex; align-items: flex-start; gap: 1rem; }
.ea-feature-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--accent); font-size: 1rem; flex-shrink: 0; }
.ea-feature > div { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }
.ea-feature strong { color: var(--text); font-weight: 600; }

.ea-confirm { text-align: center; padding: 4rem 2rem; }
.ea-confirm-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(63,185,80,0.12); border: 1px solid var(--green); color: var(--green); font-size: 1.75rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; }
.ea-confirm-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; }
.ea-confirm-body { color: var(--muted); font-size: 0.9375rem; max-width: 440px; margin: 0 auto; line-height: 1.6; }

@media (max-width: 900px) {
  .ea-layout { grid-template-columns: 1fr; }
  .ea-headline { font-size: 1.75rem; }
  .ea-features { display: none; }
}