:root {
  --bg: #070b10;
  --bg-2: #0e1620;
  --panel: rgba(14, 22, 32, 0.94);
  --border: rgba(52, 211, 153, 0.28);
  --ok: #34d399;
  --bad: #f87171;
  --accent: #38bdf8;
  --gold: #fbbf24;
  --text: #e8eef5;
  --muted: #93a4b8;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text);
  background: radial-gradient(900px 480px at 85% -10%, #12324a 0%, var(--bg) 55%);
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #7dd3fc; }

.sg-banner {
  background: #122033; color: var(--gold); font-size: 0.8rem;
  text-align: center; padding: 0.45rem 1rem; border-bottom: 1px solid #1e3348;
}
.sg-note, .disclaimer, .muted { color: var(--muted); font-size: 0.85rem; }
.sg-photo {
  display: grid; place-items: center; min-height: 180px; width: 100%; height: 100%;
  border: 1px dashed #35506a; border-radius: 12px; color: var(--gold);
  background: repeating-linear-gradient(45deg, #101820, #101820 10px, #152030 10px, #152030 20px);
  font-size: 0.9rem; text-align: center; padding: 1rem;
}
.sg-photo.tall { min-height: 320px; position: absolute; inset: 0; }

.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 1.4rem;
  background: rgba(7,11,16,0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand { display: flex; align-items: center; gap: 0.55rem; color: var(--text); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #22d3ee, #34d399);
  box-shadow: 0 0 16px rgba(52,211,153,0.4);
}
.nav-links { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: 0.92rem; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.4rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  border-radius: 999px; padding: 0.65rem 1.15rem; cursor: pointer; font: inherit;
}
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; }
.btn-primary { background: linear-gradient(135deg, #22d3ee, #34d399); border: 0; color: #062016; font-weight: 700; }
.btn-ghost { background: rgba(255,255,255,0.04); }
.btn-block { width: 100%; margin-top: 0.8rem; }

.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 2rem;
  padding: 3rem 1.5rem 2rem; max-width: 1180px; margin: 0 auto;
}
.eyebrow { color: var(--ok); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; }
.hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); line-height: 1.15; margin: 0.4rem 0 1rem; }
.lead { color: var(--muted); max-width: 36rem; }
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.3rem 0; }
.stats-row { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.stats-row strong { display: block; font-size: 1.45rem; color: var(--ok); }
.stats-row span { color: var(--muted); font-size: 0.8rem; }

.hud-feed {
  background: var(--bg-2); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px; overflow: hidden;
}
.hud-title {
  position: absolute; z-index: 3; left: 12px; top: 12px;
  background: rgba(10,16,24,0.82); border-radius: 10px; padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.1); max-width: 70%;
}
.hud-title.compact { position: absolute; left: 10px; top: 10px; }
.hud-title strong { display: block; font-size: 0.78rem; letter-spacing: 0.04em; }
.hud-title span { display: block; color: var(--muted); font-size: 0.7rem; }
.hud-stage { position: relative; min-height: 340px; }
.hud-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.65rem 1rem; font-size: 0.82rem; background: #0a121c;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--bad); box-shadow: 0 0 8px var(--bad); margin-right: 0.35rem;
  animation: pulse 1.4s infinite;
}
@keyframes pulse { 50% { opacity: 0.45; } }
.score b { color: var(--ok); }

.bbox {
  position: absolute; z-index: 2; border: 2px solid var(--ok); border-radius: 4px;
  pointer-events: none;
}
.bbox.ok { border-color: var(--ok); box-shadow: 0 0 0 1px rgba(52,211,153,0.25); }
.bbox.bad { border-color: var(--bad); box-shadow: 0 0 0 1px rgba(248,113,113,0.3); }
.bbox span {
  position: absolute; left: 0; top: -1.35rem; white-space: nowrap;
  font-size: 0.68rem; font-weight: 700; padding: 0.1rem 0.35rem; border-radius: 3px;
  background: rgba(6,12,18,0.9); color: var(--ok);
}
.bbox.bad span { color: var(--bad); }

.section-head { max-width: 1100px; margin: 0 auto 1.4rem; padding: 0 1.5rem; }
.section-head h2 { margin: 0 0 0.35rem; font-size: clamp(1.4rem, 3vw, 2rem); }

.demo-section, .features, .how, .compare, .faq, .cta { padding: 2.6rem 0; }
.demo-panel {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 1rem;
}
.demo-feed, .dash-feed {
  position: relative; min-height: 360px; border-radius: 16px; overflow: hidden;
  background: #0a121c; border: 1px solid rgba(255,255,255,0.08);
}
.alert-rail {
  background: var(--panel); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 1rem 1.1rem;
}
.alert-rail ul { list-style: none; margin: 0; padding: 0; }
.alert-rail li {
  border-bottom: 1px solid rgba(255,255,255,0.06); padding: 0.7rem 0; font-size: 0.88rem;
}
.alert-rail .tag-ok { color: var(--ok); }
.alert-rail .tag-bad { color: var(--bad); }

.feature-grid {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
.feature-grid article {
  background: var(--bg-2); border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius); padding: 1.2rem;
}
.feature-grid h3 { margin: 0 0 0.4rem; color: var(--ok); font-size: 1.05rem; }
.feature-grid p { margin: 0; color: var(--muted); }

.steps {
  max-width: 900px; margin: 0 auto; padding: 0 1.5rem; list-style: none; counter-reset: step;
}
.steps li {
  counter-increment: step; position: relative; padding: 1rem 1rem 1rem 3.2rem;
  margin-bottom: 0.6rem; background: var(--bg-2); border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}
.steps li::before {
  content: counter(step); position: absolute; left: 0.9rem; top: 1rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--ok); color: #062016; font-weight: 700; font-size: 0.85rem;
  display: grid; place-items: center;
}
.steps strong { display: block; }
.steps span { color: var(--muted); font-size: 0.9rem; }

.table-wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
th { color: var(--muted); font-weight: 600; }
tbody tr:hover { background: rgba(255,255,255,0.03); }

.faq-list { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
.faq-item {
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
  margin-bottom: 0.6rem; background: var(--bg-2); overflow: hidden;
}
.faq-item button {
  width: 100%; text-align: left; background: none; border: 0; color: var(--text);
  padding: 0.95rem 1.1rem; font: inherit; cursor: pointer; font-weight: 600;
}
.faq-item .ans { display: none; padding: 0 1.1rem 1rem; color: var(--muted); }
.faq-item.open .ans { display: block; }

.cta {
  text-align: center; max-width: 720px; margin: 0 auto; padding: 3rem 1.5rem;
}
.cta h2 { margin-top: 0; }

.footer {
  border-top: 1px solid rgba(255,255,255,0.06); padding: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; color: var(--muted); font-size: 0.85rem;
}
.footer.compact { justify-content: space-between; }
.footer-links { display: flex; gap: 1rem; }
.footer strong { display: block; color: var(--text); }

/* Dashboard */
.dash-body { background: #05080c; }
.dash-layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 1rem;
  max-width: 1280px; margin: 0 auto; padding: 1rem 1.2rem 2rem;
}
.dash-side {
  background: var(--panel); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 1rem; height: fit-content; position: sticky; top: 70px;
}
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0.8rem 0 1rem; }
.kpi-grid div {
  background: #0a121c; border-radius: 10px; padding: 0.65rem;
  border: 1px solid rgba(255,255,255,0.06);
}
.kpi-grid span { display: block; color: var(--muted); font-size: 0.72rem; }
.kpi-grid strong { font-size: 1.2rem; color: var(--ok); }
.zone-list { list-style: none; padding: 0; margin: 0; }
.zone-list li {
  display: flex; justify-content: space-between; padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.88rem;
}
.dash-feed-wrap { margin-bottom: 1.2rem; }
.feed-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0.2rem; font-size: 0.85rem; color: var(--muted);
}
.staff-table-wrap, .incidents {
  background: var(--bg-2); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; padding: 1rem; margin-bottom: 1rem;
}
.staff-table { font-size: 0.85rem; }
.pill {
  display: inline-block; padding: 0.1rem 0.45rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
}
.pill.ok { background: rgba(52,211,153,0.15); color: var(--ok); }
.pill.bad { background: rgba(248,113,113,0.15); color: var(--bad); }
.incidents ul { list-style: none; padding: 0; margin: 0; }
.incidents li { padding: 0.55rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.88rem; }

@media (max-width: 900px) {
  .hero, .demo-panel, .feature-grid, .dash-layout { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; right: 1rem; top: 58px; background: #0e1620; padding: 1rem; border-radius: 12px; border: 1px solid #243447; }
  .dash-side { position: static; }
}
