/* ============================================================================
   em_moderno.css — visual moderno comum das telas do "Emprego +"
   (mesmo estilo da tela de Colaboradores). Só mexe na APARÊNCIA na tela;
   a impressão continua como antes.
     body.em-moderno → telas internas (topo, cartões, formulários, tabelas)
     body.em-leve    → telas que já têm visual próprio (menu, login, cadastro
                       público): só fonte, campos e botões mais refinados.
   ============================================================================ */
@media screen {

/* ───────── Base comum ───────── */
body.em-moderno, body.em-leve {
    --em-verde: #1f9d4c; --em-verde-esc: #145c28; --em-verde-claro: #eafaf0; --em-verde-borda: #c9ecd6;
    --em-tinta: #0f2a1a; --em-texto: #334155; --em-suave: #64748b; --em-linha: #e7ebf0; --em-fundo: #f4f7f5;
    --em-raio: 18px; --em-sombra: 0 1px 2px rgba(15,42,26,.06), 0 10px 28px rgba(15,42,26,.07);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}
body.em-moderno button, body.em-moderno input, body.em-moderno select, body.em-moderno textarea,
body.em-leve button, body.em-leve input, body.em-leve select, body.em-leve textarea { font-family: inherit; }

/* campos (as duas versões) */
body.em-moderno input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]):not([type=hidden]),
body.em-moderno select, body.em-moderno textarea,
body.em-leve input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]):not([type=hidden]),
body.em-leve select, body.em-leve textarea {
    border: 2px solid var(--em-linha); border-radius: 12px; background-color: #fff; color: var(--em-tinta);
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
body.em-moderno input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]):not([type=hidden]),
body.em-moderno select { min-height: 46px; padding: .65rem .9rem; font-size: .95rem; }
body.em-moderno textarea { padding: .7rem .9rem; font-size: .95rem; }
body.em-moderno input:hover:not(:focus):not([readonly]):not(:disabled), body.em-moderno select:hover:not(:focus), body.em-moderno textarea:hover:not(:focus),
body.em-leve input:hover:not(:focus):not([readonly]):not(:disabled), body.em-leve select:hover:not(:focus), body.em-leve textarea:hover:not(:focus) { border-color: #d3dbe3; }
body.em-moderno input:focus, body.em-moderno select:focus, body.em-moderno textarea:focus,
body.em-leve input:focus, body.em-leve select:focus, body.em-leve textarea:focus {
    outline: none; border-color: var(--em-verde) !important; box-shadow: 0 0 0 4px rgba(31,157,76,.13) !important;
}
body.em-moderno input[readonly], body.em-moderno input:disabled, body.em-moderno select:disabled { background-color: #f6f8f7; color: var(--em-suave); }
body.em-moderno input::placeholder, body.em-moderno textarea::placeholder { color: #9aa6b2; }
body.em-moderno input[type=checkbox], body.em-moderno input[type=radio],
body.em-leve input[type=checkbox], body.em-leve input[type=radio] { accent-color: var(--em-verde); width: 18px; height: 18px; cursor: pointer; }

/* ───────── Telas internas ───────── */
body.em-moderno { background: radial-gradient(1200px 500px at 100% -10%, rgba(31,157,76,.07), transparent 60%), var(--em-fundo) !important; color: var(--em-texto); }

/* Topo: tipo A (header > nav > .nav-titulo + .nav-sessao) e tipo B (header > h1 + .usuario-info) */
body.em-moderno header {
    position: sticky; top: 0; z-index: 900;
    background: linear-gradient(120deg, var(--em-verde) 0%, var(--em-verde-esc) 100%) !important;
    color: #fff; padding: .7rem 0 !important; box-shadow: 0 6px 22px rgba(20,92,40,.24) !important;
    transition: box-shadow .25s, padding .25s;
}
body.em-moderno header.em-rolou { padding: .45rem 0 !important; box-shadow: 0 8px 26px rgba(20,92,40,.32) !important; }
body.em-moderno header:has(> h1) { padding: .7rem 1.4rem !important; display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; }
body.em-moderno header > nav { max-width: 1240px; gap: 1rem; }
body.em-moderno header .logo-nav-setre, body.em-moderno header .logo-nav {
    height: 42px; width: auto; background: #fff; border-radius: 12px; padding: 5px 10px; box-shadow: 0 6px 14px -8px rgba(0,0,0,.45);
}
body.em-moderno header .nav-titulo, body.em-moderno header > h1 { font-size: 1.08rem !important; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
body.em-moderno header .nav-titulo small { font-size: .75rem; font-weight: 500; opacity: .82; margin-top: .1rem; }
body.em-moderno header .nav-sessao, body.em-moderno header .usuario-info { gap: .45rem; font-size: .85rem; opacity: 1; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
body.em-moderno header .nav-sessao > span, body.em-moderno header .usuario-info > span { display: inline-flex; align-items: center; gap: .5rem; margin-right: .3rem; font-weight: 500; }
body.em-moderno header .nav-sessao a, body.em-moderno header .usuario-info a {
    color: #fff !important; text-decoration: none !important; opacity: 1 !important;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18);
    padding: .42rem .9rem; border-radius: 999px; font-size: .82rem; font-weight: 600; white-space: nowrap;
    transition: background .2s, transform .15s;
}
body.em-moderno header .nav-sessao a:hover, body.em-moderno header .usuario-info a:hover { background: rgba(255,255,255,.26); transform: translateY(-1px); }
body.em-moderno header a.nav-sair, body.em-moderno header a.btn-sair {
    background: #fff !important; color: var(--em-verde-esc) !important; border-color: #fff !important; font-weight: 700;
}
body.em-moderno header a.nav-sair:hover, body.em-moderno header a.btn-sair:hover { background: #f0fdf4 !important; }
body.em-moderno .em-av {
    width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--em-verde-esc);
    display: inline-grid; place-items: center; font-weight: 800; font-size: .85rem; font-style: normal; flex: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,.25);
}

/* Área de conteúdo */
body.em-moderno .container { margin-top: 1.8rem; }
body.em-moderno .painel { margin-top: 1.6rem; }

/* Cartões */
body.em-moderno .card, body.em-moderno .card-form {
    border-radius: var(--em-raio) !important; border: 1px solid var(--em-linha); box-shadow: var(--em-sombra) !important;
}
body.em-moderno .card h1, body.em-moderno .card h2, body.em-moderno .card h3,
body.em-moderno .sidebar h3 { color: var(--em-tinta) !important; font-weight: 800; letter-spacing: -.02em; }
body.em-moderno .card h1, body.em-moderno .card > h2:first-child { font-size: 1.4rem; }
body.em-moderno p.sub, body.em-moderno .card p.sub { color: var(--em-suave) !important; }
body.em-moderno .secao-titulo {
    color: var(--em-tinta) !important; font-weight: 800; letter-spacing: -.01em;
    display: flex; align-items: center; gap: .55rem;
}
body.em-moderno .secao-titulo::before {
    content: ""; width: 6px; height: 1.05em; border-radius: 9px; flex: none;
    background: linear-gradient(180deg, var(--em-verde), #7bd89c);
}
body.em-moderno label { color: var(--em-tinta); }
body.em-moderno .obrig, body.em-moderno label .obrig { color: #dc2626; }
body.em-moderno .opcional, body.em-moderno label .opcional { color: var(--em-suave) !important; font-weight: 400; }

/* Botões */
body.em-moderno .btn-salvar, body.em-moderno .btn-modal-primario, body.em-moderno .btn-gps,
body.em-moderno .btn-nova, body.em-moderno .btn-primary {
    background: var(--em-verde) !important; color: #fff !important; border: 0 !important;
    border-radius: 12px !important; font-weight: 700; letter-spacing: .01em;
    box-shadow: 0 8px 18px rgba(31,157,76,.28); transition: background .2s, transform .15s, box-shadow .2s;
}
body.em-moderno .btn-salvar:hover:not(:disabled), body.em-moderno .btn-modal-primario:hover:not(:disabled),
body.em-moderno .btn-gps:hover, body.em-moderno .btn-nova:hover, body.em-moderno .btn-primary:hover {
    background: #1a8a42 !important; transform: translateY(-1px); box-shadow: 0 12px 24px rgba(31,157,76,.34); opacity: 1;
}
body.em-moderno .btn-salvar:disabled, body.em-moderno .btn-modal-primario:disabled { background: #b8c4bd !important; box-shadow: none; cursor: not-allowed; }
body.em-moderno .btn-gps.ativo { background: #dc2626 !important; box-shadow: 0 8px 18px rgba(220,38,38,.28); }
body.em-moderno .btn-cancelar, body.em-moderno .btn-modal-secundario, body.em-moderno .btn-cancelar-edicao,
body.em-moderno .btn-cancelar-modal {
    background: #eef2f0 !important; color: var(--em-texto) !important; border: 0 !important;
    border-radius: 12px !important; font-weight: 600; transition: background .2s;
}
body.em-moderno .btn-cancelar:hover, body.em-moderno .btn-modal-secundario:hover,
body.em-moderno .btn-cancelar-edicao:hover, body.em-moderno .btn-cancelar-modal:hover { background: #e2e8e5 !important; }
body.em-moderno .btn-topo, body.em-moderno .btn-exportar, body.em-moderno .btn-imprimir, body.em-moderno .btn-manual {
    background: #fff !important; color: var(--em-verde-esc) !important; border: 1.5px solid var(--em-verde-borda) !important;
    border-radius: 12px !important; font-weight: 700; transition: background .2s, border-color .2s;
}
body.em-moderno .btn-topo:hover, body.em-moderno .btn-exportar:hover, body.em-moderno .btn-imprimir:hover, body.em-moderno .btn-manual:hover {
    background: var(--em-verde-claro) !important; border-color: var(--em-verde) !important;
}
body.em-moderno .btn-manual.ativo { background: #1d4ed8 !important; border-color: #1d4ed8 !important; color: #fff !important; }
body.em-moderno .btn-acao, body.em-moderno .btn-ver-linha, body.em-moderno .btn-editar, body.em-moderno .btn-excluir, body.em-moderno .btn-alternar {
    border-radius: 10px !important; font-weight: 600; transition: background .2s, border-color .2s, color .2s;
}
body.em-moderno .btn-editar, body.em-moderno .btn-ver-linha {
    background: var(--em-verde-claro) !important; color: var(--em-verde-esc) !important; border: 1.5px solid var(--em-verde-borda) !important;
}
body.em-moderno .btn-editar:hover, body.em-moderno .btn-ver-linha:hover { background: #d7f5e2 !important; opacity: 1; }
body.em-moderno .btn-excluir { background: #fff !important; color: #dc2626 !important; border: 1.5px solid #fecaca !important; }
body.em-moderno .btn-excluir:hover { background: #fef2f2 !important; border-color: #fca5a5 !important; }
body.em-moderno .btn-alternar { background: #fff !important; color: var(--em-texto) !important; border: 1.5px solid var(--em-linha) !important; }
body.em-moderno .btn-alternar:hover { background: #f6f8f7 !important; }

/* Abas, opções e marcadores */
body.em-moderno .radio-item, body.em-moderno .checkbox-item, body.em-moderno .origem-opcao,
body.em-moderno .resultado-opcao, body.em-moderno .encaminhado-opcao {
    border-radius: 12px !important; transition: border-color .2s, background .2s;
}
body.em-moderno .radio-item:has(input:checked), body.em-moderno .checkbox-item:has(input:checked),
body.em-moderno .origem-opcao:has(input:checked), body.em-moderno .resultado-opcao:has(input:checked),
body.em-moderno .encaminhado-opcao:has(input:checked) {
    border-color: var(--em-verde) !important; background: var(--em-verde-claro) !important;
}
body.em-moderno .tag-regiao { background: var(--em-verde-claro); color: var(--em-verde-esc); border: 1px solid var(--em-verde-borda); }
body.em-moderno .selo-parecer { padding: .25rem .7rem; }

/* Avisos */
body.em-moderno .mensagem-erro, body.em-moderno .alerta {
    border-radius: 12px !important; border: 1px solid #fecaca; background: #fef2f2 !important; color: #991b1b !important;
}
body.em-moderno .mensagem-erro a, body.em-moderno .alerta a { color: #991b1b; font-weight: 700; }
body.em-moderno .estado-vazio, body.em-moderno .estado-carregando, body.em-moderno .lista-vazia { color: var(--em-suave) !important; }
body.em-moderno .info-resultados { color: var(--em-suave); font-weight: 600; font-size: .85rem; }
body.em-moderno .barra-selecao { border-radius: 14px !important; }

/* Filtros em "faixa" */
body.em-moderno .filtros, body.em-moderno .linha-filtros {
    background: #f8faf9; border: 1px solid var(--em-linha); border-radius: 16px; padding: 1rem 1.1rem;
}

/* Tabelas (no computador; no celular cada tela já vira cartões) */
body.em-moderno table:not(.tabela-itens-visu) thead th {
    background: #f8faf9 !important; color: var(--em-suave) !important; font-size: .72rem !important; font-weight: 700;
    letter-spacing: .06em; border-bottom: 1px solid var(--em-linha) !important; box-shadow: none !important;
}
body.em-moderno table:not(.tabela-itens-visu) thead th:first-child { border-top-left-radius: 12px; }
body.em-moderno table:not(.tabela-itens-visu) thead th:last-child { border-top-right-radius: 12px; }
body.em-moderno table tbody td { border-bottom-color: #eef1f4 !important; }
body.em-moderno table:not(.tabela-itens-visu) tbody tr { transition: background .15s; }
body.em-moderno table:not(.tabela-itens-visu) tbody tr:hover { background: #f5fbf7 !important; }
body.em-moderno table tbody tr.selecionada { background: var(--em-verde-claro) !important; }
body.em-moderno table.tabela-itens-visu th { background: var(--em-verde-esc) !important; }
body.em-moderno table.tabela-itens-visu th:first-child { border-top-left-radius: 10px; }
body.em-moderno table.tabela-itens-visu th:last-child { border-top-right-radius: 10px; }

/* Janelas (modais) */
body.em-moderno .modal-overlay { background: rgba(15,42,26,.5) !important; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
body.em-moderno .modal-box { border-radius: 22px !important; box-shadow: 0 30px 70px rgba(0,0,0,.28) !important; border: 1px solid rgba(255,255,255,.6); }
body.em-moderno .modal-box h2, body.em-moderno .modal-box h3 { color: var(--em-tinta) !important; font-weight: 800; letter-spacing: -.01em; }

/* Aviso rápido (toast) */
body.em-moderno .toast, body.em-moderno .mensagem-toast {
    background: var(--em-tinta) !important; border-radius: 14px !important; font-weight: 500;
    box-shadow: 0 14px 34px rgba(0,0,0,.25) !important;
}

/* Mapas */
body.em-moderno #mapa { border-radius: 14px !important; border: 1px solid var(--em-linha); }
body.em-moderno .lista-ruas li, body.em-moderno .lista-ruas-admin li { border-radius: 10px; padding-left: .6rem !important; padding-right: .6rem !important; }
body.em-moderno .lista-ruas-admin li:hover { background: #f5fbf7 !important; }
body.em-moderno .lista-ruas li strong, body.em-moderno .lista-ruas-admin li strong { color: var(--em-tinta) !important; }
body.em-moderno .btn-filtro-usuarios, body.em-moderno .painel-filtro-usuarios { border-radius: 12px !important; }
body.em-moderno .status-rastreio.gravando { color: var(--em-verde-esc); }

/* Barra de rolagem discreta */
body.em-moderno ::-webkit-scrollbar { width: 10px; height: 10px; }
body.em-moderno ::-webkit-scrollbar-thumb { background: #cfd8d3; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
body.em-moderno ::-webkit-scrollbar-thumb:hover { background: #b3c0b9; background-clip: padding-box; }

body.em-moderno .linha > *, body.em-moderno .form-row > *, body.em-moderno .form-row-3 > *,
body.em-moderno .filtros > *, body.em-moderno .linha-filtros > *, body.em-moderno .container > * { min-width: 0; }

@media (max-width: 700px) {
    body.em-moderno { overflow-x: hidden; }
    body.em-moderno header > nav { flex-wrap: wrap; padding: 0 1rem; gap: .5rem .8rem; }
    body.em-moderno header .nav-titulo { flex: 1 1 0; min-width: 0; }
    body.em-moderno header .nav-sessao, body.em-moderno header .usuario-info {
        margin-left: 0; width: 100%; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .15rem;
        scrollbar-width: none;
    }
    body.em-moderno header .nav-sessao::-webkit-scrollbar, body.em-moderno header .usuario-info::-webkit-scrollbar { display: none; }
    body.em-moderno header .nav-sessao > span, body.em-moderno header .usuario-info > span { flex: none; margin-right: auto; font-size: 0; gap: 0; }
    body.em-moderno header .nav-sessao > span:not(:has(.em-av)), body.em-moderno header .usuario-info > span:not(:has(.em-av)) { font-size: .8rem; }
    body.em-moderno header:has(> h1) { padding: .55rem 1rem !important; }
    body.em-moderno .container, body.em-moderno .painel { padding-left: .8rem !important; padding-right: .8rem !important; margin-top: 1rem; }
    body.em-moderno .card { padding: 1.15rem !important; }
    body.em-moderno .linha { grid-template-columns: 1fr !important; gap: 0 !important; }
    body.em-moderno input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]), body.em-moderno select, body.em-moderno textarea { max-width: 100%; font-size: 16px; }
    body.em-moderno header { padding: .55rem 0 !important; }
    body.em-moderno header .logo-nav-setre, body.em-moderno header .logo-nav { height: 34px; padding: 4px 8px; }
    body.em-moderno header .nav-sessao a, body.em-moderno header .usuario-info a { padding: .38rem .75rem; font-size: .78rem; }
    body.em-moderno header .em-av { width: 28px; height: 28px; font-size: .78rem; }
    body.em-moderno .card, body.em-moderno .card-form { border-radius: 14px !important; }
    body.em-moderno .filtros, body.em-moderno .linha-filtros { padding: .8rem; }
    body.em-moderno table:not(.tabela-itens-visu) tbody tr:hover { background: #fff !important; }
}

/* ───────── Telas com visual próprio: só o essencial ───────── */
body.em-leve .btn-primary, body.em-leve .btn-enviar, body.em-leve button[type=submit] { border-radius: 12px; }

@media (prefers-reduced-motion: reduce) {
    body.em-moderno *, body.em-moderno *::before, body.em-moderno *::after { transition: none !important; }
}
}
