/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: #0a0e17; color: #e2e8f0; }

#map { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; }

/* ── Glass-morphism Panel ──────────────────────────────────── */
.glass-panel {
    background: rgba(12, 17, 30, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.04);
    color: #e2e8f0;
    padding: 16px;
    max-height:1000px;
}

/* ── Logo ──────────────────────────────────────────────────── */
#logo-container {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
}
#logo-container img {
    height: 48px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}

/* ── Side Panels ───────────────────────────────────────────── */
.side-panel {
    position: fixed;
    top: 100px;
    width: 270px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    z-index: 1000;
}
.left-panel { left: 16px; }
.right-panel { right: 16px; }

.side-panel::-webkit-scrollbar { width: 4px; }
.side-panel::-webkit-scrollbar-track { background: transparent; }
.side-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.panel-section { margin-bottom: 16px; }
.panel-section:last-child { margin-bottom: 0; }

.panel-section-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffffff;
    margin-bottom: 8px;
}

/* ── Mode Badge ────────────────────────────────────────────── */
.mode-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.mode-observation { background: #1d4ed8; color: #dbeafe; }
.mode-forecast {
    background: #dc2626;
    color: #fecaca;
    animation: pulse-forecast 1.5s ease-in-out infinite;
}
@keyframes pulse-forecast {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50% { opacity: 0.85; box-shadow: 0 0 12px 4px rgba(220, 38, 38, 0.2); }
}

/* Forecast mode tint on events panel */
#events-panel.forecast-mode {
    border-color: rgba(220, 38, 38, 0.25);
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.12), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ── AI Analysis Box ───────────────────────────────────────── */
.ai-analysis-box {
    margin-top: 10px;


}
.ai-analysis-box .panel-section-title {
    margin-bottom: 10px;
}
.ai-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #94a3b8;
    padding: 8px 0;
}
.ai-loading .small-spinner {
    width: 16px;
    height: 16px;
    border-width: 2px;
    flex-shrink: 0;
}
#ai-analysis-content {
    font-size: 12px;
    line-height: 1.65;
    color: #cbd5e1;
    max-height: 800px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(100,116,139,0.3) transparent;
}
#ai-analysis-content::-webkit-scrollbar {
    width: 4px;
}
#ai-analysis-content::-webkit-scrollbar-thumb {
    background: rgba(100,116,139,0.3);
    border-radius: 2px;
}
#ai-analysis-content::-webkit-scrollbar-track {
    background: transparent;
}
#ai-analysis-content p {
    margin: 0 0 8px;
}
#ai-analysis-content h1, #ai-analysis-content h2, #ai-analysis-content h3,
#ai-analysis-content h4, #ai-analysis-content h5, #ai-analysis-content h6 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #e2e8f0;
    margin: 12px 0 6px;
}
#ai-analysis-content h1:first-child, #ai-analysis-content h2:first-child,
#ai-analysis-content h3:first-child {
    margin-top: 0;
}
#ai-analysis-content strong {
    color: #e2e8f0;
}
#ai-analysis-content ul {
    margin: 4px 0 8px;
    padding-left: 16px;
}
#ai-analysis-content li {
    margin-bottom: 4px;
}
#ai-analysis-content .ai-date {
    color: #60a5fa;
    font-weight: 600;
    cursor: pointer;
}
#ai-analysis-content .ai-date:hover {
    text-decoration: underline;
}

/* ── Date Display ──────────────────────────────────────────── */
.date-display {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Event Cards ───────────────────────────────────────────── */
.event-card {
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}
.event-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}
.event-card.focused {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.3);
}
.event-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.event-label {
    font-size: 11px;
    font-weight: 600;
}
.bloom-age {
    font-size: 9px;
    color: #475569;
    margin-top: 1px;
}
#events-list {
    margin-bottom:20px;
}
.event-area {
    font-size: 10px;
    color: #64748b;
}
.intensity-bar-bg {
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-bottom: 4px;
}
.intensity-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.event-stats {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #64748b;
}

/* ── Layer Buttons ─────────────────────────────────────────── */
.layer-btn-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.layer-btn {
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}
.layer-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #e2e8f0;
}
.layer-btn.active {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.5);
    color: #60a5fa;
}

/* ── Toggle Switches ───────────────────────────────────────── */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    cursor: pointer;
    font-size: 12px;
    color: #94a3b8;
}
.toggle-row input[type="checkbox"] {
    display: none;
}
.toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #64748b;
    transition: all 0.2s;
}
.toggle-row input:checked + .toggle-switch {
    background: rgba(37, 99, 235, 0.5);
}
.toggle-row input:checked + .toggle-switch::after {
    left: 18px;
    background: #60a5fa;
}

/* ── Intensity Legend ──────────────────────────────────────── */
.legend-gradient {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #00ff00, #adff2f, #ffff00, #ffa500, #ff4500, #ff0000, #8b0000);
    margin-bottom: 4px;
}
.legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #64748b;
}

/* ── Bottom Panel: Timeline ────────────────────────────────── */
.bottom-panel {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    min-width: 480px;
    max-width: 700px;
    width: 50vw;
    padding: 14px 20px;
}

.transport-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.transport-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s;
    letter-spacing: -2px;
}
.transport-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}
.transport-btn-play {
    width: 44px;
    height: 44px;
    font-size: 16px;
    letter-spacing: -1px;
}
.transport-btn-play.playing {
    background: rgba(37, 99, 235, 0.3);
    border-color: rgba(96, 165, 250, 0.5);
    color: #60a5fa;
}

.speed-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 11px;
    cursor: pointer;
    outline: none;
    margin-left: 8px;
}
.speed-select option { background: #1a1f2e; color: #e2e8f0; }

/* ── Timeline Bar ──────────────────────────────────────────── */
#timeline-bar {
    display: flex;
    gap: 2px;
    margin-bottom: 6px;
}
.timeline-marker {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}
.timeline-marker:hover { transform: scaleY(1.8); }
.timeline-marker.observation { background: rgba(59, 130, 246, 0.6); }
.timeline-marker.forecast { background: rgba(239, 68, 68, 0.6); }
.timeline-marker.active {
    background: #fbbf24 !important;
    transform: scaleY(2.2);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}
.timeline-marker.empty { background: rgba(255, 255, 255, 0.06); }

#timeline-date-label {
    text-align: center;
    font-size: 11px;
    color: #64748b;
    letter-spacing: 0.5px;
}

/* ── Loading Overlay ───────────────────────────────────────── */
#loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(8, 12, 24, 0.96);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#loading-content {
    text-align: center;
    max-width: 360px;
}
.loading-logo {
    height: 64px;
    margin-bottom: 32px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.08);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}
.small-spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
    margin: 0 0 0 0;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
#loading-text {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 16px;
    min-height: 20px;
}
.loading-progress-track {
    width: 280px;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}
#loading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ── Error Overlay ─────────────────────────────────────────── */
#error-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(8, 12, 24, 0.96);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#error-content {
    text-align: center;
    max-width: 400px;
}
#error-text {
    font-size: 15px;
    color: #94a3b8;
    margin-bottom: 24px;
    line-height: 1.6;
}
.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ── User Bar ──────────────────────────────────────────────── */
#user-bar {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(12, 17, 30, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 6px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
#user-name {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#btn-logout {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
#btn-logout:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-glass {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 8px;
    border: none;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}
.btn-glass:hover { background: #1d4ed8; }
.btn-glass-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
}
.btn-glass-outline:hover {
    background: rgba(255,255,255,0.05);
    color: #e2e8f0;
}
.btn-glass-danger {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-glass-danger:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.6);
    color: #fca5a5;
}

/* ── Small Loader ──────────────────────────────────────────── */
#small-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1500;
}
.small-loader-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(12, 17, 30, 0.88);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
    color: #94a3b8;
}

/* ── Toast ─────────────────────────────────────────────────── */
#toast-container {
    position: fixed;
    bottom: 100px;
    right: 16px;
    z-index: 1800;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast-msg {
    background: rgba(12, 17, 30, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: #94a3b8;
    animation: toast-in 0.3s ease, toast-out 0.3s ease 2.7s forwards;
}
@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ── Mobile Panel Toggles ─────────────────────────────────── */
.mobile-panel-toggle {
    display: none;
    position: fixed;
    top: 18px;
    z-index: 1002;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(12, 17, 30, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #94a3b8;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}
.mobile-panel-toggle:hover {
    background: rgba(12, 17, 30, 0.95);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.2);
}
.mobile-panel-toggle.active {
    background: rgba(37, 99, 235, 0.25);
    border-color: rgba(96, 165, 250, 0.4);
    color: #60a5fa;
}
.left-toggle { left: 16px; }
.right-toggle { right: 16px; }

/* ── Mobile Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
    .mobile-panel-toggle {
        display: flex;
    }

    #logo-container {
        left: 50%;
        transform: translateX(-50%);
    }
    #logo-container img {
        height: 36px;
    }

    .side-panel {
        top: 0;
        width: 280px;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        padding-top: 80px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        will-change: transform, opacity;
    }
    .left-panel {
        left: 0;
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
    }
    .left-panel.panel-open {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }
    .right-panel {
        right: 0;
        transform: translateX(100%);
        opacity: 0;
        pointer-events: none;
    }
    .right-panel.panel-open {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* Mobile overlay behind open panels */
    .panel-backdrop {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
    }
    .panel-backdrop.visible {
        display: block;
    }

    .bottom-panel {
        min-width: unset;
        width: calc(100vw - 32px);
        max-width: none;
        padding: 10px 14px;
        bottom: 12px;
    }

    #user-bar {
        top: 20px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        padding: 4px 10px;
    }
    #user-name {
        max-width: 120px;
        font-size: 11px;
    }
}

/* ── User Bar Icon Buttons ─────────────────────────────────── */
.user-bar-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
}
.user-bar-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ── Modal Overlay ────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}
.modal-content {
    position: relative;
    width: 340px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1051;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-title {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
}
.modal-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}
.modal-close:hover {
    color: #e2e8f0;
}

/* ── AOI List Items ───────────────────────────────────────── */
.aoi-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}
.aoi-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}
.aoi-color-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.aoi-item-info {
    flex: 1;
    min-width: 0;
}
.aoi-item-name {
    font-size: 12px;
    font-weight: 500;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aoi-item-radius {
    font-size: 10px;
    color: #64748b;
}
.aoi-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.aoi-item-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 12px;
    transition: all 0.2s;
}
.aoi-item-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}
.aoi-item-btn.delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}
.aoi-empty {
    text-align: center;
    padding: 20px 0;
    font-size: 12px;
    color: #64748b;
}

/* ── AOI Form ─────────────────────────────────────────────── */
.aoi-form-group {
    margin-bottom: 14px;
}
.aoi-form-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748b;
    margin-bottom: 6px;
}
.aoi-form-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.aoi-form-input:focus {
    border-color: rgba(96, 165, 250, 0.5);
}
.aoi-form-range {
    width: 100%;
    accent-color: #60a5fa;
}
.aoi-form-select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.aoi-form-select:focus {
    border-color: rgba(96, 165, 250, 0.5);
}
.aoi-form-select option {
    background: #1a1f2e;
    color: #e2e8f0;
}
.aoi-form-color {
    width: 40px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: none;
    cursor: pointer;
    padding: 1px;
}
.aoi-form-input.error {
    border-color: rgba(239, 68, 68, 0.6);
    animation: shake 0.3s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ── Placement Mode ───────────────────────────────────────── */
.placement-mode .leaflet-container {
    cursor: crosshair !important;
}

/* ── AOI Marker Icon ──────────────────────────────────────── */
.aoi-marker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

/* ── Leaflet Overrides ─────────────────────────────────────── */
.leaflet-control-zoom a {
    background: rgba(12, 17, 30, 0.8) !important;
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,0.1) !important;
    backdrop-filter: blur(8px);
}
.leaflet-control-zoom a:hover {
    background: rgba(30, 40, 60, 0.9) !important;
}
.leaflet-control-attribution {
    background: rgba(12, 17, 30, 0.6) !important;
    color: #64748b !important;
    font-size: 9px !important;
}
.leaflet-control-attribution a { color: #94a3b8 !important; }
