:root {
    --bg: #05060a;
    --panel: rgba(10, 13, 19, 0.94);
    --panel-soft: rgba(19, 23, 33, 0.88);
    --line: rgba(255, 255, 255, 0.09);
    --text: #f6f8ff;
    --muted: #9da5ba;
    --primary: #ff233f;
    --secondary: #1f6bff;
    --success: #00ff9d;
    --danger: #ff233f;
    --warning: #ffd166;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--text); font-family: Inter, Segoe UI, Arial, sans-serif; background: radial-gradient(circle at 8% 10%, rgba(255,35,63,.19), transparent 28%), radial-gradient(circle at 82% 20%, rgba(31,107,255,.15), transparent 32%), var(--bg); }
button, input, select { font: inherit; }
button, .login-btn, .logout { border: 0; color: var(--text); background: linear-gradient(120deg, var(--primary), var(--secondary)); font-weight: 900; cursor: pointer; text-decoration: none; }
.hidden { display: none !important; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(520px, 100%); padding: 42px; background: rgba(8, 10, 16, .88); border: 1px solid rgba(31,107,255,.45); border-left: 3px solid var(--primary); text-align: center; box-shadow: 0 28px 80px rgba(0,0,0,.45); }
.login-card h1 { margin: 10px 0; font-size: 38px; }
.login-btn { display: inline-block; margin-top: 24px; padding: 14px 24px; }
.shell { width: min(1600px, calc(100vw - 28px)); height: calc(100vh - 28px); margin: 14px auto; display: grid; grid-template-columns: 270px 1fr; border: 1px solid rgba(31,107,255,.5); border-left-color: rgba(255,35,63,.7); background: rgba(0,0,0,.42); overflow: hidden; }
.rail { padding: 22px; background: rgba(5, 8, 14, .91); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.brand-mark { width: 50px; height: 50px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--secondary)); font-weight: 1000; }
.brand-mark.large { width: 72px; height: 72px; margin: 0 auto; font-size: 24px; }
.brand h1 { margin: 0; font-size: 23px; }.brand p { margin: 2px 0 0; color: var(--muted); }
.nav, .logout { text-align: left; padding: 14px 16px; background: rgba(255,255,255,.08); clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%); }
.nav.active { background: linear-gradient(120deg, var(--primary), var(--secondary)); }
.logout { margin-top: auto; display: block; }
.content { padding: 24px; overflow: hidden; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.topbar h2 { margin: 0; font-size: 30px; }.eyebrow { margin: 0 0 4px; text-transform: uppercase; color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .08em; }.muted { color: var(--muted); }
.user-chip { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.06); padding: 8px 12px; border: 1px solid var(--line); }
.user-chip img { width: 32px; height: 32px; object-fit: cover; background: rgba(255,255,255,.1); }
.view { display: none; overflow: auto; padding-top: 22px; scrollbar-width: none; }.view::-webkit-scrollbar { display: none; }.view.active { display: block; }
.server-row { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }.server-row label { color: var(--muted); font-weight: 800; } select, input { background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text); padding: 12px; outline: none; } option { color: #111; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }.stat, .panel { background: var(--panel); border: 1px solid rgba(31,107,255,.34); border-left: 2px solid var(--primary); padding: 18px; }.stat span, .license-box span { color: var(--muted); display: block; margin-bottom: 8px; }.stat strong { font-size: 24px; overflow-wrap: anywhere; }.stat.accent strong { color: var(--success); }
.panel { margin-top: 18px; }.panel.full { height: calc(100vh - 160px); display: flex; flex-direction: column; }.panel h3 { margin: 0 0 14px; }.panel-head { display: flex; gap: 14px; justify-content: space-between; align-items: center; }.panel-head input { max-width: 360px; width: 100%; } #refresh, #saveModules { padding: 12px 16px; }
.module-grid, .controls-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }.module, .control-card, .event { background: var(--panel-soft); border: 1px solid var(--line); border-left: 3px solid var(--secondary); padding: 14px; }.module.off, .control-card.off { border-left-color: var(--danger); opacity: .78; }.module h4, .control-card h4 { margin: 0 0 8px; }.module p, .event-meta { color: var(--muted); font-size: 13px; }.state { display: inline-block; margin-top: 10px; font-weight: 1000; color: var(--success); }.off .state { color: var(--danger); }
.control-card { display: grid; gap: 10px; }.toggle-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; }.toggle-line input { width: 20px; height: 20px; accent-color: var(--primary); }.control-card select { width: 100%; }
.event-list { display: grid; gap: 10px; overflow: auto; scrollbar-width: none; }.event-list::-webkit-scrollbar { display:none; }.event-list.empty { color: var(--muted); }.event.danger { border-left-color: var(--danger); }.event.warning { border-left-color: var(--warning); }.event-top { display: flex; justify-content: space-between; gap: 10px; font-weight: 1000; }.badge { color: var(--success); background: rgba(0,255,157,.1); padding: 3px 8px; }
.license-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }.license-box div { background: rgba(255,255,255,.055); padding: 16px; border: 1px solid var(--line); }.license-box strong { overflow-wrap: anywhere; }
.status-line { min-height: 20px; color: var(--success); }
@media (max-width: 1100px) { .stats, .module-grid, .controls-grid, .license-box { grid-template-columns: 1fr; } .shell { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - 28px); } }.create-row { display: grid; grid-template-columns: 1fr 1fr 180px; gap: 12px; margin: 10px 0 14px; }
#createServerTop { padding: 12px 16px; background: rgba(255,255,255,.08); border: 1px solid var(--line); }
#setupSnippet { width: 100%; min-height: 260px; margin-top: 16px; resize: none; background: rgba(0,0,0,.32); border: 1px solid var(--line); color: var(--text); padding: 14px; font-family: Consolas, monospace; }
@media (max-width: 900px) { .create-row { grid-template-columns: 1fr; } }