/**
 * Dialed Mobile App CSS
 * Apple-Quality Mobile Experience
 * Version 2.0 - Complete Overhaul
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --mobile-header-height: 56px;
    --mobile-nav-height: 64px;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);

    /* Calculated heights for content padding */
    --mobile-header-total: calc(var(--mobile-header-height) + var(--safe-area-top));
    --mobile-nav-total: calc(var(--mobile-nav-height) + var(--safe-area-bottom));

    /* Colors */
    --mobile-primary: #2D2438;
    --mobile-primary-dark: #1A1520;
    --mobile-accent: #7DD3C0;
    --mobile-text: #F8F6FA;
    --mobile-text-muted: #7A7085;
    --mobile-border: rgba(248, 246, 250, 0.1);
}

/* ============================================
   MOBILE HEADER - Fixed Top Bar
   ============================================ */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mobile-header-total);
    padding-top: var(--safe-area-top);
    background: linear-gradient(135deg, var(--mobile-primary-dark) 0%, var(--mobile-primary) 100%);
    border-bottom: 1px solid var(--mobile-border);
    z-index: 9999;
    align-items: center;
    justify-content: space-between;
    padding-left: calc(16px + var(--safe-area-left));
    padding-right: calc(16px + var(--safe-area-right));
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
}

.mobile-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-header .menu-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: none;
    background: rgba(248, 246, 250, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--mobile-text);
    transition: background 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-header .menu-toggle:active {
    background: rgba(248, 246, 250, 0.2);
    transform: scale(0.95);
}

.mobile-header .menu-toggle svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.mobile-header .logo {
    font-family: 'Satoshi', sans-serif;
    font-size: 1.375rem;
    font-weight: 600;
    color: #FDFCFA;
    letter-spacing: -0.03em;
}

.mobile-header .header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mobile-header .header-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: none;
    background: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #B8A9C9;
    position: relative;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-header .header-btn:active {
    background: rgba(248, 246, 250, 0.1);
    transform: scale(0.95);
}

.mobile-header .header-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.75;
}

.mobile-header .header-btn .badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: var(--mobile-accent);
    border-radius: 50%;
    border: 2px solid var(--mobile-primary-dark);
}

.mobile-header .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mobile-accent) 0%, #5ABAA6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mobile-primary-dark);
    font-weight: 600;
    font-size: 0.875rem;
    font-family: 'Satoshi', sans-serif;
    margin-left: 4px;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION - Fixed Bottom Bar
   ============================================ */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-nav-total);
    padding-bottom: var(--safe-area-bottom);
    background: linear-gradient(180deg, var(--mobile-primary) 0%, var(--mobile-primary-dark) 100%);
    border-top: 1px solid var(--mobile-border);
    z-index: 9999;
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
}

.mobile-bottom-nav .nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: var(--mobile-nav-height);
    padding: 0 4px;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--mobile-text-muted);
    font-size: 0.625rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    padding: 8px 12px;
    border-radius: 14px;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 60px;
    min-height: 52px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.mobile-bottom-nav .nav-item:active {
    transform: scale(0.92);
}

.mobile-bottom-nav .nav-item.active {
    color: var(--mobile-accent);
    background: rgba(125, 211, 192, 0.12);
}

.mobile-bottom-nav .nav-item .nav-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

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

.mobile-bottom-nav .nav-item .nav-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.75;
}

.mobile-bottom-nav .nav-item .nav-label {
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* ============================================
   MOBILE SLIDE-OUT MENU
   ============================================ */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 21, 32, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

.mobile-slide-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: linear-gradient(180deg, var(--mobile-primary) 0%, var(--mobile-primary-dark) 100%);
    z-index: 10001;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    padding-top: var(--safe-area-top);
    padding-bottom: var(--safe-area-bottom);
    padding-left: var(--safe-area-left);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.mobile-slide-menu.active {
    transform: translateX(0);
}

.mobile-slide-menu .menu-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--mobile-border);
    display: flex;
    align-items: center;
    gap: 14px;
}

.mobile-slide-menu .menu-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mobile-accent) 0%, #5ABAA6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mobile-primary-dark);
    font-weight: 600;
    font-size: 1.25rem;
    font-family: 'Satoshi', sans-serif;
    flex-shrink: 0;
}

.mobile-slide-menu .menu-user-info h3 {
    color: #FDFCFA;
    font-family: 'Satoshi', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.mobile-slide-menu .menu-user-info p {
    color: var(--mobile-accent);
    font-size: 0.8125rem;
    margin: 4px 0 0 0;
}

.mobile-slide-menu .menu-section {
    padding: 16px 16px;
    border-bottom: 1px solid rgba(248, 246, 250, 0.05);
}

.mobile-slide-menu .menu-section-title {
    color: var(--mobile-text-muted);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 8px;
    margin-bottom: 10px;
}

.mobile-slide-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    border-radius: 12px;
    color: #B8A9C9;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 48px;
}

.mobile-slide-menu .menu-item:active {
    background: rgba(248, 246, 250, 0.1);
    transform: scale(0.98);
}

.mobile-slide-menu .menu-item.active {
    background: rgba(125, 211, 192, 0.12);
    color: var(--mobile-accent);
}

.mobile-slide-menu .menu-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.75;
    flex-shrink: 0;
}

.mobile-slide-menu .menu-footer {
    padding: 20px;
    margin-top: auto;
}

.mobile-slide-menu .logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: rgba(196, 84, 84, 0.12);
    border: 1px solid rgba(196, 84, 84, 0.25);
    border-radius: 12px;
    color: #C45454;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-slide-menu .logout-btn:active {
    background: rgba(196, 84, 84, 0.2);
    transform: scale(0.98);
}

.mobile-slide-menu .logout-btn svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   RESPONSIVE BREAKPOINTS - MOBILE VIEW
   ============================================ */
@media (max-width: 900px) {
    /* Show mobile navigation elements */
    .mobile-header,
    .mobile-bottom-nav {
        display: flex;
    }

    .mobile-menu-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-menu-overlay.active {
        pointer-events: auto;
    }

    /* Hide ALL desktop sidebars */
    .sidebar,
    .portal-sidebar,
    .admin-sidebar,
    aside.sidebar,
    nav.sidebar,
    [class*="sidebar"]:not(.mobile-slide-menu) {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Hide desktop portal header */
    .portal-header,
    .dashboard-header,
    header.portal-header {
        display: none !important;
    }

    /* Reset root sidebar width */
    :root {
        --sidebar-width: 0px !important;
    }

    /* ============================================
       MAIN CONTENT AREA - Critical Spacing
       ============================================ */
    html {
        overflow-x: hidden;
    }

    body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: auto;
    }

    .portal-layout {
        display: block !important;
    }

    /* Primary content containers */
    .portal-main,
    main.portal-main,
    .main-content,
    main {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-top: calc(var(--mobile-header-total) + 16px) !important;
        padding-bottom: calc(var(--mobile-nav-total) + 24px) !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-height: 100vh;
        box-sizing: border-box;
    }

    .portal-content {
        padding: 0 !important;
        padding-top: 0 !important;
        min-height: auto;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* ============================================
       PAGE HEADERS
       ============================================ */
    .page-header,
    .samples-header,
    .content-header,
    .section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 0 !important;
        margin-bottom: 16px !important;
    }

    .page-header h1,
    .page-title,
    .samples-title h1,
    .page-header-left h1 {
        font-size: 1.5rem !important;
        line-height: 1.25 !important;
        margin-bottom: 4px !important;
    }

    .page-header p,
    .page-subtitle,
    .samples-title p,
    .page-header-left p {
        font-size: 0.875rem !important;
    }

    .header-actions,
    .samples-actions,
    .page-header .actions {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }

    .header-actions .btn,
    .samples-actions .btn {
        flex: 1 !important;
        justify-content: center !important;
        padding: 12px 16px !important;
        font-size: 0.875rem !important;
    }

    /* ============================================
       CARDS & STAT GRIDS
       ============================================ */
    .stats-row,
    .stat-grid,
    .quick-stats {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .stat-card,
    .metric-card {
        padding: 14px !important;
        border-radius: 12px !important;
    }

    .stat-value {
        font-size: 1.375rem !important;
    }

    .stat-label {
        font-size: 0.6875rem !important;
    }

    /* Single column for main content cards */
    .samples-grid,
    .dashboard-grid,
    .cards-grid,
    .metrics-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    /* ============================================
       FILTER TABS - Horizontal Scroll
       ============================================ */
    .filter-tabs,
    .category-tabs,
    .tabs,
    .tab-nav {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        gap: 6px !important;
        padding: 4px !important;
        margin: 0 -16px 16px -16px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .filter-tabs::-webkit-scrollbar,
    .category-tabs::-webkit-scrollbar,
    .tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-tab,
    .category-tab,
    .tab {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        padding: 10px 16px !important;
        font-size: 0.8125rem !important;
        min-height: 44px !important;
    }

    /* ============================================
       DOCUMENTS TOOLBAR
       ============================================ */
    .docs-toolbar {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .search-wrapper {
        min-width: 100% !important;
        width: 100% !important;
    }

    /* ============================================
       BUTTONS - Touch Optimized
       ============================================ */
    .btn {
        min-height: 44px !important;
        padding: 12px 20px !important;
        font-size: 0.9375rem !important;
        border-radius: 12px !important;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .btn:active {
        transform: scale(0.97);
        opacity: 0.9;
    }

    .btn-group,
    .button-group,
    .action-buttons {
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .btn-group .btn,
    .button-group .btn {
        width: 100% !important;
    }

    /* ============================================
       FORMS - iOS Zoom Prevention
       ============================================ */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents iOS zoom */
        padding: 14px !important;
        border-radius: 12px !important;
        min-height: 48px !important;
        -webkit-appearance: none;
    }

    .form-row,
    .form-grid,
    .input-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .form-group {
        margin-bottom: 16px !important;
        width: 100% !important;
    }

    /* ============================================
       TABLES & FILE LISTS - Horizontal Scroll
       ============================================ */
    .table-container,
    .docs-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 -16px !important;
        padding: 0 16px !important;
        border-radius: 0 !important;
    }

    .file-row {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 12px 16px !important;
    }

    .file-info {
        flex: 1 1 100% !important;
    }

    .file-date,
    .file-size {
        font-size: 0.75rem !important;
    }

    .file-status {
        display: none !important;
    }

    .file-actions {
        flex-shrink: 0;
    }

    .action-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }

    table,
    .data-table {
        min-width: 500px !important;
        font-size: 0.8125rem !important;
    }

    th, td {
        padding: 10px 12px !important;
        white-space: nowrap !important;
    }

    /* ============================================
       MESSAGES PAGE - Special Layout
       ============================================ */
    .messages-page,
    .messaging-layout {
        height: calc(100vh - var(--mobile-header-total) - var(--mobile-nav-total)) !important;
        margin: 0 -16px !important;
        padding: 0 !important;
    }

    .conversations-panel {
        width: 100% !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        z-index: 10 !important;
    }

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

    .back-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
    }

    .message-input-container {
        padding: 12px !important;
        padding-bottom: calc(12px + var(--safe-area-bottom)) !important;
    }

    .message-textarea {
        font-size: 16px !important;
        min-height: 44px !important;
    }

    .send-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
    }

    /* ============================================
       MODALS - Mobile Optimized
       ============================================ */
    .modal,
    .modal-overlay {
        padding: 16px !important;
        padding-top: calc(16px + var(--safe-area-top)) !important;
        padding-bottom: calc(16px + var(--safe-area-bottom)) !important;
    }

    .modal-content,
    .modal-dialog,
    .modal > div {
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(100vh - 100px - var(--safe-area-top) - var(--safe-area-bottom)) !important;
        margin: 0 !important;
        border-radius: 20px !important;
    }

    .modal-header,
    .modal-footer {
        padding: 16px 20px !important;
    }

    .modal-body {
        padding: 20px !important;
        max-height: calc(100vh - 220px - var(--safe-area-top) - var(--safe-area-bottom)) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* ============================================
       TOAST NOTIFICATIONS - Above Bottom Nav
       ============================================ */
    .toast-container {
        bottom: calc(var(--mobile-nav-total) + 16px) !important;
        left: 16px !important;
        right: 16px !important;
    }

    .toast {
        min-width: auto !important;
        width: 100% !important;
    }

    /* ============================================
       SAMPLE CARDS
       ============================================ */
    .sample-card {
        border-radius: 12px !important;
    }

    .sample-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 14px !important;
    }

    .sample-body {
        padding: 14px !important;
    }

    .sample-details {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .progress-tracker {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 8px !important;
        margin: 0 -14px !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .progress-step .step-icon {
        width: 32px !important;
        height: 32px !important;
    }

    .progress-step .step-label {
        font-size: 0.625rem !important;
    }

    /* ============================================
       AI SUMMARY SECTION
       ============================================ */
    .ai-summary {
        border-radius: 12px !important;
        padding: 14px !important;
    }

    .ai-actions {
        flex-wrap: wrap !important;
    }

    .ai-btn {
        flex: 1 1 calc(50% - 6px) !important;
        justify-content: center !important;
        min-width: 100px !important;
        padding: 10px 14px !important;
    }

    /* ============================================
       CARD ACTIONS
       ============================================ */
    .card-actions {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .card-actions .btn {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: 100px !important;
    }

    /* ============================================
       TYPOGRAPHY SCALING
       ============================================ */
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
    h3 { font-size: 1.125rem !important; }
    h4 { font-size: 1rem !important; }

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

    .mobile-only,
    .show-mobile {
        display: block !important;
    }

    /* Horizontal overflow prevention */
    .portal-content > *,
    .page-content > * {
        max-width: 100% !important;
    }

    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* ============================================
   SMALL MOBILE (< 400px)
   ============================================ */
@media (max-width: 400px) {
    .mobile-header .logo {
        font-size: 1.25rem;
    }

    .mobile-bottom-nav .nav-item {
        min-width: 52px;
        padding: 6px 8px;
    }

    .mobile-bottom-nav .nav-item .nav-label {
        font-size: 0.5625rem;
    }

    .mobile-bottom-nav .nav-item .nav-icon svg {
        width: 22px;
        height: 22px;
    }

    .stats-row,
    .quick-stats {
        grid-template-columns: 1fr !important;
    }

    .sample-details {
        grid-template-columns: 1fr !important;
    }

    .ai-btn {
        flex: 1 1 100% !important;
    }

    .card-actions .btn {
        flex: 1 1 100% !important;
    }

    .page-header h1,
    .page-title {
        font-size: 1.25rem !important;
    }

    .stat-value {
        font-size: 1.25rem !important;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION
   ============================================ */
@media (max-width: 900px) and (orientation: landscape) {
    :root {
        --mobile-header-height: 48px;
        --mobile-nav-height: 52px;
    }

    .mobile-bottom-nav .nav-item .nav-label {
        display: none;
    }

    .mobile-bottom-nav .nav-item {
        min-width: 44px;
        padding: 8px 12px;
    }

    .mobile-slide-menu {
        width: 260px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .mobile-slide-menu,
    .mobile-menu-overlay,
    .mobile-bottom-nav .nav-item,
    .mobile-header .header-btn,
    .btn {
        transition: none !important;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn,
    button,
    a.nav-item,
    .menu-item,
    .file-row,
    .conversation-item,
    .filter-tab {
        min-height: 44px;
    }

    /* Remove hover states that cause sticky on touch */
    .btn:hover,
    button:hover,
    a:hover,
    .nav-item:hover,
    .menu-item:hover {
        transform: none !important;
    }

    /* Active states only */
    .btn:active,
    button:active {
        transform: scale(0.97);
        opacity: 0.9;
    }
}

/* ============================================
   PWA STANDALONE MODE
   ============================================ */
@media (display-mode: standalone) {
    .mobile-header {
        padding-top: calc(var(--safe-area-top) + 4px);
    }

    html, body {
        /* Prevent overscroll bounce on iOS */
        overscroll-behavior: none;
    }
}

/* ============================================
   NOTCH / DYNAMIC ISLAND SUPPORT
   ============================================ */
@supports (padding-top: env(safe-area-inset-top)) {
    .mobile-header {
        padding-top: max(var(--safe-area-top), 0px);
    }

    .mobile-bottom-nav {
        padding-bottom: max(var(--safe-area-bottom), 0px);
    }
}
