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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #4caf50 100%);
    min-height: 100vh;
    color: #212121;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #2e7d32;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(46, 125, 50, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 2rem;
    color: #2e7d32;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1b5e20;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    color: #2e7d32;
    border: 2px solid #4caf50;
}

.btn-secondary:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: translateY(-1px);
    border-color: #2e7d32;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Main Content */
.main {
    padding: 2rem 0;
}

/* Status Bar */
.status-bar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 2px solid #4caf50;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.2);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1b5e20;
    font-weight: 500;
}

.status-item i {
    color: #2e7d32;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(46, 125, 50, 0.25);
    border-color: #4caf50;
}

.card-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1b5e20;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header i {
    color: #2e7d32;
}

.card-body {
    padding: 1.5rem;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px solid #4caf50;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.card-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1b5e20;
    margin-bottom: 4px;
}

.card-content p {
    color: #424242;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Filters */
.filters-section {
    margin-bottom: 2rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #1b5e20;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 10px 12px;
    border: 2px solid #4caf50;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #212121;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    min-height: 400px;
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-controls .btn {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border: 2px solid rgba(76, 175, 80, 0.3);
}

.chart-controls .btn.active {
    background: #2e7d32;
    color: white;
    border-color: #1b5e20;
}

.chart-controls .btn:hover {
    background: rgba(46, 125, 50, 0.2);
    border-color: #2e7d32;
}

/* Lists */
.municipalities-list,
.peaks-list {
    max-height: 300px;
    overflow-y: auto;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 2px solid rgba(76, 175, 80, 0.2);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-info h4 {
    font-weight: 600;
    color: #1b5e20;
    margin-bottom: 4px;
}

.list-item-info p {
    font-size: 0.85rem;
    color: #424242;
    font-weight: 500;
}

.list-item-value {
    font-weight: 700;
    color: #2e7d32;
    background: rgba(76, 175, 80, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #4caf50;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    border: 3px solid #4caf50;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid #4caf50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(76, 175, 80, 0.05);
}

.modal-header h3 {
    font-weight: 600;
    color: #1b5e20;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #424242;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(76, 175, 80, 0.1);
    color: #1b5e20;
}

.modal-body {
    padding: 1.5rem;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #4caf50;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(76, 175, 80, 0.05);
}

.upload-area:hover {
    border-color: #2e7d32;
    background: rgba(76, 175, 80, 0.1);
}

.upload-area.dragover {
    border-color: #1b5e20;
    background: rgba(76, 175, 80, 0.15);
}

.upload-area i {
    font-size: 3rem;
    color: #4caf50;
    margin-bottom: 1rem;
}

.upload-area p {
    color: #424242;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Progress */
.upload-progress {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid #4caf50;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
    width: 0%;
    transition: width 0.3s ease;
}

/* Loading */
.loading {
    text-align: center;
    color: #424242;
    padding: 2rem;
    font-weight: 500;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: #2e7d32;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.loading-spinner p {
    font-weight: 600;
    color: #1b5e20;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #4caf50;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3000;
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

.notification.error {
    border-left-color: #f44336;
}

.notification.error i {
    color: #f44336;
}

.notification.success i {
    color: #4caf50;
}

.notification button {
    background: none;
    border: none;
    color: #424242;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    margin-left: auto;
}

.notification button:hover {
    background: rgba(0, 0, 0, 0.1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .status-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .chart-controls {
        align-self: stretch;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 1rem 0;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem 1rem 0;
    }
    
    .summary-card {
        padding: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* Chart Container Responsive */
.card-body canvas {
    max-width: 100%;
    height: auto !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.6s ease-out;
}

.summary-card:nth-child(1) { animation-delay: 0.1s; }
.summary-card:nth-child(2) { animation-delay: 0.2s; }
.summary-card:nth-child(3) { animation-delay: 0.3s; }
.summary-card:nth-child(4) { animation-delay: 0.4s; }

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

::-webkit-scrollbar-track {
    background: rgba(76, 175, 80, 0.1);
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #2e7d32;
}

/* Custom Green Theme Enhancements */
.btn-primary:active {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    transform: translateY(0);
}

.card-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

.summary-card:hover .card-icon {
    transform: scale(1.1);
}

.filter-group select option {
    color: #212121;
    background: white;
}

.chart-controls .btn.active:hover {
    background: #1b5e20;
}

