:root {
  --bg: #0b0b14;
  --bg2: #13131e;
  --bg3: #1a1a28;
  --border: #232336;
  --border-strong: #30304a;
  --text: #e9e9f3;
  --muted: #8e8ea6;
  --accent: #8b5cf6;
  --accent2: #7c3aed;
  --accent3: #6d28d9;
  --accent-glow: rgba(139, 92, 246, 0.18);
  --green: #34d399;
  --red: #f87171;
  --orange: #fbbf24;
  --yellow: #facc15;
  --blue: #60a5fa;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  /* subtle top glow */
  background-image: radial-gradient(1200px 500px at 50% -200px, rgba(139, 92, 246, 0.10), transparent 70%);
  background-repeat: no-repeat;
}

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

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 10, 15, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 1.5rem;
}
.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 1.6rem; height: 1.6rem;
  border-radius: 6px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
  flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 1.1rem; }
.nav-links a { color: var(--muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.container { max-width: 1000px; margin: 2rem auto; padding: 0 1.5rem; flex: 1; width: 100%; }

.footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
}

/* ---------- typography ---------- */
h1 { font-size: 1.9rem; margin-bottom: 0.75rem; letter-spacing: -0.02em; font-weight: 750; }
h2 { font-size: 1.3rem; margin: 1.75rem 0 0.75rem; letter-spacing: -0.01em; font-weight: 700; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; font-weight: 650; }
p { margin-bottom: 0.75rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
}
code { background: var(--bg3); padding: 0.12rem 0.4rem; border-radius: 5px; border: 1px solid var(--border); }
pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  margin: 0.75rem 0;
}

/* ---------- buttons ---------- */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  color: #04110f;
  font-weight: 700;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.btn-primary:hover {
  text-decoration: none;
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
button.btn-primary { font-family: inherit; }

.btn-ghost {
  display: inline-block;
  background: var(--bg3);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: border-color 0.15s ease;
}
.btn-ghost:hover { border-color: var(--accent); text-decoration: none; }

.btn-lg { padding: 0.75rem 1.5rem; font-size: 1.05rem; }

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  padding: 0;
}
.link-btn:hover { color: var(--text); }

/* ---------- cards ---------- */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--border-strong); }

.auth-box { max-width: 400px; margin: 3rem auto; }
.auth-box h1 { font-size: 1.4rem; }

/* ---------- forms ---------- */
label { display: block; margin: 1rem 0 0.35rem; font-size: 0.9rem; color: var(--muted); font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.inline { display: inline; }

/* ---------- flash ---------- */
.flash {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border: 1px solid;
}
.flash-error { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.35); color: #fca5a5; }
.flash-success { background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.35); color: #6ee7b7; }

/* ---------- table ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
tbody tr:hover { background: var(--bg2); }

/* ---------- badges ---------- */
.badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
}
.badge-queued { background: rgba(135, 148, 165, 0.12); color: var(--muted); border-color: var(--border-strong); }
.badge-running { background: rgba(96, 165, 250, 0.12); color: var(--blue); border-color: rgba(96, 165, 250, 0.3); }
.badge-completed { background: rgba(52, 211, 153, 0.12); color: var(--green); border-color: rgba(52, 211, 153, 0.3); }
.badge-failed { background: rgba(248, 113, 113, 0.12); color: var(--red); border-color: rgba(248, 113, 113, 0.3); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 5rem 0 3.5rem; position: relative; }
.hero h1 {
  font-size: 3rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent), #c4b5fd 55%, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg3);
  border: 1px solid var(--border-strong);
  color: var(--muted);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
}
.hero-badge .dot {
  width: 0.45rem; height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.hero-sub { color: var(--muted); font-size: 1.15rem; max-width: 640px; margin: 1rem auto 2rem; }
.hero-cta { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1rem 0 2.5rem; }
.step {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  position: relative;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.step:hover { border-color: var(--accent3); transform: translateY(-2px); }
.step-num {
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  color: #04110f;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.step h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.step p { color: var(--muted); font-size: 0.87rem; margin: 0; }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 2rem 0; }
.feature {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color 0.15s ease;
}
.feature:hover { border-color: var(--border-strong); }
.feature h3 { margin-top: 0; font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* ---------- report view ---------- */
.report-head { margin-bottom: 1.5rem; }
.report-meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.report-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.report-actions .btn {
  background: var(--bg3);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.15s ease;
}
.report-actions .btn:hover { border-color: var(--accent); text-decoration: none; }

.summary-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.sev-pill {
  padding: 0.32rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid;
}
.sev-critical { background: rgba(248,113,113,0.12); color: #fca5a5; border-color: rgba(248,113,113,0.3); }
.sev-high { background: rgba(251,191,36,0.12); color: #fcd34d; border-color: rgba(251,191,36,0.3); }
.sev-medium { background: rgba(250,204,21,0.1); color: #fde047; border-color: rgba(250,204,21,0.3); }
.sev-low { background: rgba(96,165,250,0.12); color: #93c5fd; border-color: rgba(96,165,250,0.3); }
.sev-informational { background: rgba(135,148,165,0.12); color: var(--muted); border-color: var(--border-strong); }

.sev-head { display: flex; align-items: center; gap: 0.5rem; margin: 1.75rem 0 0.7rem; font-size: 1.2rem; font-weight: 700; }
.sev-count { background: var(--bg3); border-radius: 20px; padding: 0.1rem 0.6rem; font-size: 0.82rem; color: var(--muted); }
.sev-text-critical { color: #fca5a5; }
.sev-text-high { color: #fcd34d; }
.sev-text-medium { color: #fde047; }
.sev-text-low { color: #93c5fd; }
.sev-text-informational { color: var(--muted); }

.finding {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
  transition: border-color 0.15s ease;
}
.finding:hover { border-color: var(--border-strong); }
.finding-top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.finding-rule { font-weight: 650; }
.finding-tool { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.finding-loc { margin: 0.3rem 0; }
.finding-loc code { font-size: 0.8rem; }
.finding-msg { color: var(--muted); font-size: 0.9rem; }

.sev-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.sev-badge.sev-critical { background: var(--red); color: #1a0505; }
.sev-badge.sev-high { background: var(--orange); color: #1a1200; }
.sev-badge.sev-medium { background: var(--yellow); color: #1a1400; }
.sev-badge.sev-low { background: var(--blue); color: #050d1a; }
.sev-badge.sev-informational { background: var(--bg3); color: var(--muted); }
.finding:has(.sev-critical) { border-left-color: var(--red); }
.finding:has(.sev-high) { border-left-color: var(--orange); }
.finding:has(.sev-medium) { border-left-color: var(--yellow); }
.finding:has(.sev-low) { border-left-color: var(--blue); }

/* ---------- misc ---------- */
.qr-box { text-align: center; margin: 1rem 0; }
.qr-box img { background: #fff; padding: 0.75rem; border-radius: 10px; }
