*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:#0b0e14; --surface:#13181f; --border:#1f2733; --border2:#2a3444;
  --accent:#3b82f6; --accent2:#60a5fa; --text:#e8edf5; --muted:#7c8fa6;
  --success:#22c55e; --danger:#ef4444; --warning:#f59e0b; --sidebar:180px;
}
body { font-family:'DM Sans',sans-serif; background:var(--bg); color:var(--text); min-height:100vh; display:flex; }
/* Sidebar */
.sidebar { width:var(--sidebar); background:var(--surface); border-right:1px solid var(--border); display:flex; flex-direction:column; position:fixed; top:0; left:0; bottom:0; z-index:100; }
.sidebar-brand { padding:24px 20px 20px; border-bottom:1px solid var(--border); }
.brand-icon { width:32px; height:32px; background:linear-gradient(135deg,#3b82f6,#1d4ed8); border-radius:8px; display:flex; align-items:center; justify-content:center; font-family:'Syne',sans-serif; font-weight:800; color:#fff; font-size:16px; margin-bottom:10px; box-shadow:0 4px 12px rgba(59,130,246,.35); }
.brand-name { font-family:'Syne',sans-serif; font-size:.85rem; font-weight:700; color:var(--text); line-height:1.3; }
.brand-name span { color:var(--accent); }
.nav { padding:16px 12px; flex:1; }
.nav-label { font-size:.65rem; font-weight:600; color:#3d4f66; letter-spacing:1px; text-transform:uppercase; padding:0 8px; margin-bottom:8px; margin-top:16px; }
.nav-label:first-child { margin-top:0; }
.nav-item { display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:8px; font-size:.855rem; color:var(--muted); cursor:pointer; transition:all .2s; text-decoration:none; margin-bottom:2px; }
.nav-item:hover { background:var(--border); color:var(--text); }
.nav-item.active { background:rgba(59,130,246,.15); color:var(--accent2); }
.nav-item .icon { font-size:16px; width:20px; text-align:center; }
.sidebar-footer { padding:16px 12px; border-top:1px solid var(--border); }
.back-main-btn { display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:8px; font-size:.855rem; color:var(--muted); transition:all .2s; width:100%; text-decoration:none; margin-bottom:4px; }
.back-main-btn:hover { background:var(--border); color:var(--text); }
.logout-btn { display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:8px; font-size:.855rem; color:#ef4444; cursor:pointer; transition:all .2s; width:100%; background:none; border:none; font-family:'DM Sans',sans-serif; }
.logout-btn:hover { background:rgba(239,68,68,.1); }
/* Main */
.main { margin-left:var(--sidebar); flex:1; display:flex; flex-direction:column; min-height:100vh; }
.topbar { background:var(--surface); border-bottom:1px solid var(--border); padding:0 32px; height:60px; display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:50; }
.topbar-title { font-family:'Syne',sans-serif; font-size:1rem; font-weight:700; }
.topbar-right { display:flex; align-items:center; gap:12px; }
.avatar { width:36px; height:36px; border-radius:50%; background:linear-gradient(135deg,#3b82f6,#1d4ed8); display:flex; align-items:center; justify-content:center; font-family:'Syne',sans-serif; font-weight:700; font-size:14px; color:#fff; }
.topbar-username { font-size:.875rem; color:var(--muted); }
.content { padding:32px; flex:1; }
/* Panel */
.panel { background:var(--surface); border:1px solid var(--border2); border-radius:14px; padding:28px; margin-bottom:20px; }
.panel-title { font-family:'Syne',sans-serif; font-size:1rem; font-weight:700; margin-bottom:4px; }
.panel-sub { font-size:.84rem; color:var(--muted); margin-bottom:24px; padding-bottom:16px; border-bottom:1px solid var(--border); }
/* Form */
.field { margin-bottom:18px; }
label { display:block; font-size:.78rem; font-weight:500; color:var(--muted); margin-bottom:7px; letter-spacing:.5px; text-transform:uppercase; }
input[type="text"], input[type="email"], input[type="password"] { width:100%; background:#0e1319; border:1px solid var(--border2); border-radius:10px; padding:11px 14px; font-size:.9rem; color:var(--text); font-family:'DM Sans',sans-serif; outline:none; transition:border-color .2s,box-shadow .2s; }
input:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(59,130,246,.15); }
input::placeholder { color:#3d4f66; }
input:disabled { opacity:.5; cursor:not-allowed; }
.btn { padding:11px 22px; border:none; border-radius:10px; font-family:'Syne',sans-serif; font-size:.88rem; font-weight:700; cursor:pointer; transition:all .2s; }
.btn-primary { background:linear-gradient(135deg,#3b82f6,#1d4ed8); color:#fff; box-shadow:0 4px 14px rgba(59,130,246,.3); }
.btn-primary:hover:not(:disabled) { transform:translateY(-1px); box-shadow:0 6px 20px rgba(59,130,246,.4); }
.btn-primary:disabled { opacity:.5; cursor:not-allowed; transform:none; }
.btn-danger { background:rgba(239,68,68,.12); color:#fca5a5; border:1px solid rgba(239,68,68,.3); }
.btn-danger:hover { background:rgba(239,68,68,.2); }
/* Info row */
.info-row { display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px solid var(--border); font-size:.875rem; }
.info-row:last-child { border-bottom:none; }
.info-key { color:var(--muted); }
.info-val { color:var(--text); font-weight:500; }
/* Badge */
.badge { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:20px; font-size:.75rem; font-weight:600; }
.badge-active { background:rgba(34,197,94,.15); color:#4ade80; border:1px solid rgba(34,197,94,.3); }
/* Message */
.msg { padding:10px 14px; border-radius:8px; font-size:.83rem; margin-bottom:16px; display:none; }
.msg.error   { background:rgba(239,68,68,.12); border:1px solid rgba(239,68,68,.3); color:#fca5a5; display:block; }
.msg.success { background:rgba(34,197,94,.12); border:1px solid rgba(34,197,94,.3); color:#86efac; display:block; }
/* Page header */
.page-header { margin-bottom:28px; }
.page-header h1 { font-family:'Syne',sans-serif; font-size:1.5rem; font-weight:800; margin-bottom:4px; }
.page-header p { font-size:.875rem; color:var(--muted); }
/* Loading overlay */
#loading-overlay { position:fixed; inset:0; background:var(--bg); display:flex; align-items:center; justify-content:center; z-index:9999; flex-direction:column; gap:16px; }
.loading-spinner { width:40px; height:40px; border:3px solid var(--border2); border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.loading-text { color:var(--muted); font-size:.9rem; }
/* Empty state */
.empty-state { text-align:center; padding:60px 20px; color:var(--muted); }
.empty-icon { font-size:48px; margin-bottom:16px; opacity:.5; }
.empty-title { font-family:'Syne',sans-serif; font-size:1rem; font-weight:700; color:var(--text); margin-bottom:8px; }
/* Danger zone */
.danger-zone { border-color:rgba(239,68,68,.3) !important; }
.danger-zone .panel-title { color:#fca5a5; }
/* Grid 2 col */
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
/* Stat dot */
.stat-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; }
.dot-green { background:var(--success); box-shadow:0 0 6px rgba(34,197,94,.5); }
/* Responsive */
@media(max-width:768px) { :root{--sidebar:0px} .sidebar{display:none} .content{padding:20px} .grid-2{grid-template-columns:1fr} }
