:root, [data-bs-theme="dark"] {
    --bs-body-bg: #0e141b;
    --bs-body-color: #e7edf4;
    --bs-primary: #3c8f7c;
    --bs-primary-rgb: 60, 143, 124;
    --bs-secondary-color: #9aabba;
    --bs-card-bg: #16202a;
    --bs-card-border-color: #243140;
    --bs-border-color: #243140;
    --bs-tertiary-bg: #1c2936;
}

body { font-feature-settings: "ss01"; }

.sidebar {
    width: 240px;
    min-height: 100vh;
    background: #101820;
    border-right: 1px solid var(--bs-border-color);
    position: sticky;
    top: 0;
}

.sidebar .brand {
    color: var(--bs-body-color);
    font-weight: 650;
    text-decoration: none;
    padding: 1.25rem 1rem 0.5rem;
    letter-spacing: 0.01em;
}

.sidebar .nav-section {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1rem 1rem 0.35rem;
}

.sidebar a:not(.brand) {
    color: #d5dee7;
    text-decoration: none;
    padding: 0.55rem 1rem;
    border-left: 3px solid transparent;
}

.sidebar a:not(.brand).active,
.sidebar a:not(.brand):hover {
    background: #1a2833;
    border-left-color: var(--bs-primary);
    color: white;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(14, 20, 27, 0.92);
    border-bottom: 1px solid var(--bs-border-color);
    padding: 0.75rem 1.25rem;
    backdrop-filter: blur(8px);
}

.stat-card { border-top: 3px solid var(--bs-primary); }
.log-card { color: inherit; }
.log-card:hover { border-color: var(--bs-primary); }
.log-view {
    background: #0b1117;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    max-height: 70vh;
    overflow: auto;
    color: #d6e2dc;
    font-size: 0.82rem;
}
.guest-body { min-height: 100vh; background: radial-gradient(circle at top, #1a2c28, #0e141b 45%); }
.guest-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.auth-card { width: min(440px, 100%); background: #16202a; }
.qr-wrap { background: white; display: inline-block; padding: 12px; border-radius: 8px; }
.group-box { max-height: 220px; overflow: auto; }
.site-on { box-shadow: inset 4px 0 0 var(--bs-success); }
.site-off { box-shadow: inset 4px 0 0 #6c757d; }
.site-editor {
    min-height: 28rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    background: #0b1117;
}
.table { --bs-table-bg: transparent; }
