/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.75rem;
    z-index: 1001;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.mobile-overlay.active {
    display: block;
}

/* Desktop - Hide mobile elements */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }

    .mobile-overlay {
        display: none !important;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {

    /* Show Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex !important;
    }

    /* Sidebar Mobile */
    .sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
    }

    .sidebar.active {
        transform: translateX(0) !important;
    }

    /* Main Content Mobile */
    .main-content {
        margin-left: 0 !important;
        padding: 1rem !important;
        padding-top: 5rem !important;
        /* Space for toggle button */
    }

    /* Dashboard Layout */
    .dashboard-layout {
        flex-direction: column;
    }

    /* Dashboard Main Grids - Force 1 Column */
    .dashboard-main-grid,
    .wallet-grid,
    .settings-grid,
    .quick-stats-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    /* Dashboard Header */
    .dashboard-header {
        margin-top: 0;
        margin-bottom: 1.5rem !important;
        padding-top: 0;
        padding-left: 3rem;
        /* Space for toggle */
    }

    .dashboard-header h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem;
    }

    /* Shop Banners */
    .shop-header-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem !important;
        background-position: center right;
    }

    .shop-balance-card {
        width: 100%;
    }

    /* Account Profile Header */
    .profile-header {
        flex-direction: column;
        align-items: flex-start !important;
        padding: 2rem 1.5rem !important;
        gap: 1rem;
    }

    .profile-info {
        flex-direction: column;
        align-items: center;
        width: 100%;
        text-align: center;
        gap: 1rem;
    }

    .profile-names h1 {
        font-size: 1.5rem;
    }

    /* Virtual Card Mobile */
    .virtual-card {
        padding: 1.5rem;
        min-height: 200px;
    }

    .vc-number {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    /* Pricing & Service Grids */
    .pricing-grid,
    .service-grid-layout {
        grid-template-columns: 1fr !important;
    }

    /* Quick Stats Items */
    .quick-stat-item {
        padding: 0.75rem;
    }

    /* Table Responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .card {
        overflow-x: auto;
        /* Allow tables to scroll in cards */
    }

    .table {
        min-width: 600px;
        /* Force table width to trigger scroll */
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    /* Forms Mobile */
    .form-group {
        margin-bottom: 1rem;
    }

    .form-control {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* Buttons Mobile */
    .btn {
        width: 100%;
        /* Full width buttons on mobile usually better */
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    .quick-actions-panel {
        grid-template-columns: 1fr !important;
    }

    .spec-grid {
        grid-template-columns: 1fr !important;
    }
}