* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f5f7fb;
    color: #1e2a3a;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HEADER */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2b4c7c 100%);
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.logo .map-icon {
    font-size: 2rem;
}
.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
}
.logo h1 span {
    color: #ffd966;
}
.tagline {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* MAIN */
main {
    flex: 1;
    position: relative;
}
.toolbar {
    background: white;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.location-box {
    display: flex;
    gap: 12px;
    align-items: center;
}
.btn-primary {
    background: #2b6a4c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
}
.btn-primary:hover {
    background: #1e4a35;
    transform: scale(1.02);
}
.btn-sec {
    background: #e2e8f0;
    border: none;
    padding: 6px 12px;
    border-radius: 30px;
    cursor: pointer;
}
select {
    padding: 8px 12px;
    border-radius: 30px;
    border: 1px solid #ccc;
    background: white;
}
.filter-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.filtros-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.filtro-item {
    background: #eef2f5;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.filtro-item.active {
    background: #2b6a4c;
    color: white;
}
#mapContainer {
    height: calc(100vh - 170px);
    min-height: 450px;
}
#map {
    height: 100%;
    width: 100%;
    z-index: 1;
}

/* Botão flutuante */
.btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2b6a4c;
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1000;
    transition: 0.2s;
}
.btn-floating:hover {
    background: #1e4a35;
    transform: scale(1.05);
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: white;
    max-width: 500px;
    width: 90%;
    border-radius: 20px;
    padding: 25px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}
.modal-small {
    max-width: 450px;
}
.close, .closeAval {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
}
.modal-content h2, .modal-content h3 {
    margin-bottom: 20px;
    color: #1e3c72;
}
label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}
input, select, textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 12px;
    font-family: inherit;
}
.coord-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.coord-row input {
    flex: 1;
}
.check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.check-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    margin-top: 0;
}
footer {
    background: #eef2f5;
    text-align: center;
    padding: 12px;
    font-size: 0.75rem;
    color: #4a5568;
}

/* Responsividade */
@media (max-width: 700px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .location-box {
        justify-content: space-between;
    }
    .filter-box {
        flex-wrap: wrap;
    }
    .btn-floating {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    #mapContainer {
        height: calc(100vh - 250px);
    }
}
