/* ============================================
   MOBILE APP DESIGN SYSTEM
   Touch-first, app-like experience
   ============================================ */

/* PWA Meta */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Touch-friendly sizing */
@media (max-width: 991px) {
    :root {
        --touch-target: 48px;
        --spacing-xs: 8px;
        --spacing-sm: 12px;
        --spacing-md: 16px;
        --spacing-lg: 24px;
        --spacing-xl: 32px;
        --border-radius: 16px;
        --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
        --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
        --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
        --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        --font-secondary: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }
}

/* ============================================
   BOTTOM NAVIGATION (Mobile Only)
   ============================================ */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    padding-top: 12px; /* Add top padding to prevent FAB clipping */
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    overflow: visible; /* Allow FAB to extend beyond container */
}

.mobile-bottom-nav.active {
    display: flex;
}

/* Hide on desktop, show on mobile */
@media (min-width: 992px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .mobile-bottom-nav {
        display: flex !important;
    }
}

.nav-item-bottom {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    text-decoration: none;
    color: #666;
    transition: all 0.2s;
    position: relative;
    min-height: 64px;
    overflow: hidden;
}

.nav-item-bottom i {
    font-size: 24px;
    margin-bottom: 4px;
    transition: transform 0.2s;
}

.nav-item-bottom span {
    font-family: var(--font-primary);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
}

.nav-item-bottom.active {
    color: #174175;
}

.nav-item-bottom.active i {
    transform: scale(1.1);
}

.nav-item-bottom:active {
    background: rgba(23,65,117,0.05);
    transform: scale(0.95);
}

.nav-item-bottom .badge {
    position: absolute;
    top: 8px;
    right: 20%;
    background: #ff4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* FAB Button in Bottom Nav */
.nav-item-fab {
    position: relative;
    top: -8px;
    z-index: 1001; /* Ensure FAB is above the nav container */
}

.nav-item-fab i {
    font-size: 32px !important;
    margin-bottom: 0 !important;
    color: white !important;
}

.nav-item-fab span {
    display: none;
}

.nav-item-fab::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: var(--gradient-light);
    border-radius: 50%;
    z-index: -1;
    box-shadow: 0 4px 16px rgba(23,65,117,0.4);
}

.nav-item-fab.active::before {
    background: var(--gradient-light);
}

/* ============================================
   MOBILE APP NAVIGATION
   ============================================ */
@media (max-width: 991px) {
    .app-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1001;
        background: var(--primary-color);
        box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    }
    
    .nav-wrapper {
        min-height: 56px;
        padding: 0 16px;
    }
    
    .nav-logo {
        flex: 1;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .logo-box {
        width: 40px;
        height: 40px;
    }
    
    .logo-box i {
        font-size: 20px;
    }
    
    /* Hide desktop menu */
    .desktop-menu {
        display: none !important;
    }
    
    .nav-user {
        display: none !important;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    /* Sidebar/Drawer - Modern Smooth Design */
    .mobile-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 380px;
        background: var(--primary-color);
        z-index: 1002;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile-menu.show {
        transform: translateX(0);
    }
    
    .mobile-menu-header {
        background: var(--primary-color);
        color: #ffffff;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 56px;
        padding: 0 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .mobile-menu-header-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .mobile-menu-header .logo-box {
        width: 40px;
        height: 40px;
        background: rgba(255,255,255,0.15);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-menu-header .logo-box i {
        font-size: 20px;
        color: #ffffff;
    }
    
    .mobile-menu-title {
        flex: 1;
    }
    
    .mobile-menu-title h3 {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 700;
        color: #ffffff;
    }
    
    .mobile-menu-title p {
        margin: 2px 0 0 0;
        font-size: 0.85rem;
        color: rgba(255,255,255,0.8);
    }
    
    .mobile-menu-close {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(255,255,255,0.15);
        border: none;
        color: #ffffff;
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .mobile-menu-close:active {
        background: rgba(255,255,255,0.25);
        transform: scale(0.95);
    }
    
    .mobile-menu-user {
        background: rgba(255,255,255,0.08);
        padding: 20px;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        display: flex;
        align-items: center;
        gap: 16px;
        margin: 0 12px;
        border-radius: 12px;
        margin-bottom: 16px;
    }
    
    .user-avatar {
        width: 52px;
        height: 52px;
        background: rgba(255,255,255,0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        border: 2px solid rgba(255,255,255,0.3);
    }
    
    .user-avatar i {
        font-size: 28px;
        color: #ffffff;
    }
    
    .user-info {
        flex: 1;
        min-width: 0;
    }
    
    .user-name {
        font-size: 1.1rem;
        font-weight: 700;
        color: #ffffff;
        margin-bottom: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .user-role {
        font-size: 0.85rem;
        color: rgba(255,255,255,0.8);
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .mobile-menu-body {
        flex: 1;
        padding: 12px 0;
        overflow-y: auto;
    }
    
    .mobile-menu .nav-item {
        padding: 14px 20px;
        color: #ffffff;
        font-family: var(--font-primary);
        font-size: 0.9rem;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 14px;
        transition: all 0.2s;
        text-decoration: none;
        background: transparent;
        position: relative;
        margin: 0 12px 2px 12px;
        border-radius: 10px;
        border-left: 3px solid transparent;
    }
    
    .mobile-menu .nav-item i {
        font-size: 20px;
        color: rgba(255,255,255,0.9);
        width: 24px;
        text-align: center;
    }
    
    .mobile-menu .nav-item:active {
        background: rgba(255,255,255,0.1);
    }
    
    .mobile-menu .nav-item.active {
        background: rgba(255,255,255,0.15);
        color: #ffffff;
        font-weight: 600;
        border-left-color: #ffffff;
    }
    
    .mobile-menu .nav-item.active i {
        color: #ffffff;
    }
    
    .mobile-menu .nav-item.active span {
        color: #ffffff;
    }
    
    .mobile-menu .nav-item.logout {
        color: #ff6b6b;
        font-weight: 600;
        border-left-color: #ff6b6b;
    }
    
    .mobile-menu .nav-item.logout i {
        color: #ff6b6b;
    }
    
    .mobile-menu .nav-item.logout:active {
        background: rgba(255,107,107,0.15);
    }
    
    .mobile-menu-divider {
        height: 1px;
        background: rgba(255,255,255,0.1);
        margin: 12px 20px;
    }
    
    .mobile-menu-section {
        margin-bottom: 20px;
    }
    
    .mobile-menu-section:last-child {
        margin-bottom: 0;
    }
    
    .mobile-menu-section-title {
        padding: 12px 20px 8px 20px;
        font-size: 0.7rem;
        font-weight: 700;
        color: rgba(255,255,255,0.6);
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 4px;
    }
    
    /* Backdrop */
    .mobile-menu-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1001;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    
    .mobile-menu-backdrop.show {
        opacity: 1;
        pointer-events: all;
    }
}

/* ============================================
   MOBILE APP CARDS
   ============================================ */
@media (max-width: 991px) {
    .mobile-card {
        background: white;
        border-radius: var(--border-radius);
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-md);
        box-shadow: var(--shadow-sm);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }
    
    .mobile-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, #174175 0%, #1a5091 100%);
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .mobile-card:active {
        transform: scale(0.98);
        box-shadow: var(--shadow-md);
    }
    
    .mobile-card:active::before {
        opacity: 1;
    }
    
    .mobile-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: var(--spacing-md);
    }
    
    .mobile-card-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: #333;
        margin: 0;
    }
    
    .mobile-card-subtitle {
        font-size: 0.9rem;
        color: #666;
        margin: 4px 0 0 0;
    }
    
    .mobile-card-body {
        color: #555;
        line-height: 1.6;
    }
    
    .mobile-card-footer {
        display: flex;
        gap: var(--spacing-sm);
        margin-top: var(--spacing-md);
        padding-top: var(--spacing-md);
        border-top: 1px solid #f0f0f0;
    }
}

/* ============================================
   SWIPE ACTIONS
   ============================================ */
.swipe-container {
    position: relative;
    overflow: hidden;
}

.swipe-content {
    position: relative;
    z-index: 2;
    background: white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.swipe-actions {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding-right: var(--spacing-md);
    z-index: 1;
}

.swipe-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 100%;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.swipe-action.delete {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
}

.swipe-action.edit {
    background: var(--gradient-light);
}

.swipe-action.archive {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

/* ============================================
   PULL TO REFRESH
   ============================================ */
.pull-to-refresh {
    text-align: center;
    padding: var(--spacing-lg);
    color: #666;
    font-size: 0.9rem;
    display: none;
}

.pull-to-refresh.active {
    display: block;
}

.pull-to-refresh i {
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   BOTTOM SHEETS
   ============================================ */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    z-index: 1050;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.bottom-sheet.active {
    transform: translateY(0);
}

.bottom-sheet-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bottom-sheet-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.bottom-sheet-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.bottom-sheet-close:active {
    background: #e0e0e0;
    transform: scale(0.95);
}

.bottom-sheet-body {
    padding: var(--spacing-lg);
}

.bottom-sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1049;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.bottom-sheet-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   FLOATING ACTION BUTTON
   ============================================ */
.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-light);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(23,65,117,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
}

/* Adjust FAB position when bottom nav is visible */
@media (max-width: 991px) {
    .fab {
        bottom: 100px; /* Move up to avoid overlap with bottom nav */
    }
}

.fab.visible {
    opacity: 1;
    pointer-events: all;
}

.fab.active {
    display: flex;
}

.fab:active {
    transform: scale(0.9);
    box-shadow: 0 2px 8px rgba(23,65,117,0.3);
}

/* Hide FAB on very small screens to avoid overlap */
@media (max-width: 360px) {
    .fab {
        display: none !important;
    }
}

/* ============================================
   MOBILE APP FORMS
   ============================================ */
@media (max-width: 991px) {
    .mobile-form {
        background: white;
        border-radius: var(--border-radius);
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-md);
        box-shadow: var(--shadow-sm);
    }
    
    .form-control {
        border-radius: 12px;
        border: 2px solid #e0e0e0;
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        transition: all 0.2s;
        -webkit-appearance: none;
    }
    
    .form-control:focus {
        border-color: #174175;
        box-shadow: 0 0 0 4px rgba(23,65,117,0.1);
        outline: none;
    }
    
    .btn {
        height: 52px;
        border-radius: 12px;
        font-weight: 600;
        font-size: 1rem;
        border: none;
        box-shadow: var(--shadow-sm);
        transition: all 0.2s;
    }
    
    .btn:active {
        transform: scale(0.98);
        box-shadow: var(--shadow-md);
    }
    
    .btn-primary {
        background: var(--gradient-light);
        color: white;
    }
    
    .btn-success {
        background: linear-gradient(135deg, #28a745 0%, #218838 100%);
        color: white;
    }
    
    .btn-danger {
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
        color: white;
    }
}

/* ============================================
   HAPTIC FEEDBACK (iOS/Android)
   ============================================ */
.haptic-light {
    animation: haptic-light 0.1s;
}

.haptic-medium {
    animation: haptic-medium 0.15s;
}

.haptic-heavy {
    animation: haptic-heavy 0.2s;
}

@keyframes haptic-light {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.98); }
}

@keyframes haptic-medium {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.96); }
}

@keyframes haptic-heavy {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.94); }
}

/* ============================================
   SMOOTH SCROLLING
   ============================================ */
@media (max-width: 991px) {
    html {
        scroll-behavior: smooth;
        height: 100%;
    }
    
    body {
        min-height: 100%;
        /* Keep the main page scroll "native" on iOS/Android.
           Avoid forcing overflow scrolling on html/body (can break or get stuck on iOS). */
        touch-action: pan-y;
    }

    html:not(.scroll-locked),
    body:not(.scroll-locked) {
        overflow-y: visible !important;
    }

    html.scroll-locked,
    body.scroll-locked {
        overflow: hidden !important;
        height: 100% !important;
        touch-action: none;
    }

    .mobile-menu,
    .bottom-sheet {
        touch-action: pan-y;
    }
}

/* App version label (menu footer) */
.app-version {
    font-size: 12px;
    opacity: 0.75;
    padding: 8px 20px 14px 20px;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.2px;
    user-select: none;
    pointer-events: none;
}

/* Desktop dropdown version label */
.dropdown-menu .app-version {
    color: #6c757d;
    opacity: 0.9;
    padding: 10px 18px 6px 18px;
}

/* ============================================
   LOADING STATES
   ============================================ */
.mobile-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    color: #666;
}

.mobile-loading i {
    font-size: 48px;
    color: #174175;
    margin-bottom: var(--spacing-md);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.95); }
}

/* ============================================
   EMPTY STATES
   ============================================ */
.mobile-empty-state {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    color: #999;
}

.mobile-empty-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: var(--spacing-md);
}

.mobile-empty-state h3 {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: var(--spacing-sm);
}

.mobile-empty-state p {
    font-size: 0.95rem;
    color: #999;
}

/* ============================================
   PAGE HEADER (Mobile App Style)
   ============================================ */
.page-header-mobile {
    margin-bottom: 16px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #174175;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    font-weight: 400;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
}

/* ============================================
   MOBILE NUMBER INPUT
   ============================================ */
.mobile-number-input {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.number-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: var(--gradient-light);
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(23,65,117,0.2);
}

.number-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(23,65,117,0.3);
}

.number-btn i {
    pointer-events: none;
}

.mobile-number-input input {
    flex: 1;
    border: 2px solid #e0e0e0 !important;
    border-radius: 10px !important;
    background: #f8f9fa;
}

.mobile-number-input input:focus {
    border-color: #174175 !important;
    background: white;
    box-shadow: 0 0 0 4px rgba(23,65,117,0.1);
}

/* ============================================
   MOBILE TOAST NOTIFICATIONS
   ============================================ */
.mobile-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: white;
    color: #333;
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 10000;
    max-width: 90%;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 15px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.mobile-toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.mobile-toast::before {
    content: '';
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 16px 0 0 16px;
}

.mobile-toast-success::before {
    background: #28a745;
}

.mobile-toast-error::before,
.mobile-toast-danger::before {
    background: #dc3545;
}

.mobile-toast-warning::before {
    background: #ffc107;
}

.mobile-toast-info::before {
    background: #17a2b8;
}

.mobile-toast i {
    font-size: 20px;
}

.mobile-toast-success i {
    color: #28a745;
}

.mobile-toast-error i,
.mobile-toast-danger i {
    color: #dc3545;
}

.mobile-toast-warning i {
    color: #ffc107;
}

.mobile-toast-info i {
    color: #17a2b8;
}

/* ============================================
   MOBILE ALERT (Replace old alerts)
   ============================================ */
.modern-alert {
    position: fixed;
    top: 80px;
    left: 16px;
    right: 16px;
    z-index: 900; /* ensure nav (z-index:1001) stays above the alert */
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 16px;
    animation: slideDownMobile 0.3s ease;
    font-weight: 500;
    font-size: 15px;
}

@keyframes slideDownMobile {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modern-alert i {
    font-size: 24px;
    flex-shrink: 0;
}

.modern-alert .close {
    margin-left: auto;
    padding: 0;
    background: none;
    border: none;
    font-size: 24px;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.2s;
}

.modern-alert .close:hover {
    opacity: 1;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: block !important;
}

@media (max-width: 991px) {
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
}

/* Safe area for notched devices */
@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
    
    .fab {
        bottom: max(90px, calc(90px + env(safe-area-inset-bottom)));
    }
}

/* Force prevent horizontal scrolling */
@media (max-width: 991px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: relative;
    }
    
    .mobile-bottom-nav {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Ensure no element can cause horizontal scroll */
    * {
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    /* Fix any potential overflow issues */
    .container, .container-fluid, .row, [class*="col-"] {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

