@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0d0d0d;
  --surface: #141414;
  --surface2: #1a1a1a;
  --border: #2a2a2a;
  --accent: #e63946;
  --accent2: #ff6b35;
  --success: #2ecc71;
  --warning: #f39c12;
  --text: #f0f0f0;
  --text-muted: #888;
  --font: 'Inter', -apple-system, sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.navbar-brand .shield-icon { color: var(--accent); font-size: 20px; }
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.navbar-nav a {
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
}
.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--text);
  background: var(--surface2);
}
.navbar-actions { display: flex; align-items: center; gap: 8px; }

/* ===== LAYOUT ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.page { padding: 32px 24px; max-width: 1280px; margin: 0 auto; }
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.page-title { font-size: 22px; font-weight: 700; }
.page-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 2px; }

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 600; }
.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.stat-card .stat-value { font-size: 32px; font-weight: 700; color: var(--accent); }
.stat-card .stat-label { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ===== TABLES ===== */
.table-container { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface2);
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:hover td { background: var(--surface2); cursor: pointer; }
tr:last-child td { border-bottom: none; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.badge-s1 { background: rgba(46,204,113,0.15); color: var(--success); border: 1px solid rgba(46,204,113,0.3); }
.badge-s2 { background: rgba(243,156,18,0.15); color: var(--warning); border: 1px solid rgba(243,156,18,0.3); }
.badge-s3 { background: rgba(255,107,53,0.15); color: var(--accent2); border: 1px solid rgba(255,107,53,0.3); }
.badge-s4 { background: rgba(230,57,70,0.2); color: var(--accent); border: 1px solid rgba(230,57,70,0.4); }
.badge-active { background: rgba(46,204,113,0.15); color: var(--success); border: 1px solid rgba(46,204,113,0.3); }
.badge-new { background: rgba(100,100,255,0.15); color: #8899ff; border: 1px solid rgba(100,100,255,0.3); }
.badge-escalated { background: rgba(230,57,70,0.2); color: var(--accent); border: 1px solid rgba(230,57,70,0.4); }
.badge-closed { background: rgba(136,136,136,0.15); color: var(--text-muted); border: 1px solid var(--border); }
.badge-submitted { background: rgba(243,156,18,0.15); color: var(--warning); border: 1px solid rgba(243,156,18,0.3); }
.badge-removed { background: rgba(46,204,113,0.15); color: var(--success); border: 1px solid rgba(46,204,113,0.3); }
.badge-rejected { background: rgba(230,57,70,0.15); color: var(--accent); border: 1px solid rgba(230,57,70,0.3); }
.badge-pending { background: rgba(136,136,136,0.15); color: var(--text-muted); border: 1px solid var(--border); }
.badge-high { background: rgba(230,57,70,0.15); color: var(--accent); border: 1px solid rgba(230,57,70,0.3); }
.badge-medium { background: rgba(243,156,18,0.15); color: var(--warning); border: 1px solid rgba(243,156,18,0.3); }
.badge-low { background: rgba(46,204,113,0.15); color: var(--success); border: 1px solid rgba(46,204,113,0.3); }
.badge-published { background: rgba(46,204,113,0.2); color: var(--success); border: 1px solid rgba(46,204,113,0.4); }
.badge-anon { background: rgba(46,204,113,0.15); color: var(--success); border: 1px solid rgba(46,204,113,0.3); }
.badge-court { background: rgba(230,57,70,0.15); color: var(--accent); border: 1px solid rgba(230,57,70,0.3); }
.badge-legal-hold { background: rgba(230,57,70,0.1); color: var(--accent); border: 1px solid rgba(230,57,70,0.4); font-size: 10px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px; }
.form-control {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font);
  transition: border-color 0.15s;
  outline: none;
}
.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #c1121f; color: #fff; text-decoration: none; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface2); text-decoration: none; }
.btn-success { background: rgba(46,204,113,0.15); color: var(--success); border: 1px solid rgba(46,204,113,0.3); }
.btn-success:hover { background: rgba(46,204,113,0.25); text-decoration: none; }
.btn-warning { background: rgba(243,156,18,0.15); color: var(--warning); border: 1px solid rgba(243,156,18,0.3); }
.btn-warning:hover { background: rgba(243,156,18,0.25); text-decoration: none; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== ALERT BANNERS ===== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.alert-danger { background: rgba(230,57,70,0.1); border: 1px solid rgba(230,57,70,0.3); color: #ff8087; }
.alert-warning { background: rgba(243,156,18,0.1); border: 1px solid rgba(243,156,18,0.3); color: var(--warning); }
.alert-success { background: rgba(46,204,113,0.1); border: 1px solid rgba(46,204,113,0.3); color: var(--success); }
.alert-info { background: rgba(100,100,255,0.1); border: 1px solid rgba(100,100,255,0.3); color: #8899ff; }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 20px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ===== INCIDENT QUEUE ===== */
.incident-row { cursor: pointer; transition: background 0.1s; }
.incident-row.s4 td { border-left: 3px solid var(--accent); }
.incident-row.s3 td:first-child { border-left: 3px solid var(--accent2); }
.incident-row.s2 td:first-child { border-left: 3px solid var(--warning); }
.risk-bar-container { width: 80px; height: 6px; background: var(--border); border-radius: 3px; }
.risk-bar { height: 100%; border-radius: 3px; transition: width 0.3s; }
.risk-bar.high { background: var(--accent); }
.risk-bar.medium { background: var(--warning); }
.risk-bar.low { background: var(--success); }

/* ===== DETAIL PANEL ===== */
.detail-panel {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-top: 8px;
  display: none;
}
.detail-panel.active { display: block; }
.scores-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.score-item { text-align: center; }
.score-value { font-size: 22px; font-weight: 700; }
.score-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }

/* ===== GRAPH ===== */
.graph-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}
.graph-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  position: absolute;
  transition: all 0.2s;
}
.graph-node:hover { transform: scale(1.1); }
.graph-node-actor { width: 60px; height: 60px; background: rgba(230,57,70,0.2); border: 2px solid var(--accent); color: var(--accent); }
.graph-node-alias { width: 46px; height: 46px; background: rgba(255,107,53,0.15); border: 2px solid var(--accent2); color: var(--accent2); }
.graph-node-incident { width: 40px; height: 40px; background: rgba(243,156,18,0.15); border: 2px solid var(--warning); color: var(--warning); }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 16px; }
.timeline-item::before { content: ''; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline-time { font-size: 11px; color: var(--text-muted); }
.timeline-content { font-size: 13px; margin-top: 2px; }

/* ===== KANBAN ===== */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kanban-column { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.kanban-column-header { font-size: 13px; font-weight: 600; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.kanban-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 10px; cursor: pointer; transition: border-color 0.15s; }
.kanban-card:hover { border-color: var(--accent); }
.kanban-card-ref { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.kanban-card-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }

/* ===== EVIDENCE VAULT ===== */
.evidence-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; display: flex; gap: 14px; align-items: flex-start; }
.evidence-icon { font-size: 28px; flex-shrink: 0; }
.evidence-hash { font-family: monospace; font-size: 11px; color: var(--text-muted); word-break: break-all; margin-top: 4px; }
.chain-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* ===== STATS BAR ===== */
.stats-bar { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 24px; display: flex; gap: 32px; align-items: center; justify-content: center; }
.stats-bar-item { text-align: center; }
.stats-bar-value { font-size: 24px; font-weight: 700; color: var(--accent); }
.stats-bar-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== PUBLICATION GATE ===== */
.pub-gate-banner {
  background: rgba(230,57,70,0.1);
  border: 1px solid rgba(230,57,70,0.4);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.pub-gate-icon { font-size: 24px; }
.pub-gate-text { font-size: 14px; font-weight: 600; color: #ff8087; }
.pub-gate-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===== FILTER ROW ===== */
.filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filter-row .form-control { width: auto; min-width: 140px; }
.filter-tabs { display: flex; gap: 2px; background: var(--surface2); border-radius: 8px; padding: 3px; }
.filter-tab { padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; color: var(--text-muted); transition: all 0.15s; }
.filter-tab.active { background: var(--surface); color: var(--text); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a0506 50%, #0d0d0d 100%);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
  text-align: center;
}
.hero-title { font-size: 44px; font-weight: 800; line-height: 1.2; max-width: 700px; margin: 0 auto 16px; }
.hero-title span { color: var(--accent); }
.hero-sub { font-size: 18px; color: var(--text-muted); max-width: 560px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== VALUE PROPS ===== */
.value-props { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; padding: 48px 24px; max-width: 1280px; margin: 0 auto; }
.prop-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 24px; }
.prop-icon { font-size: 28px; margin-bottom: 12px; }
.prop-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.prop-desc { font-size: 13px; color: var(--text-muted); }

/* ===== PRICING ===== */
.pricing { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 30px rgba(230,57,70,0.15); }
.price-name { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; }
.price-amount { font-size: 30px; font-weight: 800; margin-bottom: 4px; }
.price-period { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.price-features { list-style: none; font-size: 13px; color: var(--text-muted); }
.price-features li { padding: 4px 0; }
.price-features li::before { content: '✓ '; color: var(--success); }

/* ===== SEVERITY SCALE ===== */
.severity-scale { display: flex; gap: 16px; flex-wrap: wrap; }
.severity-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.severity-dot { width: 12px; height: 12px; border-radius: 50%; }

/* ===== FOOTER ===== */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== 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: 12px; padding: 36px; width: 100%; max-width: 420px; }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .shield { font-size: 36px; }
.auth-title { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 24px; }
.auth-divider { text-align: center; color: var(--text-muted); font-size: 13px; margin: 16px 0; }

/* ===== PROGRESS BAR ===== */
.progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.progress-bar { height: 100%; border-radius: 3px; transition: width 0.3s; }
.progress-bar-success { background: var(--success); }
.progress-bar-warning { background: var(--warning); }
.progress-bar-danger { background: var(--accent); }

/* ===== COMPLIANCE ===== */
.audit-row { border-bottom: 1px solid var(--border); padding: 10px 0; display: grid; grid-template-columns: 140px 1fr 200px; gap: 12px; font-size: 13px; }
.audit-action { font-family: monospace; font-size: 11px; color: var(--accent2); }
.audit-time { color: var(--text-muted); font-size: 11px; }

/* ===== SPLIT LAYOUT ===== */
.split { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
@media (max-width: 768px) { .split { grid-template-columns: 1fr; } .kanban { grid-template-columns: 1fr; } .hero-title { font-size: 28px; } }

/* ===== MISC ===== */
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.loading { text-align: center; padding: 48px; color: var(--text-muted); }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
