/* Responsiveness & Mobile Styles */

.mobile-nav { display: none; }

/* ─────────────────────────────────────────────
   MOBILE — ≤ 768px
───────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Hide desktop sidebar */
    .app-sidebar { display: none !important; }

    /* Mobile header */
    .app-header {
        padding: 0 16px !important;
        height: 60px !important;
        min-height: 60px !important;
        max-height: 60px !important;
    }

    .header-search { display: none; }
    .header-username { display: none !important; }

    /* Content area */
    .app-content {
        padding: 20px 16px !important;
        padding-bottom: 80px !important;
    }

    /* Mobile Bottom Navigation */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background-color: var(--card, #212327);
        border-top: 1px solid var(--border, rgba(255, 255, 255, 0.06));
        justify-content: space-around;
        align-items: center;
        z-index: 500;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary, #BBCABF);
        font-size: 0.7rem;
        text-decoration: none;
        gap: 2px;
        flex: 1;
        height: 100%;
        transition: color var(--transition-fast);
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-weight: 500;
    }
    .mobile-nav-item:hover,
    .mobile-nav-item.active {
        color: var(--primary, #10B981);
    }

    .mobile-nav-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 22px;
        width: 22px;
    }

    /* Middle "+" Add button */
    .mobile-nav-add {
        position: relative;
        top: -12px;
        background-color: var(--primary, #10B981);
        color: var(--text-on-primary, #003824) !important;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        box-shadow: 0 4px 14px rgba(16,185,129,0.35);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        font-weight: 600;
        transition: background-color var(--transition-fast);
    }
    .mobile-nav-add:hover {
        background-color: var(--primary-hover, #4EDEA3);
    }
}

/* ─────────────────────────────────────────────
   TABLET — 769px to 1024px
───────────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
    .app-sidebar {
        width: 220px !important;
    }

    .app-content {
        padding: 24px 20px !important;
    }
}

/* ─────────────────────────────────────────────
   PREVENT HORIZONTAL SCROLL GLOBALLY
───────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .table-container {
        border-radius: 12px !important;
    }
    .metrics-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    @media (min-width: 576px) {
        .metrics-grid {
            grid-template-columns: repeat(2, 1fr) !important;
        }
    }
    .metric-card {
        padding: 16px !important;
        min-height: 90px !important;
    }
    .metric-card-value {
        font-size: 22px !important;
    }
    .page-heading__actions .btn {
        width: 100%;
        justify-content: center;
    }
}
