/* Globestar Scanner — base styles (was the inline <style> in templates/base.html). */
:root {
  --bg: #070b14;
  --bg2: #0c1220;
  --card: #111827;
  --card2: #0f172a;
  --line: #1e293b;
  --line2: #334155;
  --fg: #e2e8f0;
  --muted: #94a3b8;
  --dim: #64748b;
  --acc: #22d3ee;
  --acc2: #818cf8;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --crit: #ef4444;
  --high: #f97316;
  --med: #eab308;
  --low: #38bdf8;
  --info: #94a3b8;
  --nav-h: 56px;
  --radius: 12px;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--fg);
  font-family: var(--font); font-size: 14.5px; line-height: 1.5;
  background:
    radial-gradient(900px 420px at 8% -8%, #164e6388 0%, transparent 55%),
    radial-gradient(700px 380px at 92% 0%, #312e8188 0%, transparent 50%),
    linear-gradient(180deg, var(--bg2), var(--bg));
}
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
nav.top {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.25rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: #070b14e6; backdrop-filter: blur(14px);
}
.brand {
  display: flex; align-items: center; gap: .65rem; font-weight: 700;
  letter-spacing: .01em; color: #fff; text-decoration: none !important;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  box-shadow: 0 0 20px #22d3ee55;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #041016;
}
.brand small { display: block; font-size: 10px; font-weight: 500; color: var(--dim); letter-spacing: .12em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: .15rem; }
.nav-links a {
  color: #cbd5e1; padding: .45rem .75rem; border-radius: 8px; font-size: 13px; font-weight: 500;
  text-decoration: none !important;
}
.nav-links a:hover { background: #1e293b88; color: #fff; }
.nav-links a.active { background: #1e293b; color: #fff; box-shadow: inset 0 0 0 1px var(--line2); }
.nav-user { margin-left: .75rem; padding-left: .9rem; border-left: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; }
.page-head .sub { margin: .25rem 0 0; color: var(--muted); font-size: 13.5px; }
.card {
  background: linear-gradient(180deg, #141c2e, var(--card));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.35rem; box-shadow: 0 18px 40px #00000066;
}
.card + .card { margin-top: 1rem; }
.card h2 { margin: 0 0 .85rem; font-size: 1.05rem; font-weight: 650; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.card-head h2 { margin: 0; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-bottom: .3rem; }
input, select, textarea {
  width: 100%; background: #0a101c; border: 1px solid var(--line2); color: var(--fg);
  border-radius: 9px; padding: .7rem .85rem; margin: 0 0 1rem; font: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #22d3ee99; box-shadow: 0 0 0 3px #22d3ee22; }
textarea { min-height: 72px; font-family: var(--mono); font-size: 12.5px; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: linear-gradient(90deg, #0891b2, #4f46e5); color: #fff !important;
  border: 0; border-radius: 9px; padding: .7rem 1.15rem; font-weight: 650; font-size: 13.5px;
  cursor: pointer; text-decoration: none !important; box-shadow: 0 8px 24px #4f46e544;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost {
  background: transparent; border: 1px solid var(--line2); color: var(--fg) !important;
  box-shadow: none;
}
.btn-ghost:hover { background: #1e293b66; }
.btn-sm { padding: .4rem .7rem; font-size: 12.5px; border-radius: 7px; }
.err {
  background: #7f1d1d40; border: 1px solid #ef444488; color: #fecaca;
  padding: .75rem .9rem; border-radius: 9px; margin-bottom: 1rem;
}
.ok-msg {
  background: #064e3b40; border: 1px solid #34d39966; color: #a7f3d0;
  padding: .75rem .9rem; border-radius: 9px; margin-bottom: 1rem;
}
.muted { color: var(--muted); font-size: 13.5px; }
.dim { color: var(--dim); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
tbody tr:hover { background: #0b122088; }
.pill {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 700;
  border: 1px solid var(--line2); border-radius: 999px; padding: .18rem .55rem; color: var(--muted);
}
.status {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em;
  border-radius: 999px; padding: .2rem .55rem; border: 1px solid transparent;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-queued { color: #94a3b8; background: #33415544; border-color: #47556966; }
.st-running, .st-checking { color: #67e8f9; background: #08334488; border-color: #22d3ee55; }
.st-done { color: #6ee7b7; background: #064e3b55; border-color: #34d39955; }
.st-error, .st-failed { color: #fca5a5; background: #7f1d1d55; border-color: #ef444466; }
.sev {
  display: inline-flex; min-width: 4.6rem; justify-content: center;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; border-radius: 6px; padding: .2rem .45rem; border: 1px solid transparent;
}
.sev-critical { color: #fff; background: #dc2626; border-color: #f87171; box-shadow: 0 0 12px #ef444466; }
.sev-high { color: #fff7ed; background: #c2410c; border-color: #fb923c; }
.sev-medium { color: #422006; background: #eab308; border-color: #facc15; }
.sev-low { color: #082f49; background: #38bdf8; border-color: #7dd3fc; }
.sev-info { color: #e2e8f0; background: #334155; border-color: #64748b; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .85rem; margin-bottom: 1.25rem; }
.stat {
  background: linear-gradient(180deg, #0f172a, #0b1220);
  border: 1px solid var(--line); border-radius: 11px; padding: .95rem 1rem;
  position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--acc);
}
.stat.crit::before { background: var(--crit); }
.stat.high::before { background: var(--high); }
.stat.med::before { background: var(--med); }
.stat.low::before { background: var(--low); }
.stat.ok::before { background: var(--ok); }
.stat .muted { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat strong { display: block; margin-top: .2rem; font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; font-family: var(--mono); }
pre {
  background: #060a12; border: 1px solid var(--line); border-radius: 9px;
  padding: 1rem; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.45;
}
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin .8s linear infinite; }
.spin { display: inline-block; height: 1rem; width: 1rem; border-radius: 999px; border: 2px solid #1e3a5f; border-top-color: var(--acc); vertical-align: middle; }
.spin-lg { height: 2.5rem; width: 2.5rem; border-width: 3px; }
.tabs { display: flex; gap: .2rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 1rem 0; padding-bottom: 0; }
.tab {
  background: transparent; border: 0; color: var(--muted); padding: .6rem .8rem; cursor: pointer;
  font-weight: 600; font-size: 12.5px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: #e2e8f0; }
.tab.active { color: #fff; border-bottom-color: var(--acc); }
.tab .n { font-weight: 500; font-size: 10.5px; color: var(--dim); margin-left: .25rem; font-family: var(--mono); }
.pane { display: none; }
.pane.active { display: block; }
.sev-row { display: flex; flex-wrap: wrap; gap: .65rem 1.1rem; margin: 0 0 1rem; }
.chk { display: flex; align-items: center; gap: .45rem; color: var(--fg); font-size: 13.5px; cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 500; }
.chk input { width: auto; margin: 0; accent-color: var(--acc); }
.bar { margin-top: .65rem; height: 8px; background: #0a101c; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; max-width: 32rem; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #06b6d4, #6366f1); border-radius: 999px; transition: width .35s ease; }
.bar-lbl { font-size: 12px; color: var(--acc); font-weight: 700; margin-top: .35rem; font-family: var(--mono); }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 0 0 1rem; }
.toolbar input, .toolbar select { width: auto; min-width: 140px; margin: 0; padding: .45rem .65rem; font-size: 13px; }
.filter-chip {
  border: 1px solid var(--line2); background: #0a101c; color: var(--muted);
  border-radius: 999px; padding: .25rem .65rem; font-size: 11.5px; font-weight: 650; cursor: pointer;
}
.filter-chip.on { color: #fff; border-color: #22d3ee88; background: #08334488; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1rem; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } .nav-links a { padding: .4rem .5rem; } }
.empty { color: var(--dim); padding: 1.25rem .25rem; font-size: 13.5px; }
.host { font-family: var(--mono); font-size: 13px; }
.kpi-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 0; }

/* helpers (moved from inline markup for a strict CSP: no style="" attributes) */
.hidden { display: none !important; }
.is-hidden { display: none; }
.wrap--narrow { max-width: 440px; padding-top: 3rem; }
.wrap--card { max-width: 520px; padding-top: 3rem; }
.wrap--landing { max-width: 720px; padding-top: 3rem; }
.hero-title { margin: .6rem 0; }
.login-title { margin: .5rem 0 0; }
.btn--block { width: 100%; }
.filter-q { min-width: 180px; }
