/* style.css - Core Design System for OmniRisk */

:root {
    --bg-color: #050811;
    --panel-bg: rgba(10, 15, 30, 0.75);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-focus: rgba(59, 130, 246, 0.5);
    --text-color: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-color: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.35);
    --accent-hover: #1d4ed8;
    
    /* Risk Levels semantic colors */
    --risk-0: #4b5563; /* No Data / Minimal */
    --risk-1: #10b981; /* Very Low - Emerald */
    --risk-2: #34d399; /* Low - Green */
    --risk-3: #fbbf24; /* Medium - Amber */
    --risk-4: #f97316; /* High - Orange */
    --risk-5: #ef4444; /* Very High - Red */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* Glassmorphism Sidebar Control Panel */
.dashboard-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 440px;
    max-height: calc(100vh - 40px);
    background-color: var(--panel-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px;
    z-index: 10;
    box-shadow: 0 20px 50px 0 rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.dashboard-panel::-webkit-scrollbar {
    width: 6px;
}
.dashboard-panel::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.15);
    border-radius: 3px;
}

.header-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}

.logo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.badge {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.badge-btn {
    background-color: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.25);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.badge-btn:hover {
    background-color: rgba(59, 130, 246, 0.25);
    border-color: rgba(96, 165, 250, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.badge-btn:active {
    transform: translateY(0);
}

.about-map-btn {
    position: absolute;
    bottom: 24px;
    left: 20px;
    z-index: 15;
}

/* Address Autocomplete Search */
.search-group {
    display: flex;
    gap: 8px;
    position: relative;
}

.search-input {
    flex-grow: 1;
    background-color: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 12px 14px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 10px var(--accent-glow);
}

.btn-search {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-search:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.btn-reset {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    align-self: center;
    margin-right: 4px;
}

.btn-reset:hover {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.1);
}

.search-results {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    background-color: #0b0f19;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
    display: none;
}

.search-result-item {
    padding: 12px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-item:hover {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

/* Control Controls - Scenarios & Timeline */
.scenario-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.btn-scenario {
    background-color: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-scenario.active {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.timeline-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.timeline-label-active {
    color: #60a5fa;
}

.timeline-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    margin: 8px 0;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    border: 2px solid white;
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.timeline-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

/* Dashboard Information / Cards */
.intro-panel {
    text-align: center;
    padding: 30px 14px;
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px dashed var(--border-color);
    border-radius: 14px;
}

.intro-icon {
    font-size: 36px;
    animation: pulse 2s infinite ease-in-out;
}

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

.card {
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.location-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.location-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 70%;
}

.location-title {
    font-size: 16px;
    font-weight: 700;
    color: #60a5fa;
    white-space: normal;
    word-break: break-word;
}

.location-coordinates {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
}

/* Circular Overall Risk Score Indicator */
.score-circle {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 0 15px rgba(255,255,255,0.05);
}

.score-text {
    z-index: 2;
}

/* Individual Hazard Progress Bars */
.hazards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hazard-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hazard-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
}

.hazard-name {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hazard-value {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.bar-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* Recommendation Box */


/* Action Buttons */
.btn-block {
    display: flex;
    gap: 8px;
}

.btn-action {
    flex: 1;
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-action:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Loader overlay */
#loader {
    display: none;
    text-align: center;
    font-size: 13px;
    color: var(--accent-color);
    font-weight: 600;
    margin: 8px 0;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* Report Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(5, 8, 17, 0.85);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    width: 800px;
    max-width: 90%;
    height: 85vh;
    background-color: #0b0f19;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.8);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #60a5fa;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: white;
}

.modal-body {
    flex-grow: 1;
    padding: 30px 40px;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.6;
    color: #e5e7eb;
}

/* Markdown styling inside modal */
.report-content h1 {
    font-size: 22px;
    margin-bottom: 16px;
    border-bottom: 2px solid rgba(255,255,255,0.08);
    padding-bottom: 8px;
    background: none;
    -webkit-text-fill-color: initial;
}

.report-content h2 {
    font-size: 18px;
    margin: 24px 0 12px;
    color: #60a5fa;
}

.report-content h3 {
    font-size: 15px;
    margin: 16px 0 8px;
    color: #93c5fd;
}

.report-content p {
    margin-bottom: 12px;
}

.report-content ul {
    margin-bottom: 16px;
    padding-left: 20px;
}

.report-content li {
    margin-bottom: 6px;
}

.report-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Map layer controls */
.map-style-control {
    display: none !important;
    position: absolute;
    bottom: 24px;
    right: 50px;
    z-index: 10;
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 6px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 380px;
    justify-content: center;
}

.btn-map-type {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-map-type:hover {
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-map-type.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px var(--accent-glow);
    transform: translateY(0);
}

/* Semantic dynamic risk classes */
.c-0 { color: var(--risk-0); background-color: rgba(75, 85, 99, 0.12); }
.c-1 { color: var(--risk-1); background-color: rgba(16, 185, 129, 0.12); }
.c-2 { color: var(--risk-2); background-color: rgba(52, 211, 153, 0.12); }
.c-3 { color: var(--risk-3); background-color: rgba(251, 191, 36, 0.12); }
.c-4 { color: var(--risk-4); background-color: rgba(249, 115, 22, 0.12); }
.c-5 { color: var(--risk-5); background-color: rgba(239, 68, 68, 0.12); }

.bg-0 { background-color: var(--risk-0); }
.bg-1 { background-color: var(--risk-1); box-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }
.bg-2 { background-color: var(--risk-2); box-shadow: 0 0 10px rgba(52, 211, 153, 0.2); }
.bg-3 { background-color: var(--risk-3); box-shadow: 0 0 10px rgba(251, 191, 36, 0.2); }
.bg-4 { background-color: var(--risk-4); box-shadow: 0 0 10px rgba(249, 115, 22, 0.2); }
.bg-5 { background-color: var(--risk-5); box-shadow: 0 0 10px rgba(239, 68, 68, 0.2); }

/* PRINT STYLES - Hides the map and formats report perfectly */
@media print {
    body, html {
        background: white !important;
        color: black !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    #map, .dashboard-panel, .map-style-control, .modal-overlay .modal-header, .modal-overlay .modal-footer {
        display: none !important;
    }
    
    .modal-overlay {
        position: relative !important;
        background: white !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        height: auto !important;
        width: auto !important;
        display: block !important;
    }
    
    .modal-container {
        border: none !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        background: white !important;
    }
    
    .modal-body {
        padding: 0 !important;
        overflow: visible !important;
        color: black !important;
    }
    
    .report-content h1, .report-content h2, .report-content h3 {
        color: black !important;
        border-color: #ddd !important;
    }
}

/* ==========================================================================
   Monetization & Freemium Styles
   ========================================================================== */

.blur-text {
    filter: blur(5.5px);
    user-select: none;
    pointer-events: none;
    opacity: 0.65;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.score-subtitle {
    font-size: 11px;
    color: #ef4444;
    font-weight: 500;
    margin-top: 2px;
}

.paywall-card {
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
    width: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    animation: fadeIn 0.4s ease-out;
}

.paywall-card h3 {
    color: #f8fafc;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.paywall-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

.paywall-features {
    list-style: none;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.paywall-features li {
    font-size: 12px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.paywall-features li span {
    color: #10b981;
    font-weight: bold;
}

.stripe-checkout-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.stripe-checkout-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

.stripe-checkout-btn:active {
    transform: translateY(1px);
}

.danger-tag {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-right: 4px;
    text-transform: uppercase;
}

.locked-badge {
    background: rgba(148, 163, 184, 0.1) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    color: var(--text-muted) !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Auth & Portfolio UI Styles */
.auth-header-panel {
    position: absolute;
    top: 20px;
    right: 70px;
    z-index: 100;
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-nav {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-color);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-nav:hover {
    background-color: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.3);
}

.btn-nav-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-nav-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

.user-email-text {
    font-size: 13px;
    color: #e2e8f0;
    font-weight: 500;
}

.user-tier-badge {
    background-color: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    text-transform: uppercase;
}

.user-tier-badge.pro {
    background-color: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.35);
}

.btn-save-portfolio {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    color: #cbd5e1;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.btn-save-portfolio:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #fff;
}

/* Portfolio Table Styling */
.portfolio-table th, .portfolio-table td {
    padding: 12px 15px;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.portfolio-table tr:hover {
    background-color: rgba(255,255,255,0.02);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

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

/* Hide drag handle on desktop */
.panel-drag-handle {
    display: none;
}

/* Mobile-specific adjustments for smartphones and tablets */
@media (max-width: 768px) {
    /* Set viewport size/height constraints */
    body {
        height: 100%;
        overflow: hidden;
    }

    .modal-container {
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
    }

    #map {
        height: 100vh;
        width: 100vw;
    }

    /* Auth panel mobile optimizations */
    .auth-header-panel {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        gap: 8px;
        z-index: 20;
    }

    .user-email-text {
        display: none !important;
    }

    /* Convert sidebar dashboard panel to slide-up Bottom Sheet */
    .dashboard-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        top: auto;
        width: 100vw;
        height: 75vh;
        max-height: 75vh;
        border-radius: 24px 24px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding: 16px 20px 30px 20px;
        gap: 12px;
        transform: translateY(calc(100% - 130px));
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
    }

    /* Show drag handle only on mobile */
    .panel-drag-handle {
        display: block;
        width: 48px;
        height: 5px;
        background-color: rgba(255, 255, 255, 0.25);
        border-radius: 3px;
        margin: -10px auto 12px auto;
        cursor: pointer;
    }

    /* Expand class when bottom sheet is pulled up */
    .dashboard-panel.expanded {
        transform: translateY(0);
    }

    /* Hide the long subtitle on mobile to fit the search bar in the collapsed peek state */
    .subtitle {
        display: none;
    }

    /* Search results dropdown mobile styling */
    .search-results {
        position: absolute;
        top: 48px;
        max-height: 180px;
        z-index: 200;
    }

    /* Make buttons and inputs easy to tap (min 44px height for mobile touch targets) */
    .search-input, .btn-search, .btn-scenario, .timeline-slider {
        font-size: 16px; /* Prevents auto-zoom on iOS Safari */
    }

    .btn-search, .search-input {
        height: 44px;
        padding: 10px 14px;
    }

    .scenario-selector {
        padding: 2px;
    }

    .btn-scenario {
        padding: 8px 4px;
    }
}

