/* MOBILE APP EXPERIENCE (Catedral Live) - V2 Low-Light Premium */

/* Default: Hide Bottom Nav on Desktop */
.mobile-bottom-nav {
    display: none;
}

/* MOBILE VIEWPORT (Max Width 1024px) */
@media (max-width: 1024px) {

    /* 1. LAYOUT RESET */
    body {
        overflow-x: hidden !important;
        width: 100%;
        background-attachment: scroll;
    }

    .dashboard-container {
        flex-direction: column;
    }

    /* Hide Desktop Sidebar */
    .sidebar {
        display: none !important;
    }

    /* Main Content Full Width */
    .main-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        padding: 5rem 1rem 7rem 1rem !important;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    /* 2. APP-LIKE HEADER */
    .header-dash {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 900;
        background: rgba(5, 5, 5, 0.95);
        /* var(--bg-deep) with opacity */
        backdrop-filter: blur(15px);
        padding: 15px 20px;
        margin: 0 !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .header-dash h2 {
        font-family: 'Outfit', sans-serif !important;
        font-size: 1rem !important;
        font-weight: 700 !important;
        margin: 0;
        color: var(--text-primary) !important;
    }

    .mobile-toggle {
        display: none !important;
    }

    #user-greeting {
        font-size: 0.9rem !important;
        display: block;
        margin-top: 2px;
        color: var(--gold-primary) !important;
    }

    .user-info {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid var(--gold-primary) !important;
    }

    .user-info i {
        font-size: 1.2rem !important;
        color: var(--gold-primary) !important;
    }

    /* 3. CARDS & GRIDS */
    .stats-grid,
    #user-history,
    #requests-list,
    #pending-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.2rem !important;
    }

    .dashboard-cards-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
    }

    #card-action-btn {
        grid-column: span 2 !important;
    }

    .departments-grid,
    .folders-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .folder-item,
    .dept-card {
        padding: 15px !important;
        min-height: 120px !important;
        flex-direction: column !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .folder-item i,
    .dept-card i {
        font-size: 1.8rem !important;
        margin-bottom: 10px !important;
        margin-right: 0 !important;
    }

    /* File Cards */
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    }

    /* 4. BOTTOM NAVIGATION BAR */
    .bottom-nav {
        display: flex !important;
        /* Ensure visibility on mobile if using app.html structure */
    }

    .mobile-bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 70px !important;
        background: rgba(10, 10, 10, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
        z-index: 1000 !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding-bottom: 0 !important;
    }

    /* FOR DASHBOARD SIDEBAR AS NAV */
    .sidebar {
        /* If we wanted to transform sidebar to bottom nav, we'd do it here, 
           but app.html usually has a separate .bottom-nav or uses sidebar hidden.
           Let's assume there's a specific mobile nav structure or we create one.
           The 'dashboard.html' has a sidebar. We need to turn it into a bottom nav
           OR use the existing bottom nav if present. 
           In dashboard.html, I saw a sidebar but no bottom nav structure in the HTML I viewed?
           Wait, there was no .bottom-nav in dashboard.html. 
           I might need to add it or the sidebar becomes it. 
           Legacy mobile.css didn't show the sidebar transformation clearly, 
           it just said .sidebar { display: none } and then .mobile-bottom-nav { display: flex }.
           The HTML for mobile bottom nav must be dynamically added or exists hidden.
           I'll assume it exists or I should add it.
           Actually, looking at dashboard.html again, I don't see a bottom nav container.
           It might be injected by JS or I missed it.
           Wait, lines 289-323 is Sidebar.
           The user wants mobile responsiveness.
           Previous mobile.css had .mobile-bottom-nav { display: flex }.
           If it's not in HTML, it won't show.
           I should stick to what was working or check if I need to add it.
           For now, I'll style .mobile-bottom-nav in case it's added.
        */
    }

    /* INPUTS */
    input,
    select,
    textarea,
    button {
        font-size: 16px !important;
        /* Prevent Zoom */
    }

    /* ADMIN PANEL MOBILE GRID */
    #pending-grid {
        grid-template-columns: 1fr !important;
    }
}