@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background-color: #F8FAFC;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Sidebar scrollbar --- */
.sidebar { scrollbar-width: thin; scrollbar-color: #CBD5E0 transparent; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #CBD5E0; border-radius: 3px; }

/* --- Dash dropdown overrides --- */
.Select-control {
    border: 1px solid #E2E8F0 !important;
    border-radius: 6px !important;
    min-height: 36px !important;
}
.Select-control:hover { border-color: #CBD5E0 !important; }
.is-focused .Select-control {
    border-color: #135773 !important;
    box-shadow: 0 0 0 1px #135773 !important;
}
.Select-placeholder, .Select-value-label { font-size: 13px !important; }
.Select-menu-outer {
    border: 1px solid #E2E8F0 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}

/* --- Button hover --- */
.btn-primary:hover { opacity: 0.85; }
.btn-primary:active { opacity: 0.75; }

/* --- 3D Help Button --- */
.help-tour-btn {
    width: 40px; height: 40px;
    border-radius: 50%; border: none; cursor: pointer;
    font-size: 18px; font-weight: 800; color: white;
    background: linear-gradient(135deg, #1a6d8a 0%, #135773 50%, #0e4058 100%);
    box-shadow:
        0 4px 6px rgba(19, 87, 115, 0.35),
        0 1px 3px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
}
.help-tour-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 12px rgba(19, 87, 115, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.help-tour-btn:active {
    transform: translateY(1px);
    box-shadow:
        0 1px 2px rgba(19, 87, 115, 0.3),
        inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
@keyframes help-pulse {
    0%, 100% { box-shadow: 0 4px 6px rgba(19, 87, 115, 0.35), 0 1px 3px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.2); }
    50% { box-shadow: 0 4px 14px rgba(19, 87, 115, 0.5), 0 0 0 6px rgba(19, 87, 115, 0.12), inset 0 1px 0 rgba(255,255,255,0.2); }
}
.help-tour-btn { animation: help-pulse 2.5s ease-in-out 3; }

/* --- Intro.js Overrides --- */
.introjs-tooltip {
    border-radius: 10px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
    max-width: 380px !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}
.introjs-tooltiptext {
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: #334155 !important;
    padding: 12px 16px !important;
}
.introjs-tooltip-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #135773 !important;
}
.introjs-button {
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 6px 14px !important;
    text-shadow: none !important;
    border: 1px solid #E2E8F0 !important;
}
.introjs-nextbutton, .introjs-donebutton {
    background: #135773 !important;
    color: white !important;
    border-color: #135773 !important;
}
.introjs-nextbutton:hover, .introjs-donebutton:hover {
    background: #0e4058 !important;
}
.introjs-prevbutton {
    background: white !important;
    color: #64748B !important;
}
.introjs-helperLayer {
    border-radius: 8px !important;
    box-shadow: rgba(19, 87, 115, 0.5) 0 0 0 0, rgba(19, 87, 115, 0.15) 0 0 0 5000px !important;
}
.introjs-arrow { border-width: 8px !important; }
.introjs-bullets ul li a.active {
    background: #135773 !important;
}
.introjs-progress .introjs-progressbar {
    background: #135773 !important;
}
.introjs-skipbutton {
    color: #94A3B8 !important;
    font-size: 14px !important;
}
.introjs-tooltip {
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}
.introjs-helperLayer {
    transition: all 0.35s ease !important;
}
.introjs-overlay {
    transition: opacity 0.3s ease !important;
}

/* --- Download button hover --- */
button[id^="dl-png-"]:hover,
button[id^="dl-csv-btn-"]:hover {
    border-color: #135773;
    color: #135773;
}

/* --- Welcome Overlay --- */
.welcome-overlay {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    animation: welcome-fade-in 0.35s ease both;
}
.welcome-overlay.welcome-fade-out { animation: welcome-fade-out 0.3s ease both; }
.welcome-card {
    background: white; border-radius: 14px; padding: 36px 32px 28px;
    max-width: 420px; width: 90%; text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.welcome-title { color: #135773; font-size: 20px; font-weight: 700; margin: 0 0 12px; }
.welcome-text { color: #64748B; font-size: 14px; line-height: 1.55; margin: 0 0 16px; }
.welcome-buttons { display: flex; gap: 12px; justify-content: center; }
.welcome-btn-tour {
    background: #135773; color: white; border: none; border-radius: 8px;
    padding: 10px 24px; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background 0.2s;
}
.welcome-btn-tour:hover { background: #0e4058; }
.welcome-btn-skip {
    background: transparent; color: #64748B; border: 1px solid #E2E8F0; border-radius: 8px;
    padding: 10px 20px; font-size: 14px; font-weight: 500; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    transition: border-color 0.2s;
}
.welcome-btn-skip:hover { border-color: #CBD5E0; }
.welcome-skip-hint { display: block; font-size: 11px; color: #94A3B8; font-weight: 400; }
@keyframes welcome-fade-in {
    from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); }
}
@keyframes welcome-fade-out {
    from { opacity: 1; } to { opacity: 0; }
}

