/**
 * Responsive CSS for Mobile, Tablet, and Desktop
 * School Management System
 */

/* ============================================
   MOBILE FIRST APPROACH
   ============================================ */

/* Base Mobile Styles (320px and up) */
@media screen and (max-width: 768px) {
    
    /* Ensure body is scrollable on mobile */
    html, body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
    }
    
    /* Dashboard Wrapper */
    .dashboard-wrapper {
        flex-direction: column;
    }
    
    /* Sidebar */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 1002;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    /* Show sidebar when active */
    .sidebar.active {
        left: 0;
        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    /* Always show labels on mobile/tablet */
    .sidebar .sidebar-logo-text,
    .sidebar .menu-title,
    .sidebar .menu-item span {
        display: block !important;
    }
    
    /* Sidebar Backdrop Overlay */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1001;
        backdrop-filter: blur(2px);
        transition: opacity 0.3s ease;
    }
    
    .sidebar-backdrop.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
    
    /* Mobile Menu Toggle - Enhanced */
    .mobile-menu-toggle {
        display: flex !important;
        position: fixed;
        bottom: 20px;
        right: 16px;
        width: 58px;
        height: 58px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        cursor: pointer;
        z-index: 1003;
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border: 3px solid rgba(255, 255, 255, 0.2);
    }
    
    .mobile-menu-toggle:active {
        transform: scale(0.9);
    }
    
    .mobile-menu-toggle::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        animation: pulse 2s ease-in-out infinite;
        z-index: -1;
    }
    
    @keyframes pulse {
        0%, 100% {
            transform: scale(1);
            opacity: 1;
        }
        50% {
            transform: scale(1.1);
            opacity: 0.7;
        }
    }
    
    /* Active state - Red gradient when sidebar is open */
    .mobile-menu-toggle.active {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        box-shadow: 0 6px 20px rgba(245, 87, 108, 0.5);
        transform: rotate(90deg);
    }
    
    .mobile-menu-toggle.active::before {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    }
    
    /* Main Content */
    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 0;
    }
    
    /* Header - Optimized Mobile Layout */
    .header {
        display: flex;
        flex-direction: row;
        padding: 10px 12px;
        gap: 10px;
        align-items: center;
        justify-content: space-between;
        min-height: 60px;
        flex-wrap: wrap;
    }
    
    .header-left {
        flex: 1;
        min-width: 0;
    }
    
    .header-left > div {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 0 !important;
    }
    
    .header-left h1 {
        font-size: 16px !important;
        margin: 0 !important;
        line-height: 1.3;
        font-weight: 600;
    }
    
    .header-left p {
        font-size: 11px !important;
        margin: 2px 0 0 0 !important;
        line-height: 1.2;
    }
    
    .header-left img {
        width: 36px !important;
        height: 36px !important;
        flex-shrink: 0;
    }
    
    .breadcrumb {
        font-size: 10px;
        margin-top: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .header-right {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 12px;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }
    
    .header-icon {
        position: relative;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        border-radius: 50%;
        background: var(--bg-card);
        transition: all 0.3s ease;
    }
    
    .header-icon:active {
        transform: scale(0.9);
        background: var(--bg-hover);
    }
    
    .header-icon i {
        font-size: 18px;
    }
    
    .search-box {
        display: none; /* Hide on mobile */
    }
    
    .user-profile {
        display: flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        padding: 4px 8px;
        border-radius: 50px;
        background: var(--bg-card);
        transition: all 0.3s ease;
        min-width: 44px;
    }
    
    .user-profile:active {
        transform: scale(0.95);
        background: var(--bg-hover);
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        font-weight: 600;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        flex-shrink: 0;
    }
    
    .user-info {
        display: none; /* Hide user name on mobile */
    }
    
    .user-profile .fa-chevron-down {
        font-size: 10px;
        margin-left: 2px;
    }
    
    /* Content Area - Optimized Spacing */
    .content {
        padding: 12px;
        padding-bottom: 80px; /* Space for floating menu button */
    }
    
    /* Cards - Compact mobile view with better spacing */
    .card {
        margin-bottom: 12px;
        border-radius: 12px;
        padding: 14px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .card:active {
        transform: translateY(2px);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }
    
    .card-header {
        padding: 0 0 12px 0;
        font-size: 15px;
        font-weight: 600;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .card-body {
        padding: 0;
    }
    
    /* Statistics Cards - Horizontal compact layout */
    .stats-grid,
    .stat-cards {
        grid-template-columns: 1fr !important;
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .stat-card {
        padding: 14px 16px;
        min-height: 75px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        border-radius: 12px;
        background: var(--bg-card);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    
    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--primary-blue);
        border-radius: 12px 0 0 12px;
    }
    
    .stat-card:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }
    
    .stat-card .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: linear-gradient(135deg, rgba(45, 91, 255, 0.1), rgba(45, 91, 255, 0.05));
    }
    
    .stat-card .stat-content {
        flex: 1;
        min-width: 0;
    }
    
    .stat-card h3 {
        font-size: 11px;
        margin: 0 0 4px 0;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-secondary);
        font-weight: 500;
    }
    
    .stat-card .stat-value {
        font-size: 24px;
        font-weight: 700;
        margin: 0;
        line-height: 1.2;
        color: var(--text-primary);
    }
    
    .stat-card .stat-change {
        font-size: 11px;
        margin-top: 4px;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
    
    /* Tables - Mobile optimized */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding: 0 12px;
        border-radius: 12px;
    }
    
    table {
        font-size: 13px;
        border-radius: 12px;
        overflow: hidden;
    }
    
    table th {
        padding: 12px 10px;
        white-space: nowrap;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        background: var(--bg-hover);
    }
    
    table td {
        padding: 12px 10px;
        white-space: nowrap;
        font-size: 13px;
    }
    
    table tr {
        border-bottom: 1px solid var(--border-color);
    }
    
    table tr:last-child {
        border-bottom: none;
    }
    
    /* Make table rows tappable */
    table tr:active {
        background: var(--bg-hover);
    }
    
    /* Hide less important columns on mobile */
    .hide-mobile {
        display: none !important;
    }
    
    /* Forms - Mobile optimized */
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
        font-weight: 500;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    input,
    select,
    textarea {
        font-size: 15px; /* Prevent zoom on iOS */
        padding: 12px 14px;
        border-radius: 10px;
        transition: all 0.3s ease;
    }
    
    input:focus,
    select:focus,
    textarea:focus {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(45, 91, 255, 0.15);
    }
    
    /* Buttons - Mobile optimized */
    .btn {
        width: 100%;
        padding: 13px 18px;
        font-size: 14px;
        font-weight: 500;
        border-radius: 10px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .btn:active {
        transform: scale(0.96);
    }
    
    .btn-primary {
        box-shadow: 0 4px 12px rgba(45, 91, 255, 0.3);
    }
    
    .btn-primary:active {
        box-shadow: 0 2px 6px rgba(45, 91, 255, 0.2);
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin: 0;
    }
    
    /* Small inline buttons */
    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
        width: auto;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
    
    .btn i {
        font-size: 14px;
    }
    
    /* Modals */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Dropdowns - Optimized mobile positioning */
    #notificationDropdown,
    #userMenuDropdown {
        position: fixed !important;
        top: 65px !important;
        right: 12px !important;
        left: auto !important;
        width: calc(100% - 24px) !important;
        max-width: 360px !important;
        z-index: 2000 !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
        animation: slideDown 0.3s ease !important;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    #userMenuDropdown {
        width: auto !important;
        min-width: 220px !important;
        max-width: 280px !important;
    }
    
    #userMenuDropdown a {
        padding: 14px 18px !important;
        font-size: 14px !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        transition: all 0.2s ease !important;
    }
    
    #userMenuDropdown a:active {
        background: var(--bg-hover) !important;
        transform: scale(0.98);
    }
    
    #notificationDropdown .notification-item {
        transition: all 0.2s ease !important;
    }
    
    #notificationDropdown .notification-item:active {
        background: var(--bg-hover) !important;
        transform: scale(0.98);
    }
    
    /* Charts */
    canvas {
        max-height: 250px !important;
    }
    
    /* Grid Layouts */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
    }
    
    /* Subject Cards */
    .subject-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Exam Cards */
    .exam-card {
        padding: 15px;
    }
    
    .exam-details {
        grid-template-columns: 1fr !important;
    }
    
    /* Payment Cards */
    .payment-card {
        padding: 15px;
    }
    
    .payment-details {
        grid-template-columns: 1fr !important;
    }
    
    /* Timetable */
    .timetable-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 12px;
    }
    
    /* Theme Toggle */
    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    /* Footer */
    footer {
        padding: 15px;
        font-size: 12px;
    }
    
    /* Touch-friendly spacing */
    .menu-item {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    /* Typography - Mobile optimized */
    h1 {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    h2 {
        font-size: 18px;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    h3 {
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 6px;
    }
    
    h4 {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 6px;
    }
    
    p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 10px;
    }
    
    /* Mobile-specific improvements */
    .dashboard-wrapper {
        min-height: 100vh;
    }
    
    .main-content {
        min-height: 100vh;
        padding-bottom: 80px; /* Space for floating button */
    }
    
    /* Ensure theme toggle is accessible */
    .theme-toggle {
        position: fixed;
        top: 8px;
        right: 8px;
        width: 42px;
        height: 42px;
        z-index: 999;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-card);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
    }
    
    .theme-toggle:active {
        transform: scale(0.9);
    }
    
    .theme-toggle i {
        font-size: 18px;
    }
    
    /* Alerts on mobile - Better spacing */
    .alert {
        padding: 12px 14px;
        font-size: 13px;
        margin-bottom: 12px;
        border-radius: 10px;
        display: flex;
        align-items: flex-start;
        gap: 10px;
        line-height: 1.5;
    }
    
    .alert i {
        font-size: 18px;
        margin-top: 2px;
        flex-shrink: 0;
    }
    
    /* Better button spacing */
    .btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-weight: 500;
    }
    
    /* Touch feedback for interactive elements */
    a, button, .clickable {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        user-select: none;
    }
    
    /* Login Page Mobile */
    .login-page {
        min-height: 100vh !important;
        height: auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 20px 10px !important;
        display: block !important;
    }
    
    .login-container {
        flex-direction: column;
        padding: 20px;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        overflow-y: visible;
        margin: 20px auto !important;
    }
    
    .login-box {
        width: 100%;
        max-width: 100%;
        padding: 30px 20px;
        min-height: auto !important;
    }
    
    .login-illustration {
        display: none;
    }
    
    /* Ensure form elements are accessible */
    .login-form {
        margin-bottom: 20px;
    }
    
    .btn-block {
        margin-bottom: 30px !important;
    }
    
    .login-footer {
        padding-bottom: 30px;
    }
}

/* ============================================
   TABLET STYLES (768px - 1024px)
   ============================================ */

@media screen and (min-width: 769px) and (max-width: 1024px) {
    
    /* Sidebar */
    .sidebar {
        width: 240px;
    }
    
    /* Main Content */
    .main-content {
        margin-left: 240px;
        width: calc(100% - 240px);
    }
    
    /* Header */
    .header {
        padding: 20px 25px;
    }
    
    /* Content */
    .content {
        padding: 25px;
    }
    
    /* Grid Layouts */
    .grid-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Subject Grid */
    .subject-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Tables */
    table {
        font-size: 14px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 20px;
    }
    
    /* Hide mobile menu toggle */
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ============================================
   LANDSCAPE MOBILE (480px - 768px)
   ============================================ */

@media screen and (min-width: 480px) and (max-width: 768px) {
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Grid Layouts */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Subject Grid */
    .subject-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Modal */
    .modal-content {
        width: 90%;
        max-width: 500px;
    }
    
    /* Buttons */
    .btn-group {
        flex-direction: row;
    }
    
    .btn-group .btn {
        width: auto;
    }
    
    /* Header improvements for landscape */
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .header-left,
    .header-right {
        width: auto;
    }
}

/* ============================================
   EXTRA SMALL MOBILE (max-width: 480px)
   ============================================ */

@media screen and (max-width: 480px) {
    
    /* Even more compact for very small screens */
    .content {
        padding: 10px;
        padding-bottom: 80px;
    }
    
    .header {
        padding: 8px 10px;
        min-height: 56px;
    }
    
    .header-left h1 {
        font-size: 14px !important;
    }
    
    .header-left p {
        font-size: 10px !important;
    }
    
    .header-left img {
        width: 32px !important;
        height: 32px !important;
    }
    
    .header-icon {
        width: 38px;
        height: 38px;
    }
    
    .header-icon i {
        font-size: 16px;
    }
    
    .user-avatar {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }
    
    .stat-card {
        padding: 12px 14px;
        min-height: 70px;
    }
    
    .stat-card .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .stat-card .stat-value {
        font-size: 22px;
    }
    
    .stat-card h3 {
        font-size: 10px;
    }
    
    .card {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .card-header {
        padding: 0 0 10px 0;
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .mobile-menu-toggle {
        width: 54px;
        height: 54px;
        font-size: 22px;
        bottom: 16px;
        right: 14px;
    }
    
    .theme-toggle {
        width: 38px;
        height: 38px;
        top: 6px;
        right: 6px;
    }
    
    .theme-toggle i {
        font-size: 16px;
    }
    
    h1 {
        font-size: 18px;
    }
    
    h2 {
        font-size: 16px;
    }
    
    h3 {
        font-size: 14px;
    }
    
    h4 {
        font-size: 13px;
    }
    
    p {
        font-size: 13px;
    }
    
    /* Make table text smaller */
    table {
        font-size: 12px;
    }
    
    table th {
        padding: 10px 8px;
        font-size: 11px;
    }
    
    table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .alert {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .alert i {
        font-size: 16px;
    }
    
    /* Dropdowns */
    #notificationDropdown,
    #userMenuDropdown {
        top: 60px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
    }
    
    #userMenuDropdown a {
        padding: 12px 16px !important;
        font-size: 13px !important;
    }
    
    /* Buttons */
    .btn {
        min-height: 42px;
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .btn i {
        font-size: 14px;
    }
}

/* ============================================
   LARGE DESKTOP (1440px and up)
   ============================================ */

@media screen and (min-width: 1440px) {
    
    .content {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .grid-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .subject-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    
    /* Larger touch targets */
    .btn,
    .menu-item,
    a,
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects */
    .card:hover,
    .btn:hover,
    .menu-item:hover {
        transform: none;
    }
    
    /* Add active states instead */
    .card:active,
    .btn:active,
    .menu-item:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    
    .sidebar,
    .header,
    .theme-toggle,
    .mobile-menu-toggle,
    .btn,
    footer,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .content {
        padding: 0;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #2196F3;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid currentColor;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* ============================================
   ORIENTATION SPECIFIC
   ============================================ */

@media screen and (orientation: landscape) and (max-height: 500px) {
    
    /* Reduce header height in landscape */
    .header {
        padding: 10px 20px;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .menu-item {
        padding: 10px 20px;
    }
}

/* ============================================
   ANDROID SPECIFIC FIXES
   ============================================ */

/* Fix for Android Chrome address bar */
.dashboard-wrapper {
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

html {
    height: -webkit-fill-available;
}

/* Fix for Android input zoom */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
    font-size: 16px !important;
}

/* ============================================
   iOS SPECIFIC FIXES
   ============================================ */

/* Fix for iOS Safari bounce - Only for dashboard pages, not login */
body:not(.login-page) {
    overscroll-behavior-y: none;
}

/* Allow scrolling on login page */
body.login-page {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Fix for iOS input shadow */
input,
textarea,
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hide-on-mobile {
    display: none !important;
}

@media screen and (min-width: 769px) {
    .hide-on-mobile {
        display: block !important;
    }
    
    .hide-on-desktop {
        display: none !important;
    }
}

.text-center-mobile {
    text-align: center;
}

@media screen and (min-width: 769px) {
    .text-center-mobile {
        text-align: left;
    }
}

/* Scrollbar styling for mobile */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}
