:root {
    --brand: #0d6efd;
}

body {
    background: #f4f6f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Login ---------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}
.login-wrapper { width: 100%; max-width: 380px; padding: 16px; }
.login-card { border-radius: 14px; }

/* ---------- App shell ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar-brand { font-weight: 700; color: var(--brand); text-decoration: none; font-size: 1.05rem; }

.app-body { display: flex; flex: 1; min-height: 0; }

.sidebar {
    width: 230px;
    background: #101828;
    flex-shrink: 0;
    overflow-y: auto;
}
.sidebar .nav-link {
    color: #cbd5e1;
    padding: 10px 16px;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
}
.sidebar .nav-link i { width: 20px; display: inline-block; }
.sidebar .nav-link:hover { background: #1a2333; color: #fff; }
.sidebar .nav-link.active { background: #1a2333; color: #fff; border-left-color: var(--brand); }
.sidebar-divider { border-color: #2a3244; margin: 8px 16px; }

.content { flex: 1; min-width: 0; }

.app-footer { background: #fff; border-top: 1px solid #e5e7eb; }

/* ---------- Dashboard stat cards ---------- */
.stat-card { border-radius: 12px; }
.stat-icon {
    width: 46px; height: 46px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}
.stat-value { font-size: 1.15rem; font-weight: 700; }
.stat-label { font-size: 0.78rem; }

/* ---------- Mobile sidebar ---------- */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -230px;
        top: 56px;
        bottom: 0;
        transition: left .2s ease;
        z-index: 30;
    }
    .sidebar.show { left: 0; }
}
