:root {
    --sidebar-width: 250px;
    --brand: #3b5bdb;
    --brand-dark: #2b44ad;
    --surface: #f4f6fb;
}

body { background: var(--surface); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* ---------- shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: #1b2340; color: #cfd6ee; display: flex; flex-direction: column; flex-shrink: 0; }
ul.nav.flex-column.sidebar-menu { background: black; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.sidebar.offcanvas-lg { --bs-offcanvas-bg: #1b2340; --bs-offcanvas-color: #cfd6ee; }
.sidebar-brand { display: flex; align-items: center; background: black; padding: 1.1rem 1.25rem; font-weight: 600; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-menu { padding: .75rem .5rem; flex: 1; }
.sidebar-heading { text-transform: uppercase; font-size: .68rem; letter-spacing: .08em; color: #7f8bb3; padding: .9rem .75rem .3rem; }
.sidebar .nav-link { color: #cfd6ee; border-radius: .5rem; padding: .55rem .75rem; font-size: .92rem; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar .nav-link.active { background: var(--brand); color: #fff; }
.sidebar-footer { padding: .9rem 1.25rem; color: #7f8bb3; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-footer.small { background:black; }

.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: .75rem; background: #fff; padding: .7rem 1.25rem; border-bottom: 1px solid #e5e8f0; position: sticky; top: 0; z-index: 1020; }
.content { padding: 1.5rem; flex: 1; }

/* ---------- cards ---------- */
.card { border: 0; box-shadow: 0 1px 3px rgba(20, 30, 70, .08); border-radius: .75rem; }
.card-header { background: transparent; border-bottom: 1px solid #eef0f6; font-weight: 600; }
.stat-card .stat-icon { width: 46px; height: 46px; border-radius: .75rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.stat-card .stat-label { color: #6b7490; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 240px; }

/* ---------- tables ---------- */
.table-report { font-size: .82rem; white-space: nowrap; }
.table-report thead th { background: #f8f9fd; position: sticky; top: 0; font-weight: 600; }
.table-report th a { color: inherit; text-decoration: none; }
.table-wrap { max-height: 70vh; overflow: auto; }
.empty-state { text-align: center; padding: 3rem 1rem; color: #7a8299; }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: .5rem; opacity: .6; }

/* ---------- misc ---------- */
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.6); display: flex; align-items: center; justify-content: center; z-index: 3000; }
.chart-loading { position: absolute; inset: 0; background: rgba(255,255,255,.7); display: flex; align-items: center; justify-content: center; }
.source-badge { font-size: .75rem; }
.guest-body { background: linear-gradient(135deg, #1b2340, #3b5bdb); }
.guest-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.guest-card { width: 100%; max-width: 440px; border-radius: 1rem; }
.guest-logo { font-size: 2.2rem; color: var(--brand); }
.json-block { background: #0f172a; color: #e2e8f0; border-radius: .5rem; padding: 1rem; font-size: .8rem; max-height: 360px; overflow: auto; }
