:root{
  --bg1:#0b1020;
  --bg2:#0a1630;
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.08);
  --stroke:rgba(255,255,255,.10);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.65);
  --accent:#4aa3ff;
  --good:#25d366;
  --bad:#ff4d4d;
}

*{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(900px 500px at 15% 20%, rgba(74,163,255,.25), transparent 60%),
    radial-gradient(900px 500px at 80% 30%, rgba(140,82,255,.22), transparent 60%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
}

a{color:inherit}
button{font:inherit}

.container{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
}

.glass{
  width:min(980px, 100%);
  border:1px solid var(--stroke);
  background:linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border-radius:22px;
  box-shadow:0 20px 80px rgba(0,0,0,.45);
  backdrop-filter: blur(14px);
}

.login{
  padding:28px;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:22px;
}

@media (max-width: 860px){
  .login{grid-template-columns:1fr}
}

.brand{
  display:flex;
  gap:14px;
  align-items:center;
}
.logo{
  width:44px;height:44px;border-radius:14px;
  background:rgba(255,255,255,.10);
  display:flex;align-items:center;justify-content:center;
  border:1px solid var(--stroke);
}
.h1{font-size:28px;font-weight:800;margin:0}
.p{margin:8px 0 0;color:var(--muted);line-height:1.45}

.badge{
  display:inline-flex;
  margin-top:14px;
  padding:8px 12px;
  border:1px solid var(--stroke);
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:var(--muted);
  gap:10px;
  align-items:center;
}

.card{
  border:1px solid var(--stroke);
  background:rgba(0,0,0,.20);
  border-radius:18px;
  padding:18px;
}

.center{
  display:flex;
  flex-direction:column;
  gap:12px;
  justify-content:center;
  min-height:220px;
}

.note{font-size:13px;color:var(--muted);margin-top:10px}
.err{
  padding:10px 12px;
  border:1px solid rgba(255,77,77,.35);
  background:rgba(255,77,77,.10);
  border-radius:14px;
  color:#ffd0d0;
  font-size:13px;
}

/* ===== APP LAYOUT ===== */
.app{
  display:grid;
  grid-template-columns: 260px 1fr;
  min-height:92vh;
}
@media (max-width: 980px){
  .app{grid-template-columns:1fr}
  .side{display:none}
}

.side{
  border-right:1px solid var(--stroke);
  padding:18px;
}
.side .brand{margin-bottom:16px}
.nav{
  display:flex;flex-direction:column;gap:8px;margin-top:10px;
}
.nav button{
  width:100%;
  border:1px solid transparent;
  background:transparent;
  color:var(--muted);
  padding:10px 12px;
  border-radius:14px;
  text-align:left;
  cursor:pointer;
}
.nav button.active{
  background:rgba(74,163,255,.12);
  border-color:rgba(74,163,255,.18);
  color:var(--text);
}
.sideFooter{
  position:sticky;
  bottom:10px;
  margin-top:18px;
  border-top:1px solid var(--stroke);
  padding-top:14px;
  color:var(--muted);
  font-size:13px;
}
.userRow{
  display:flex;gap:10px;align-items:center;margin-top:12px;
}
.avatar{
  width:34px;height:34px;border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.08);
  overflow:hidden;
}
.avatar img{width:100%;height:100%;object-fit:cover}
.smallBtn{
  margin-top:10px;
  width:100%;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:var(--text);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
}

.main{
  padding:18px;
}
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}
.search{
  flex:1;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.04);
  border-radius:14px;
  padding:10px 12px;
  color:var(--text);
}
.pill{
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.04);
  border-radius:999px;
  padding:8px 12px;
  color:var(--muted);
}

.gridCards{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap:12px;
}
@media (max-width:1200px){
  .gridCards{grid-template-columns: repeat(2, minmax(0, 1fr));}
}
.kpi{
  border:1px solid var(--stroke);
  background:rgba(0,0,0,.18);
  border-radius:18px;
  padding:14px;
}
.kpi .t{color:var(--muted);font-size:12px}
.kpi .v{font-size:20px;font-weight:800;margin-top:8px}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--stroke);
  background:rgba(0,0,0,.18);
  border-radius:18px;
}
.table th,.table td{
  padding:12px;
  border-bottom:1px solid rgba(255,255,255,.06);
  font-size:13px;
}
.table th{color:var(--muted);text-align:left;font-weight:700}
.rowBtns{display:flex;gap:8px}
.tag{
  padding:6px 10px;border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.04);
  color:var(--muted);
  font-size:12px;
}
.green{border-color:rgba(37,211,102,.25); background:rgba(37,211,102,.10); color:#b9ffd1}
.red{border-color:rgba(255,77,77,.25); background:rgba(255,77,77,.10); color:#ffd0d0}
