:root{
  --bg: #070A12;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.09);
  --line: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);
  --accent: #59D4FF;
  --accent2: #7C5CFF;
  --good: #22c55e;
  --bad: #ef4444;
  --warn: #f59e0b;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
  background: radial-gradient(1000px 600px at 15% 15%, rgba(124,92,255,.25), transparent 55%),
              radial-gradient(900px 600px at 85% 30%, rgba(89,212,255,.22), transparent 55%),
              radial-gradient(1100px 700px at 55% 85%, rgba(34,197,94,.10), transparent 60%),
              var(--bg);
}

a{ color:inherit; text-decoration:none; }
.container{ width:min(1120px, 92vw); margin:0 auto; }

.nav{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(14px);
  background: rgba(7,10,18,.60);
  border-bottom: 1px solid var(--line);
}
.navInner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:700; letter-spacing:.2px;
}
.brand img{ width:28px; height:28px; }
.brand span{ opacity:.95; }

.navActions{ display:flex; gap:10px; align-items:center; }

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); }
.btn.primary{
  border: 1px solid rgba(89,212,255,.40);
  background: linear-gradient(135deg, rgba(89,212,255,.20), rgba(124,92,255,.22));
}
.btn.ghost{ background: transparent; }
.btn.small{ padding:8px 10px; border-radius:10px; font-size:13px; }

.hero{
  padding:58px 0 34px;
}
.heroGrid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  align-items:center;
}
.hTitle{
  font-size: clamp(32px, 4.3vw, 54px);
  line-height: 1.03;
  margin:0 0 14px;
  letter-spacing:-.5px;
}
.hSub{
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  margin:0 0 18px;
}
.hCtas{ display:flex; gap:12px; flex-wrap:wrap; margin-top: 10px; }
.kpis{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
  margin-top: 18px;
}
.kpi{
  padding:14px;
  border-radius:16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
}
.kpi .n{ font-weight:800; font-size:18px; }
.kpi .t{ color: var(--muted); font-size:13px; margin-top:4px; }

.panel{
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.panelHead{
  padding: 14px 14px 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing:.18em;
  text-transform: uppercase;
}
.canvasWrap{
  padding: 10px 14px 14px;
}
canvas{
  width:100%;
  height: 320px;
  display:block;
  border-radius: 14px;
  background: radial-gradient(600px 240px at 40% 40%, rgba(89,212,255,.12), transparent 60%),
              radial-gradient(600px 260px at 70% 60%, rgba(124,92,255,.12), transparent 60%),
              rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.08);
}

.section{
  padding: 22px 0 60px;
}
.cards3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card{
  border:1px solid var(--line);
  background: rgba(255,255,255,.05);
  border-radius: 16px;
  padding: 14px;
}
.card .title{ font-weight: 800; font-size: 16px; margin-bottom: 8px; }
.card .muted{ color: var(--muted); font-size: 13px; line-height:1.6; }

.footer{
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 18px 0;
  font-size: 13px;
}

/* dashboard */
.dash{
  padding: 26px 0 60px;
}
.dashGrid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 14px;
  align-items:start;
}
.h2{
  margin:0 0 10px;
  font-size: 18px;
}
.sub{
  color: var(--muted);
  margin: 0 0 14px;
  font-size: 13px;
}
.alertsList{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.alert.card{ padding: 12px; }
.cardTop{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom: 10px;
}
.pill{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}
.pill.score{ color: rgba(255,255,255,.85); }
.pill.status{ color: rgba(255,255,255,.80); }
.pill.sev.low{ border-color: rgba(34,197,94,.25); color: rgba(34,197,94,.85); }
.pill.sev.medium{ border-color: rgba(245,158,11,.25); color: rgba(245,158,11,.92); }
.pill.sev.high{ border-color: rgba(239,68,68,.25); color: rgba(239,68,68,.92); }
.pill.sev.critical{ border-color: rgba(239,68,68,.35); color: rgba(239,68,68,1); }

.titleRow{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:baseline;
}
.titleRow .title{ font-weight:800; font-size:14.5px; }
.titleRow .muted{ color: var(--muted); font-size:12px; }

.meta{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.meta .k{ color: rgba(255,255,255,.78); margin-right:6px; }
.meta.grid2{ grid-template-columns: repeat(2, 1fr); }

.actions{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  margin-top: 12px;
}
.empty{
  border:1px dashed rgba(255,255,255,.16);
  border-radius:16px;
  padding: 16px;
  color: var(--muted);
  background: rgba(255,255,255,.03);
}
.skeleton{
  border: 1px dashed rgba(255,255,255,.14);
  border-radius:16px;
  padding: 14px;
  color: rgba(255,255,255,.55);
}

/* modal */
.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.55);
  z-index:50;
  padding: 18px;
}
.modal.open{ display:flex; }
.modalCard{
  width:min(520px, 96vw);
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(10,12,20,.92);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modalHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 14px 14px 0;
}
.modalTitle{
  font-weight: 800;
  font-size: 16px;
}
.modalClose{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
}
.modalBody{ padding: 14px; }
.field{ display:flex; flex-direction:column; gap:6px; margin-bottom: 12px; }
label{ font-size: 12px; color: var(--muted); }
input{
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--text);
  outline: none;
}
input:focus{
  border-color: rgba(89,212,255,.35);
  box-shadow: 0 0 0 4px rgba(89,212,255,.10);
}
.error{
  color: rgba(239,68,68,.92);
  font-size: 13px;
  margin: 8px 0 0;
}

/* toast */
#toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 12px 14px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(12,14,24,.92);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events:none;
  transition: opacity .16s ease, transform .16s ease;
}
#toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}
#toast[data-type="ok"]{ border-color: rgba(34,197,94,.25); }
#toast[data-type="bad"]{ border-color: rgba(239,68,68,.25); }
#toast[data-type="info"]{ border-color: rgba(89,212,255,.25); }

@media (max-width: 920px){
  .heroGrid{ grid-template-columns: 1fr; }
  .cards3{ grid-template-columns: 1fr; }
  .kpis{ grid-template-columns: 1fr; }
  .dashGrid{ grid-template-columns: 1fr; }
  .meta{ grid-template-columns: 1fr; }
}
