:root{
  --bg:#0b1220;
  --panel:#0c1628;
  --muted:#93a4b7;
  --accent:#22d3ee;
  --warn:#f59e0b;
  --err:#ef4444;
  --ok:#22c55e;
  --border:rgba(255,255,255,.08);
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Inter,system-ui,Segoe UI,Roboto,Arial;
  background:linear-gradient(180deg,#020617,#020617);
  color:#e6f0ff;
}
.wrap{max-width:1100px;margin:36px auto;padding:0 16px}
.title{margin:0}
.mt4{margin-top:4px}.mt6{margin-top:6px}.mt8{margin-top:8px}.mt12{margin-top:12px}.mb8{margin-bottom:8px}.mb16{margin-bottom:16px}
.row{display:flex;gap:8px}.gap6{gap:6px}.gap8{gap:8px}.between{justify-content:space-between}.vcenter{align-items:center}

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

.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
}
.card-title{font-weight:700;margin-bottom:8px}

label{display:block;font-size:13px;color:var(--muted);margin:10px 0 6px}
input,textarea,select,button{font:inherit}
input,textarea,select{
  width:100%;
  background:#020617;
  color:#e6f0ff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px;
}
textarea{min-height:100px;font-family:ui-monospace,monospace}
.input-sm{padding:8px 10px;border-radius:8px}

.btn{
  border:0;
  border-radius:10px;
  padding:10px 12px;
  background:var(--accent);
  color:#042028;
  font-weight:700;
  cursor:pointer;
}
.btn-ghost{background:#111827;color:#e5e7eb}
.btn-warn{background:var(--warn);color:#1b1203}
.btn-sm{padding:8px 10px;border-radius:8px}
.btn-xs{padding:6px 8px;border-radius:8px;font-size:12px}

.status{
  padding:8px 10px;
  border-radius:10px;
  background:#020617;
  border:1px solid var(--border);
  font-size:13px;
  color:#cfe2ff;
  min-height:36px;
}
.status.ok{border-color:rgba(34,197,94,.6)}
.status.warn{border-color:rgba(245,158,11,.7)}
.status.err{border-color:rgba(239,68,68,.7)}

.muted{color:var(--muted)}
.small{font-size:12px}
.bold{font-weight:700}

/* Log list */
.loglist{
  max-height:64vh;
  overflow:auto;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
  background:#020617;
}
.logitem{display:flex;gap:10px;padding:10px;border-bottom:1px solid var(--border)}
.logitem:last-child{border-bottom:0}
.avatar{
  width:36px;height:36px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-weight:700;
}
.user-name-tag{font-weight:700}
.logbody{flex:1;min-width:0}

.badge{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--border);
  background:#0b1b31;
}
.badge-pppoe{background:#111827;border-color:#1f2937}

/* priority badges */
.badge-prio{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  margin-left:6px;
}
.badge-prio-low{background:#0f172a;border:1px solid #38bdf8;color:#bae6fd}
.badge-prio-normal{background:#0f172a;border:1px solid #22c55e;color:#bbf7d0}
.badge-prio-high{background:#451a03;border:1px solid #f97316;color:#fed7aa}
.badge-prio-critical{background:#450a0a;border:1px solid #ef4444;color:#fecaca}

/* meta detail */
.meta{margin-top:8px;border:1px solid var(--border);border-radius:10px;padding:8px;background:#020617}
.meta-head{margin-bottom:6px}
.meta-body.hidden{display:none}
.kv{display:grid;grid-template-columns:140px 1fr;gap:8px;padding:4px 0;border-top:1px dashed var(--border)}
.kv .k{color:#a9bacf}.kv .v{font-family:ui-monospace,monospace}

/* skeleton loading */
.skeleton{position:relative;overflow:hidden;background:#020617;border-radius:8px;margin:6px 0}
.skeleton-line{height:28px}
.skeleton::after{
  content:'';position:absolute;inset:0;transform:translateX(-100%);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.06),transparent);
  animation:shimmer 1.2s infinite;
}
@keyframes shimmer{100%{transform:translateX(100%)}}

/* table (users.html) */
.table{width:100%;border-collapse:collapse;font-size:14px}
.table th,.table td{border-bottom:1px solid var(--border);padding:8px 6px;text-align:left}
.table th{color:var(--muted);font-weight:600}
.pill{padding:3px 8px;border-radius:999px;font-size:11px;border:1px solid var(--border);background:#0b1b31}
.row-actions{display:flex;gap:6px}
