:root{
  --bg:#0b1220;
  --card:#0f172a;
  --card2:#111c33;
  --text:#e6e9f2;
  --muted:#aab2c5;
  --line:rgba(255,255,255,.08);
  --accent:#7c3aed;
  --accent2:#22c55e;
  --warn:#f59e0b;
  --bad:#ef4444;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(124,58,237,.35), transparent 60%),
              radial-gradient(900px 500px at 90% 0%, rgba(34,197,94,.20), transparent 60%),
              var(--bg);
  color:var(--text);
}

.wrap{max-width:980px;margin:0 auto;padding:16px}
.center{min-height:100vh;display:flex;align-items:center;justify-content:center}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.auth{width:min(420px,92vw)}
.brand{display:flex;gap:12px;align-items:center;margin-bottom:14px}
.logo{
  width:44px;height:44px;border-radius:14px;
  background: rgba(124,58,237,.25);
  border:1px solid rgba(124,58,237,.35);
  display:flex;align-items:center;justify-content:center;
  font-weight:900;
}
.title{font-weight:900;font-size:18px}
.subtitle{color:var(--muted);font-size:13px;margin-top:2px}

.form label{display:block;margin:10px 0 6px;color:var(--muted);font-size:13px}
input, select, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  color:var(--text);
  outline:none;
}
textarea{resize:vertical}
input:focus, select:focus, textarea:focus{border-color: rgba(124,58,237,.55)}

.row{display:flex;gap:10px;align-items:center;justify-content:space-between}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (max-width:720px){.grid2{grid-template-columns:1fr}}

.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:12px 14px;border-radius:14px;border:1px solid var(--line);
  text-decoration:none;color:var(--text);
  background: rgba(255,255,255,.06);
  cursor:pointer;
}
.btn.primary{
  width:100%;
  margin-top:12px;
  background: linear-gradient(90deg, rgba(124,58,237,.85), rgba(124,58,237,.55));
  border-color: rgba(124,58,237,.55);
  font-weight:800;
}
.btn.ghost{background:transparent}

.alert{
  margin:10px 0;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(239,68,68,.35);
  background: rgba(239,68,68,.12);
}

.chk{display:flex;gap:10px;align-items:center;margin-top:10px;color:var(--muted)}
.chk input{width:auto}

.topbar{
  position:sticky;top:0;z-index:10;
  background: rgba(11,18,32,.75);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
  padding:12px 14px;
}
.topbar-title{font-weight:900}

.table{display:grid;gap:8px;margin-top:10px}
.trow{
  display:grid;
  grid-template-columns: 84px 60px 60px 70px 70px 70px 90px;
  gap:6px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:16px;
  background: rgba(255,255,255,.04);
}
.thead{
  display:grid;
  grid-template-columns: 84px 60px 60px 70px 70px 70px 90px;
  gap:6px;
  color:var(--muted);
  font-size:12px;
  padding:0 10px;
}
@media (max-width:720px){
  .thead{display:none}
  .trow{grid-template-columns: 1fr 1fr; gap:10px}
  .trow > div{padding:4px 0}
}
.muted{color:var(--muted)}

.pill{
  display:inline-flex;align-items:center;justify-content:center;
  padding:6px 10px;border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  font-size:12px;font-weight:800;
}
.pill.good{border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.10);}
.pill.warn{border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.10);}
.pill.bad{border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.10);}

.mini{padding:10px;border:1px solid var(--line);border-radius:16px;background: rgba(255,255,255,.04);}
.mini .k{font-size:12px;color:var(--muted)}
.mini .v{font-size:18px;font-weight:900;margin-top:2px}

.cardline{border:1px solid var(--line)}

.history7{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.history-day{
  min-width:72px;
  padding:8px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  text-align:center;
  background:rgba(255,255,255,.03);
}

.history-date{
  font-size:12px;
  opacity:.8;
  margin-bottom:6px;
}

.history-pill{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  margin-bottom:6px;
}

.history-pill.good{
  background:#163a24;
  color:#7ee2a8;
}

.history-pill.warn{
  background:#4a3915;
  color:#f6c768;
}

.history-pill.bad{
  background:#4a1f1f;
  color:#ff9a9a;
}

.history-load{
  font-size:12px;
  opacity:.8;
}