:root{
  --bg:#0b1220;
  --panel:#0f1b33;
  --card:#111f3d;
  --card2:#0e1a34;
  --text:#eaf0ff;
  --muted:#9db0d6;
  --line:rgba(255,255,255,.08);
  --brand:#7c3aed;
  --brand2:#22c55e;
  --danger:#ef4444;
  --warning:#f59e0b;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --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(1000px 700px at 20% 10%, rgba(124,58,237,.25), transparent 60%),
              radial-gradient(900px 600px at 90% 20%, rgba(34,197,94,.18), transparent 55%),
              var(--bg);
  color:var(--text);
}

a{color:inherit; text-decoration:none}
.container{
  max-width:1100px;
  margin:0 auto;
  padding:28px 18px 60px;
}

.topbar{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
}
.brand{
  display:flex; gap:10px; align-items:center;
}
.brand .logo{
  width:42px;height:42px;border-radius:12px;
  background: linear-gradient(135deg, rgba(124,58,237,.9), rgba(34,197,94,.7));
  box-shadow: var(--shadow);
}
.brand h1{
  margin:0;
  font-size:18px;
  letter-spacing:.2px;
}
.nav{
  display:flex; gap:10px; flex-wrap:wrap;
}
.chip{
  padding:10px 12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  border-radius:999px;
  color:var(--text);
  font-weight:600;
  display:inline-flex; gap:8px; align-items:center;
}
.chip:hover{background:rgba(255,255,255,.06)}
.chip.danger{border-color: rgba(239,68,68,.35);}

.grid{
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap:16px;
}
@media (max-width: 980px){
  .grid{grid-template-columns:1fr}
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card .hd{
  padding:16px 16px 10px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.card .hd h2{
  margin:0;
  font-size:15px;
  letter-spacing:.2px;
}
.card .bd{padding:16px}

.small{color:var(--muted); font-size:13px; line-height:1.5}
hr.sep{
  border:0; height:1px;
  background: var(--line);
  margin:14px 0;
}

.row{display:flex; gap:12px; flex-wrap:wrap; align-items:center}
.stack{display:flex; flex-direction:column; gap:10px}

label{font-size:13px; color:var(--muted); font-weight:700}
input[type="text"], input[type="password"], input[type="number"], textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--text);
  outline:none;
}
textarea{min-height:110px; resize:vertical}
input:focus, textarea:focus{border-color: rgba(124,58,237,.6); box-shadow: 0 0 0 4px rgba(124,58,237,.15)}

.btn{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color:var(--text);
  font-weight:800;
  cursor:pointer;
  display:inline-flex; gap:10px; align-items:center; justify-content:center;
}
.btn:hover{background:rgba(255,255,255,.08)}
.btn.primary{
  border-color: rgba(124,58,237,.35);
  background: rgba(124,58,237,.2);
}
.btn.primary:hover{background: rgba(124,58,237,.26)}
.btn.green{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.18);
}
.btn.green:hover{background: rgba(34,197,94,.22)}
.btn.red{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.16);
}
.btn.red:hover{background: rgba(239,68,68,.2)}
.btn.full{width:100%}

.flash{
  border:1px solid rgba(34,197,94,.28);
  background: rgba(34,197,94,.12);
  padding:12px 14px;
  border-radius:14px;
  margin:12px 0 16px;
  color:#dbffe6;
  font-weight:700;
}
.flash.warn{
  border-color: rgba(245,158,11,.30);
  background: rgba(245,158,11,.14);
  color:#fff2d6;
}

.mode{
  display:flex; gap:10px; flex-wrap:wrap;
}
.pill{
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  padding:10px 12px;
  border-radius:999px;
  cursor:pointer;
  user-select:none;
  display:flex; gap:10px; align-items:center;
  font-weight:800;
}
.pill input{accent-color: var(--brand);}

.list{
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  max-height:320px;
  overflow:auto;
  background: rgba(255,255,255,.03);
}
.item{
  display:flex; gap:12px; align-items:center;
  padding:12px 12px;
  border-bottom:1px solid var(--line);
}
.item:last-child{border-bottom:0}
.item .meta{display:flex; flex-direction:column; gap:3px}
.item .meta b{font-size:14px}
.item .meta span{font-size:12px; color:var(--muted)}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(255,255,255,.03);
}
.table th, .table td{
  padding:12px 10px;
  border-bottom:1px solid var(--line);
  font-size:13px;
  text-align:left;
}
.table th{color:var(--muted); font-size:12px; letter-spacing:.4px; text-transform:uppercase}
.table tr:last-child td{border-bottom:0}

.badge{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
