:root{
  --bg:#0b1220; --card:#0f1a33; --muted:#90a4c1; --text:#e7eefc; --brand:#26d07c;
  --warn:#fbbf24; --bad:#fb7185; --ok:#34d399; --line:rgba(255,255,255,.08);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(38,208,124,.25), transparent 55%),
              radial-gradient(900px 500px at 110% 0%, rgba(99,102,241,.18), transparent 55%),
              var(--bg);
  color:var(--text);
}
a{color:inherit; text-decoration:none}
.container{max-width:1100px;margin:0 auto;padding:18px}
.topbar{
  position:sticky; top:0; z-index:50;
  background: rgba(11,18,32,.75);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.nav{
  display:flex; align-items:center; gap:14px; justify-content:space-between;
}
.brand{
  display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:.2px;
}
.brand-badge{
  width:34px;height:34px;border-radius:12px;
  background: linear-gradient(135deg, rgba(38,208,124,.95), rgba(99,102,241,.9));
  box-shadow: var(--shadow);
  display:grid;place-items:center;font-weight:900
}
.navlinks{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.chip{
  padding:9px 12px; border:1px solid var(--line); border-radius:999px;
  color:var(--text); background: rgba(255,255,255,.03);
  display:inline-flex; align-items:center; gap:8px;
}
.chip:hover{background: rgba(255,255,255,.06)}
.btn{
  border:0; cursor:pointer; font-weight:700;
  padding:10px 14px; border-radius:12px;
  background: linear-gradient(135deg, rgba(38,208,124,.95), rgba(99,102,241,.9));
  color:#06101f; box-shadow: var(--shadow);
}
.btn.secondary{
  background: rgba(255,255,255,.04);
  border:1px solid var(--line);
  color:var(--text);
  box-shadow:none;
}
.btn.danger{
  background: rgba(251,113,133,.15);
  border:1px solid rgba(251,113,133,.35);
  color:var(--text);
  box-shadow:none;
}
.grid{display:grid; gap:14px}
.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:900px){.grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.grid.two,.grid.three{grid-template-columns:1fr} .container{padding:14px}}
.card{
  background: rgba(15,26,51,.72);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card .p{padding:16px}
.h1{font-size:34px; line-height:1.12; margin:0 0 10px}
.h2{font-size:20px;margin:0 0 10px}
.muted{color:var(--muted)}
.row{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.hr{height:1px;background:var(--line);margin:14px 0}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:999px; font-weight:800;
  background: rgba(255,255,255,.05); border:1px solid var(--line);
}
.badge.ok{border-color:rgba(52,211,153,.35); background:rgba(52,211,153,.12)}
.badge.warn{border-color:rgba(251,191,36,.35); background:rgba(251,191,36,.12)}
.badge.bad{border-color:rgba(251,113,133,.35); background:rgba(251,113,133,.12)}
.kpi{
  padding:14px; border-radius:14px; border:1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.kpi .v{font-size:22px; font-weight:900}
.kpi .l{font-size:12px; color:var(--muted); font-weight:800; letter-spacing:.4px; text-transform:uppercase}
.table{width:100%; border-collapse:separate; border-spacing:0}
.table th,.table td{padding:10px 10px; border-bottom:1px solid var(--line); vertical-align:top}
.table th{color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.4px; text-align:left}
.table tr:hover td{background: rgba(255,255,255,.03)}
.input, select, textarea{
  width:100%; padding:10px 12px; border-radius:12px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline:none;
}
textarea{min-height:90px; resize:vertical}
.formgrid{display:grid; gap:12px; grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:620px){.formgrid{grid-template-columns:1fr}}
.footer{padding:22px 0;color:var(--muted); font-size:13px}
.notice{
  border:1px dashed rgba(38,208,124,.35);
  background: rgba(38,208,124,.08);
  padding:12px 14px; border-radius:14px;
}
.alert{
  border:1px solid rgba(251,191,36,.35);
  background: rgba(251,191,36,.08);
  padding:12px 14px; border-radius:14px;
}
.err{
  border:1px solid rgba(251,113,133,.35);
  background: rgba(251,113,133,.08);
  padding:12px 14px; border-radius:14px;
}
.small{font-size:13px}
.right{margin-left:auto}
img.thumb{width:100%; height:140px; object-fit:cover; border-bottom:1px solid var(--line)}
