/* Mobile-Optimized Styles - Performance First */

/* Disable heavy animations on mobile */
@media (max-width: 768px) {
    * {
        -webkit-transform: none !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
    
    /* Remove gradients on mobile for better performance */
    .stat-card.primary,
    .stat-card.success,
    .stat-card.warning,
    .stat-card.info {
        background: #667eea !important;
    }
    
    .stat-card.success {
        background: #28a745 !important;
    }
    
    .stat-card.warning {
        background: #ffc107 !important;
        color: #000 !important;
    }
    
    .stat-card.info {
        background: #17a2b8 !important;
    }
    
    .sidebar {
        background: #667eea !important;
    }
    
    /* Mobile sidebar - collapsible */
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 250px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .mobile-menu-toggle {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 999;
        background: #667eea;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 5px;
        font-size: 20px;
    }
    
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .mobile-overlay.show {
        display: block;
    }
    
    /* Adjust main content for mobile */
    .col-md-10 {
        width: 100% !important;
        padding: 60px 15px 15px !important;
    }
    
    .col-md-2 {
        width: 250px !important;
    }
    
    /* Stat cards - full width on mobile */
    .col-md-3 {
        width: 100% !important;
        margin-bottom: 15px;
    }
    
    .stat-card {
        padding: 15px !important;
        margin-bottom: 10px !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    }
    
    .stat-card h3 {
        font-size: 1.5rem !important;
    }
    
    .stat-card i {
        font-size: 2rem !important;
    }
    
    /* Buttons - larger touch targets */
    .btn {
        min-height: 44px;
        padding: 10px 20px;
        font-size: 16px;
    }
    
    .btn-sm {
        min-height: 38px;
        padding: 8px 15px;
        font-size: 14px;
    }
    
    /* Forms - better mobile input */
    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    textarea.form-control {
        min-height: 100px;
    }
    
    /* Tables - horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 600px;
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 8px;
        white-space: nowrap;
    }
    
    /* Cards */
    .card {
        margin-bottom: 15px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    }
    
    .task-card {
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    }
    
    .task-card:hover {
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    h5 {
        font-size: 1rem;
    }
    
    /* Payment method cards */
    .payment-method {
        padding: 15px !important;
        margin-bottom: 10px;
    }
    
    .payment-method i {
        font-size: 2rem !important;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 10px;
    }
    
    /* Field items in task creation */
    .field-item {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }
    
    /* Wallet card */
    .wallet-card {
        padding: 20px !important;
    }
    
    .wallet-card h1 {
        font-size: 2rem !important;
    }
    
    /* Stat boxes */
    .stat-box {
        padding: 15px !important;
        margin-bottom: 10px;
    }
    
    .stat-box i {
        font-size: 2rem !important;
    }
    
    /* Navigation improvements */
    .nav-link {
        padding: 12px 15px !important;
        font-size: 15px;
    }
    
    /* Remove unnecessary spacing */
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .mt-4 {
        margin-top: 1rem !important;
    }
    
    .p-4 {
        padding: 1rem !important;
    }
    
    /* Flex adjustments */
    .d-flex {
        flex-wrap: wrap;
    }
    
    .justify-content-between {
        justify-content: center !important;
        text-align: center;
    }
    
    /* Alert messages */
    .alert {
        font-size: 14px;
        padding: 10px;
    }
    
    /* Badge adjustments */
    .badge {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .col-md-3 {
        width: 50% !important;
    }
    
    .col-md-6 {
        width: 50% !important;
    }
    
    .stat-card {
        padding: 20px !important;
    }
}

/* Performance optimizations for all devices */
* {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading state */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Touch-friendly links */
a {
    -webkit-touch-callout: none;
}

/* Prevent text selection on buttons */
button {
    -webkit-user-select: none;
    user-select: none;
}
