*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#080810;--s1:#0e0e1a;--s2:#14141f;--s3:#1c1c2a;
  --border:rgba(255,255,255,0.06);--border2:rgba(255,255,255,0.12);
  --accent:#6c63ff;--accent2:#4f46e5;--glow:rgba(108,99,255,0.15);
  --green:#22c97a;--green-bg:rgba(34,201,122,0.1);--green-border:rgba(34,201,122,0.2);
  --red:#f05c5c;--red-bg:rgba(240,92,92,0.1);--red-border:rgba(240,92,92,0.2);
  --amber:#f0a535;--amber-bg:rgba(240,165,53,0.1);--amber-border:rgba(240,165,53,0.2);
  --blue:#38bdf8;--blue-bg:rgba(56,189,248,0.1);--blue-border:rgba(56,189,248,0.2);
  --text:#e2e2f0;--text2:#8888a8;--text3:#44445a;
  --mono:'Space Mono',monospace;--sans:'DM Sans',sans-serif;
  --r:10px;--r2:14px;
}
html,body{height:100%}
body{font-family:var(--sans);background:var(--bg);color:var(--text);font-size:13px;line-height:1.5;overflow-x:hidden}
.page{display:none}
.page.active{display:flex}
.hidden{display:none!important}
#app{flex-direction:row;min-height:100vh;width:100%}
#sidebar{width:220px;min-height:100vh;background:var(--s1);border-right:1px solid var(--border);display:flex;flex-direction:column;flex-shrink:0;position:sticky;top:0;height:100vh}
.sidebar-logo{display:flex;align-items:center;gap:10px;padding:1.2rem 1rem;border-bottom:1px solid var(--border)}
.sidebar-title{font-size:13px;font-weight:600;color:var(--text)}
.sidebar-sub{font-size:10px;color:var(--text3);font-family:var(--mono)}
.sidebar-nav{flex:1;padding:0.75rem 0.5rem;display:flex;flex-direction:column;gap:2px}
.nav-item{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:var(--r);color:var(--text2);cursor:pointer;text-decoration:none;font-size:13px;font-weight:500;transition:all 0.15s;position:relative}
.nav-item:hover{background:var(--s2);color:var(--text)}
.nav-item.active{background:rgba(108,99,255,0.12);color:var(--accent)}
.nav-item svg{flex-shrink:0;opacity:0.7}
.nav-item.active svg{opacity:1}
.nav-badge{margin-left:auto;background:var(--s3);color:var(--text2);font-size:10px;font-family:var(--mono);padding:1px 6px;border-radius:999px;border:1px solid var(--border2)}
.nav-dot{width:7px;height:7px;border-radius:50%;background:var(--green);margin-left:auto;animation:pulse 2s infinite;display:none}
.nav-dot.active{display:block}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.4}}
.sidebar-footer{padding:0.75rem;border-top:1px solid var(--border)}
.server-status{display:flex;align-items:center;gap:8px;padding:6px 8px;margin-bottom:6px}
.status-dot{width:8px;height:8px;border-radius:50%;background:var(--text3);flex-shrink:0;transition:background 0.3s}
.status-dot.ok{background:var(--green)}
.status-dot.error{background:var(--red)}
#server-status-text{font-size:11px;color:var(--text2);font-family:var(--mono)}
.logout-btn{width:100%;padding:8px;background:transparent;border:1px solid var(--border2);border-radius:var(--r);color:var(--text2);cursor:pointer;font-size:12px;font-family:var(--sans);transition:all 0.15s}
.logout-btn:hover{background:var(--red-bg);color:var(--red);border-color:var(--red-border)}
#main-content{flex:1;display:flex;flex-direction:column;min-height:100vh;overflow-x:hidden}
.topbar{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-bottom:1px solid var(--border);background:var(--s1);position:sticky;top:0;z-index:100}
.page-title{font-size:16px;font-weight:600;color:var(--text)}
.topbar-right{display:flex;align-items:center;gap:12px}
.time-display{font-family:var(--mono);font-size:11px;color:var(--text3)}
.notif-btn{position:relative;width:34px;height:34px;background:var(--s2);border:1px solid var(--border2);border-radius:var(--r);display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text2);transition:all 0.15s}
.notif-btn:hover{background:var(--s3);color:var(--text)}
.notif-count{position:absolute;top:-4px;right:-4px;background:var(--red);color:#fff;font-size:9px;font-family:var(--mono);min-width:16px;height:16px;border-radius:999px;display:none;align-items:center;justify-content:center;padding:0 3px}
.notif-count.show{display:flex}
.notif-dropdown{position:absolute;top:60px;right:1.5rem;width:320px;background:var(--s2);border:1px solid var(--border2);border-radius:var(--r2);z-index:200;display:none;overflow:hidden;box-shadow:0 8px 32px rgba(0,0,0,0.5)}
.notif-dropdown.show{display:block}
.notif-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--border);font-size:12px;font-weight:600}
.notif-header button{background:none;border:none;color:var(--text2);cursor:pointer;font-size:11px;font-family:var(--sans)}
.notif-header button:hover{color:var(--red)}
.notif-list{max-height:300px;overflow-y:auto}
.notif-item{padding:10px 14px;border-bottom:1px solid var(--border);display:flex;gap:10px;align-items:flex-start}
.notif-item:last-child{border-bottom:none}
.notif-icon{width:8px;height:8px;border-radius:50%;flex-shrink:0;margin-top:4px}
.notif-icon.warning{background:var(--amber)}
.notif-icon.error,.notif-icon.critical{background:var(--red)}
.notif-icon.info{background:var(--blue)}
.notif-msg{font-size:12px;color:var(--text);flex:1}
.notif-time{font-size:10px;color:var(--text3);font-family:var(--mono);margin-top:2px}
.notif-empty{padding:2rem;text-align:center;color:var(--text3);font-size:12px}
.page-content{padding:1.5rem;flex:1}
.toast{position:fixed;bottom:1.5rem;right:1.5rem;z-index:9999;background:var(--s3);border:1px solid var(--border2);color:var(--text);padding:12px 18px;border-radius:var(--r);font-size:13px;transform:translateY(80px);opacity:0;transition:all 0.3s ease;max-width:300px;pointer-events:none}
.toast.show{transform:translateY(0);opacity:1}
.toast.success{border-color:var(--green-border);color:var(--green)}
.toast.error{border-color:var(--red-border);color:var(--red)}
.toast.warning{border-color:var(--amber-border);color:var(--amber)}
.logo-mark{width:36px;height:36px;border-radius:10px;flex-shrink:0;background:linear-gradient(135deg,var(--accent),#a78bfa);display:flex;align-items:center;justify-content:center;font-family:var(--mono);font-size:14px;font-weight:700;color:#fff}
.logo-mark.sm{width:30px;height:30px;font-size:12px;border-radius:8px}
.spinner{display:inline-block;width:14px;height:14px;border:2px solid var(--border2);border-top-color:var(--accent);border-radius:50%;animation:spin 0.7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
::-webkit-scrollbar{width:4px;height:4px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--s3);border-radius:999px}
