:root{
  --bg:#070b16;
  --panel:#0c1326;
  --panel2:#0a1020;
  --text:#cfd6e6;
  --muted:#8a93a8;
  --line:rgba(255,255,255,.08);
  --accent:#f5c542;
}

*{box-sizing:border-box}
body.bg{margin:0;background:radial-gradient(1200px 600px at 20% 0%, #0b1530 0%, var(--bg) 55%);color:var(--text);font-family:system-ui, -apple-system, Segoe UI, Roboto, Arial}
.wrap{max-width:1200px;margin:0 auto;padding:18px}
.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.topbar h1{margin:0;font-size:22px}
.actions{display:flex;gap:10px;align-items:center}
.section{margin-top:18px}
.section h2{margin:0 0 10px 0;font-size:16px;color:var(--accent)}
.card{background:linear-gradient(180deg, var(--panel) 0%, var(--panel2) 100%);border:1px solid var(--line);border-radius:12px;padding:12px}
.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* KPI + 4 cards */
  gap: 14px;
  margin-top: 18px;
}

.grid2{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}

.metric .k{color:var(--muted);font-size:12px}
.metric .v{font-size:18px;margin-top:6px}

.table{width:100%;border-collapse:collapse;font-size:12px}
.table th,.table td{border-bottom:1px solid var(--line);padding:8px;text-align:left}
.table th{color:var(--muted);font-weight:600}
.table td{color:var(--text)}
.small{font-size:11px;color:var(--muted)}

.btn{background:#1b2b58;border:1px solid var(--line);color:var(--text);padding:9px 12px;border-radius:10px;cursor:pointer}
.btn:hover{border-color:rgba(255,255,255,.18)}
.btn.secondary{background:#111a35}

.center{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:18px}
.login{width:360px}
.login input{width:100%;padding:10px;border-radius:10px;border:1px solid var(--line);background:#0b1227;color:var(--text);margin:6px 0 12px 0}
.login label{font-size:12px;color:var(--muted)}
.muted{margin-top:10px;color:var(--muted);font-size:12px}
@media(max-width:980px){.grid4{grid-template-columns:repeat(2,1fr)}.grid2{grid-template-columns:1fr}}
/* ---- Dune-style KPI Card (dark glass) ---- */
/* === KPI Card should match metric card size === */
.kpi-card {
  background: linear-gradient(180deg, #0b1220, #070d18);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 16px;
  min-height: 140px;   /* SAME HEIGHT AS OTHER CARDS */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 0 25px rgba(0,0,0,0.35);
}

/* Top row */
.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Title */
.kpi-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
}

/* Icon circle */
.kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,200,255,0.12);
  color: #7dd3fc;
}

/* Today badge pill */
.kpi-badge {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0,255,180,0.12);
  color: #00ffc3;
  font-weight: 600;
  white-space: nowrap;
}

/* Main number */
.kpi-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-top: 8px;
  color: #fff;
}

/* Unit */
.kpi-unit {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.55;
  margin-left: 6px;
}

/* Updated line */
.kpi-sub {
  font-size: 11px;
  opacity: 0.5;
  margin-top: 6px;
  white-space: nowrap;   /* ✅ Prevent wrapping */
}


/* responsive */
@media (max-width: 520px) {
  .kpi-value #regTotalValue { font-size: 26px; }
  .kpi-icon { width: 32px; height: 32px; border-radius: 11px; }
}
.spacer-card{
  visibility:hidden;
  height: 1px;
}
