:root{
  --bg:#0b0f17;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.09);
  --stroke: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.62);
  --brand:#7c5cff;
  --brand2:#22c55e;
  --danger:#ef4444;
  --shadow: 0 12px 40px rgba(0,0,0,0.45);
  --radius: 16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(1200px 800px at 10% 10%, rgba(124,92,255,0.22), transparent 55%),
    radial-gradient(900px 700px at 90% 15%, rgba(34,197,94,0.16), transparent 55%),
    radial-gradient(1000px 700px at 50% 100%, rgba(255,255,255,0.06), transparent 55%),
    var(--bg);
  color:var(--text);
  overflow:hidden;
}

a{color:inherit}
button{font:inherit}

.app{
  display:grid;
  grid-template-columns: 280px 1fr 420px;
  height:100vh;
}

.sidebar{
  padding:18px;
  border-right:1px solid var(--stroke);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
}

.brand{
  display:flex; align-items:center; gap:12px;
  padding:14px 14px;
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  box-shadow: var(--shadow);
}
.logo{
  width:40px; height:40px; border-radius:12px;
  background: linear-gradient(135deg, rgba(124,92,255,0.9), rgba(34,197,94,0.75));
  box-shadow: 0 10px 24px rgba(124,92,255,0.25);
}
.brand h1{font-size:16px; margin:0}
.brand .sub{font-size:12px; color:var(--muted); margin-top:2px}

.nav{margin-top:16px; display:flex; flex-direction:column; gap:8px}
.navbtn{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 12px;
  border-radius: 14px;
  border:1px solid transparent;
  background: transparent;
  color:var(--text);
  cursor:pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.navbtn:hover{background: rgba(255,255,255,0.06); transform: translateY(-1px)}
.navbtn.active{
  background: rgba(124,92,255,0.18);
  border-color: rgba(124,92,255,0.35);
}
.navbtn span{color:var(--muted); font-size:12px}

.sidebarFooter{
  margin-top:auto;
  padding-top:16px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.userCard{
  padding:12px;
  border-radius: var(--radius);
  border:1px solid var(--stroke);
  background: var(--panel);
}
.userCard .name{font-weight:650}
.userCard .email{color:var(--muted); font-size:12px; margin-top:4px}
.ghost{
  border:1px solid var(--stroke);
  background: transparent;
  color:var(--text);
  padding:10px 12px;
  border-radius: 14px;
  cursor:pointer;
  transition: background .15s ease, transform .12s ease;
}
.ghost:hover{background: rgba(255,255,255,0.06); transform: translateY(-1px)}

.main{
  padding:22px;
  overflow:auto;
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}
.title h2{margin:0; font-size:20px}
.title p{margin:6px 0 0; color:var(--muted); font-size:13px}

.primary{
  background: linear-gradient(135deg, rgba(124,92,255,1), rgba(34,197,94,0.85));
  color:#0b0f17;
  border:0;
  padding:11px 14px;
  border-radius: 14px;
  cursor:pointer;
  font-weight:700;
  box-shadow: 0 12px 30px rgba(124,92,255,0.20);
  transition: transform .12s ease;
}
.primary:hover{transform: translateY(-1px)}
.primary:active{transform: translateY(0px)}

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap:14px;
  padding-bottom: 30px;
}

.card{
  background: var(--panel);
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
  cursor:pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  position:relative;
  overflow:hidden;
}
.card:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
}
.card h3{margin:0 0 8px; font-size:14px}
.card p{margin:0; color:var(--muted); font-size:12px; line-height:1.4}
.badge{
  position:absolute;
  top:12px; right:12px;
  font-size:11px;
  color: rgba(255,255,255,0.75);
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.2);
  padding:4px 8px;
  border-radius:999px;
}

.drawer{
  border-left:1px solid var(--stroke);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
  padding:18px;
  overflow:auto;
}
.drawer .panel{
  background: var(--panel);
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
}
.kv{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}
.chips{display:flex; flex-wrap:wrap; gap:8px}
.chip{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.78);
}

.role{
  padding:10px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  margin-top:10px;
}
.roleHead{display:flex; justify-content:space-between; gap:10px; align-items:baseline}
.roleHead b{font-size:13px}
.pct{font-weight:800; color:rgba(34,197,94,0.9)}
.pct.low{color:rgba(239,68,68,0.9)}
.small{color:var(--muted); font-size:12px; line-height:1.5}

hr{border:0; border-top:1px solid rgba(255,255,255,0.08); margin:14px 0}

.input{
  width:100%;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  padding:11px 12px;
  color:var(--text);
  outline:none;
}
.input:focus{border-color: rgba(124,92,255,0.5)}
.row{display:grid; grid-template-columns: 1fr 1fr; gap:10px}
.btnRow{display:flex; gap:10px; margin-top:10px}
.danger{
  background: rgba(239,68,68,0.15);
  border:1px solid rgba(239,68,68,0.25);
  color: rgba(255,255,255,0.92);
}
.danger:hover{background: rgba(239,68,68,0.20)}

#toasts{
  position: fixed;
  right: 18px;
  top: 18px;
  display:flex;
  flex-direction:column;
  gap:10px;
  z-index: 50;
}
.toast{
  width: 320px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(10,14,22,0.9);
  backdrop-filter: blur(12px);
  padding: 12px 12px;
  box-shadow: var(--shadow);
  animation: toastIn .18s ease both;
}
@keyframes toastIn{
  from{transform: translateY(-6px); opacity:0}
  to{transform: translateY(0); opacity:1}
}
.toast .t{font-weight:750; font-size:13px}
.toast .m{color:var(--muted); font-size:12px; margin-top:4px}

#modal-root{
  position: fixed;
  inset: 0;
  pointer-events:none;
  z-index: 60;
}
.modalOverlay{
  position:absolute; inset:0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:auto;
  animation: fadeIn .14s ease both;
}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.modal{
  width: min(640px, calc(100vw - 36px));
  border-radius: 18px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(12,16,25,0.92);
  box-shadow: var(--shadow);
  padding: 14px;
  animation: pop .14s ease both;
}
@keyframes pop{from{transform: scale(0.98); opacity:0}to{transform: scale(1); opacity:1}}
.modalHead{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding: 6px 6px 10px;
}
.modalHead h3{margin:0; font-size:14px}
.x{
  width: 36px; height:36px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color:var(--text);
  cursor:pointer;
}
.x:hover{background: rgba(255,255,255,0.10)}
.loadingLine{
  margin-top:10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: rgba(255,255,255,0.72);
  font-size:12px;
}
.progress{
  height: 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  overflow:hidden;
  margin-top:10px;
}
.progress > div{
  height:100%;
  width:35%;
  background: linear-gradient(90deg, rgba(124,92,255,1), rgba(34,197,94,0.85));
  animation: prog 1.0s ease-in-out infinite alternate;
}
@keyframes prog{from{transform: translateX(-20%)}to{transform: translateX(160%)}}

.authWrap{
  height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.authCard{
  width:min(860px, 100%);
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap:14px;
}
@media (max-width: 900px){
  .app{grid-template-columns: 1fr}
  .drawer{display:none}
  .authCard{grid-template-columns: 1fr}
}
.bigPanel{
  border-radius: 18px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  padding: 16px;
  box-shadow: var(--shadow);
}
.hero{
  padding:12px;
}
.hero h2{margin:0; font-size:22px}
.hero p{margin:10px 0 0; color:var(--muted); line-height:1.5}
