/* Base Responsive Styles */
@media (max-width: 768px) {
    /* General Layout */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Header */
    .app-header {
        padding: 8px 10px !important;
        border-radius: 0 0 12px 12px !important;
    }
    
    /* Mega Menu */
    #logoutDropdown {
        position: fixed !important;
        top: 60px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Stats Carousel */
    .stats-carousel-container {
        margin: 0 auto 15px !important;
        padding: 0 5px;
    }
    
    .stat-card-slide {
        width: 100% !important;
        padding: 0 5px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 15px;
        border-radius: 12px !important;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    /* Forms */
    .form-control, .form-select {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    /* Tables */
    .table-responsive {
        margin-bottom: 15px;
    }
    
    /* Bottom Navigation */
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        padding: 5px 0;
    }
    
    .bottom-nav .nav-item {
        font-size: 11px;
    }
    
    .bottom-nav .nav-item i {
        font-size: 18px !important;
        margin-bottom: 2px;
    }
    
    /* Adjust content padding for bottom nav */
    body {
        padding-bottom: 60px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    /* Adjust font sizes */
    h1 { font-size: 22px !important; }
    h2 { font-size: 20px !important; }
    h3 { font-size: 18px !important; }
    h4 { font-size: 16px !important; }
    
    /* Adjust padding and margins */
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    /* Make buttons full width on small screens */
    .btn-block-mobile {
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }
    
    /* Adjust form elements */
    .form-group {
        margin-bottom: 12px;
    }
    
    /* Adjust card padding */
    .card-body {
        padding: 12px;
    }
    
    /* Adjust bottom nav icons */
    .bottom-nav .nav-item {
        font-size: 10px;
    }
    
    .bottom-nav .nav-item i {
        font-size: 16px !important;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    /* Further reduce font sizes */
    html {
        font-size: 14px;
    }
    
    /* Adjust padding */
    .container {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    /* Make sure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Tablet and Desktop Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    /* Adjust grid layout */
    .row {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    .col-md-4, .col-md-6, .col-lg-3, .col-lg-4 {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Print Styles */
@media print {
    .no-print, .bottom-nav, .app-header {
        display: none !important;
    }
    
    body {
        padding: 0;
        background: white;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
}
