/* Reset e estilos base */
:root {
    --primary-color: #e74c3c;
    --secondary-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #c0392b;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --navbar-height: 60px;
    --mobile-breakpoint: 768px;
}

* {
    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-color: #f5f7fa;
    min-height: 100vh;
    padding-top: var(--navbar-height);
}

/* Layout principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    width: 100%;
    height: 100%;
}


header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

h1, h2, h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

h1 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2 {
    font-size: 1.4rem;
}

h3 {
    font-size: 1.2rem;
}

.main-content {
    display: flex;
    gap: 20px;
}

/* Mapa */
.map-container {
    flex: 2;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

#map {
    background: #e6e6e6;
}

.map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    font-size: 0.9rem;
}

.map-legend h3 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.legend-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border-radius: 50%;
}

.legend-icon.active {
    background-color: var(--danger-color);
}

.legend-icon.in-resolution {
    background-color: var(--warning-color);
}

.legend-icon.concluded {
    background-color: var(--success-color);
}

/* Sidebar */
.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top:15px
}

.fires-list {
    background: white;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--box-shadow);
    max-height: 450px;
    overflow-y: auto;
}

.fire-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: var(--transition);
}

.fire-item:hover {
    background-color: #f8f9fa;
}

.fire-item h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.fire-location {
    font-size: 0.8rem;
    color: #666;
}

.fire-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.8rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Estatísticas */
.stats-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--box-shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
    background: #fff;
    padding:15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-card {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 25px;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: #333;
    transform: rotate(90deg);
}

.chart-container {
    margin: 20px 0;
    position: relative;
    height: 400px;
}

.chart-tabs {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 15px;
    background-color: #eee;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.tab-btn.active {
    background-color: var(--secondary-color);
    color: white;
}

.tab-btn:hover:not(.active) {
    background-color: #ddd;
}

/* Notificação */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--success-color);
    color: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: none;
    z-index: 3000;
    animation: slideIn 0.3s ease-out;
}

.notification.error {
    background-color: var(--danger-color);
}

@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Estados */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.loading .fa-spinner {
    font-size: 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.error {
    text-align: center;
    padding: 20px;
    color: var(--danger-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.error button {
    padding: 8px 15px;
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.error button:hover {
    background-color: #a5281b;
}

.no-fires {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Popup do mapa */
.fire-popup {
    min-width: 200px;
}

.fire-popup h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.fire-popup p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.popup-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0;
}

.popup-stats div {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
}

.fire-popup button {
    width: 100%;
    padding: 8px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.fire-popup button:hover {
    background-color: #2980b9;
}

/* Responsividade */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    #map {
        height: 400px;
    }

    .sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .header-info {
        width: 100%;
        justify-content: space-between;
    }

    .modal-content {
        width: 95%;
        padding: 15px;
    }

    .chart-tabs {
        justify-content: center;
    }
    
.map-legend {
    position: relative;
    background: transparent;
    padding: 10px 15px;
    box-sizing:border-box;
    z-index: 1000;
    font-size: 0.9rem;
    box-shadow:none;
    bottom:0;
    right:0;
}

.map-legend h3 {
    margin-bottom: 8px;
    font-size: 1rem;
}
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
    }

    .chart-container {
        height: 300px;
    }
    .last-update{font-size:11px;}
}

/* Adicione no seu arquivo CSS */
/* Upload Modal Styles */
#upload-modal .modal-content {
    max-width: 500px;
}

#image-upload-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

#user-images {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-submit {
    background-color: #e74c3c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-submit:hover {
    background-color: #c0392b;
}

#upload-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

/* Admin Panel */
.admin-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.admin-btn {
    background-color: #2c3e50;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
/* Adicionar ao style.css */
.upload-pending {
    background-color: #f39c12;
    color: white;
}

.upload-success {
    background-color: #2ecc71;
    color: white;
}

.upload-error {
    background-color: #e74c3c;
    color: white;
}

.file-info {
    margin-top: 10px;
    font-size: 0.9em;
    color: #555;
}

.progress-bar {
    height: 5px;
    background-color: #eee;
    margin-top: 5px;
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: #3498db;
    width: 0%;
    transition: width 0.3s;
}

.leaflet-fullscreen-on {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 9999 !important;
}

/* Modais devem ter z-index maior que o mapa fullscreen */
.modal {
    z-index: 10000 !important;
    position: fixed !important;
}

/* Modal de informações do fogo */
#history-modal {
    z-index: 10001 !important;
}

/* Modal de upload */
#upload-modal {
    z-index: 10002 !important;
}

/* Garantir que o conteúdo da modal seja visível */
/* Reset completo para fullscreen */
.leaflet-fullscreen-on {
    z-index: 0 !important;
    position: relative !important;
}

/* Modais sempre no topo */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2147483647 !important; /* Máximo possível */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    pointer-events: auto !important;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    pointer-events: auto !important;
}

/* Garantir que os controles do mapa funcionem */
.leaflet-control-container {
    z-index: 1000 !important;
    pointer-events: auto !important;
}


/* Modais - garantido acima do falso fullscreen */
.modal {
    z-index: 2000 !important;
}

/* Botão de fullscreen customizado */
/* Estilo base do mapa */
#map {
    width: 100%;
    height: 650px;
    position: relative; /* Importante para o fluxo normal */
    transition: all 0.3s ease;
}

/* Fullscreen com absolute positioning */
#map.fullscreen-custom {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10000;
    margin: 0 !important;
    padding: 0 !important;
}

/* Container especial para fullscreen */
.fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
}
/* Garantir que o body não scrolle em fullscreen */
body.no-scroll {
    overflow: hidden !important;
}

/* Estilo do controle fullscreen */
.leaflet-control-fullscreen {
    background: white;
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.2);
}

.leaflet-control-fullscreen a {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}


/* Estilos para a nova implementação */
/* Estilo para a seção de imagens */


.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.image-card {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.image-card:hover {
    transform: translateY(-5px);
}

.image-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.image-info {
    padding: 12px;
    font-size: 0.9rem;
}

.image-info span {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.image-info i {
    margin-right: 5px;
    width: 15px;
    text-align: center;
    color: #e74c3c;
}

.loading-images {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Responsividade */
@media (max-width: 768px) {
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .image-card img {
        height: 120px;
    }
}
.fa-fire{color:#fc4404;font-size:30pt}
.last-update{float:right;margin-top:10px;}
#map-fires-heading{float:left;}


        /* Navbar principal */
        .navbar {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: var(--navbar-height);
            background-color: var(--dark-color);
            box-shadow: var(--box-shadow);
            z-index: 2000;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
        }

        .navbar-brand {
            color: white;
            font-weight: bold;
            font-size: 1.3rem;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .navbar-brand i {
            color: var(--primary-color);
        }

        /* Menu desktop */
        .navbar-links {
            display: flex;
            gap: 15px;
        }

        .nav-link {
            color: white;
            text-decoration: none;
            padding: 8px 12px;
            border-radius: var(--border-radius);
            transition: var(--transition);
            font-size: 0.95rem;
        }

        .nav-link:hover, .nav-link.active {
            background-color: rgba(255, 255, 255, 0.1);
        }

        .nav-link i {
            margin-right: 5px;
        }

        /* Menu mobile */
        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
        }

        .mobile-menu {
            position: fixed;
            top: var(--navbar-height);
            left: 0;
            width: 100%;
            background-color: var(--dark-color);
            padding: 15px;
            box-shadow: 0 5px 10px rgba(0,0,0,0.2);
            display: none;
            flex-direction: column;
            gap: 10px;
            z-index: 1999;
        }

        .mobile-menu.open {
            display: flex;
        }

        /* Responsividade */
        @media (max-width: 768px) {
            .navbar-links {
                display: none;
            }

            .mobile-menu-btn {
                display: block;
            }
        }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
