
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: #26332b;
    background: #f3f6f4;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}

.logo span {
    font-size: 30px;
}

.logo h1 {
    color: #176b3a;
    font-size: 23px;
}

.container {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
}

.sidebar {
    position: fixed;
    z-index: 1000;
    top: 0;
    bottom: 0;
    left: 0;
    width: 252px;
    padding: 26px 15px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.96);
    border-right: 1px solid rgba(38, 51, 43, 0.12);
    box-shadow: 4px 0 18px rgba(25, 45, 32, 0.12);
    backdrop-filter: blur(12px);
}

.sidebar h3 {
    margin-bottom: 12px;
    color: #718078;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-icon {
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-item span {
    flex: 1;
}

.map-container {
    position: fixed;
    inset: 0;
    min-width: 0;
}

.map-title {
    position: absolute;
    z-index: 850;
    top: 20px;
    left: 272px;
    width: min(460px, calc(100vw - 422px));
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(38, 51, 43, 0.1);
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(25, 45, 32, 0.13);
    backdrop-filter: blur(10px);
}

.map-title h2 {
    margin-bottom: 4px;
    font-size: 18px;
}

.map-title p {
    color: #718078;
    font-size: 13px;
    line-height: 1.4;
}

.conteudo-aba {
    position: absolute;
    z-index: 850;
    top: 106px;
    left: 272px;
    width: min(440px, calc(100vw - 294px));
    max-height: calc(100vh - 126px);
    max-height: calc(100dvh - 126px);
    margin: 0;
    overflow-y: auto;
}

@media (min-width: 701px) and (max-width: 900px) {
    .conteudo-aba {
        width: min(440px, calc(100vw - 440px));
    }
}

#map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
}

.admin-float svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-float {
    position: fixed;
    z-index: 1100;
    right: 22px;
    bottom: 22px;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    color: white;
    background: #176b3a;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(20, 45, 29, 0.35);
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.admin-float:hover {
    background: #0f512b;
    transform: translateY(-2px);
}

.admin-float:focus-visible {
    outline: 3px solid #f3c969;
    outline-offset: 3px;
}

.admin-float svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.painel-alertas {
    padding: 16px;
    margin-bottom: 12px;
    background: white;
    border: 1px solid #e0e7e2;
    border-radius: 8px;
}

.form-grid-alerta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.campo-alerta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.campo-alerta.full-width {
    grid-column: 1 / -1;
}

.campo-alerta label {
    font-size: 13px;
    font-weight: bold;
}

.campo-alerta input,
.campo-alerta select,
.campo-alerta textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px;
    border: 1px solid #ccd8cf;
    border-radius: 5px;
    font: inherit;
    background: white;
}

.campo-alerta textarea {
    resize: vertical;
}

.btn-selecionar-alerta,
.btn-enviar-alerta {
    min-height: 42px;
    margin-top: 12px;
    padding: 10px 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.btn-selecionar-alerta {
    background: #315d89;
    color: white;
}

.btn-selecionar-alerta.selecionando {
    background: #b7791f;
}

.btn-enviar-alerta {
    width: 100%;
    background: #176b3a;
    color: white;
}

.status-alerta {
    margin-top: 8px;
    color: #718078;
    font-size: 13px;
}

.marcador-alerta {
    background: transparent;
    border: none;
}

.marcador-alerta span {
    display: block;
    width: 26px;
    height: 26px;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.45);
    text-align: center;
    line-height: 20px;
    font-size: 13px;
}

.marcador-ponto span {
    background: #f2c94c;
    color: #3d3310;
}

.marcador-coleta span {
    background: #a52b25;
}

@media (max-width: 700px) {
    .sidebar {
        top: auto;
        right: 0;
        bottom: 0;
        width: 100%;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        overflow: hidden;
        border-top: 1px solid rgba(38, 51, 43, 0.12);
        border-right: 0;
        box-shadow: 0 -4px 18px rgba(25, 45, 32, 0.12);
    }

    .sidebar .logo,
    .sidebar h3 {
        display: none;
    }

    .sidebar nav {
        flex-direction: row;
        gap: 5px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .sidebar nav .menu-item {
        flex: 0 0 auto;
        width: auto;
        min-height: 44px;
        margin: 0;
        padding: 10px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    .map-title {
        top: 12px;
        right: 140px;
        left: 12px;
        width: auto;
        padding: 11px 14px;
    }

    .map-title h2 {
        font-size: 16px;
    }

    .map-title p {
        font-size: 12px;
    }

    .conteudo-aba {
        top: 178px;
        right: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100vh - 260px);
        max-height: calc(100dvh - 260px);
    }

    .admin-float {
        right: 14px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        width: 52px;
        height: 52px;
    }

    .form-grid-alerta {
        grid-template-columns: 1fr;
    }

    .campo-alerta.full-width {
        grid-column: auto;
    }

    .painel-alertas {
        padding: 12px;
    }
}
