/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(120deg, #f5f7fa 0%, #c9e7ff 100%);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.5s;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 1.2rem 0 1rem 0;
    box-shadow: 0 2px 16px rgba(44,62,80,0.10);
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    transition: background 0.5s;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.logo i {
    font-size: 2.2rem;
    color: #e74c3c;
    filter: drop-shadow(0 2px 6px #fff3);
}

.logo h1 {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 2px 8px #0002;
}

.header-info h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.2rem;
}

.header-info p {
    font-size: 1rem;
    color: #e0e0e0;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    background: #fff2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 1.1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
}
.view-btn.active, .view-btn:hover {
    background: #fff;
    color: #3498db;
}

/* Main Container */
.main-container {
    display: flex;
    height: calc(100vh - 80px);
    position: relative;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(120deg, #f5f7fa 0%, #e3f0ff 100%);
    box-shadow: 2px 0 16px rgba(44,62,80,0.07);
    border-radius: 18px;
    padding: 1.2rem 1rem 1rem 1rem;
    width: 270px;
    min-width: 220px;
    max-width: 320px;
    transition: box-shadow 0.3s, background 0.5s;
}
.sidebar.collapsed {
    transform: translateX(-100%);
}
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}
.sidebar-header h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.toggle-btn {
    background: #e3e3e3;
    border: none;
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    font-size: 1.1rem;
    cursor: pointer;
    color: #2c3e50;
    transition: background 0.2s;
}
.toggle-btn:hover {
    background: #d1eaff;
}

.layer-controls {
    margin-bottom: 1.2rem;
}
.layer-group {
    margin-bottom: 1.1rem;
}
.layer-group h4 {
    font-size: 1rem;
    color: #3498db;
    margin-bottom: 0.4rem;
    font-weight: 600;
}
.layer-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    font-size: 1rem;
    color: #2c3e50;
    cursor: pointer;
    transition: color 0.2s;
}
.layer-option input[type="checkbox"], .layer-option input[type="radio"] {
    accent-color: #3498db;
    width: 1.1em;
    height: 1.1em;
}
.layer-option .checkmark {
    width: 1em;
    height: 1em;
    border-radius: 3px;
    background: #e3e3e3;
    display: inline-block;
}

.sidebar-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}
.stats {
    display: flex;
    gap: 2.5rem;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e74c3c;
    text-shadow: 0 2px 8px #fff2;
}
.stat-label {
    font-size: 0.95rem;
    color: #2c3e50;
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* Map Controls */
.map-controls {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.control-btn, .btn {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.2rem;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 2px 8px #0001;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    font-weight: 600;
}
.control-btn.primary, .btn.heatmap-btn {
    background: linear-gradient(135deg, #e67e22, #e74c3c);
}
.control-btn:hover, .btn:hover, .btn.heatmap-btn:hover {
    background: linear-gradient(135deg, #e74c3c, #e67e22);
    color: #fff;
    box-shadow: 0 4px 16px #e74c3c33;
}
.btn.active, .btn.heatmap-btn.active {
    background: linear-gradient(135deg, #e74c3c, #e67e22);
    color: #fff;
    box-shadow: 0 4px 16px #e74c3c33;
}

/* Info Panel */
.info-panel {
    position: absolute;
    top: 110px;
    left: 30px;
    transform: none;
    z-index: 1200;
    min-width: 320px;
    max-width: 420px;
    padding: 1.2rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 6px 32px rgba(44,62,80,0.18);
    background: linear-gradient(135deg, #ff9800, #e74c3c);
    color: #fff;
    animation: fadeInDown 0.7s;
    transition: background 0.5s, box-shadow 0.3s;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-40px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.18);
    margin-bottom: 0.7rem;
}
.info-header h3 {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.2s;
}
.close-btn:hover {
    color: #ffd700;
}
.info-content p {
    margin: 0.5rem 0;
    font-size: 1.08rem;
    color: #fff;
    transition: color 0.2s;
}
.info-content p strong {
    color: #ffd700;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(44,62,80,0.18);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: background 0.3s;
}
.modal.show {
    display: flex;
}
.modal-content {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px #0002;
    padding: 2rem 2.5rem 1.5rem 2.5rem;
    min-width: 320px;
    max-width: 95vw;
    animation: fadeInDown 0.5s;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}
.modal-header h3 {
    font-size: 1.2rem;
    color: #e74c3c;
    font-weight: 700;
}
.form-group {
    margin-bottom: 1.1rem;
}
.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.3rem;
    display: block;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid #d1eaff;
    border-radius: 7px;
    font-size: 1rem;
    margin-top: 0.2rem;
    background: #f8fafd;
    transition: border 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border: 1.5px solid #3498db;
    outline: none;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
}
.btn-primary {
    background: linear-gradient(135deg, #27ae60, #2ecc40);
    color: #fff;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #2ecc40, #27ae60);
}
.btn-secondary {
    background: #e3e3e3;
    color: #2c3e50;
}
.btn-secondary:hover {
    background: #d1eaff;
    color: #3498db;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(44,62,80,0.18);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}
.loading-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px #0002;
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.loading-content i {
    font-size: 2.2rem;
    color: #3498db;
}

/* Custom Leaflet Styles */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
    margin: 1rem;
    font-family: inherit;
}

.leaflet-popup-tip {
    background: white;
}

/* Responsive Design */
@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        max-width: 100vw;
        min-width: unset;
        margin-bottom: 1.2rem;
    }
    .info-panel {
        min-width: 90vw;
        max-width: 98vw;
        left: 5vw;
        top: 120px;
        transform: none;
    }
}
@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    .sidebar {
        padding: 0.7rem 0.5rem 0.7rem 0.5rem;
    }
    .info-panel {
        padding: 1rem 0.5rem;
    }
    .modal-content {
        padding: 1.2rem 0.7rem 1rem 0.7rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in {
    animation: slideIn 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 

.heatmap-btn {
    background: linear-gradient(135deg, #e67e22, #e74c3c);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}
.heatmap-btn:hover, .heatmap-btn.active {
    background: linear-gradient(135deg, #e74c3c, #e67e22);
    color: #fff;
} 