:root { color-scheme: dark; }
* { font-family: 'Inter', system-ui, sans-serif; }
body { background: #1e1f22; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #111214; border-radius: 8px; border: 2px solid #2b2d31; }
::-webkit-scrollbar-track { background: transparent; }

/* Cards */
.card { background: #2b2d31; border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { font-weight: 700; font-size: 15px; }
.card-head p { font-size: 12px; color: #a1a1aa; margin-top: 2px; }
.link { font-size: 12px; color: #949cf7; font-weight: 600; white-space: nowrap; }
.link:hover { color: #c7ccff; }

.stat-label { font-size: 12px; color: #a1a1aa; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 26px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.stat-foot { font-size: 12px; color: #71717a; margin-top: 4px; }
.trend { font-size: 12px; font-weight: 700; background: rgba(255,255,255,.08); padding: 2px 7px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.trend.up { color: #6ee7b7; background: rgba(52,211,153,.12); }
.trend.down { color: #fda4af; background: rgba(251,113,133,.12); }
.livedot { display: inline-block; width: 7px; height: 7px; border-radius: 99px; background: #34d399; margin-right: 5px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Nav */
.nav-btn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; color: #b5bac1; font-weight: 500; }
.nav-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-btn.active { background: #404249; color: #fff; }
.nav-btn em { margin-left: auto; font-style: normal; font-size: 11px; background: rgba(255,255,255,.1); padding: 1px 7px; border-radius: 99px; color: #d4d4d8; }
.nav-btn em.alert { background: #f43f5e; color: #fff; font-weight: 700; }
.nav-btn i.dot { margin-left: auto; width: 8px; height: 8px; border-radius: 99px; background: #34d399; }

/* icons - svg, no emojis */
.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.big { width: 24px; height: 24px; }
.icon-btn { color: #71717a; padding: 6px; border-radius: 8px; }
.icon-btn:hover { color: #fff; background: rgba(255,255,255,.07); }
.dotpulse { display: inline-block; width: 7px; height: 7px; border-radius: 99px; background: currentColor; margin-right: 5px; }

/* Buttons / inputs */
.btn-primary { background: #5865F2; color: #fff; font-weight: 600; font-size: 14px; padding: 8px 16px; border-radius: 9px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.btn-primary:hover { background: #4752c4; }
.btn-secondary { background: #4e5058; color: #fff; font-weight: 500; font-size: 14px; padding: 8px 14px; border-radius: 9px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; justify-content: center; }
.btn-secondary:hover { background: #6d6f78; }
.btn-danger { background: #da373c; color: #fff; font-weight: 600; font-size: 14px; padding: 8px 16px; border-radius: 9px; }
.btn-danger:hover { background: #b52b30; }
.btn-icon { background: #2b2d31; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; }
.btn-mini { background: rgba(255,255,255,.07); padding: 5px 10px; border-radius: 7px; }
.btn-mini:hover { background: rgba(255,255,255,.14); }
.input { background: #1e1f22; border: 1px solid rgba(255,255,255,.07); border-radius: 9px; padding: 9px 12px; font-size: 14px; outline: none; color: #fff; }
.input:focus { border-color: rgba(88,101,242,.7); }
.fld { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #d4d4d8; }
.fld .hint { font-weight: 400; font-size: 12px; color: #71717a; }

.legend { display: inline-flex; align-items: center; gap: 6px; color: #a1a1aa; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pill { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.pill.ok { background: rgba(52,211,153,.14); color: #6ee7b7; }
.pill.warn { background: rgba(251,191,36,.14); color: #fcd34d; }

.tbl { width: 100%; font-size: 14px; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #71717a; font-weight: 700; padding: 10px 16px; background: #232428; }
.tbl td { padding: 11px 16px; border-top: 1px solid rgba(255,255,255,.05); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255,255,255,.02); }

.role-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; background: rgba(255,255,255,.07); padding: 2px 8px; border-radius: 99px; margin: 1px 2px 1px 0; white-space: nowrap; }
.role-badge i { width: 8px; height: 8px; border-radius: 99px; display: inline-block; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #a1a1aa; text-transform: capitalize; }
.status i { width: 9px; height: 9px; border-radius: 99px; }
.st-online i { background: #23a55a; } .st-idle i { background: #f0b232; }
.st-dnd i { background: #f23f43; } .st-offline i { background: #80848e; }

.qa { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border-radius: 12px; background: #1e1f22; border: 1px solid rgba(255,255,255,.06); font-size: 22px; }
.qa span { font-size: 12px; font-weight: 600; color: #d4d4d8; }
.qa:hover { border-color: rgba(88,101,242,.5); background: #232428; }

.viewspace { animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.toggle { position: relative; width: 42px; height: 24px; border-radius: 99px; background: #4e5058; transition: .15s; flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 99px; background: #fff; transition: .15s; }
.toggle.on { background: #23a55a; }
.toggle.on::after { left: 21px; }

.toast { background: #111214; border: 1px solid rgba(255,255,255,.1); border-left: 3px solid #5865F2; border-radius: 10px; padding: 11px 14px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: slidein .2s ease; }
@keyframes slidein { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

canvas#activityChart { width: 100% !important; max-height: 240px; }
