/* ============ Portal shell ============ */
.portal-wrapper { display: flex; min-height: 100vh; width: 100%; }
.sidebar {
    width: 250px; flex-shrink: 0;
    background: var(--portal-sidebar-bg, #1b3d1e);
    color: #e2eee2;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    transition: margin-left .25s ease;
}
.sidebar-brand { padding: 1.1rem 1.2rem; font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar-brand small { display: block; font-size: .65rem; font-weight: 400; opacity: .75; }
.sidebar-nav { display: flex; flex-direction: column; padding: .8rem .6rem 2rem; }
.sidebar-nav a {
    color: #cfe0cf; text-decoration: none; padding: .5rem .8rem; border-radius: 8px;
    display: flex; align-items: center; gap: .6rem; font-size: .9rem; margin-bottom: 2px;
    transition: background .15s ease;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.sidebar-nav a i { width: 18px; text-align: center; }
.nav-group-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; opacity: .55; margin: .9rem .8rem .25rem; }

.portal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    display: flex; align-items: center; gap: .8rem;
    padding: .6rem 1rem;
    background: var(--kday-surface);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--kday-surface-border);
    position: sticky; top: 0; z-index: 100;
}
.topbar-search input { min-width: 220px; }
.user-chip { border: 1px solid var(--kday-surface-border); border-radius: 999px; font-size: .88rem; }
.portal-content { padding: 1.4rem; }

/* Sidebar collapse: desktop shrink, mobile drawer */
@media (min-width: 992px) {
    body.sidebar-collapsed .sidebar { margin-left: -250px; }
}
@media (max-width: 991.98px) {
    .sidebar { position: fixed; z-index: 1050; left: 0; margin-left: -260px; box-shadow: 4px 0 24px rgba(0,0,0,.25); }
    body.sidebar-open .sidebar { margin-left: 0; }
}

/* ============ Stat cards ============ */
.stat-card { padding: 1.1rem; text-align: center; position: relative; overflow: hidden; }
.stat-card i { font-size: 1.4rem; margin-bottom: .35rem; }
.stat-card .stat-value { font-size: 1.45rem; font-weight: 700; }
.stat-card .stat-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.stat-green i { color: var(--kday-green-2); }
.stat-gold i { color: var(--kday-gold); }
.stat-brown i { color: var(--kday-brown); }
[data-bs-theme="dark"] .stat-brown i { color: #bcaaa4; }

/* Tables */
.table { --bs-table-bg: transparent; }
