/* ==========================================================================
   UNIVERSAL ERP - MASTER STYLESHEET (site.css)
   ========================================================================== */

/* ── 1. CORE THEME VARIABLES ── */
:root {
    color-scheme: light;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --app-bg: #f8f9fc;
    --app-text: #1a1a1a;
    /* Structural Surfaces */
    --card-bg: #ffffff;
    --card-text: #374151;
    --border-color: #e3e8ef;
    --border-light: #f0f2f5;
    --footer-bg: #fafbfc;
    --text-muted: #6b7280;
    /* Sidebar & Topbar */
    --sidebar-bg: #ffffff;
    --sidebar-text: #4b5563;
    --sidebar-hover-bg: #f3f4f6;
    --sidebar-hover-text: #111827;
    --sidebar-active-bg: rgba(10, 140, 76, 0.1);
    --sidebar-active-color: #0a8c4c;
    --topbar-bg: #ffffff;
    --topbar-text: #374151;
    /* Brand & Accent Colors */
    --primary-color: #0a8c4c;
    --primary-hover: #08733e;
    --primary-gradient: linear-gradient(135deg, #43cea2, #185a9d);
    --danger-red: #e74c3c;
    --danger-light: #fdf2f2;
    --warning-border: rgba(231, 76, 60, 0.15);
    /* Gradients */
    --grad-primary: linear-gradient(135deg, #43cea2, #185a9d);
    --grad-secondary: linear-gradient(135deg, #2193b0, #1d976c);
    --grad-fab: linear-gradient(135deg, #2193b0, #6dd5ed);
    /* Form Controls */
    --input-bg: #ffffff;
    --input-text: #1f2937;
    --input-border: #cbd5e1;
    /* Layout Dimensions */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --topbar-height: 70px;
    --transition-speed: 0.3s;
    --border-radius: 14px;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
}

/* ── DARK MODE OVERRIDES ── */
[data-bs-theme="dark"], [data-theme="dark"], body.dark-mode, html.dark {
    color-scheme: dark !important;
    --app-bg: #12131c;
    --app-text: #f1f5f9;
    /* Structural Surfaces */
    --card-bg: #1e1e2d;
    --card-text: #f1f5f9;
    --border-color: #323248;
    --border-light: #2b2b40;
    --footer-bg: #151521;
    --text-muted: #94a3b8;
    /* Sidebar & Topbar */
    --sidebar-bg: #1e1e2d;
    --sidebar-text: #a1a5b7;
    --sidebar-hover-bg: #2b2b40;
    --sidebar-hover-text: #ffffff;
    --sidebar-active-bg: rgba(56, 189, 248, 0.15);
    --sidebar-active-color: #38bdf8;
    --topbar-bg: #1e1e2d;
    --topbar-text: #e2e8f0;
    /* Brand & Accent Colors */
    --primary-color: #38bdf8;
    --primary-hover: #0284c7;
    --primary-gradient: linear-gradient(135deg, #0284c7, #0369a1);
    --danger-light: rgba(231, 76, 60, 0.2);
    --warning-border: rgba(231, 76, 60, 0.3);
    /* Form Controls */
    --input-bg: #151521;
    --input-text: #f8fafc;
    --input-border: #383852;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.25);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
}

/* ── 2. GLOBAL RESET & BASE ── */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--app-bg) !important;
    color: var(--app-text) !important;
    margin: 0;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb,
[data-theme="dark"] ::-webkit-scrollbar-thumb,
body.dark-mode ::-webkit-scrollbar-thumb {
    background: #323248;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ── 3. FORM CONTROLS & DROPDOWNS ── */
.form-control, .form-select {
    font-size: 13px;
    border-radius: 9px;
    border: 1px solid var(--input-border) !important;
    background-color: var(--input-bg) !important;
    color: var(--input-text) !important;
    padding: 8px 14px;
    min-height: 42px;
    height: 42px;
    transition: all 0.2s ease;
}

.form-select {
    padding-right: 36px !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 14px 10px !important;
    cursor: pointer;
}

[data-bs-theme="dark"] .form-select,
[data-theme="dark"] .form-select,
body.dark-mode .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

.form-select option {
    background-color: var(--card-bg) !important;
    color: var(--card-text) !important;
    padding: 10px 14px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(10, 140, 76, 0.15);
    outline: none;
    background-color: var(--input-bg) !important;
    color: var(--input-text) !important;
}

.form-control:read-only {
    background-color: var(--footer-bg) !important;
    color: var(--text-muted) !important;
}

.input-group {
    border-radius: 9px;
    overflow: hidden;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    display: flex;
    align-items: stretch;
    min-height: 42px;
}

.input-group-text {
    background-color: var(--footer-bg) !important;
    color: var(--text-muted) !important;
    border: none !important;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group .form-control,
.input-group .form-select {
    border: none !important;
    box-shadow: none !important;
    border-left: 1px solid var(--border-color) !important;
    padding-left: 14px !important;
}

/* ── 4. BULLETPROOF HIGH-CONTRAST CHECKBOXES & RADIOS ── */

/* A. Base Unchecked State */
.form-check-input,
.form-check-input[type="checkbox"],
.claim-checkbox,
input[type="checkbox"].form-check-input {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    background-color: #ffffff !important;
    border: 2px solid #000000 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
    background-image: none !important;
    transition: all 0.15s ease-in-out !important;
}

    .form-check-input[type="radio"] {
        border-radius: 50% !important;
    }

    /* B. Checked Checkbox State (Black Box with White Checkmark) */
    .form-check-input:checked,
    .form-check-input[type="checkbox"]:checked,
    .claim-checkbox:checked,
    input[type="checkbox"].form-check-input:checked {
        background-color: #6b7280 !important;
        border-color: #6b7280 !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.8' d='M3.5 8.5l3 3 6.5-6.5'/%3e%3c/svg%3e") !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-size: 75% 75% !important;

    }

    /* C. Checked Radio State */
    .form-check-input[type="radio"]:checked {
        background-color: #000000 !important;
        border-color: #000000 !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2.2' fill='%23ffffff'/%3e%3c/svg%3e") !important;
        background-size: 100% 100% !important;
    }

    /* D. Focus Outline */
    .form-check-input:focus,
    .claim-checkbox:focus {
        outline: none !important;
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2) !important;
    }

/* E. Dark Mode Overrides */
[data-bs-theme="dark"] .form-check-input:not(:checked),
[data-bs-theme="dark"] .claim-checkbox:not(:checked),
body.dark-mode .form-check-input:not(:checked),
body.dark-mode .claim-checkbox:not(:checked) {
    background-color: #1e1e2d !important;
    border: 2px solid #ffffff !important;
}

[data-bs-theme="dark"] .form-check-input:checked,
[data-bs-theme="dark"] .claim-checkbox:checked,
body.dark-mode .form-check-input:checked,
body.dark-mode .claim-checkbox:checked {
    background-color: #000000 !important;
    border-color: #ffffff !important;
}

/* F. Switches */
.form-switch .form-check-input {
    width: 2.25em !important;
    height: 1.25em !important;
    border-radius: 2em !important;
    border: 1.5px solid var(--border-color) !important;
    background-color: var(--input-bg) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2394a3b8'/%3e%3c/svg%3e") !important;
    background-position: left center !important;
}

    .form-switch .form-check-input:checked {
        background-position: right center !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e") !important;
        background-color: var(--primary-color) !important;
        border-color: var(--primary-color) !important;
    }

.form-check-label {
    color: var(--card-text) !important;
    cursor: pointer;
    font-size: 13px;
    margin-left: 8px !important;
}

/* ── 5. APP SHELL LAYOUT ── */
.app-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
}

.app-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    transition: width var(--transition-speed) ease, transform var(--transition-speed) ease, background-color var(--transition-speed);
    z-index: 1040;
}

.sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-size: 20px;
    font-weight: 700;
    color: var(--sidebar-text);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
}

    .sidebar-brand i {
        margin-right: 10px;
        font-size: 24px;
        color: var(--primary-color);
    }

.sidebar-nav-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 14px;
    scrollbar-width: thin;
}

    .sidebar-nav-scroll .nav-item {
        margin-bottom: 4px;
    }

    .sidebar-nav-scroll .nav-link {
        display: flex;
        align-items: center;
        padding: 10px 14px;
        color: var(--sidebar-text);
        border-radius: 8px;
        font-weight: 500;
        font-size: 14px;
        transition: all 0.2s;
        white-space: nowrap;
    }

        .sidebar-nav-scroll .nav-link i {
            width: 24px;
            font-size: 16px;
            text-align: center;
            margin-right: 10px;
        }

        .sidebar-nav-scroll .nav-link.active {
            background-color: var(--sidebar-active-bg);
            color: var(--sidebar-active-color);
        }

        .sidebar-nav-scroll .nav-link:hover {
            background-color: var(--sidebar-hover-bg);
            color: var(--sidebar-hover-text);
        }

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding: 12px 14px;
    flex-shrink: 0;
    background-color: var(--sidebar-bg);
    margin-top: auto;
    width: 100%;
}

.user-card {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    gap: 12px;
    color: var(--sidebar-text);
    transition: 0.2s;
}

    .user-card:hover {
        background-color: var(--sidebar-hover-bg);
        color: var(--sidebar-hover-text);
    }

.user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--sidebar-text);
}

.user-status {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #10B981;
}

/* Topbar */
.app-topbar {
    height: var(--topbar-height);
    background-color: var(--topbar-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1030;
    transition: background-color var(--transition-speed);
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-toggle-sidebar {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--topbar-text);
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: 0.2s;
}

    .btn-toggle-sidebar:hover {
        background-color: var(--sidebar-hover-bg);
    }

.topbar-icon-btn, .theme-toggle-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--topbar-text);
    position: relative;
    cursor: pointer;
    transition: 0.2s;
}

    .topbar-icon-btn:hover, .theme-toggle-btn:hover {
        background: var(--sidebar-hover-bg);
        border-color: var(--primary-color);
    }

.badge-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #ef4444;
    border: 2px solid var(--topbar-bg);
    border-radius: 50%;
}

.profile-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--topbar-text);
    font-weight: 500;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: 0.2s;
}

    .profile-dropdown-toggle:hover {
        background-color: var(--sidebar-hover-bg);
    }

.profile-img {
    height: 38px;
    width: 38px;
    object-fit: cover;
    border: 2px solid var(--border-color);
    background-color: var(--card-bg);
    border-radius: 50%;
    padding: 2px;
    box-shadow: var(--shadow-sm);
}

.dropdown-menu-modern {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: 12px;
    padding: 8px 0;
    margin-top: 10px !important;
}

    .dropdown-menu-modern .dropdown-item {
        padding: 8px 20px;
        font-size: 14px;
        font-weight: 500;
        color: var(--card-text);
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .dropdown-menu-modern .dropdown-item i {
            color: var(--text-muted);
            font-size: 16px;
            width: 18px;
            text-align: center;
        }

        .dropdown-menu-modern .dropdown-item:hover {
            background-color: var(--sidebar-hover-bg);
            color: var(--primary-color);
        }

.dropdown-header-user {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

    .dropdown-header-user .name {
        font-weight: 700;
        color: var(--card-text);
        font-size: 15px;
    }

/* ── 6. DASHBOARD COMPONENTS & CARDS ── */
.dashboard-wrapper {
    padding-bottom: 40px;
}

.dashboard-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--app-text);
    margin-bottom: 4px;
}

.dashboard-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 0;
}

.warning-card {
    background-color: var(--danger-light);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border: 1px solid var(--warning-border);
}

.warning-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--danger-red);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.warning-text {
    font-size: 13px;
    color: var(--card-text);
    margin-bottom: 0;
    line-height: 1.5;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

    .stat-box:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--card-text);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.stat-box.attendance .stat-icon, .icon-green {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.stat-box.classes .stat-icon, .icon-blue {
    background: rgba(33, 150, 243, 0.15);
    color: #2196f3;
}

.stat-box.assignments .stat-icon, .icon-yellow {
    background: rgba(255, 179, 0, 0.15);
    color: #ffb300;
}

.stat-box.level .stat-icon, .icon-purple {
    background: rgba(156, 39, 176, 0.15);
    color: #9c27b0;
}

.icon-red {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
}

.icon-dark {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.list-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    transition: transform 0.2s ease;
    text-decoration: none;
}

    .list-card:hover {
        transform: translateY(-2px);
    }

.list-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.list-content {
    flex: 1;
}

.list-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

    .list-title-wrap h3 {
        font-size: 16px;
        font-weight: 700;
        margin: 0;
        color: var(--card-text);
    }

.cert-text {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.badge-soft {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.badge-paid {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.badge-pending {
    background: rgba(255, 179, 0, 0.15);
    color: #f7971e;
}

.badge-danger {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
}

.badge-neutral {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.dash-tabs-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

    .dash-tabs-bar::-webkit-scrollbar {
        display: none;
    }

.dash-tab-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 800;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    font-size: 12px;
}

    .dash-tab-btn:hover {
        background: var(--footer-bg);
        color: var(--app-text);
    }

    .dash-tab-btn.active {
        background: var(--primary-color);
        border-color: var(--primary-color);
        color: #ffffff;
    }

.section-panel {
    display: none;
}

    .section-panel.active {
        display: block;
        animation: fadeIn 0.3s;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dash-chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.chart-card-header {
    font-weight: 700;
    color: var(--card-text);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1050;
}

/* ── WhatsApp Floating Action Button ── */
.fab-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #ffffff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    z-index: 1050;
}

    .fab-btn:hover {
        background: linear-gradient(135deg, #28e06c, #0e7063);
        transform: translateY(-5px) scale(1.08);
        box-shadow: 0 8px 22px rgba(37, 211, 102, 0.5);
        color: #ffffff !important;
    }

    .fab-btn:active {
        transform: scale(0.95);
    }

/* Mobile viewport adjustment to prevent overlap with bottom navigation */
@media (max-width: 768px) {
    .fab-btn {
        bottom: 85px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

.fab-income {
    background: linear-gradient(135deg, #10b981, #059669);
}

.fab-expense {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.bottom-nav2 {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: var(--topbar-bg);
    box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 10px 15px calc(10px + env(safe-area-inset-bottom)) 15px;
    gap: 20px;
    z-index: 1050 !important;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--border-color);
}

    .bottom-nav2::-webkit-scrollbar {
        display: none;
    }

.nav-item2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 11px;
    gap: 4px;
    min-width: 55px;
    transition: 0.2s;
}

    .nav-item2 i {
        font-size: 20px;
    }

    .nav-item2.active {
        color: var(--primary-color);
        font-weight: 600;
    }

/* ── 7. RESPONSIVE BREAKPOINTS ── */
@media (min-width: 992px) {
    .bottom-nav2 {
        display: none !important;
    }

    body.sidebar-collapsed .app-sidebar {
        width: var(--sidebar-collapsed-width);
    }

    body.sidebar-collapsed .sidebar-brand {
        justify-content: center;
        padding: 0;
    }

        body.sidebar-collapsed .sidebar-brand i {
            margin-right: 0;
            font-size: 26px;
        }

        body.sidebar-collapsed .sidebar-brand .nav-text,
        body.sidebar-collapsed .sidebar-nav-scroll .nav-text,
        body.sidebar-collapsed .nav-section-title,
        body.sidebar-collapsed .user-details {
            display: none;
        }

    body.sidebar-collapsed .sidebar-nav-scroll .nav-link {
        justify-content: center;
        padding: 12px 0;
    }

        body.sidebar-collapsed .sidebar-nav-scroll .nav-link i {
            margin-right: 0;
            font-size: 18px;
        }
}

@media (max-width: 991px) {
    .dash-chart-row {
        grid-template-columns: 1fr;
    }

    .dash-tabs-bar {
        display: none !important;
    }

    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
    }

        .app-sidebar.show {
            transform: translateX(0);
            box-shadow: 4px 0 24px rgba(0,0,0,0.1);
        }

    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.4);
        z-index: 1035;
        display: none;
        opacity: 0;
        transition: opacity var(--transition-speed);
    }

        .sidebar-backdrop.show {
            display: block;
            opacity: 1;
        }
}

@media (max-width: 768px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body {
        padding-bottom: 90px !important;
    }

    .fab-container {
        bottom: 85px;
        right: 20px;
    }
}

@media (max-width: 520px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
}
