:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --ok: #4ade80;
  --warn: #fbbf24;
  --err: #f87171;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.5rem; background: #020617; border-bottom: 1px solid #334155; }
.topbar nav { display: flex; gap: 1rem; align-items: center; }
.brand { font-weight: 700; font-size: 1.1rem; }
.container { padding: 1.5rem; max-width: 1400px; margin: 0 auto; }
.hero h1 { margin: 0 0 0.25rem; }
.card { background: var(--panel); border: 1px solid #334155; border-radius: 12px; padding: 1.25rem; margin-bottom: 1rem; }
.card.narrow { max-width: 420px; margin: 3rem auto; }
label { display: block; margin-bottom: 0.75rem; }
input, button { font: inherit; }
input { width: 100%; padding: 0.5rem 0.65rem; border-radius: 8px; border: 1px solid #475569; background: #0f172a; color: var(--text); }
button { padding: 0.55rem 1rem; border-radius: 8px; border: none; background: var(--accent); color: #0f172a; font-weight: 600; cursor: pointer; }
.link-btn { background: none; color: var(--muted); border: none; cursor: pointer; }
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; align-items: start; }
.kanban-column { background: #020617; border-radius: 12px; padding: 0.75rem; min-height: 200px; }
.kanban-column h2 { font-size: 0.95rem; margin: 0 0 0.75rem; color: var(--muted); }
.lead-card { display: block; background: var(--panel); border: 1px solid #334155; border-radius: 10px; padding: 0.75rem; margin-bottom: 0.5rem; }
.lead-card strong { display: block; }
.muted { color: var(--muted); font-size: 0.85rem; word-break: break-all; }
.badge { display: inline-block; font-size: 0.75rem; padding: 0.15rem 0.45rem; border-radius: 999px; background: #334155; margin-right: 0.25rem; }
.badge.ok { background: #14532d; color: var(--ok); }
.badge.warn { background: #713f12; color: var(--warn); }
.status { display: block; margin-top: 0.35rem; font-size: 0.8rem; color: var(--muted); }
.empty { color: var(--muted); font-size: 0.85rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.actions form { display: inline-block; margin: 0 0.5rem 0.5rem 0; }
.mock-form { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; align-items: end; }
.mock-form select { width: auto; min-width: 8rem; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.preview-grid figure { margin: 0; }
.preview-grid img { width: 100%; border-radius: 8px; border: 1px solid #334155; }
.preview-grid figcaption { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.35rem; }
.gallery-full { display: flex; flex-direction: column; gap: 2rem; }
.gallery-full figure { margin: 0; }
.gallery-full img { width: 100%; max-width: 100%; border-radius: 8px; border: 1px solid #334155; cursor: zoom-in; }
.gallery-full a:hover img { border-color: var(--accent); }
.discovery-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.35rem 1rem; margin-top: 0.5rem; }
.inline-check { display: flex; align-items: center; gap: 0.35rem; font-size: 0.9rem; margin: 0; }
.inline-check input { width: auto; }
.email-preview { width: 100%; min-height: 720px; border: 1px solid #334155; border-radius: 8px; background: #fff; }
.error { color: var(--err); }
.ok { color: var(--ok); }
.public-hero { text-align: center; max-width: 720px; margin: 0 auto 2rem; }
.public-hero .lead { color: var(--muted); font-size: 1.05rem; line-height: 1.5; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--accent); margin: 0 0 0.5rem; }
.public-form-card { max-width: 520px; margin: 0 auto 1.5rem; }
.feature-list { margin: 0; padding-left: 1.25rem; line-height: 1.7; }
.muted-box { text-align: center; color: var(--muted); }
.progress-bar { height: 6px; background: #334155; border-radius: 999px; overflow: hidden; margin: 1rem 0; }
#progress-pulse { height: 100%; width: 40%; background: var(--accent); border-radius: 999px; animation: pulse-slide 1.4s ease-in-out infinite; }
@keyframes pulse-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
textarea, select { width: 100%; padding: 0.5rem 0.65rem; border-radius: 8px; border: 1px solid #475569; background: #0f172a; color: var(--text); font: inherit; }
pre { white-space: pre-wrap; background: #0f172a; padding: 1rem; border-radius: 8px; overflow: auto; }
.secondary-btn { background: #334155; color: var(--text); margin-left: 0.5rem; }
.stats-panel { margin-top: 0.75rem; line-height: 1.6; }
.scan-progress { margin: 1rem 0; padding: 1rem; background: #0f172a; border-radius: 10px; border: 1px solid #334155; }
.progress-bar { height: 10px; background: #334155; border-radius: 999px; overflow: hidden; margin: 0.75rem 0; }
.progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 0.4s ease; }
.scan-recent { margin: 0.5rem 0 0; padding-left: 1.25rem; font-size: 0.85rem; color: var(--muted); max-height: 160px; overflow-y: auto; }
.filter-bar { margin-bottom: 1rem; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.75rem 1rem; }
.filter-actions { margin-top: 0.75rem; display: flex; gap: 0.5rem; align-items: center; }
.btn-link { display: inline-block; padding: 0.55rem 1rem; border-radius: 8px; text-decoration: none; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th, .data-table td { text-align: left; padding: 0.65rem 0.5rem; border-bottom: 1px solid #334155; vertical-align: top; }
.data-table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #0f172a; }
.lead-preview-link { display: inline-block; margin-top: 0.15rem; font-weight: 600; text-decoration: underline; }
.clickable-row .lead-preview-link:hover { color: #93c5fd; }
.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.outreach-panel textarea { min-height: 100px; }
.outreach-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; align-items: center; }
.outreach-actions form { margin: 0; display: inline-flex; gap: 0.35rem; align-items: center; }
.danger-btn { background: #b91c1c; color: #fff; }
.outreach-meta { font-size: 0.85rem; color: var(--muted); margin: 0.35rem 0 0.75rem; }
.send-history { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.9rem; }
.tier-critical { border-color: #b91c1c; }
.tier-high { border-color: #c2410c; }
.tier-medium { border-color: #a16207; }
.dashboard-hero { margin-bottom: 1rem; }
.dashboard-hero h1 { margin: 0 0 0.25rem; }
.dashboard-stats { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }
.stat-chip { background: var(--panel); border: 1px solid #334155; border-radius: 10px; padding: 0.65rem 1rem; min-width: 7rem; }
.stat-chip.ok-chip { border-color: #14532d; }
.stat-value { display: block; font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.stat-label { display: block; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.15rem; }
.dashboard-grid { display: grid; gap: 1rem; margin-bottom: 1rem; }
.picks-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.main-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }
.dashboard-panel h2 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.panel-head { margin-bottom: 0.85rem; }
.panel-head .muted { margin: 0; font-size: 0.85rem; }
.panel-foot { margin: 1rem 0 0; font-size: 0.85rem; }
.pick-list, .rec-list, .activity-feed { list-style: none; margin: 0; padding: 0; }
.pick-row, .rec-row, .activity-row { display: flex; gap: 0.75rem; align-items: flex-start; justify-content: space-between; padding: 0.65rem 0; border-bottom: 1px solid #334155; }
.pick-row:last-child, .rec-row:last-child, .activity-row:last-child { border-bottom: none; }
.pick-main, .rec-main, .activity-main { flex: 1; min-width: 0; display: block; color: inherit; text-decoration: none; }
.pick-main:hover strong, .rec-main:hover strong, .activity-main:hover strong { color: var(--accent); }
.pick-main strong, .rec-main strong, .activity-main strong { display: block; margin-bottom: 0.15rem; }
.pick-meta, .activity-meta { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; justify-content: flex-end; }
.rec-row.severity-high { border-left: 3px solid var(--err); padding-left: 0.65rem; }
.rec-row.severity-medium { border-left: 3px solid var(--warn); padding-left: 0.65rem; }
.rec-row.severity-low { border-left: 3px solid #475569; padding-left: 0.65rem; }
.activity-row.kind-inquiry { border-left: 3px solid var(--ok); padding-left: 0.65rem; }
.activity-row.kind-bounce { border-left: 3px solid var(--err); padding-left: 0.65rem; }
.activity-row.kind-self_serve { border-left: 3px solid var(--accent); padding-left: 0.65rem; }
.kind-badge { text-transform: uppercase; font-size: 0.68rem; }
