/* ═══════════════════════════════════════════════════════════════════════════════
   HEALTHION MOBILE RESPONSIVE CSS
   Comprehensive mobile-first responsive styles for all pages
   Author: Healthion Development Team
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Global overflow prevention - prevents any horizontal scroll on any page */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Global container fix - prevents 100vw from causing scroll */
.dashboard-app {
    max-width: 100vw;
    box-sizing: border-box;
}

/* Flex children should not overflow */
.main-content {
    min-width: 0;
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE NAVIGATION - Slide-in Sidebar
═══════════════════════════════════════════════════════════════ */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.3);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(26, 188, 156, 0.4);
}

.mobile-menu-toggle i {
    color: white;
    font-size: 20px;
}

/* Mobile Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1500;
    /* Match mobile media query z-index */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   TABLET BREAKPOINT (max-width: 1200px)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {

    /* Dashboard Grid */
    .dashboard-content {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 20px !important;
    }

    .right-sidebar {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    /* Quick Actions */
    .quick-actions-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px !important;
    }

    /* Search Box */
    .search-box {
        width: 300px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TABLET SMALL BREAKPOINT (max-width: 992px)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Quick Actions */
    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Wallet Widget */
    .wallet-widget {
        padding: 20px !important;
    }

    .wallet-balance .amount {
        font-size: 26px !important;
    }

    /* Sidebar Width */
    .sidebar {
        width: 220px !important;
    }

    .main-content {
        margin-left: 220px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE BREAKPOINT (max-width: 768px)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Header */
    .top-header {
        padding: 12px 16px !important;
        flex-wrap: wrap;
        gap: 12px;
        z-index: 2500 !important;
        /* Above sidebar */
        position: relative !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 2600 !important;
        /* Above everything */
    }

    /* Overlay and Sidebar Layering - FIXED z-index values */
    .sidebar-overlay {
        z-index: 1500 !important;
        /* Below sidebar but above content */
        display: none !important;
        /* Hidden by default */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    .sidebar-overlay.active {
        display: block !important;
    }

    .sidebar {
        transform: translateX(-100%) !important;
        /* Hidden by default */
        width: 100% !important;
        /* Full width on mobile */
        max-width: 320px !important;
        /* But not too wide */
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000 !important;
        /* Above overlay */
        position: fixed !important;
        /* Ensure it's fixed */
        left: 0 !important;
        top: 0 !important;
        height: 100vh !important;
        box-shadow: 2px 0 16px rgba(0, 0, 0, 0.1) !important;
        /* Add shadow for depth */
    }

    .sidebar.open {
        transform: translateX(0) !important;
        /* Show when open */
    }

    /* Lock body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden !important;
    }

    /* Main Content Full Width */
    .main-content {
        margin-left: 0 !important;
        padding-top: 90px !important;
        /* Increased space for mobile header + breathing room */
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Prevent dashboard-app from exceeding viewport on mobile */
    .dashboard-app {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Page content - tight mobile padding */
    .page-content {
        padding: 16px !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Dashboard Content */
    .dashboard-content {
        grid-template-columns: 1fr !important;
        padding: 16px !important;
    }

    /* Right Sidebar - Stack Vertically */
    .right-sidebar {
        grid-template-columns: 1fr !important;
    }

    /* Stats Grid - 2 columns on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .stat-card {
        padding: 16px !important;
    }

    .stat-info .value {
        font-size: 22px !important;
    }

    .stat-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }

    /* Quick Actions - 2 columns */
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .action-card {
        padding: 16px 12px !important;
    }

    .action-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 20px !important;
    }

    .action-title {
        font-size: 12px !important;
    }

    .action-desc {
        font-size: 10px !important;
    }

    /* Header - visible on all screens, hidden when sidebar is open */
    .top-header {
        padding: 8px 12px 8px 60px !important;
        /* Left padding for hamburger button */
        flex-wrap: nowrap;
        gap: 8px;
        z-index: 1100 !important;
        /* Below sidebar and overlay */
        position: fixed !important;
        /* Fixed at top */
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: white !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        align-items: center;
    }

    /* Hide header when sidebar is open */
    .sidebar.open~.main-content .top-header {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* Show search box on mobile - make it compact */
    .top-header .search-container {
        flex: 1;
        max-width: 300px;
    }

    .top-header .search-box {
        width: 100% !important;
    }

    .top-header .search-box input {
        font-size: 13px !important;
        padding: 8px 12px 8px 36px !important;
    }

    /* Show header actions on mobile - make them compact */
    .top-header .header-actions {
        display: flex !important;
        gap: 8px !important;
        margin-left: auto;
    }

    .top-header .header-btn {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
    }

    /* Hide user name text on mobile, show only avatar */
    .top-header .user-info {
        display: none !important;
    }

    .top-header .user-avatar {
        width: 36px !important;
        height: 36px !important;
    }

    .top-header .profile-chevron {
        display: none !important;
    }

    /* Page Content */
    .page-content {
        padding: 16px !important;
    }

    /* Welcome Section */
    .welcome-section h1 {
        font-size: 20px !important;
    }

    .welcome-section p {
        font-size: 13px !important;
    }

    /* Section Headers */
    .section-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }

    .section-title {
        font-size: 16px !important;
    }

    /* Consultation Items */
    .consultation-item,
    .appointment-item {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 14px !important;
    }

    .consultation-item .doctor-avatar,
    .appointment-item .patient-avatar {
        width: 44px !important;
        height: 44px !important;
    }

    .consultation-type,
    .appointment-type {
        align-self: flex-start !important;
        margin-top: 8px;
    }

    /* Wallet Widget */
    .wallet-widget {
        padding: 16px !important;
    }

    .wallet-balance .amount {
        font-size: 24px !important;
    }

    .wallet-actions {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .wallet-btn {
        padding: 10px !important;
    }

    /* Form Elements */
    .form-group label {
        font-size: 12px !important;
    }

    .input-wrapper input {
        padding: 12px 12px 12px 40px !important;
        font-size: 14px !important;
    }

    /* Login Page Specific - Enhanced Premium Mobile Design */
    .login-container {
        flex-direction: column !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        min-height: 100vh !important;
        background: #fff !important;
    }

    /* Hide the green branding panel on mobile for cleaner login */
    .login-branding {
        display: none !important;
    }

    .login-form-panel {
        padding: 40px 24px !important;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center !important;
        min-height: 100vh !important;
        background: linear-gradient(180deg, #f8fdfc 0%, #fff 50%, #f8fdfc 100%) !important;
    }

    .brand-logo {
        margin-bottom: 28px !important;
        gap: 16px !important;
    }

    .brand-logo-img {
        width: 200px !important;
        filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15)) !important;
    }

    .brand-name {
        font-size: 22px !important;
    }

    .brand-tagline {
        font-size: 12px !important;
    }

    .brand-content {
        text-align: center !important;
    }

    .brand-content h2 {
        font-size: 20px !important;
        margin-bottom: 10px !important;
        line-height: 1.4 !important;
    }

    .brand-content p {
        font-size: 14px !important;
        margin-bottom: 20px !important;
        opacity: 0.9;
    }

    .brand-features {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: center !important;
    }

    .feature-item {
        background: rgba(255, 255, 255, 0.15) !important;
        padding: 8px 14px !important;
        border-radius: 20px !important;
        gap: 8px !important;
    }

    .feature-icon {
        width: 28px !important;
        height: 28px !important;
        background: transparent !important;
    }

    .feature-icon svg {
        width: 14px !important;
        height: 14px !important;
    }

    .feature-text {
        font-size: 12px !important;
        font-weight: 500 !important;
    }

    /* Form Header */
    .form-header {
        margin-bottom: 24px !important;
    }

    .form-header h1 {
        font-size: 22px !important;
        font-weight: 700 !important;
        background: linear-gradient(135deg, #1BC5B8, #14A89F) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
    }

    .form-header p {
        font-size: 14px !important;
        color: #64748B !important;
    }

    /* Role Selector - Premium Cards */
    .role-selector {
        flex-direction: column !important;
        gap: 12px !important;
        margin-bottom: 24px !important;
    }

    .role-btn {
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 16px 18px !important;
        gap: 14px !important;
        border-radius: 16px !important;
        border: 2px solid #E2E8F0 !important;
        background: #fff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
        transition: all 0.25s ease !important;
    }

    .role-btn.active {
        border-color: #1BC5B8 !important;
        background: linear-gradient(135deg, rgba(27, 197, 184, 0.08), rgba(20, 168, 159, 0.04)) !important;
        box-shadow: 0 4px 16px rgba(27, 197, 184, 0.2) !important;
    }

    .role-icon {
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }

    .role-icon svg {
        width: 22px !important;
        height: 22px !important;
    }

    .role-info {
        text-align: left !important;
        flex: 1 !important;
    }

    .role-label {
        font-size: 15px !important;
        font-weight: 600 !important;
        margin-bottom: 2px !important;
    }

    .role-desc {
        font-size: 12px !important;
        color: #64748B !important;
    }

    /* Login Tabs - Pill Style */
    .login-tabs {
        display: flex !important;
        gap: 4px !important;
        background: #F1F5F9 !important;
        padding: 4px !important;
        border-radius: 12px !important;
        margin-bottom: 20px !important;
    }

    .login-tab {
        flex: 1 !important;
        padding: 10px 8px !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        border-radius: 10px !important;
        border: none !important;
        background: transparent !important;
        color: #64748B !important;
        transition: all 0.25s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
    }

    .login-tab.active {
        background: #fff !important;
        color: #1BC5B8 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    }

    .login-tab svg,
    .login-tab i {
        width: 14px !important;
        height: 14px !important;
        font-size: 12px !important;
    }

    /* Form Groups */
    .form-group {
        margin-bottom: 16px !important;
    }

    .form-group label {
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #1E293B !important;
        margin-bottom: 8px !important;
    }

    .input-wrapper {
        position: relative !important;
    }

    .input-wrapper input {
        width: 100% !important;
        padding: 14px 16px 14px 48px !important;
        font-size: 15px !important;
        border: 2px solid #E2E8F0 !important;
        border-radius: 14px !important;
        background: #F8FAFC !important;
        transition: all 0.25s ease !important;
    }

    .input-wrapper input:focus {
        border-color: #1BC5B8 !important;
        background: #fff !important;
        box-shadow: 0 0 0 4px rgba(27, 197, 184, 0.1) !important;
    }

    .input-icon {
        position: absolute !important;
        left: 16px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        color: #94A3B8 !important;
    }

    /* Login Button */
    .login-btn {
        width: 100% !important;
        padding: 16px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        border-radius: 14px !important;
        background: linear-gradient(135deg, #1BC5B8, #14A89F) !important;
        border: none !important;
        color: #fff !important;
        box-shadow: 0 4px 16px rgba(27, 197, 184, 0.3) !important;
        transition: all 0.25s ease !important;
    }

    .login-btn:active {
        transform: scale(0.98) !important;
        box-shadow: 0 2px 8px rgba(27, 197, 184, 0.3) !important;
    }

    /* Remember & Forgot */
    .form-options {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 20px !important;
        font-size: 13px !important;
    }

    .forgot-link {
        color: #1BC5B8 !important;
        font-weight: 500 !important;
    }

    /* Divider */
    .login-divider {
        display: flex !important;
        align-items: center !important;
        gap: 16px !important;
        margin: 20px 0 !important;
        color: #94A3B8 !important;
        font-size: 13px !important;
    }

    .login-divider::before,
    .login-divider::after {
        content: '' !important;
        flex: 1 !important;
        height: 1px !important;
        background: linear-gradient(90deg, transparent, #E2E8F0, transparent) !important;
    }

    /* Register Link */
    .register-prompt {
        text-align: center !important;
        font-size: 14px !important;
        color: #64748B !important;
        margin-top: 16px !important;
    }

    .register-prompt a {
        color: #1BC5B8 !important;
        font-weight: 600 !important;
    }

    /* Back Button - Fixed position since branding panel is hidden */
    .back-home-btn {
        position: fixed !important;
        top: 16px !important;
        left: 16px !important;
        padding: 10px 16px !important;
        font-size: 13px !important;
        background: #fff !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 24px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
        z-index: 100 !important;
        color: #1BC5B8 !important;
        border: 1px solid #E2E8F0 !important;
    }

    /* Verification Banner */
    .verification-alert-banner {
        padding: 16px !important;
    }

    .verification-alert-content {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .verification-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 20px !important;
    }

    .verification-text h3 {
        font-size: 16px !important;
    }

    .verification-status-grid {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .verification-action {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Messages Template */
    .chat-sidebar {
        width: 100% !important;
        position: absolute !important;
        z-index: 10;
    }

    .chat-main {
        width: 100% !important;
    }

    /* Pending Widget */
    .pending-widget {
        padding: 16px !important;
    }

    .pending-item {
        padding: 10px !important;
        gap: 10px !important;
    }

    .pending-item .avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 11px !important;
    }

    .pending-item .info h5 {
        font-size: 12px !important;
    }

    .pending-item .info p {
        font-size: 10px !important;
    }

    /* Back Button */
    .back-home-btn {
        top: 12px !important;
        left: 12px !important;
        padding: 8px 14px !important;
        font-size: 13px !important;
    }

    /* Modals */
    .modal-overlay .coming-soon-card,
    .modal-overlay .cs-card {
        padding: 24px !important;
        width: 95% !important;
        max-width: 360px !important;
    }

    .cs-icon {
        width: 60px !important;
        height: 60px !important;
    }

    .cs-icon i {
        font-size: 24px !important;
    }

    .cs-title {
        font-size: 20px !important;
    }

    .cs-desc {
        font-size: 14px !important;
        margin-bottom: 20px !important;
    }

    /* Table Responsiveness */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    /* Schedule Management */
    .schedule-container {
        flex-direction: column !important;
    }

    .schedule-sidebar {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #E8E8E8;
    }

    .schedule-main {
        width: 100% !important;
    }

    /* Clinic Cards */
    .clinic-card {
        padding: 16px !important;
    }

    .clinic-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    /* Doctor Profile */
    .profile-header {
        flex-direction: column !important;
        text-align: center !important;
    }

    .profile-avatar {
        margin: 0 auto !important;
    }

    /* Booking Steps */
    .booking-steps {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .step-item {
        flex-direction: row !important;
        width: 100% !important;
        justify-content: flex-start !important;
        gap: 12px !important;
    }

    /* Slot Selection */
    .time-slots-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    .time-slot {
        padding: 10px 8px !important;
        font-size: 12px !important;
    }

    /* Date Picker */
    .date-picker-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    /* Health Score Widget */
    .health-score-widget {
        padding: 16px !important;
    }

    .score-circle {
        width: 80px !important;
        height: 80px !important;
    }

    /* Activity Section */
    .activity-item {
        gap: 10px !important;
    }

    .activity-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
    }

    .activity-content h5 {
        font-size: 12px !important;
    }

    .activity-content p {
        font-size: 11px !important;
    }

    /* Empty State */
    .empty-state {
        padding: 24px 16px !important;
    }

    .empty-state i {
        font-size: 36px !important;
    }

    .empty-state h4 {
        font-size: 14px !important;
    }

    .empty-state p {
        font-size: 12px !important;
    }

    /* Buttons */
    .btn-primary,
    .btn-secondary {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SMALL MOBILE BREAKPOINT (max-width: 480px)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

    /* Stats Grid - Single Column */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    /* Quick Actions - 2 columns tighter */
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .action-card {
        padding: 12px 8px !important;
    }

    .action-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }

    /* Page Content */
    .page-content {
        padding: 12px !important;
    }

    .dashboard-content {
        padding: 12px !important;
    }

    /* Welcome Section */
    .welcome-section h1 {
        font-size: 18px !important;
    }

    /* Login Page */
    body {
        padding: 0 !important;
    }

    .login-branding {
        padding: 20px 16px !important;
    }

    .login-form-panel {
        padding: 20px 16px !important;
    }

    .form-header h1 {
        font-size: 20px !important;
    }

    .form-header p {
        font-size: 13px !important;
    }

    /* Role Buttons */
    .role-icon {
        width: 36px !important;
        height: 36px !important;
    }

    .role-label {
        font-size: 13px !important;
    }

    .role-desc {
        font-size: 10px !important;
    }

    /* Wallet */
    .wallet-balance .amount {
        font-size: 20px !important;
    }

    /* Section Headers */
    .section-title {
        font-size: 15px !important;
    }

    .view-all {
        font-size: 12px !important;
    }

    /* Consultation Meta */
    .consultation-meta {
        flex-direction: column !important;
        gap: 6px !important;
    }

    .appointment-meta {
        flex-direction: column !important;
        gap: 4px !important;
    }

    /* Time Slots */
    .time-slots-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Header Actions */
    .header-actions {
        gap: 8px !important;
    }

    .header-btn {
        width: 36px !important;
        height: 36px !important;
    }

    .user-avatar {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }

    /* Theme Toggle */
    .theme-toggle-wrapper {
        margin-right: 8px !important;
    }

    .theme-toggle-wrapper dotlottie-wc {
        width: 50px !important;
        height: 25px !important;
    }

    /* Sidebar (when open) */
    .sidebar {
        width: 260px !important;
    }

    .sidebar-header {
        padding: 16px !important;
    }

    .nav-menu {
        padding: 12px 8px !important;
    }

    .nav-item {
        padding: 10px !important;
        font-size: 13px !important;
    }

    /* Homepage Specific */
    .hero-section h1 {
        font-size: 24px !important;
    }

    .hero-section p {
        font-size: 14px !important;
    }

    /* FAQ Section */
    .faq-item {
        padding: 12px !important;
    }

    .faq-question {
        font-size: 14px !important;
    }

    .faq-answer {
        font-size: 13px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   EXTRA SMALL MOBILE BREAKPOINT (max-width: 360px)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {

    /* Minimal padding */
    .page-content,
    .dashboard-content {
        padding: 8px !important;
    }

    .stat-card {
        padding: 12px !important;
    }

    .stat-info .value {
        font-size: 18px !important;
    }

    .stat-info h3 {
        font-size: 10px !important;
    }

    /* Ultra compact quick actions */
    .action-card {
        padding: 10px 6px !important;
    }

    .action-title {
        font-size: 11px !important;
    }

    .action-desc {
        display: none !important;
    }

    /* Login */
    .brand-logo-img {
        width: 140px !important;
    }

    .brand-content h2 {
        font-size: 16px !important;
    }

    .brand-features {
        display: none !important;
    }

    .login-btn {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }

    /* Time slots - single column */
    .time-slots-grid {
        grid-template-columns: 1fr !important;
    }

    /* Sidebar */
    .sidebar {
        width: 100% !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   LANDSCAPE MOBILE OPTIMIZATION
═══════════════════════════════════════════════════════════════ */
@media (max-height: 500px) and (orientation: landscape) {
    .login-container {
        flex-direction: row !important;
        height: auto !important;
        min-height: 100vh;
    }

    .login-branding {
        min-height: auto !important;
        padding: 20px !important;
    }

    .login-form-panel {
        padding: 20px !important;
        overflow-y: auto;
    }

    .sidebar {
        height: 100vh;
        overflow-y: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TOUCH DEVICE OPTIMIZATIONS
═══════════════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets */
    .nav-item {
        min-height: 48px !important;
        padding: 14px 12px !important;
    }

    .header-btn,
    .user-avatar {
        min-width: 44px !important;
        min-height: 44px !important;
    }

    .time-slot {
        min-height: 44px !important;
    }

    .action-card {
        min-height: 80px !important;
    }

    /* Remove hover effects */
    .stat-card:hover,
    .action-card:hover,
    .consultation-item:hover,
    .appointment-item:hover {
        transform: none !important;
    }

    /* Active states for touch */
    .stat-card:active,
    .action-card:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }

    .consultation-item:active,
    .appointment-item:active {
        background: var(--primary-light) !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SAFE AREA INSETS (for notched devices)
═══════════════════════════════════════════════════════════════ */
@supports (padding: env(safe-area-inset-bottom)) {
    .sidebar {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .main-content {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .page-content {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .mobile-menu-toggle {
        left: calc(12px + env(safe-area-inset-left));
    }
}

/* ═══════════════════════════════════════════════════════════════
   PRINT STYLES
═══════════════════════════════════════════════════════════════ */
@media print {

    .sidebar,
    .mobile-menu-toggle,
    .header-actions,
    .sidebar-overlay {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .page-content {
        padding: 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION (Accessibility)
═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .sidebar {
        transition: none !important;
    }
}