/* ============================================================
   Sistema de Gestão de Outdoor — tema inspirado na identidade visual do Sicredi
   Verde Sicredi Digital #3FA110 · Branco · Nunito
   ============================================================ */

:root {
    --verde: #6B7280;
    --verde-escuro: #4B5563;
    --verde-claro: #EEF0F2;
    --texto: #1F2A1A;
    --cinza: #6B7280;
    --fundo: #F7F9F6;
    --borda: #E1E7DC;
    --raio: 14px;
}

/* tema verde quando a aba Out Door está ativa */
body.tema-outdoor {
    --verde: #3FA110;
    --verde-escuro: #2E7A0C;
    --verde-claro: #E8F5E1;
    --borda: #D9E5D2;
}

/* tema laranja quando a aba Frontlight está ativa */
body.tema-frontlight {
    --verde: #F97316;
    --verde-escuro: #C2570C;
    --verde-claro: #FFF1E4;
    --borda: #F5DCC4;
}

* { box-sizing: border-box; }

body {
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    background: var(--fundo);
    color: var(--texto);
    margin: 0;
}

a { color: inherit; }

/* ---------- topo ---------- */

/* tema neutro (aba "Todos"): topo claro e suave, com a logo colorida */
.topo {
    background: #F3F4F6;
    color: var(--texto);
    padding: 1.1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--borda);
}

.topo-marca { display: flex; align-items: center; gap: .8rem; }

.topo-logo-link { display: inline-flex; align-items: center; }
.topo-logo { height: 30px; width: auto; display: block; }

.topo a { color: var(--texto); text-decoration: none; }
.topo h1 { font-size: 1.25rem; margin: 0; font-weight: 800; font-style: italic; letter-spacing: .2px; }
.topo h1 strong { font-weight: 800; }

.topo nav { display: flex; gap: .5rem; align-items: center; }
.topo nav a {
    padding: .3rem .1rem;
    font-weight: 600;
    font-size: .95rem;
    opacity: .7;
    transition: opacity .15s ease;
}
.topo nav a:hover { opacity: 1; }
.topo nav a.ativo { opacity: 1; font-weight: 800; }
.nav-separador { opacity: .3; font-size: .85rem; margin: 0 .1rem; }

.nav-inativo {
    font-weight: 600;
    font-size: .95rem;
    opacity: .3;
    cursor: default;
}

.nav-dropdown-wrapper { position: relative; display: inline-flex; align-items: center; }
.nav-caret { font-size: .7rem; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: .8rem;
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    min-width: 170px;
    padding: .4rem;
    z-index: 60;
}
.nav-dropdown-menu.aberto { display: block; }
.nav-dropdown-menu a {
    display: block;
    padding: .5rem .7rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: .85rem;
    color: var(--texto);
}
.nav-dropdown-menu a:hover { background: var(--verde-claro); }

.nav-usuario {
    color: rgba(31,42,26,.6);
    font-weight: 700;
    font-size: .85rem;
    margin-left: .4rem;
}
.nav-sair {
    padding: .5rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .85rem;
    border: 1px solid var(--borda);
    color: var(--texto);
}
.nav-sair:hover { background: rgba(0,0,0,.05); }

/* temas Out Door / Frontlight: topo colorido, com a logo negativa (branca) */
body.tema-outdoor .topo,
body.tema-frontlight .topo {
    background: var(--verde);
    background: linear-gradient(120deg, var(--verde) 0%, var(--verde-escuro) 100%);
    color: #fff;
    border-bottom: none;
}
body.tema-outdoor .topo a,
body.tema-frontlight .topo a { color: #fff; }
/* o dropdown do Gestor tem fundo branco mesmo com o topo colorido —
   os links dele precisam continuar escuros, não brancos como o resto do topo */
body.tema-outdoor .nav-dropdown-menu a,
body.tema-frontlight .nav-dropdown-menu a { color: var(--texto); }
body.tema-outdoor .nav-separador,
body.tema-frontlight .nav-separador { opacity: .45; }
body.tema-outdoor .nav-inativo,
body.tema-frontlight .nav-inativo { color: #fff; opacity: .45; }
body.tema-outdoor .nav-usuario,
body.tema-frontlight .nav-usuario { color: rgba(255,255,255,.85); }
body.tema-outdoor .nav-sair,
body.tema-frontlight .nav-sair { border: 1px solid rgba(255,255,255,.4); color: #fff; }
body.tema-outdoor .nav-sair:hover,
body.tema-frontlight .nav-sair:hover { background: rgba(255,255,255,.15); }

/* ---------- tela de login ---------- */

body.pagina-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--verde-escuro, #2E7A0C) 0%, #1F2A1A 100%);
}
body.pagina-login { --verde: #3FA110; --verde-escuro: #2E7A0C; --verde-claro: #E8F5E1; }

.login-caixa {
    background: #fff;
    border-radius: var(--raio);
    padding: 2.5rem 2.2rem;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.login-marca { display: flex; flex-direction: column; align-items: center; gap: .7rem; margin-bottom: 1.8rem; text-align: center; }
.login-logo { height: 38px; width: auto; display: block; }
.login-marca h1 { font-size: 1.05rem; font-weight: 800; font-style: italic; color: var(--verde-escuro); margin: 0; line-height: 1.25; }

.form-login { display: flex; flex-direction: column; gap: 1.1rem; }
.form-login label { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; font-weight: 700; color: var(--texto); }
.form-login input {
    padding: .65rem .8rem;
    border: 1px solid var(--borda);
    border-radius: 10px;
    font-family: inherit;
    font-size: .95rem;
}
.form-login input:focus { outline: none; border-color: var(--verde); }
.campo-senha { position: relative; display: flex; }
.campo-senha input { flex: 1; padding-right: 2.6rem; }
.botao-olho {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: .3rem;
    line-height: 1;
}

.linha-lembrar {
    flex-direction: row !important;
    align-items: center;
    gap: .5rem;
    font-weight: 600 !important;
    color: var(--cinza);
    font-size: .82rem !important;
    cursor: pointer;
}
.linha-lembrar input { accent-color: var(--verde); width: 16px; height: 16px; }

.form-login button {
    margin-top: .3rem;
    padding: .75rem;
    background: var(--verde);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 800;
    font-size: .95rem;
    cursor: pointer;
}
.form-login button:hover { background: var(--verde-escuro); }

/* ---------- layout geral ---------- */

.conteudo {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h2 { font-weight: 800; font-style: italic; color: var(--verde-escuro); }

/* ---------- abas de origem ---------- */

.abas-origem { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.abas-origem a {
    padding: .45rem 1rem;
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: 999px;
    text-decoration: none;
    color: var(--texto);
    font-size: .85rem;
    font-weight: 700;
    transition: all .15s ease;
}
.abas-origem a.ativo { background: var(--verde); color: #fff; border-color: var(--verde); }
.abas-origem a:hover:not(.ativo) { border-color: var(--verde); }
.abas-origem .contagem { opacity: .75; font-size: .8rem; font-weight: 600; }

/* ---------- busca e filtros ---------- */

.acoes-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: .5rem;
}

.acoes-topo-esquerda { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }

.form-busca { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.form-busca input,
.form-busca select {
    padding: .55rem .8rem;
    border: 1px solid var(--borda);
    border-radius: 10px;
    font-family: inherit;
    font-size: .9rem;
    background: #fff;
}
.form-busca input { width: 260px; }
.form-busca input:focus,
.form-busca select:focus { outline: none; border-color: var(--verde); }

.form-busca button {
    padding: .55rem 1.3rem;
    border: none;
    border-radius: 999px;
    background: var(--verde);
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    transition: background .15s ease;
}
.form-busca button:hover { background: var(--verde-escuro); }

.total-registros { color: var(--cinza); font-weight: 700; font-size: .9rem; }

.link-limpar-filtros {
    color: var(--cinza);
    text-decoration: underline;
    font-size: .85rem;
    font-weight: 700;
    white-space: nowrap;
}
.link-limpar-filtros:hover { color: var(--verde-escuro); }

.botao-novo-ponto {
    padding: .55rem 1.1rem;
    border-radius: 999px;
    background: var(--verde-escuro);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease;
}
.botao-novo-ponto:hover { background: #374151; }

/* ---------- tabela ---------- */

.tabela {
    width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: var(--raio);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border: 1px solid var(--borda);
}

.tabela th, .tabela td {
    padding: .7rem .9rem;
    border-bottom: 1px solid var(--borda);
    text-align: left;
    font-size: .88rem;
    white-space: nowrap;
}

.tabela td.descricao { white-space: nowrap; }

.tabela th {
    background: var(--verde-claro);
    color: var(--verde-escuro);
    font-weight: 800;
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .04em;
}

.tabela tbody tr:hover { background: #FAFCF8; }
.tabela tbody tr:last-child td { border-bottom: none; }

.col-foto { width: 44px; }
.miniatura { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; display: block; cursor: zoom-in; transition: transform .15s ease; }
.miniatura:hover { transform: scale(1.08); }
.sem-foto { color: #aaa; }

.col-check { width: 34px; text-align: center; }
.col-check input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--verde); cursor: pointer; }

.linha-selecionada { background: var(--verde-claro) !important; box-shadow: inset 3px 0 0 var(--verde); }

.col-numero { font-weight: 800; color: var(--verde); white-space: nowrap; }

.col-logradouro strong { font-weight: 800; color: var(--texto); }
.col-logradouro { white-space: nowrap; }

.linha-secundaria { color: var(--cinza); font-size: .8rem; margin-top: .1rem; white-space: nowrap; }

.col-bairro-cidade { white-space: nowrap; }
.col-bairro-cidade strong { font-weight: 800; color: var(--texto); }

.col-mapa { white-space: nowrap; }
.link-mapa { color: var(--verde-escuro); text-decoration: none; font-weight: 700; font-size: .85rem; }
.link-mapa:hover { text-decoration: underline; }
.pin-mapa { font-size: .9rem; }

.acoes-menu { position: relative; text-align: center; }
.botao-menu {
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--cinza);
    padding: .2rem .5rem;
    border-radius: 6px;
}
.botao-menu:hover { background: var(--verde-claro); color: var(--verde-escuro); }

.menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 60;
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    min-width: 120px;
    padding: .4rem;
}
.menu-dropdown.aberto { display: block; }
.menu-dropdown a {
    display: block;
    padding: .5rem .7rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: .85rem;
    color: var(--texto);
}
.menu-dropdown a:hover { background: var(--verde-claro); }
.menu-dropdown form { margin: 0; }
.botao-excluir-menu {
    display: block;
    width: 100%;
    text-align: left;
    padding: .5rem .7rem;
    border: 0;
    border-radius: 6px;
    background: none;
    font-family: inherit;
    font-weight: 700;
    font-size: .85rem;
    color: #C0392B;
    cursor: pointer;
}
.botao-excluir-menu:hover { background: #FDECEA; }

/* ---------- painel de seleção em lote ---------- */

.painel-selecao {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 280px;
    max-height: 60vh;
    background: var(--verde-escuro);
    color: #fff;
    border-radius: var(--raio);
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 50;
}

.painel-selecao-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .9rem 1rem;
    background: rgba(0,0,0,.12);
}
.painel-selecao-topo strong { font-size: .95rem; }

.painel-fechar {
    background: none;
    border: 1px solid rgba(255,255,255,.5);
    color: #fff;
    border-radius: 999px;
    padding: .25rem .8rem;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
}
.painel-fechar:hover { background: rgba(255,255,255,.15); }

.painel-lista {
    list-style: none;
    margin: 0;
    padding: .4rem .6rem;
    overflow-y: auto;
    flex: 1;
}
.painel-lista li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem .5rem;
    font-size: .82rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
    gap: .5rem;
}
.painel-lista li button {
    background: none;
    border: none;
    color: rgba(255,255,255,.8);
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
}
.painel-lista li button:hover { color: #fff; }

.painel-pre-selecao {
    margin: .8rem;
    padding: .6rem;
    background: #fff;
    color: var(--verde-escuro);
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 800;
    font-size: .88rem;
    cursor: pointer;
    transition: opacity .15s ease;
}
.painel-pre-selecao:hover:not(:disabled) { background: #f0f0f0; }
.painel-pre-selecao:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- página de pré-seleção ---------- */

.pre-selecao-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}

.pre-selecao-dados {
    position: sticky;
    top: 1.5rem;
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    padding: 1.3rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.pre-selecao-dados h3 {
    margin: 0 0 1rem;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--cinza);
    font-style: normal;
}
.pre-selecao-dados h3 strong { color: var(--verde-escuro); }

.form-pre-selecao { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; }
.form-pre-selecao label {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-size: .85rem;
    font-weight: 700;
    margin-top: .6rem;
}
.form-pre-selecao .obrigatorio { color: #C0392B; }

.linha-checkbox {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    margin-top: .9rem !important;
}
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-weight: 600;
    font-size: .78rem;
    color: var(--cinza);
}
.linha-periodo {
    display: flex;
    gap: .6rem;
    margin-top: .4rem;
}
.linha-periodo label {
    flex: 1;
}
.checkbox-inline input { accent-color: var(--verde); }

.form-pre-selecao input[type="text"],
.form-pre-selecao select {
    padding: .55rem .7rem;
    border: 1px solid var(--borda);
    border-radius: 10px;
    font-family: inherit;
    font-size: .88rem;
}
.form-pre-selecao input:disabled,
.form-pre-selecao select:disabled { background: #F1F3EF; color: #aaa; }
.form-pre-selecao input:focus, .form-pre-selecao select:focus { outline: none; border-color: var(--verde); }

.aviso-pequeno { font-size: .75rem; color: var(--cinza); margin: .2rem 0 0; }

.botao-gerar {
    margin-top: 1.1rem;
    padding: .75rem;
    background: var(--verde);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 800;
    font-size: .92rem;
    cursor: pointer;
}
.botao-gerar:hover { background: var(--verde-escuro); }

.botao-limpar {
    width: 100%;
    padding: .55rem;
    background: none;
    border: none;
    color: var(--cinza);
    font-family: inherit;
    font-weight: 700;
    font-size: .8rem;
    cursor: pointer;
    text-align: center;
}
.botao-limpar:hover { color: #C0392B; }

.tabela-wrapper {
    width: 100%;
    border-radius: var(--raio);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border: 1px solid var(--borda);
}
.tabela-wrapper .tabela { border: none; box-shadow: none; border-radius: 0; }

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 12, .88);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
}
.lightbox.aberto { display: flex; }
.lightbox figure {
    margin: 0;
    max-width: min(90vw, 900px);
    max-height: 90vh;
    cursor: default;
    text-align: center;
}
.lightbox img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 12px 40px rgba(0,0,0,.4);
    display: block;
}
.lightbox-barra {
    background: var(--verde);
    background: linear-gradient(120deg, var(--verde) 0%, var(--verde-escuro) 100%);
    border-radius: 0 0 10px 10px;
    padding: .9rem 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    justify-content: flex-start;
    text-align: left;
}
.lightbox-campo { display: flex; flex-direction: column; gap: .1rem; }
.lightbox-rotulo {
    color: rgba(255,255,255,.75);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
}
.lightbox-campo span:last-child { color: #fff; font-weight: 700; font-size: .92rem; }
.lightbox-logo { height: 22px; width: auto; margin-left: auto; align-self: center; opacity: .85; }
.lightbox-fechar {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    font-weight: 300;
}
.lightbox-fechar:hover { color: var(--verde); }

.pre-selecao-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.link-voltar { color: var(--verde-escuro); text-decoration: none; font-weight: 700; font-size: .9rem; }
.link-voltar:hover { text-decoration: underline; }

.pre-selecao-resumo-linha { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.pre-selecao-resumo { color: var(--cinza); font-weight: 700; margin: 0; }
.link-adicionar-pontos {
    color: var(--verde-escuro);
    text-decoration: none;
    font-weight: 700;
    font-size: .85rem;
}
.link-adicionar-pontos:hover { text-decoration: underline; }

.pre-selecao-grade {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.pre-selecao-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.pre-selecao-remover { position: absolute; top: .5rem; right: .5rem; z-index: 5; margin: 0; }
.pre-selecao-remover button {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pre-selecao-remover button:hover { background: #C0392B; }

.pre-selecao-foto { width: 100%; height: 150px; background: var(--verde-claro); display: flex; align-items: center; justify-content: center; }
.pre-selecao-foto img { width: 100%; height: 100%; object-fit: cover; }
.pre-selecao-foto .sem-foto { color: var(--cinza); font-size: .85rem; }

.pre-selecao-info { padding: .9rem 1rem; display: flex; flex-direction: column; gap: .3rem; }
.pre-selecao-info strong { font-size: .92rem; }
.pre-selecao-info span { font-size: .82rem; color: var(--cinza); }
.pre-selecao-descricao { font-style: italic; }
.pre-selecao-info .link-mapa { margin-top: .3rem; }

/* ---------- envio da pré-seleção ---------- */

.envio-painel {
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    padding: 1.4rem;
    margin: 1rem 0;
    max-width: 560px;
}
.envio-painel h3 { margin: 0 0 .9rem; font-weight: 800; font-style: italic; color: var(--verde-escuro); }
.envio-acoes { display: flex; flex-wrap: wrap; gap: .6rem; }
.botao-envio {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem 1.1rem;
    border-radius: 999px;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: .88rem;
    text-decoration: none;
    cursor: pointer;
    transition: filter .15s ease;
}
.botao-envio:hover { filter: brightness(.94); }
.botao-envio-pdf { background: var(--verde-claro); color: var(--verde-escuro); }
.botao-envio-link { background: var(--verde); color: #fff; }
.botao-envio-whatsapp { background: #25D366; color: #fff; }
.botao-envio-copiar { background: var(--verde-claro); color: var(--verde-escuro); }

/* ---------- página pública da pré-seleção ---------- */

.topo-publico { justify-content: flex-start; }

.publica-dados {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .8rem 1.5rem;
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.2rem;
}
.publica-dados div { font-size: .88rem; }
.publica-dados strong { display: block; color: var(--verde-escuro); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; margin-bottom: .2rem; }

.publica-grade { margin-top: 1.4rem; }

.acoes a {
    margin-right: .8rem;
    text-decoration: none;
    font-weight: 700;
    font-size: .85rem;
}
.acoes a:first-child { color: var(--verde-escuro); }
.acoes a:last-child { color: #C0392B; }

/* ---------- badges (origem) ---------- */

.badge {
    display: inline-block;
    font-size: .68rem;
    padding: .15rem .55rem;
    border-radius: 999px;
    margin-left: .4rem;
    color: #fff;
    font-weight: 700;
    vertical-align: middle;
}
.badge-out_door { background: #2563eb; }
.badge-frontlight { background: #d97706; }
.badge-manual { background: var(--verde); }

.badge-tipo {
    display: inline-block;
    font-size: .72rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-weight: 800;
}
.badge-tipo.badge-outdoor { background: #E8F5E1; color: #2E7A0C; }
.badge-tipo.badge-frontlight { background: #FFF1E4; color: #C2570C; }
.badge-tipo.badge-neutro { background: var(--verde-claro); color: var(--cinza); }

/* ---------- paginação ---------- */

.paginacao { margin-top: 1.2rem; display: flex; gap: .4rem; }
.paginacao a {
    display: inline-block;
    padding: .4rem .8rem;
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: 999px;
    text-decoration: none;
    color: var(--texto);
    font-weight: 700;
    font-size: .85rem;
}
.paginacao a.ativo { background: var(--verde); color: #fff; border-color: var(--verde); }
.paginacao a:hover:not(.ativo) { border-color: var(--verde); }

/* ---------- formulário (criar/editar) ---------- */

.form-ponto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem 1.2rem;
    align-items: start;
    background: #fff;
    padding: 1.2rem 1.6rem;
    border-radius: var(--raio);
    border: 1px solid var(--borda);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    max-width: 600px;
}

.form-ponto label { display: flex; flex-direction: column; font-size: .82rem; font-weight: 700; gap: .22rem; color: var(--texto); }
.form-ponto .campo-largo { grid-column: 1 / -1; }
.form-ponto textarea { min-height: 2.8rem; resize: vertical; }
.form-ponto input, .form-ponto textarea, .form-ponto select {
    padding: .45rem .7rem;
    border: 1px solid var(--borda);
    border-radius: 10px;
    font-size: .9rem;
    font-family: inherit;
    font-weight: 400;
}
.form-ponto input:focus, .form-ponto textarea:focus, .form-ponto select:focus {
    outline: none;
    border-color: var(--verde);
}

.form-ponto > button {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: .1rem;
    padding: .55rem 1.5rem;
    background: var(--verde);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 800;
    font-size: .95rem;
    cursor: pointer;
    transition: background .15s ease;
}
.form-ponto > button:hover { background: var(--verde-escuro); }

@media (max-width: 560px) {
    .form-ponto { grid-template-columns: 1fr; }
}

.foto-atual { max-width: 200px; border-radius: var(--raio); margin-bottom: 1rem; display: block; }

/* ---------- select customizado (sempre abre pra baixo) ---------- */

.select-custom { position: relative; }
.select-custom-nativo {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.select-custom-botao {
    position: relative;
    width: 100%;
    text-align: left;
    padding: .45rem 1.8rem .45rem .7rem;
    border: 1px solid var(--borda);
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: .9rem;
    color: var(--texto);
    cursor: pointer;
}
.select-custom-botao.vazio { color: #8a9086; }
.select-custom-botao::after {
    content: '';
    position: absolute;
    right: .8rem;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--cinza);
    transform: translateY(-50%);
    transition: transform .15s ease;
}
.select-custom.aberto .select-custom-botao { border-color: var(--verde); }
.select-custom.aberto .select-custom-botao::after { transform: translateY(-50%) rotate(180deg); }

.select-custom-painel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
    z-index: 50;
}
.select-custom.aberto .select-custom-painel { display: block; }
.select-custom-item { padding: .5rem .75rem; font-size: .9rem; cursor: pointer; }
.select-custom-item:hover { background: var(--verde-claro); }
.select-custom-item.selecionado { background: var(--verde-claro); font-weight: 700; color: var(--verde-escuro); }

/* ---------- alertas ---------- */

.alerta { padding: .8rem 1.1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 700; font-size: .9rem; }
.alerta-sucesso { background: var(--verde-claro); color: var(--verde-escuro); }
.alerta-erro { background: #FDECEA; color: #C0392B; }
.alerta-erro ul { margin: 0; padding-left: 1.2rem; }

/* ---------- gestor ---------- */

.gestor-intro { color: var(--cinza); margin-top: -.5rem; margin-bottom: 1.5rem; }

.gestor-grade {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.gestor-card {
    display: block;
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    padding: 1.4rem;
    text-decoration: none;
    color: var(--texto);
    position: relative;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.gestor-card:hover { border-color: var(--verde); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.gestor-card h3 { margin: 0 0 .4rem; font-weight: 800; font-style: italic; color: var(--verde-escuro); }
.gestor-card p { margin: 0 0 .8rem; font-size: .9rem; color: var(--cinza); }
.gestor-card-numero { font-weight: 700; font-size: .85rem; color: var(--verde-escuro); }

.gestor-card-desativado { cursor: default; opacity: .65; }
.gestor-card-desativado:hover { border-color: var(--borda); box-shadow: none; }
.gestor-card-badge {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: var(--verde-claro);
    color: var(--verde-escuro);
    font-size: .7rem;
    font-weight: 800;
    padding: .2rem .6rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ---------- gestor: cidades e bairros ---------- */

.gestor-cidades-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }

.form-nova-cidade { display: flex; gap: .5rem; margin-bottom: 1.5rem; max-width: 420px; }
.form-nova-cidade input {
    flex: 1;
    padding: .55rem .8rem;
    border: 1px solid var(--borda);
    border-radius: 10px;
    font-family: inherit;
    font-size: .9rem;
}
.form-nova-cidade button {
    padding: .55rem 1.1rem;
    border: none;
    border-radius: 999px;
    background: var(--verde);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
    white-space: nowrap;
}
.form-nova-cidade button:hover { background: var(--verde-escuro); }

.cidades-lista { display: flex; flex-direction: column; gap: 1rem; }

.cidade-bloco {
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    padding: 1.1rem 1.3rem;
}

.cidade-cabecalho { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.form-inline-nome { display: flex; gap: .4rem; align-items: center; }
.form-inline-nome input {
    padding: .4rem .7rem;
    border: 1px solid var(--borda);
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: .95rem;
    color: var(--verde-escuro);
}
.cidade-cabecalho .form-inline-nome input { width: 220px; }
.form-inline-nome button {
    padding: .4rem .8rem;
    border: none;
    border-radius: 8px;
    background: var(--verde-claro);
    color: var(--verde-escuro);
    font-weight: 700;
    font-size: .8rem;
    cursor: pointer;
}
.form-inline-nome button:hover { background: var(--verde); color: #fff; }

.cidade-contagem { color: var(--cinza); font-size: .82rem; font-weight: 700; margin-left: auto; }

.botao-excluir-inline {
    padding: .4rem .8rem;
    border: none;
    border-radius: 8px;
    background: #FDECEA;
    color: #C0392B;
    font-weight: 700;
    font-size: .8rem;
    cursor: pointer;
}
.botao-excluir-inline:hover { background: #F8D3CF; }

.bairros-lista { list-style: none; margin: .9rem 0 0; padding: 0 0 0 1rem; border-left: 2px solid var(--verde-claro); display: flex; flex-direction: column; gap: .5rem; }
.bairros-lista li { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.bairros-lista .form-inline-nome input { width: 180px; font-weight: 600; font-size: .88rem; color: var(--texto); }
.bairros-vazio { color: var(--cinza); font-size: .85rem; font-style: italic; }

.form-novo-bairro { display: flex; gap: .5rem; margin-top: .9rem; padding-left: 1rem; max-width: 320px; }
.form-novo-bairro input {
    flex: 1;
    padding: .4rem .7rem;
    border: 1px solid var(--borda);
    border-radius: 8px;
    font-family: inherit;
    font-size: .85rem;
}
.form-novo-bairro button {
    padding: .4rem .8rem;
    border: none;
    border-radius: 8px;
    background: var(--verde-claro);
    color: var(--verde-escuro);
    font-weight: 700;
    font-size: .8rem;
    cursor: pointer;
    white-space: nowrap;
}
.form-novo-bairro button:hover { background: var(--verde); color: #fff; }