/*
 * Mobile Responsive Styles for User Dashboard & Related Pages
 * Created: December 14, 2025
 * Purpose: Additive mobile-first CSS - Does not modify desktop styles
 * 
 * IMPORTANT: Any styles marked with [DESKTOP_CHANGE] modify desktop appearance
 * and can be removed if needed for rollback
 */

/* ===================================================================
   0. CRITICAL MOBILE FIXES - MUST LOAD FIRST
   =================================================================== */

/* Prevent horizontal scrolling and ensure proper mobile rendering */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    body {
        font-size: 14px !important;
    }
    
    /* Visual indicator that mobile CSS is loaded */
    body::after {
        content: 'Mobile CSS Active (< 768px)';
        position: fixed;
        bottom: 0;
        left: 0;
        background: #28a745;
        color: white;
        padding: 2px 8px;
        font-size: 10px;
        z-index: 99999;
        border-radius: 0 4px 0 0;
        opacity: 0.7;
    }
    
    * {
        box-sizing: border-box !important;
    }
    
    /* Force all wide elements to respect viewport */
    img, iframe, video, embed, object {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* ===================================================================
   1. GENERAL MOBILE IMPROVEMENTS (All User Pages)
   =================================================================== */

/* Better spacing and typography on mobile */
@media (max-width: 768px) {
    /* Reduce heading sizes for mobile readability */
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.35rem !important; }
    h4 { font-size: 1.2rem !important; }
    h5 { font-size: 1.1rem !important; }
    h6 { font-size: 1rem !important; }
    
    /* Reduce card padding for better space utilization */
    .card {
        margin-bottom: 1rem !important;
        border-radius: 8px !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card-header {
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
    }
    
    /* Better button sizing for touch */
    .btn {
        font-size: 0.9rem !important;
        padding: 0.6rem 1rem !important;
        min-height: 44px; /* Apple/Google touch target recommendation */
        position: relative !important;
        z-index: 100 !important; /* Ensure all buttons are clickable */
    }
    
    .btn-sm {
        font-size: 0.85rem !important;
        padding: 0.5rem 0.75rem !important;
        min-height: 38px;
        position: relative !important;
        z-index: 100 !important;
    }
    
    .btn-lg {
        font-size: 1rem !important;
        padding: 0.75rem 1.25rem !important;
        position: relative !important;
        z-index: 100 !important;
    }
    
    /* Ensure all links are clickable */
    a {
        position: relative !important;
        z-index: 50 !important;
    }
    
    /* Container spacing adjustments */
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .container {
        max-width: 100% !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    .row {
        margin-left: -0.5rem !important;
        margin-right: -0.5rem !important;
    }
    
    .col, [class*="col-"] {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* Alert adjustments for mobile */
    .alert {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .alert h4 {
        font-size: 1.1rem !important;
    }
    
    .alert .d-flex {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .alert .fs-3 {
        margin-bottom: 0.75rem !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 576px) {
    /* Extra small screens - even more compact */
    .card-body {
        padding: 0.75rem !important;
    }
    
    h4.mb-3 {
        margin-bottom: 1rem !important;
    }
}

/* ===================================================================
   2. NAVIGATION & SIDEBAR IMPROVEMENTS
   =================================================================== */

@media (max-width: 768px) {
    /* CRITICAL: Force main content to full width on mobile */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px !important;
        position: relative !important;
        z-index: 1 !important; /* Ensure main content is above background but below modals */
        padding-top: 80px !important; /* Make room for mobile header + spacing */
    }
    
    /* MOBILE HEADER REDESIGN - Professional Layout */
    .content-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        z-index: 1040 !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        border-bottom: 1px solid #e0e0e0 !important;
    }
    
    .content-header .d-flex {
        position: relative !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 10px !important;
        margin: 0 !important;
        border: none !important;
        height: 60px !important;
        width: 100% !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Hide page title on mobile - we'll show logo instead */
    .content-header h1.h2 {
        display: none !important;
        order: 2 !important;
    }
    
    /* Mobile header logo (center) - shown on mobile */
    .mobile-header-logo {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        z-index: 1041 !important;
        pointer-events: none !important;
        max-width: 50% !important;
        padding: 0 !important;
    }
    
    .mobile-logo-img {
        height: 26px !important;
        width: auto !important;
        display: block !important;
        flex-shrink: 0 !important;
    }
    
    .mobile-site-name {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        color: #333 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex-shrink: 1 !important;
        max-width: calc(100% - 34px) !important;
    }
    
    /* Page title hidden on mobile */
    .content-header h1.h2 {
        display: none !important;
    }
    
    /* Position mobile toggle in header area */
    .mobile-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: absolute !important;
        left: 10px !important;
        top: 10px !important;
        z-index: 1050 !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        color: #667eea !important;
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }
    
    .mobile-toggle:hover {
        background: #f0f0f0 !important;
    }
    
    /* User toolbar on right - simple flex layout */
    .content-header .btn-toolbar {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        position: absolute !important;
        right: 10px !important;
        top: 10px !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 1050 !important;
        height: auto !important;
        flex-shrink: 0 !important;
    }
    
    /* Hide site status badge on mobile - not needed */
    .content-header .btn-group {
        display: none !important;
    }
    
    /* User dropdown - show only avatar */
    .content-header .dropdown button {
        font-size: 0 !important;
        padding: 0 !important;
        border-radius: 50% !important;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        max-width: 38px !important;
        max-height: 38px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 2px solid #667eea !important;
        background: white !important;
        color: #667eea !important;
        flex-shrink: 0 !important;
    }
    
    .content-header .dropdown button i {
        font-size: 1rem !important;
        margin: 0 !important;
        line-height: 1 !important;
    }
    
    .content-header .dropdown {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100% !important;
        position: relative !important;
        z-index: 1051 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .content-header .dropdown button::after {
        display: none !important; /* Hide dropdown arrow */
    }
    
    /* Fix clickability of page headings and top elements */
    .d-sm-flex.align-items-center,
    .page-heading,
    h1, h2, h3, h4, h5, h6 {
        position: relative !important;
        z-index: 10 !important; /* Above sidebar but below mobile toggle */
        margin-top: 15px !important;
        padding-top: 10px !important;
    }
    
    /* Breadcrumb spacing */
    .breadcrumb,
    nav[aria-label="breadcrumb"] {
        margin-top: 15px !important;
        padding-top: 10px !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    /* Ensure all interactive elements in main content are clickable */
    .container-fluid,
    .container {
        position: relative !important;
        z-index: 10 !important;
        padding-top: 15px !important;
    }
    
    .alert {
        position: relative !important;
        z-index: 10 !important;
    }
    
    .card {
        position: relative !important;
        z-index: 10 !important;
    }
    
    .admin-wrapper {
        display: block !important;
    }
    
    /* Add backdrop when sidebar is open */
    body.sidebar-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        backdrop-filter: blur(2px);
    }
    
    /* Improve sidebar on mobile */
    .sidebar {
        box-shadow: 4px 0 20px rgba(0,0,0,0.3) !important;
        width: 250px !important;
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
    }
    
    .sidebar.show {
        transform: translateX(0) !important;
    }
    
    /* Better touch targets for nav links */
    .nav-link {
        padding: 15px 20px !important;
        font-size: 0.95rem !important;
    }
    
    .nav-link i {
        font-size: 1.1rem !important;
    }
    
    /* Show mobile toggle */
    .mobile-toggle {
        display: flex !important;
        z-index: 1050 !important; /* Higher than main content but below modals */
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
    }
    
    /* Ensure sidebar doesn't cover clickable content when hidden */
    .sidebar {
        pointer-events: none !important; /* Disable pointer events when hidden */
    }
    
    .sidebar.show {
        pointer-events: auto !important; /* Re-enable when visible */
    }
    
    /* Fix submenu positioning on mobile - bottom sheet style */
    .submenu {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        bottom: 0 !important;
        min-width: 100% !important;
        max-height: 60vh !important;
        border-radius: 16px 16px 0 0 !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.3) !important;
        transform: translateY(100%);
    }
    
    .nav-item.has-submenu:hover .submenu {
        transform: translateY(0);
    }
    
    /* Mobile toggle button improvements */
    .mobile-toggle {
        width: 44px !important;
        height: 44px !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .mobile-toggle i {
        font-size: 1.2rem !important;
    }
}

/* ===================================================================
   3. DASHBOARD SPECIFIC IMPROVEMENTS
   =================================================================== */

@media (max-width: 992px) {
    /* Tablet - show stats above feed */
    .dashboard-stats-column {
        order: 1 !important;
    }
    
    .dashboard-feed-column {
        order: 2 !important;
    }
    
    /* Disable sticky positioning on tablet/mobile */
    .sticky-top {
        position: relative !important;
        top: 0 !important;
    }
}

@media (max-width: 768px) {
    /* Stats cards - keep 2 columns but make them more compact */
    .dashboard-stats-column .row.g-3 {
        gap: 0.75rem !important;
    }
    
    .dashboard-stats-column .card {
        margin-bottom: 0 !important;
    }
    
    .dashboard-stats-column .card-body {
        padding: 0.75rem !important;
    }
    
    .dashboard-stats-column .fa-2x {
        font-size: 1.5rem !important;
    }
    
    .dashboard-stats-column .card-subtitle {
        font-size: 0.75rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .dashboard-stats-column .card-title {
        font-size: 1.1rem !important;
    }
    
    .dashboard-stats-column .btn-sm {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.6rem !important;
    }
    
    /* Feed items */
    .dashboard-feed-column .card {
        margin-bottom: 1rem !important;
    }
    
    /* Video embeds responsive */
    .ratio.ratio-16x9 {
        margin-top: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    /* Extra small - single column stats [DESKTOP_CHANGE: None] */
    .dashboard-stats-column .col-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .dashboard-stats-column .card-body {
        padding: 1rem !important;
    }
    
    .dashboard-stats-column .fa-2x {
        font-size: 2rem !important;
    }
    
    .dashboard-stats-column .card-title {
        font-size: 1.25rem !important;
    }
}

/* ===================================================================
   4. TABLE RESPONSIVENESS (Earnings, Payments, Withdrawals, etc.)
   =================================================================== */

@media (max-width: 768px) {
    /* Make tables scroll horizontally */
    .table-responsive {
        border: none !important;
        margin-bottom: 1rem !important;
    }
    
    .table {
        font-size: 0.85rem !important;
        margin-bottom: 0 !important;
    }
    
    .table thead th {
        font-size: 0.8rem !important;
        padding: 0.5rem !important;
        white-space: nowrap;
    }
    
    .table tbody td {
        padding: 0.5rem !important;
        vertical-align: middle !important;
    }
    
    /* Badge sizing in tables */
    .table .badge {
        font-size: 0.75rem !important;
        padding: 0.35em 0.5em !important;
    }
    
    /* Action buttons in tables */
    .table .btn-sm {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

/* Alternative: Card-based table layout for very small screens */
@media (max-width: 576px) {
    /* Option to convert tables to stacked cards on very small screens */
    .table-mobile-cards thead {
        display: none !important;
    }
    
    .table-mobile-cards tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        background: white;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .table-mobile-cards tbody td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem !important;
        border: none !important;
        border-bottom: 1px solid #f0f0f0 !important;
        text-align: right !important;
    }
    
    .table-mobile-cards tbody td:last-child {
        border-bottom: none !important;
    }
    
    .table-mobile-cards tbody td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #666;
        text-align: left;
        margin-right: 1rem;
    }
}

/* ===================================================================
   5. MATRIX TREE MOBILE IMPROVEMENTS
   =================================================================== */

@media (max-width: 768px) {
    /* Tree container improvements */
    .tree-pan-zoom-container {
        height: 500px !important; /* Shorter on mobile */
        border-radius: 8px !important;
    }
    
    /* Tree node sizing for mobile */
    .tree li {
        padding: 15px 3px 0 3px !important;
    }
    
    .tree .node {
        font-size: 0.75rem !important;
        padding: 0.5rem !important;
        min-width: 80px !important;
    }
    
    .tree .node-name {
        font-size: 0.7rem !important;
    }
    
    .tree .node-status {
        font-size: 0.65rem !important;
    }
    
    /* Tree controls for mobile */
    .tree-controls {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
    
    .tree-controls .btn {
        flex: 1 1 auto !important;
        min-width: 80px !important;
    }
    
    /* Zoom controls - make them larger for touch */
    .zoom-controls button {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.2rem !important;
    }
}

@media (max-width: 576px) {
    /* Extra small screens */
    .tree-pan-zoom-container {
        height: 400px !important;
    }
    
    .tree .node {
        min-width: 70px !important;
        font-size: 0.7rem !important;
    }
}

/* ===================================================================
   6. FORMS & INPUTS (Registration, Login, Payment Pages)
   =================================================================== */

@media (max-width: 768px) {
    /* Form improvements */
    .form-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .form-control,
    .form-select {
        font-size: 0.95rem !important;
        padding: 0.6rem 0.75rem !important;
        min-height: 44px; /* Touch-friendly */
        position: relative !important;
        z-index: 100 !important; /* Ensure inputs are clickable */
    }
    
    .form-control:focus,
    .form-select:focus {
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
        z-index: 101 !important;
    }
    
    .form-text {
        font-size: 0.85rem !important;
    }
    
    /* Input group adjustments */
    .input-group-text {
        font-size: 0.9rem !important;
        padding: 0.6rem 0.75rem !important;
    }
    
    /* Stack input groups vertically on mobile for referral links */
    .input-group {
        flex-direction: column !important;
    }
    
    .input-group .form-control {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
        border-radius: 0.25rem !important;
    }
    
    .input-group-append {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    .input-group-append .btn {
        width: 100% !important;
        border-radius: 0.25rem !important;
    }
    
    /* Form buttons */
    .form-group .btn,
    .mb-3 .btn {
        width: 100% !important; /* Full-width buttons on mobile */
        margin-bottom: 0.5rem !important;
    }
}

/* ===================================================================
   7. MODALS & POPOVERS
   =================================================================== */

@media (max-width: 768px) {
    /* Modal improvements for mobile */
    .modal-dialog {
        margin: 0.5rem !important;
        max-width: calc(100% - 1rem) !important;
    }
    
    .modal-content {
        border-radius: 12px !important;
    }
    
    .modal-header {
        padding: 1rem !important;
    }
    
    .modal-body {
        padding: 1rem !important;
    }
    
    .modal-footer {
        padding: 1rem !important;
        flex-wrap: wrap !important;
    }
    
    .modal-footer .btn {
        flex: 1 1 100% !important;
        margin: 0.25rem 0 !important;
    }
    
    .modal-title {
        font-size: 1.1rem !important;
    }
}

/* ===================================================================
   8. EARNINGS PAGE SPECIFIC
   =================================================================== */

@media (max-width: 768px) {
    /* Main stats cards */
    .earnings-stats .col-md-4 {
        margin-bottom: 1rem !important;
    }
    
    .earnings-stats .fa-3x {
        font-size: 2rem !important;
    }
    
    .earnings-stats .card-subtitle {
        font-size: 0.85rem !important;
    }
    
    .earnings-stats .card-title {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .earnings-stats .fa-3x {
        font-size: 1.75rem !important;
    }
    
    .earnings-stats .card-title {
        font-size: 1.3rem !important;
    }
}

/* ===================================================================
   9. AUTH PAGES (Login, Registration)
   =================================================================== */

@media (max-width: 768px) {
    /* Navbar fixes for auth pages */
    .navbar {
        padding: 0.5rem 1rem !important;
    }
    
    .navbar-brand {
        font-size: 1.1rem !important;
        gap: 0.5rem !important;
        margin-right: 0 !important;
    }
    
    .navbar-brand img {
        height: 1.5rem !important;
    }
    
    .navbar-brand span {
        font-size: 1rem !important;
    }
    
    .nav-link {
        font-size: 0.9rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Auth card improvements */
    .auth-container {
        padding: 1rem !important;
    }
    
    .auth-card {
        margin: 0 !important;
        border-radius: 12px !important;
    }
    
    .auth-card .card-header {
        padding: 1.25rem 1rem !important;
    }
    
    .auth-card .card-body {
        padding: 1.5rem 1rem !important;
    }
    
    /* Logo sizing */
    .auth-logo {
        max-width: 150px !important;
        margin-bottom: 1rem !important;
    }
    
    /* Social login buttons */
    .social-login-btn {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Auth page content wrapper */
    body.app-public {
        padding-top: 60px !important; /* Account for fixed navbar */
    }
    
    body.app-public .container {
        padding-top: 1rem !important;
    }
    
    /* Auth page text center on mobile */
    body.app-public .text-center h1,
    body.app-public .text-center .h3 {
        font-size: 1.5rem !important;
    }
    
    body.app-public .text-center p {
        font-size: 0.9rem !important;
    }
}

/* ===================================================================
   10. UTILITY CLASSES & HELPERS
   =================================================================== */

@media (max-width: 768px) {
    /* Hide on mobile utility */
    .hide-mobile {
        display: none !important;
    }
    
    /* Show only on mobile */
    .show-mobile {
        display: block !important;
    }
    
    /* Text alignment utilities */
    .text-mobile-center {
        text-align: center !important;
    }
    
    /* Spacing utilities for mobile */
    .mb-mobile-2 {
        margin-bottom: 0.5rem !important;
    }
    
    .mb-mobile-3 {
        margin-bottom: 1rem !important;
    }
    
    .p-mobile-2 {
        padding: 0.5rem !important;
    }
    
    /* Full width on mobile */
    .w-mobile-100 {
        width: 100% !important;
    }
}

/* ===================================================================
   11. IMAGES & MEDIA
   =================================================================== */

@media (max-width: 768px) {
    /* Ensure all images are responsive */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .img-fluid {
        border-radius: 8px !important;
    }
    
    /* Video embeds */
    .ratio {
        border-radius: 8px !important;
        overflow: hidden !important;
    }
}

/* ===================================================================
   12. PAYMENT & WITHDRAWAL PAGES
   =================================================================== */

@media (max-width: 768px) {
    /* Payment amount cards */
    .payment-amount-card {
        margin-bottom: 1rem !important;
    }
    
    .payment-amount-card .form-control {
        font-size: 1.25rem !important;
        text-align: center !important;
    }
    
    /* QR code display */
    .qr-code-container {
        text-align: center !important;
        padding: 1rem !important;
    }
    
    .qr-code-container img {
        max-width: 250px !important;
    }
    
    /* Payment method buttons */
    .payment-method-btn {
        width: 100% !important;
        margin-bottom: 0.75rem !important;
        padding: 1rem !important;
    }
}

/* ===================================================================
   13. PROFILE & SETTINGS PAGES
   =================================================================== */

@media (max-width: 768px) {
    /* Profile page specific fixes */
    .profile-page .card {
        margin-bottom: 1rem !important;
    }
    
    /* Profile header */
    .profile-header {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .profile-avatar {
        margin-bottom: 1rem !important;
    }
    
    /* Site status badge */
    .badge {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem !important;
    }
    
    /* Profile form inputs */
    .form-control[readonly] {
        background-color: #f5f5f5 !important;
        font-size: 0.9rem !important;
    }
    
    /* Settings tabs */
    .nav-tabs {
        flex-direction: column !important;
        border-bottom: none !important;
    }
    
    .nav-tabs .nav-link {
        border: 1px solid #dee2e6 !important;
        margin-bottom: 0.5rem !important;
        border-radius: 8px !important;
        text-align: left !important;
    }
    
    .nav-tabs .nav-link.active {
        border-color: #667eea !important;
        background-color: #667eea !important;
        color: white !important;
    }
    
    /* Profile Information section */
    .card h5, .card h6 {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* User dropdown on profile page */
    .btn-group .dropdown-toggle {
        font-size: 0.9rem !important;
        padding: 0.5rem 1rem !important;
    }
}

/* ===================================================================
   14. LOADING & SKELETON SCREENS
   =================================================================== */

@media (max-width: 768px) {
    /* Loading spinner */
    .spinner-border {
        width: 2rem !important;
        height: 2rem !important;
    }
    
    .spinner-border-sm {
        width: 1rem !important;
        height: 1rem !important;
    }
}

/* ===================================================================
   15. FOOTER ADJUSTMENTS
   =================================================================== */

@media (max-width: 768px) {
    .footer {
        padding: 1rem !important;
        font-size: 0.85rem !important;
        text-align: center !important;
    }
    
    .footer .row {
        flex-direction: column !important;
    }
    
    .footer .col {
        margin-bottom: 0.5rem !important;
    }
}

/* ===================================================================
   16. PRINT MEDIA QUERY (Bonus)
   =================================================================== */

@media print {
    /* Hide sidebar and navigation on print */
    .sidebar,
    .mobile-toggle,
    .navbar {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* ===================================================================
   17. DESKTOP RULES (Hide mobile-only elements on desktop)
   =================================================================== */

/* Hide mobile header logo and toggle on desktop */
@media (min-width: 769px) {
    .mobile-header-logo {
        display: none !important;
    }
    
    .mobile-toggle {
        display: none !important;
    }
}

/* ===================================================================
   END OF MOBILE RESPONSIVE STYLES
   Last Updated: December 14, 2025
   =================================================================== */
