/* ============================================================
   Argos OSINT KYC Platform — Global Design System
   Based on buscar.html dark theme
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg: #0f1115;
  --panel: #1a1d24;
  --panel2: #232730;
  --border: #2c313c;
  --text: #e6e8ec;
  --muted: #8a93a6;
  --accent: #4f8cff;
  --accent2: #6ee7b7;
  --warn: #f59e0b;
  --error: #ef4444;
  --highlight: #facc15;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;
  --shadow: 0 2px 8px rgba(0,0,0,.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.5);
  --transition: 150ms ease;

  /* Spacing scale (base 4px) — see frontend/DESIGN.md §4 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
}

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

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: transparent;
  min-height: 100vh;
}

img, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }

p { margin-bottom: 0.75rem; color: var(--text); }
small { font-size: 0.85rem; color: var(--muted); }
strong { font-weight: 600; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--panel2); padding: 0.15em 0.4em; border-radius: 3px; }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-sm {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.flex-1 { flex: 1; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-accent2 { color: var(--accent2); }
.text-warn { color: var(--warn); }
.text-error { color: var(--error); }
.text-sm { font-size: 0.85rem; }
.text-lg { font-size: 1.15rem; }
.text-xs { font-size: 0.75rem; }
.font-mono { font-family: var(--font-mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* ── Utilities ──────────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-accent2 { color: var(--accent2); }
.text-warn { color: var(--warn); }
.text-error { color: var(--error); }
.text-highlight { color: var(--highlight); }
.text-white { color: #fff; }
.text-black { color: #000; }
.text-sm { font-size: 0.85rem; }
.text-lg { font-size: 1.15rem; }
.text-xs { font-size: 0.75rem; }
.text-base { font-size: 1rem; }
.text-mono { font-family: var(--font-mono); }
.text-upper { text-transform: uppercase; }
.text-nowrap { white-space: nowrap; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leading-tight { line-height: 1.3; }
.italic { font-style: italic; }
.no-underline { text-decoration: none; }
.underline { text-decoration: underline; }
.letter-wide { letter-spacing: 0.05em; }

.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.mt-auto { margin-top: auto; }
.self-start { align-self: flex-start; }
.self-center { align-self: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }

.m-0 { margin: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.ml-1 { margin-left: 0.5rem; }
.ml-2 { margin-left: 1rem; }
.mr-1 { margin-right: 0.5rem; }
.mr-2 { margin-right: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2 { padding-left: 1rem; padding-right: 1rem; }
.px-3 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }

.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 999px; }
.rounded-t-lg { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.rounded-b-0 { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-l { border-left: 1px solid var(--border); }
.border-0 { border: none; }
.border-accent { border-color: var(--accent); }
.border-accent2 { border-color: var(--accent2); }
.border-warn { border-color: var(--warn); }
.border-error { border-color: var(--error); }

.bg-panel { background: var(--panel); }
.bg-panel2 { background: var(--panel2); }
.bg-transparent { background: transparent; }
.bg-accent { background: var(--accent); }
.bg-accent2 { background: var(--accent2); }
.bg-error { background: var(--error); }

.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }

.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.z-1 { z-index: 1; }
.z-100 { z-index: 100; }
.z-200 { z-index: 200; }
.z-1000 { z-index: 1000; }

.pointer { cursor: pointer; }
.no-select { user-select: none; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-y-auto { overflow-y: auto; }
.flex-nowrap { flex-wrap: nowrap; }

.transition { transition: all var(--transition); }
.transition-fast { transition: all 120ms ease; }

.screen-reader-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
}
.btn:hover { background: var(--border); text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #3a7aef; border-color: #3a7aef; }

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.btn-secondary:hover { color: var(--text); border-color: var(--muted); }

.btn-danger {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn-ghost:hover { color: var(--text); background: var(--panel2); }

.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.6rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

.btn-icon {
  padding: 0.5rem;
  aspect-ratio: 1;
  border-radius: var(--radius);
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color var(--transition);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79,140,255,.15);
}
.form-input::placeholder { color: var(--muted); opacity: 0.6; }
.form-input.error { border-color: var(--error); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { appearance: none; cursor: pointer; }

.form-error {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 0.3rem;
}
.form-help {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}
.form-row > .form-group { flex: 1; }

.form-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 1rem;
  font-weight: 600;
}
.card-body {
  padding: 1.25rem;
}
.card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  background: var(--panel2);
  color: var(--muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge-success {
  background: rgba(110,231,183,.12);
  color: var(--accent2);
  border-color: rgba(110,231,183,.25);
}
.badge-warning {
  background: rgba(245,158,11,.12);
  color: var(--warn);
  border-color: rgba(245,158,11,.25);
}
.badge-danger {
  background: rgba(239,68,68,.12);
  color: var(--error);
  border-color: rgba(239,68,68,.25);
}
.badge-info {
  background: rgba(79,140,255,.12);
  color: var(--accent);
  border-color: rgba(79,140,255,.25);
}
.badge-highlight {
  background: rgba(250,204,21,.12);
  color: var(--highlight);
  border-color: rgba(250,204,21,.25);
}

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

table {
  font-size: 0.9rem;
}
thead th {
  background: var(--panel);
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(79,140,255,.04); }
tbody tr.row-active { background: rgba(79,140,255,.08); }

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
  background: var(--panel);
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.navbar-brand:hover { text-decoration: none; }
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.navbar-link {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.navbar-link:hover {
  color: var(--text);
  background: var(--panel2);
  text-decoration: none;
}
.navbar-link.active {
  color: var(--accent);
  background: rgba(79,140,255,.1);
}
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}
.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
}
.modal-close {
  color: var(--muted);
  font-size: 1.25rem;
  padding: 0.25rem;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--panel2); }
.modal-body {
  padding: 1.5rem;
}
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ── Toast ─────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toast-in 250ms ease;
  min-width: 280px;
  max-width: 420px;
}
.toast-success {
  background: #065f46;
  color: var(--accent2);
  border: 1px solid rgba(110,231,183,.3);
}
.toast-error {
  background: #7f1d1d;
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.3);
}
.toast-warning {
  background: #78350f;
  color: var(--warn);
  border: 1px solid rgba(245,158,11,.3);
}
.toast-info {
  background: #1e3a5f;
  color: var(--accent);
  border: 1px solid rgba(79,140,255,.3);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Spinner ───────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.spinner-sm { width: 14px; height: 14px; border-width: 1.5px; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }

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

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem;
  color: var(--muted);
}

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 0;
  overflow-x: auto;
}
.tab {
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  background: none;
}
.tab:hover {
  color: var(--text);
  text-decoration: none;
}
.tab.active {
  color: var(--accent2);
  border-bottom-color: var(--accent2);
}
.tab-content {
  padding: 1.25rem 0;
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--muted);
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}
.empty-state-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.empty-state-desc {
  font-size: 0.9rem;
  max-width: 360px;
  margin-bottom: 1.25rem;
}

/* ── Dividers & Misc ───────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--panel2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.35rem;
  min-width: 180px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  padding: 0.35rem;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text);
  border-radius: 4px;
  transition: background var(--transition);
}
.dropdown-item:hover {
  background: var(--panel2);
  text-decoration: none;
}
.dropdown-divider {
  border-top: 1px solid var(--border);
  margin: 0.35rem 0;
}

.tooltip {
  position: relative;
}
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
  margin-bottom: 0.35rem;
}
.tooltip:hover::after { opacity: 1; }

/* ── Flow: step list, source chips, stat cards, kv rows ───── */

.step-list {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.step-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
}
.step-item:last-child { border-bottom: none; }
.step-item .step-icon {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.step-item .step-label { flex: 1; color: var(--text); }
.step-item .step-time {
  color: var(--muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
}
.step-item .step-status {
  width: 20px;
  text-align: center;
  font-weight: 600;
  flex-shrink: 0;
}
.step-item .step-detail {
  color: var(--muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.step-item.step-ok    .step-status { color: var(--accent2); }
.step-item.step-warn  .step-status { color: var(--warn); }
.step-item.step-error .step-status { color: var(--error); }
.step-item.step-skip  .step-status { color: var(--muted); }
.step-list-empty {
  padding: var(--space-3);
  color: var(--muted);
  font-size: 0.82rem;
}

.source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: rgba(110,231,183,.12);
  color: var(--accent2);
  border: 1px solid rgba(110,231,183,.25);
  white-space: nowrap;
}
.source-chips-empty { color: var(--muted); font-size: 0.82rem; }

.stat-cards {
  display: flex;
  gap: var(--space-3);
}
.stat-card {
  flex: 1;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  text-align: center;
}
.stat-card .stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-card .stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-mono);
}
.stat-card.stat-accent  .stat-value { color: var(--accent); }
.stat-card.stat-accent2 .stat-value { color: var(--accent2); }
.stat-card.stat-neutral .stat-value { color: var(--text); }

.kv-row {
  display: flex;
  gap: var(--space-2);
  font-size: 0.85rem;
  margin-bottom: 3px;
}
.kv-row .kv-label {
  color: var(--muted);
  min-width: 64px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 1px;
}
.kv-row .kv-val {
  color: var(--text);
  font-family: var(--font-mono);
  word-break: break-word;
}

@media (max-width: 640px) {
  .stat-cards { flex-direction: column; gap: var(--space-2); }
  .step-item { flex-wrap: wrap; }
}

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

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 1.25rem; }
}

@media (max-width: 768px) {
  html { font-size: 13px; }
  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
  .navbar { padding: 0 1rem; }
  .modal { max-width: 100%; margin: 0.5rem; }
  .container, .container-sm { padding: 0 1rem; }
  .hidden-mobile { display: none !important; }
}

@media (max-width: 480px) {
  .btn-lg { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
  .card-body { padding: 1rem; }
  .modal-body { padding: 1rem; }
  .tabs { gap: 0; }
  .tab { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
  .hidden-sm { display: none !important; }
}

/* ── Print ─────────────────────────────────────────────────── */

/* --- Argos OSINT Portal Background --- */
.argos-bg{
  position:fixed;inset:0;z-index:0;overflow:hidden;
  background:radial-gradient(ellipse 80% 75% at 50% 50%, #0f1115 0%, #080C20 60%, #05081A 100%);
}
.argos-bg canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.argos-bg::after{
  content:"";position:absolute;inset:0;opacity:.06;mix-blend-mode:overlay;pointer-events:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.argos-bg--quiet canvas{opacity:.45}
@media (prefers-reduced-motion:reduce){
  .argos-bg canvas{opacity:.45}
}

body > *:not(.argos-bg) { position: relative; z-index: 1; }

@media print {
  body {
    background: #fff;
    color: #000;
  }
  .navbar, .toast-container, .modal-overlay,
  .btn, .tabs, .spinner, .no-print {
    display: none !important;
  }
  .card {
    border: 1px solid #ccc;
    box-shadow: none;
    break-inside: avoid;
  }
  table { font-size: 10pt; }
  a { color: #000; text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
}

/* ── Utility ──────────────────────────────────────────────── */
.footer-desc { max-width: 250px; }
