/* ================================================================
   KIANIX FOUNDATION — FULL RESPONSIVE SYSTEM
   Covers all breakpoints: 1100px, 1024px, 992px, 768px, 480px, 360px
   ================================================================ */

/* ===== BASE SAFETY ===== */
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe, embed, object { max-width: 100%; height: auto; }
html, body { 
    overflow-x: hidden !important; 
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    -webkit-overflow-scrolling: touch;
}
* { -webkit-tap-highlight-color: rgba(0,0,0,0); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* ===== HAMBURGER TOGGLE ===== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    z-index: 1010;
    flex-shrink: 0;
    position: relative;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.9);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ===== NAV OVERLAY ===== */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    z-index: 997;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.nav-overlay.active { display: block; }

/* ===== NAV CLOSE BUTTON ===== */
.nav-close-btn {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1011;
}
.nav-close-btn:hover { background: rgba(255,255,255,0.2); }

/* ===== FOOTER CLASSES ===== */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 80px;
}
.footer-bottom-bar {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 0.85rem;
}
.footer-email-form { display: flex; gap: 8px; }

/* ===== PAGE HERO SECTIONS (inner pages) ===== */
.page-hero-section { padding: 120px 0; }
.page-hero-section h1 { font-size: 3.5rem; }

/* ================================================================
   1100px — LARGE TABLETS
   ================================================================ */
@media (max-width: 1100px) {
    .container { padding: 0 28px; }
    .category-cards-grid { grid-template-columns: repeat(3, 1fr); }
    .nav-links { gap: 16px; }
}

/* ================================================================
   1024px — TABLETS / SMALL LAPTOPS
   ================================================================ */
@media (max-width: 1024px) {
    .container { padding: 0 24px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 50px; }

    /* IAM section */
    .iam-section { padding: 80px 0 50px; }
    .iam-static-text { font-size: 3.8rem !important; letter-spacing: -2px !important; }
    .iam-item { font-size: 3.8rem !important; letter-spacing: -2px !important;
                line-height: 95px !important; height: 95px; }
    .iam-scroller { height: 95px; }
    @keyframes iam-scroll {
        0%,15%  { transform: translateY(0); }
        20%,35% { transform: translateY(-95px); }
        40%,55% { transform: translateY(-190px); }
        60%,75% { transform: translateY(-285px); }
        80%,95% { transform: translateY(-380px); }
        100%    { transform: translateY(0); }
    }

    /* Grids */
    .work-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .featured-masonry-container { grid-template-columns: 1fr !important; }
    .trust-grid-layout { grid-template-columns: 1fr !important; gap: 40px !important; }
    .stories-grid { grid-template-columns: 1fr 1fr !important; }
    .reach-stats { grid-template-columns: repeat(2, 1fr) !important; max-width: 100% !important; }
    .reach-stat-item h4 { font-size: 2.5rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    /* Sections */
    .section { padding: 80px 0 !important; }
    .section-categories { padding: 80px 0 !important; }
    .reach-section { padding: 80px 0; }

    /* Dashboard */
    .dashboard-layout { grid-template-columns: 1fr; margin-top: 80px; }
    .dashboard-sidebar { display: none; }
    .dashboard-content { padding: 28px; }
}

/* ================================================================
   992px — TABLET / LARGE PHONE
   ================================================================ */
@media (max-width: 992px) {
    .hero-title { font-size: 3rem !important; letter-spacing: -1.5px !important; }
    .category-cards-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 20px; padding: 25px; }
    .stat-item { border-right: none !important; }
    .campaign-grid-premium { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr !important; gap: 30px !important; }
    .auth-card { padding: 40px 32px; }
    .admin-dashboard-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   768px — MOBILE PHONES
   ================================================================ */
@media (max-width: 1024px) {
    .container { padding: 0 15px; }
    .nav-container { 
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 85px;
    }

    .navbar-brand { 
        display: flex !important;
        align-items: center;
        gap: 8px;
        order: 1 !important;
    }
    .navbar-brand img { height: 75px !important; width: auto; }
    .navbar-brand span { color: #1e293b !important; font-size: 2.2rem !important; display: block !important; }

    .nav-actions { 
        display: flex !important;
        align-items: center;
        gap: 8px;
        order: 2 !important;
        margin-left: auto;
        margin-right: 10px;
        z-index: 5;
    }
    
    /* Center button ONLY on small mobile */
    @media (max-width: 576px) {
        .nav-actions {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            margin: 0 !important;
        }
    }
    .nav-actions .btn { padding: 8px 14px; font-size: 0.8rem; white-space: nowrap; }
    .nav-actions .desktop-only { display: none !important; }
    
    .nav-social-icons { border-left: none; padding-left: 0; margin-left: 5px; gap: 4px; }
    .nav-social-icon { width: 30px; height: 30px; font-size: 0.8rem; }

    .nav-toggle { 
        display: flex !important; 
        order: 3 !important;
        width: 44px;
        height: 44px;
        justify-content: center;
        align-items: center;
        margin-left: 5px;
    }
    .nav-toggle span { background: #1e293b !important; }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        z-index: 2000;
        padding: 80px 20px 40px;
        transition: left 0.3s ease;
        box-shadow: 10px 0 40px rgba(0,0,0,0.1);
    }
    .nav-links.open, .nav-links.active { left: 0; }

    .nav-link {
        color: #1e293b !important;
        opacity: 1 !important;
        padding: 13px 10px;
        border-bottom: 1px solid #f1f5f9;
        width: 100%;
        font-size: 0.95rem;
        white-space: normal;
        border-radius: 0;
        background: transparent !important;
    }
    .nav-link:hover { color: var(--primary) !important; background: #f8fafc !important; }

    .nav-dropdown-wrapper { width: 100%; }
    .nav-dropdown-content {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        background: #f8fafc !important;
        border-radius: 12px;
        padding: 4px;
        margin: 4px 10px 10px;
        display: none;
        border: 1px solid #f1f5f9 !important;
    }
    .nav-dropdown-wrapper.open .nav-dropdown-content { display: block; }
    .nav-dropdown-content a {
        color: #475569 !important;
        border-radius: 8px;
        padding: 12px 15px !important;
        font-weight: 600;
        border: none !important;
    }
    .nav-dropdown-content a i {
        color: var(--primary);
        margin-right: 10px;
    }
    .nav-dropdown-content a:hover {
        background: #fff !important;
        color: var(--primary) !important;
        transform: none;
    }



    /* Hide fundraiser btn from top nav on mobile (available in drawer menu) */
    .btn-fundraiser-nav { display: none !important; }

    /* Compact nav-actions on mobile */
    .nav-actions {
        display: flex !important;
        align-items: center;
        gap: 8px !important;
    }
    .nav-actions .btn-primary {
        padding: 8px 14px !important;
        font-size: 0.82rem !important;
        margin-right: 0 !important;
    }
    /* Hide login text link on small screens - use drawer instead */
    .nav-actions > a.nav-link { display: none !important; }

    /* The hamburger MUST always be visible and tappable */
    #navToggle {
        display: flex !important;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        z-index: 1020;
    }


    /* ---- Hero ---- */
    .hero { min-height: 100svh; min-height: 100vh; }
    .hero-content { max-width: 100% !important; text-align: center; }
    .hero-title { font-size: 2.2rem !important; letter-spacing: -1px !important; line-height: 1.15 !important; }
    .hero-subtitle { font-size: 1rem !important; }
    .hero-badge { font-size: 0.75rem !important; padding: 6px 14px !important; }
    .hero-actions {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    .hero-actions .btn { width: 100%; max-width: 280px; justify-content: center; margin: 0 !important; }

    /* ---- Stats Bar ---- */
    .container-overlap { margin-top: 0; }
    .stats-bar {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 20px !important;
        margin-top: -24px;
        border-radius: 20px !important;
    }
    .stat-item { padding: 10px !important; }
    .stat-item h3 { font-size: 1.1rem !important; }
    .stat-item p { font-size: 0.78rem !important; }
    .stat-icon-wrapper { width: 48px !important; height: 48px !important; }

    /* ---- IAM Section ---- */
    .iam-section { padding: 50px 0 30px; }
    .iam-container { gap: 14px; flex-wrap: wrap; }
    .iam-static-text { font-size: 2.6rem !important; letter-spacing: -1px !important; }
    .iam-item { font-size: 2.6rem !important; letter-spacing: -1px !important; line-height: 65px !important; height: 65px; }
    .iam-scroller { height: 65px; }
    @keyframes iam-scroll {
        0%,15%  { transform: translateY(0); }
        20%,35% { transform: translateY(-65px); }
        40%,55% { transform: translateY(-130px); }
        60%,75% { transform: translateY(-195px); }
        80%,95% { transform: translateY(-260px); }
        100%    { transform: translateY(0); }
    }
    .iam-cards-container { flex-direction: column; height: auto !important; gap: 16px; margin-top: 36px; }
    .iam-card { height: 260px; flex: none !important; border-radius: 28px; }
    .iam-card-content { padding: 28px 22px; }
    .iam-card-content h3 { font-size: 1.8rem !important; letter-spacing: -0.5px; white-space: normal; }
    .iam-card-status { top: 18px; right: 18px; font-size: 0.6rem; padding: 6px 12px; }

    /* ---- Sections ---- */
    .section { padding: 50px 0 !important; }
    .section-header h2 { font-size: 1.8rem !important; letter-spacing: -0.5px !important; }
    .section-header p { font-size: 0.95rem !important; }
    .section-categories { padding: 50px 0 !important; }

    /* ---- Category Cards ---- */
    .category-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cat-card { padding: 24px 14px; border-radius: 20px; }
    .cat-icon-box { width: 58px; height: 58px; font-size: 1.4rem; border-radius: 16px; margin-bottom: 14px; }
    .cat-card h3 { font-size: 0.9rem; }

    /* ---- Work Grid ---- */
    .work-grid { grid-template-columns: 1fr !important; gap: 16px; }
    .work-card img { height: 200px; }

    /* ---- Featured Campaigns ---- */
    .featured-masonry-container { grid-template-columns: 1fr !important; }
    .featured-header { flex-direction: column !important; align-items: flex-start !important; gap: 16px; }
    .featured-header > a { align-self: flex-start; }

    /* ---- How It Works ---- */
    .how-it-works-steps { grid-template-columns: 1fr !important; gap: 20px !important; }

    /* ---- Trust Section ---- */
    .trust-grid-layout { grid-template-columns: 1fr !important; gap: 40px !important; }
    .trust-cards-grid { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }
    .trust-mini-stats { flex-direction: column !important; gap: 12px !important; }

    /* ---- Stories Section ---- */
    .stories-grid { grid-template-columns: 1fr !important; gap: 24px !important; }

    /* ---- Reach Section ---- */
    .reach-section { padding: 50px 0; }
    .reach-container { display: block !important; }
    .reach-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px;
        max-width: 100% !important;
    }
    .reach-stat-item { padding: 24px 14px !important; border-radius: 20px; }
    .reach-stat-item h4 { font-size: 2rem !important; }
    .reach-stat-item p { font-size: 0.75rem !important; }
    .reach-pill { display: none; }

    /* ---- Contact Page / Inner Hero ---- */
    .contact-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
    .contact-form-grid { grid-template-columns: 1fr !important; gap: 0 !important; margin-bottom: 0 !important; }
    .contact-form-grid .form-group { margin-bottom: 16px; }
    .page-hero-section { padding: 140px 0 80px !important; border-radius: 0 0 40px 40px !important; }
    .page-hero-section h1 { font-size: 2.2rem !important; }
    .page-hero-section p { font-size: 1rem !important; }

    /* ---- Auth Pages ---- */
    .auth-page { padding: 40px 16px; }
    .auth-card { padding: 28px 20px; border-radius: 20px; }
    .auth-card h1 { font-size: 1.7rem; }

    /* ---- Dashboard ---- */
    .dashboard-layout { grid-template-columns: 1fr; margin-top: 70px; }
    .dashboard-sidebar {
        width: 280px;
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        height: 100dvh;
        z-index: 1100;
        transition: left 0.3s ease;
        padding-top: 80px;
        display: flex !important;
    }
    .dashboard-sidebar.mobile-open { left: 0; box-shadow: 4px 0 30px rgba(0,0,0,0.15); }
    .dashboard-content { padding: 20px 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
    .dash-header h1 { font-size: 1.5rem; }
    .campaign-list-item { grid-template-columns: 1fr !important; gap: 10px !important; }
    .dash-section { padding: 20px 16px; }

    /* ---- Campaign Grid ---- */
    .campaign-grid-premium { grid-template-columns: 1fr !important; }

    /* ---- Announcement Ticker ---- */
    .announcement-ticker { padding: 18px 0; }
    .ticker-container { gap: 12px; }
    .ticker-label { padding: 8px 12px; font-size: 0.65rem; }
    .ticker-more { display: none !important; }

    /* ---- Flash Messages ---- */
    .flash-message { right: 16px; left: 16px; min-width: unset; }

    /* ---- Donation Modal ---- */
    .modal-wrapper { align-items: flex-end !important; }
    .modal-content {
        padding: 28px 20px 32px;
        border-radius: 28px 28px 0 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        position: relative;
    }
    .modal-title { font-size: 1.5rem !important; }
    .donate-input { font-size: 1.8rem !important; }

    /* ---- Admin ---- */
    .admin-sidebar { transform: translateX(-240px); }
    .admin-sidebar.mobile-open { transform: translateX(0); }
    .admin-content { margin-left: 0 !important; }
    .admin-main { padding: 16px !important; }
    .admin-stats-grid { grid-template-columns: 1fr 1fr !important; }
    .form-row { grid-template-columns: 1fr !important; }

    /* ---- Footer ---- */
    .footer-grid { grid-template-columns: 1fr; gap: 32px; margin-bottom: 40px; }
    .footer-bottom-bar {
        flex-direction: column !important;
        gap: 16px;
        text-align: center;
        padding-top: 28px;
    }
    .footer-bottom-bar > div { flex-wrap: wrap; justify-content: center; gap: 16px !important; }
    .footer-email-form { flex-direction: column !important; }
    .footer-email-form input { width: 100%; }
    .footer-premium { padding: 60px 0 32px !important; }

    /* ---- Campaign Detail Page ---- */
    .campaign-hero-bg { padding: 100px 0 40px; border-radius: 0 0 32px 32px; margin-bottom: 32px; }
    .campaign-hero-title { font-size: 1.8rem !important; letter-spacing: -0.5px; }
    .campaign-main-grid, .campaign-story-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
    .campaign-main-image { height: auto !important; aspect-ratio: 16/9; border-radius: 20px; }
    .donation-column { position: relative !important; top: 0 !important; }
    .story-content { font-size: 1rem !important; }
    .social-share { padding: 24px !important; }
    .social-share div { flex-direction: column; }
    .social-share .btn { width: 100%; justify-content: center; }
}

/* ================================================================
   480px — SMALL PHONES
   ================================================================ */
@media (max-width: 480px) {
    .container { padding: 0 14px; }

    /* Navbar brand */
    .navbar-brand { font-size: 1.7rem !important; gap: 10px !important; }
    .navbar-brand img { height: 75px !important; }

    /* Hero */
    .hero-title { font-size: 1.9rem !important; }

    /* Stats bar */
    .stats-bar { padding: 14px !important; gap: 10px !important; }
    .stat-item h3 { font-size: 1rem !important; }

    /* IAM */
    .iam-static-text { font-size: 2rem !important; }
    .iam-item { font-size: 2rem !important; line-height: 52px !important; height: 52px; }
    .iam-scroller { height: 52px; }
    @keyframes iam-scroll {
        0%,15%  { transform: translateY(0); }
        20%,35% { transform: translateY(-52px); }
        40%,55% { transform: translateY(-104px); }
        60%,75% { transform: translateY(-156px); }
        80%,95% { transform: translateY(-208px); }
        100%    { transform: translateY(0); }
    }
    .iam-card { height: 230px; }
    .iam-card-content { padding: 20px 18px; }
    .iam-card-content h3 { font-size: 1.5rem !important; }

    /* Categories */
    .category-cards-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .cat-card { padding: 18px 8px; border-radius: 16px; }
    .cat-icon-box { width: 48px; height: 48px; font-size: 1.2rem; border-radius: 14px; margin-bottom: 10px; }
    .cat-card h3 { font-size: 0.75rem; }

    /* Trust section */
    .trust-cards-grid { grid-template-columns: 1fr !important; }

    /* Admin */
    .admin-stats-grid { grid-template-columns: 1fr !important; }
    .stats-grid { grid-template-columns: 1fr !important; }

    /* Reach stats */
    .reach-stat-item h4 { font-size: 1.6rem !important; }

    /* Dashboard */
    .stats-grid { grid-template-columns: 1fr 1fr !important; }

    /* Section headers */
    .section-header h2 { font-size: 1.6rem !important; }

    /* Auth */
    .auth-card { padding: 22px 16px; }

    /* Contact */
    .contact-info-item { flex-direction: row !important; }
}

/* ================================================================
   360px — EXTRA SMALL (Galaxy S series etc.)
   ================================================================ */
@media (max-width: 360px) {
    .container { padding: 0 12px; }
    .category-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .hero-title { font-size: 1.7rem !important; }
    .nav-links { width: 92%; }
    .stats-bar { grid-template-columns: 1fr 1fr; }
    .navbar-brand { font-size: 1.3rem !important; }
    .navbar-brand img { height: 60px !important; }
}

/* ================================================================
   TOUCH & INTERACTION IMPROVEMENTS
   ================================================================ */
@media (max-width: 768px) {
    .btn { min-height: 44px; }
    .nav-link { min-height: 44px; display: flex !important; align-items: center; }
    .sidebar-link { padding: 16px 18px; }
    .preset-btn { min-height: 48px; font-size: 0.9rem; }
    .admin-action-btn { width: 36px; height: 36px; }
    .form-control { padding: 13px 16px; font-size: 1rem; }
    input, select, textarea { font-size: 16px; } /* Prevent iOS zoom on focus */
}

/* ================================================================
   AUTH PAGES (LOGIN / REGISTER)
   ================================================================ */
.auth-split-layout {
    display: flex;
    min-height: 100vh;
    background: #fff;
    overflow: hidden;
}
.auth-image-side {
    flex: 1;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 60px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.auth-image-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.8) 100%);
}
.auth-image-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 500px;
}
.auth-form-side {
    width: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 100px;
    background: #fff;
    overflow-y: auto;
}
.auth-form-container {
    max-width: 420px;
    width: 100%;
    margin: 40px auto;
}

@media (max-width: 1100px) {
    .auth-form-side { 
        width: 500px; 
        padding: 60px 40px; 
    }
}

@media (max-width: 992px) {
    .auth-split-layout { flex-direction: column; height: auto; min-height: 100vh; overflow-y: auto; }
    .auth-image-side { 
        flex: none; 
        height: 350px; 
        padding: 40px 24px; 
        order: 1;
    }
    .auth-form-side { 
        width: 100% !important; 
        padding: 50px 24px 80px; 
        order: 2;
        min-height: auto;
    }
    .auth-form-container { 
        margin: 0 auto; 
        max-width: 100%;
    }
    .auth-image-content h2 { font-size: 1.8rem !important; }
}

@media (max-width: 480px) {
    .auth-image-side { height: 280px; }
    .auth-image-content h2 { font-size: 1.5rem !important; margin-bottom: 12px !important; }
    .auth-image-content p { font-size: 0.9rem !important; }
    .auth-form-side { padding: 40px 20px 60px; }
}

/* ================================================================
   UTILITY: SHOW/HIDE
   ================================================================ */
.auth-page { padding: 120px 0; }
.mobile-only { display: none !important; }
.desktop-only { display: block; }

@media (max-width: 1024px) {
    .mobile-only { display: block !important; }
    .desktop-only { display: none !important; }
}
/* Tablet Exception: Show socials AND currency in header, exactly like PC */
@media (max-width: 1024px) and (min-width: 576px) {
    .nav-actions .desktop-only,
    .nav-social-icons.desktop-only,
    .nav-actions .currency-switcher.desktop-only { 
        display: inline-flex !important; 
    }
    /* Hide redundant sidebar switcher on tablets */
    .nav-links .currency-switcher.mobile-only {
        display: none !important;
    }
}

/* Mobile Visibility: Hide socials and currency from top header to keep it clean */
@media (max-width: 576px) {
    .nav-social-icons, .currency-switcher.desktop-only { 
        display: none !important; 
    }
}

/* ================================================================
   MOBILE DASHBOARD — BOTTOM NAV BAR
   ================================================================ */
.dash-mobile-topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 300;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 16px;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.dash-mobile-topbar h4 {
    font-size: 1rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    flex: 1;
    text-align: center;
}

.dash-menu-toggle {
    background: #f1f5f9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Bottom tab bar for dashboard on mobile */
.dash-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.dash-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.dash-bottom-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 12px;
    color: #94a3b8;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
    transition: color 0.2s;
}

.dash-bottom-btn i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.dash-bottom-btn.active,
.dash-bottom-btn:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .dash-mobile-topbar { display: flex !important; }
    .dash-bottom-nav { display: block !important; }

    /* Push content up so bottom nav doesn't cover it */
    .dashboard-content {
        padding: 20px 16px 90px !important;
    }

    /* Stats - always 2 cols on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* Stat cards smaller on mobile */
    .stat-card { padding: 20px 16px !important; }
    .stat-value { font-size: 1.4rem !important; }
    .stat-icon { width: 40px !important; height: 40px !important; margin-bottom: 14px !important; }

    /* Tables scroll horizontal */
    .campaigns-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table { min-width: 600px; }

    /* Modal: slide up from bottom on mobile */
    .modal {
        align-items: flex-end !important;
    }
    .modal-box {
        border-radius: 24px 24px 0 0 !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 24px 20px 32px !important;
    }
    .modal-header h3 { font-size: 1.1rem !important; }
    .form-row { grid-template-columns: 1fr !important; gap: 0 !important; }

    /* Dash header */
    .dash-header h1, .dash-header h2 { font-size: 1.5rem !important; }
    .dash-header { margin-bottom: 24px; }

    /* Empty state */
    .empty-state { padding: 40px 20px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr !important; }
    .stat-value { font-size: 1.2rem !important; }
    .stat-label { font-size: 0.75rem !important; }
}
