:root {
    --bg: #0c0a16; --panel: #13101f; --panel-2: #1a1629; --panel-3: #221c36;
    --line: rgba(186, 168, 255, .13); --line-2: rgba(186, 168, 255, .26);
    --accent: #8b5cf6; --accent-hi: #b79cff; --text: #efeafb; --muted: #9d96ba;
    --green: #34d399; --red: #f87171; --amber: #fbbf24;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 "Inter", "Segoe UI", system-ui, sans-serif; }
a { color: var(--accent-hi); text-decoration: none; }
button { font: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.center { text-align: center; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: rgba(19, 16, 31, .92); backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; letter-spacing: .2px; }
.brand b { color: var(--accent-hi); font-weight: 700; }
.top-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-name { overflow: hidden; max-width: 180px; white-space: nowrap; text-overflow: ellipsis; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--panel-3); object-fit: cover; flex: none; }

main { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; }
h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: .2px; }
h2 { margin: 0 0 12px; font-size: 15px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); color: var(--text); font-weight: 600; }
.btn:hover { border-color: var(--accent); }
.btn-primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn-primary:hover { background: #7c4ff0; }
.btn-ghost { background: transparent; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

.login { display: grid; place-items: center; min-height: 65vh; }
.login-card { width: 100%; max-width: 420px; padding: 32px 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); text-align: center; }
.login-card img { margin-bottom: 12px; }
.login-card p { margin: 8px 0 22px; color: var(--muted); }
.login-card .btn { width: 100%; height: 44px; }
.note { margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.error { margin: 0 0 16px; padding: 10px 12px; border: 1px solid rgba(248, 113, 113, .4); border-radius: 10px; background: rgba(248, 113, 113, .08); color: #fecaca; }

.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 18px; }
.server { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); text-align: left; }
.server:hover { border-color: var(--accent); }
.server[disabled] { cursor: default; opacity: .55; }
.server-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--panel-3); font-weight: 700; object-fit: cover; flex: none; }
.server-text { min-width: 0; }
.server-text strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--green); }

.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.rank { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-weight: 600; }
.tab.on { border-bottom-color: var(--accent); color: var(--text); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.kpi small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.kpi strong { display: block; margin-top: 4px; font-size: 24px; }
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); min-width: 0; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bars i { flex: 1; min-height: 3px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--accent-hi), var(--accent)); }
.member { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.member:first-of-type { border-top: 0; }
.member small { display: block; font-size: 12px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.search { width: 100%; max-width: 320px; height: 36px; margin-bottom: 12px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); color: var(--text); font: inherit; }

@media (max-width: 860px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cols { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    main { padding: 20px 16px 48px; }
    .top { padding: 10px 16px; }
    .who-name { display: none; }
}
