:root {
    color-scheme: dark;
    --bg: #061a3f;
    --bg-soft: #0a3b7d;
    --body-bg: radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), transparent 32%),
        linear-gradient(145deg, #031126 0%, #062b66 48%, #0b5ab8 100%);
    --panel: rgba(5, 35, 82, 0.9);
    --panel-strong: rgba(8, 55, 118, 0.94);
    --panel-muted: rgba(8, 40, 86, 0.78);
    --border: rgba(125, 211, 252, 0.42);
    --border-strong: rgba(186, 230, 253, 0.62);
    --text: #f8fbff;
    --muted: #c4d7ec;
    --input-bg: #f8fbff;
    --input-text: #06111f;
    --blue: #1287e8;
    --blue-light: #60d5ff;
    --blue-deep: #0750a6;
    --green: #22c55e;
    --orange: #f97316;
    --red: #ef4444;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --inner-line: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --texto-suave: var(--muted);
    --font-projeto: "Sora", system-ui, -apple-system, sans-serif;
}

body.light-theme {
    color-scheme: light;
    --bg: #eef6ff;
    --bg-soft: #d8ecff;
    --body-bg: radial-gradient(circle at top left, rgba(18, 135, 232, 0.18), transparent 34%),
        linear-gradient(145deg, #f7fbff 0%, #e8f4ff 52%, #cfe8ff 100%);
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: rgba(247, 251, 255, 0.96);
    --panel-muted: rgba(229, 242, 255, 0.88);
    --border: rgba(14, 91, 166, 0.22);
    --border-strong: rgba(18, 135, 232, 0.42);
    --text: #082044;
    --muted: #47617f;
    --input-bg: #ffffff;
    --input-text: #082044;
    --blue: #0e6fca;
    --blue-light: #1597ee;
    --blue-deep: #084f9f;
    --shadow: 0 20px 54px rgba(12, 56, 107, 0.16);
    --inner-line: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

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

html {
    min-height: 100%;
    background: var(--bg);
    touch-action: pan-y;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    padding: 24px;
    background: var(--body-bg);
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--text);
    font-family: var(--font-projeto);
    font-weight: 500;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background 0.25s ease, color 0.25s ease;
    touch-action: pan-y;
    overscroll-behavior-x: none;
    overscroll-behavior-y: auto;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

h1, h2, h3, h4,
.topo h1,
.botao,
.menu-btn,
.theme-toggle,
.sair,
.site-offline-aviso,
button,
input,
select,
textarea {
    font-family: var(--font-projeto);
}

h1, h2, h3,
.topo h1 {
    font-weight: 700;
    letter-spacing: -0.03em;
}

.botao,
.menu-btn,
.theme-toggle,
.sair {
    font-weight: 700;
    letter-spacing: -0.02em;
}

:focus-visible {
    outline: 2px solid var(--blue-light, #60d5ff);
    outline-offset: 2px;
}

body.com-fundo-site {
    background-color: var(--bg);
    background-image:
        linear-gradient(180deg, rgba(3, 17, 38, 0.78), rgba(6, 43, 102, 0.82)),
        var(--fundo-imagem-url);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
    body.com-fundo-site {
        background-attachment: scroll;
    }
}

body.light-theme.com-fundo-site {
    background-image:
        linear-gradient(180deg, rgba(247, 251, 255, 0.84), rgba(207, 232, 255, 0.88)),
        var(--fundo-imagem-url);
}

body.mapa-aberto,
html.mapa-aberto {
    overflow: hidden;
    touch-action: none;
}

body.mapa-aberto #mapaContainer,
body.mapa-aberto .mapa-conteudo,
body.mapa-aberto #mapaFrame {
    touch-action: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.login-card {
    width: min(100%, 430px);
    max-width: calc(100vw - 20px);
    margin: 70px auto;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--panel-strong), var(--panel));
    box-shadow: var(--shadow), var(--inner-line);
    backdrop-filter: blur(16px);
    text-align: center;
}

.login-logo {
    display: block;
    width: min(100%, 320px);
    margin: 0 auto 20px;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.78));
}

.login-card h1 {
    margin-bottom: 8px;
    font-size: 28px;
    text-transform: uppercase;
}

.login-card p {
    margin-bottom: 24px;
    color: var(--muted);
}

.login-intro {
    margin-bottom: 18px;
    font-size: 15px;
}

.login-opcoes {
    display: grid;
    gap: 12px;
}

.login-painel h1 {
    margin-bottom: 8px;
    font-size: 24px;
    text-transform: uppercase;
}

.login-opcao {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--panel-muted);
    color: var(--text);
    text-align: left;
}

.login-opcao strong {
    display: block;
    font-size: 16px;
}

.login-opcao small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.login-opcao i {
    width: 28px;
    font-size: 22px;
    text-align: center;
    color: var(--blue-light);
}

.login-opcao-equipe {
    border-color: rgba(18, 135, 232, 0.45);
    background: rgba(18, 135, 232, 0.12);
}

.login-opcao-publico {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.1);
}

.login-opcao-publico i {
    color: #4ade80;
}

.login-opcao-publico-entrar {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 15px 18px;
    border: 1px solid rgba(34, 197, 94, 0.45);
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.login-voltar {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.login-agente-wrap {
    position: relative;
    z-index: 45;
}

.login-agente-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(3, 17, 38, 0.72);
    backdrop-filter: blur(3px);
}

body.light-theme .login-agente-backdrop {
    background: rgba(8, 32, 68, 0.42);
}

.login-agente-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(96, 213, 255, 0.45);
    background: rgba(18, 135, 232, 0.16);
    color: var(--text);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.login-agente-texto {
    white-space: normal;
}

.login-agente-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    z-index: 1010;
    display: grid;
    gap: 10px;
    width: min(320px, calc(100vw - 32px));
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: #071e45;
    box-shadow: var(--shadow), var(--inner-line);
}

.login-agente-popover.oculta {
    display: none;
}

body.light-theme .login-agente-popover {
    background: #ffffff;
}

.login-agente-popover-titulo {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.login-agente-popover input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--input-text);
    font-size: 16px;
}

.login-agente-entrar {
    width: 100%;
    justify-content: center;
}

body.login-agente-aberto {
    overflow-x: hidden;
    width: 100%;
}

body.acesso-agente #loginAgenteWrap {
    display: none !important;
}

body.acesso-agente #mapaTopoWrap {
    display: none !important;
}

.login-card input {
    width: 100%;
    margin-bottom: 16px;
    padding: 15px 16px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: var(--radius-sm);
    outline: 0;
    background: var(--input-bg);
    color: var(--input-text);
    font-size: 16px;
}

.login-card input:focus,
.pesquisa:focus {
    border-color: var(--blue-light);
    box-shadow: 0 0 0 4px rgba(0, 148, 255, 0.22);
}

.login-card button,
.sair,
.theme-toggle,
.menu-btn,
.botao,
#fechar {
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-card button {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 18px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
    color: white;
    font-size: 16px;
    font-weight: 700;
}

#painel {
    display: block;
    max-width: 100%;
    overflow-x: hidden;
}

.topo {
    position: relative;
    z-index: 40;
    display: flex;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto 24px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--panel-muted);
    box-shadow: var(--shadow), var(--inner-line);
    backdrop-filter: blur(16px);
}

.topo > div {
    min-width: 0;
}

.logo {
    display: block;
    width: min(100%, 420px);
    height: auto;
    margin-bottom: 14px;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.26)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.82));
}

body.light-theme .login-logo,
body.light-theme .logo {
    filter: drop-shadow(0 8px 18px rgba(8, 32, 68, 0.18));
}

.topo h1 {
    margin-bottom: 8px;
    font-size: 30px;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.topo p,
#relogio {
    color: var(--muted);
}

.saudacao-agente {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--blue-light);
}

#relogio {
    margin-top: 10px;
    color: var(--blue-light);
}

body.light-theme #relogio {
    color: var(--blue-deep);
}

.online-wrap {
    position: relative;
}

.online-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(46, 204, 113, 0.45);
    background: rgba(46, 204, 113, 0.12);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
}

.online-badge i {
    color: #2ecc71;
    font-size: 10px;
}

.online-badge.ativo {
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.25);
}

.online-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 200;
    min-width: 260px;
    max-width: min(520px, 92vw);
    max-height: min(70vh, 380px);
    overflow-y: auto;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: #071e45;
    color: var(--text);
    box-shadow: var(--shadow), var(--inner-line);
    isolation: isolate;
}

body.light-theme .online-popover {
    background: #ffffff;
    border-color: var(--border-strong);
}

.online-popover-titulo {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.online-popover ul.online-nomes {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.online-popover .online-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    background: rgba(46, 204, 113, 0.18);
    border: 1px solid rgba(46, 204, 113, 0.4);
}

body.light-theme .online-popover .online-chip {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.35);
}

.online-popover .online-chip i {
    color: #2ecc71;
    font-size: 8px;
    flex-shrink: 0;
}

.online-popover .online-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-wrap {
    position: relative;
}

.chat-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(96, 213, 255, 0.45);
    background: rgba(18, 135, 232, 0.16);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
}

.chat-badge.ativo {
    box-shadow: 0 0 0 2px rgba(18, 135, 232, 0.28);
}

.chat-icone-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-ponto-novo {
    position: absolute;
    top: -3px;
    right: -5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid #071e45;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.45);
    animation: chat-ponto-pulsar 1.6s ease-in-out infinite;
}

body.light-theme .chat-ponto-novo {
    border-color: #ffffff;
}

@keyframes chat-ponto-pulsar {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.85;
    }
}

.chat-badge.tem-mensagens-novas {
    border-color: rgba(239, 68, 68, 0.55);
    background: rgba(239, 68, 68, 0.14);
}

.chat-badge.tem-mensagens-novas .chat-icone,
.menu-btn.tem-mensagens-novas .chat-icone {
    color: #fca5a5;
}

.menu-btn.tem-mensagens-novas {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.1);
}

.chat-badge-contador {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    line-height: 1;
}

.chat-painel {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 260;
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: min(380px, calc(100vw - 24px));
    height: min(520px, calc(100vh - 24px));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--panel-strong);
    box-shadow: var(--shadow), var(--inner-line);
    overflow: hidden;
}

.chat-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(18, 135, 232, 0.12);
}

.chat-kicker {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chat-cabecalho h2 {
    margin: 4px 0 0;
    font-size: 18px;
}

.chat-cabecalho-acoes {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-notificacoes {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.chat-notificacoes.ativo {
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}

.chat-fechar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.chat-mensagens {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    overflow-y: auto;
}

.chat-vazio {
    margin: auto 0;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.chat-bolha {
    display: grid;
    gap: 4px;
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--panel-muted);
}

.chat-bolha.propria {
    align-self: flex-end;
    border-color: rgba(18, 135, 232, 0.45);
    background: rgba(18, 135, 232, 0.18);
}

.chat-bolha.pendente {
    opacity: 0.6;
}

.chat-bolha.pendente .chat-bolha-texto::after {
    content: " · enviando…";
    font-size: 11px;
    font-style: italic;
    color: var(--muted);
}

.chat-bolha-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.chat-bolha-texto {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.4;
}

.chat-formulario {
    display: grid;
    gap: 10px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--border);
    background: var(--panel);
}

.chat-formulario textarea {
    width: 100%;
    min-height: 72px;
    padding: 11px 12px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: var(--radius-sm);
    resize: vertical;
    background: var(--input-bg);
    color: var(--input-text);
}

.chat-enviar {
    justify-self: end;
}

body.chat-aberto {
    overflow: hidden;
}

body.rolagem-travada,
body.chat-aberto {
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
    overscroll-behavior: none;
}

.online-vazio {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.menu-badge {
    display: inline-flex;
    min-width: 22px;
    height: 22px;
    margin-left: auto;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.menu-btn {
    position: relative;
}

a.menu-btn {
    text-decoration: none;
}

.theme-toggle.ativo {
    border-color: rgba(46, 204, 113, 0.65);
    background: rgba(46, 204, 113, 0.14);
}

.mapa-legenda {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--panel-muted);
}

.mapa-legenda-titulo {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.mapa-legenda-itens {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.mapa-legenda-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.mapa-cor-indicador {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    flex: 0 0 auto;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.mapa-cor-verde { background: #16a34a; }
.mapa-cor-azul { background: linear-gradient(135deg, var(--blue-deep), var(--blue)); }
.mapa-cor-vermelho { background: #dc2626; }
.mapa-cor-laranja { background: #ea580c; }

.mapa-card-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.equipe-status.online {
    color: #2ecc71;
    font-weight: 800;
}

.equipe-contato {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.utilidades-painel {
    min-height: auto;
    padding: 22px 24px;
    text-align: left;
}

.utilidades-botoes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.utilidades-botoes .menu-btn {
    width: auto;
    flex: 1 1 180px;
    max-width: 100%;
    margin-bottom: 0;
    justify-content: center;
    text-decoration: none;
}

.equipe-contato-btn {
    flex: 1 1 120px;
    justify-content: center;
    min-height: 42px;
    padding: 10px 12px;
    font-size: 14px;
}

.topo-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topo-actions > button {
    min-width: 0;
}

.topo-actions .chat-badge,
.topo-actions .online-badge,
.topo-actions .notificacoes-botao,
.topo-actions .theme-toggle,
.topo-actions .topo-exportar,
.topo-actions .topo-painel-admin,
.topo-actions .login-agente-btn,
.topo-actions .sair {
    min-height: 46px;
    padding-top: 8px;
    padding-bottom: 8px;
    border-radius: var(--radius-sm);
    align-items: center;
}

.sair {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.16);
    color: white;
    font-weight: 700;
    border: 1px solid rgba(239, 68, 68, 0.38);
}

body.light-theme .sair {
    color: #991b1b;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 18px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(18, 135, 232, 0.18), rgba(96, 213, 255, 0.12));
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--inner-line);
    text-decoration: none;
}

.layout {
    display: flex;
    max-width: 1240px;
    margin: 0 auto;
    gap: 22px;
    align-items: flex-start;
}

.mapa-topo-wrap {
    max-width: 1240px;
    margin: 0 auto 22px;
    padding: 0 16px;
}

.mapa-topo-titulo {
    margin: 0 0 12px;
    font-size: clamp(18px, 2.4vw, 22px);
    font-weight: 700;
    color: var(--text);
}

.mapa-topo-frame-wrap {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow), var(--inner-line);
}

.mapa-topo-frame-wrap iframe {
    display: block;
    width: 100%;
    min-height: 180px;
    border: 0;
    background: rgba(0, 0, 0, 0.08);
}

.sidebar {
    position: sticky;
    top: 24px;
    width: 270px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow), var(--inner-line);
    backdrop-filter: blur(16px);
}

.sidebar h2 {
    margin-bottom: 18px;
    font-size: 20px;
}

.menu-btn {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 11px;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--panel-muted);
    color: var(--text);
    text-align: left;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.menu-btn:hover,
.menu-btn.active {
    border-color: var(--border-strong);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
    color: var(--text);
}

.conteudo {
    flex: 1;
    min-width: 0;
}

.secao {
    margin-bottom: 22px;
    content-visibility: auto;
    contain-intrinsic-size: auto 420px;
}

.oculta {
    display: none !important;
}

.secao.oculta,
.secao.visibilidade-desativada {
    display: none;
    content-visibility: hidden;
}

@media (prefers-reduced-motion: reduce), (max-width: 700px) {
    body,
    .menu-btn,
    .botao,
    .card,
    .grafico,
    .mapa-card,
    .equipe-card,
    .aviso-card {
        transition: none !important;
    }
}

.indicadores-atualizacao,
.indicadores-atualizacao-secao {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.indicadores-atualizacao {
    font-size: 14px;
}

.section-heading {
    margin-bottom: 16px;
}

.section-heading.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-heading span {
    display: block;
    margin-bottom: 4px;
    color: var(--blue-light);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.section-heading h2 {
    font-size: 28px;
    text-transform: uppercase;
}

.dashboard,
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.graficos-lista {
    display: grid;
    gap: 20px;
}

#gridMapas {
    grid-template-columns: 1fr;
}

.mapa-campanha {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--panel-strong), var(--panel));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18), var(--inner-line);
}

.mapa-campanha + .mapa-campanha {
    margin-top: 18px;
}

.mapa-campanha-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.mapa-campanha-header span {
    display: block;
    margin-bottom: 4px;
    color: var(--blue-light);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.mapa-campanha-header h3 {
    font-size: 22px;
    text-transform: uppercase;
}

.mapa-campanha-header small {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    background: rgba(18, 135, 232, 0.16);
    font-weight: 700;
    white-space: nowrap;
}

.mapa-campanha > p {
    margin-bottom: 18px;
    color: var(--muted);
}

.mapa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.mapa-vazio {
    padding: 22px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--muted);
    text-align: center;
}

.info,
.card,
.grafico {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--panel-strong), var(--panel));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18), var(--inner-line);
    backdrop-filter: blur(14px);
}

.info {
    min-height: 150px;
    padding: 26px;
    text-align: center;
}

.info h3 {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 42px;
}

.info p,
.card p {
    color: var(--muted);
}

.info-titulo {
    margin-bottom: 14px;
    color: var(--blue-light);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-epidemiologico {
    grid-template-columns: 1fr;
}

.info-epidemiologica .info-titulo {
    margin-bottom: 16px;
    font-size: 20px;
    letter-spacing: 0.03em;
}

.info-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-split-tres {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-split > div {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(18, 135, 232, 0.12);
}

.info-split h3 {
    font-size: 34px;
}

.grafico {
    height: 500px;
    margin-bottom: 22px;
    padding: 22px;
}

canvas {
    width: 100% !important;
    height: 100% !important;
}

.pesquisa {
    width: 100%;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: var(--radius-md);
    outline: 0;
    background: var(--input-bg);
    color: var(--input-text);
    font-size: 16px;
}

.avisos-lista {
    display: grid;
    gap: 14px;
}

.aviso-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, var(--panel-strong), var(--panel));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16), var(--inner-line);
}

.aviso-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.aviso-card h3 {
    font-size: 20px;
}

.aviso-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.aviso-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    background: rgba(18, 135, 232, 0.16);
    font-size: 13px;
    font-weight: 700;
}

.aviso-card p {
    color: var(--muted);
    line-height: 1.5;
    white-space: pre-wrap;
}

.equipe-lista {
    display: grid;
    gap: 18px;
}

.equipe-grupo {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--panel-strong), var(--panel));
    box-shadow: 0 12px 28px rgba(3, 17, 38, 0.22), var(--inner-line);
    content-visibility: auto;
    contain-intrinsic-size: auto 360px;
    isolation: isolate;
}

.equipe-grupo[hidden],
.equipe-card[hidden] {
    display: none !important;
}

.equipe-grupo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.equipe-grupo-header span {
    display: block;
    margin-bottom: 4px;
    color: var(--blue-light);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.equipe-grupo-header h3 {
    font-size: 22px;
    text-transform: uppercase;
}

.equipe-grupo-header small {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    background: rgba(18, 135, 232, 0.16);
    font-weight: 700;
    white-space: nowrap;
}

.equipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.equipe-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--panel-muted);
    content-visibility: auto;
    contain-intrinsic-size: auto 260px;
}

.equipe-card h3 {
    margin-bottom: 8px;
    font-size: 20px;
}

.equipe-card p {
    color: var(--muted);
}

.equipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.equipe-meta span {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    background: rgba(18, 135, 232, 0.16);
    font-size: 13px;
    font-weight: 700;
}

.aviso-vazio {
    padding: 22px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--muted);
    text-align: center;
}

.erro-dados {
    display: grid;
    gap: 8px;
    background: rgba(239, 68, 68, 0.08);
    color: var(--text);
}

.erro-dados strong,
.erro-dados span {
    display: block;
}

.erro-dados span {
    color: var(--muted);
    line-height: 1.45;
}

.card {
    padding: 22px;
}

.icone {
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 18px;
    background: rgba(0, 148, 255, 0.2);
    color: var(--blue-light);
    font-size: 25px;
}

.equipe-avatar {
    overflow: hidden;
    border-radius: 50%;
    width: 72px;
    height: 72px;
    margin-bottom: 14px;
    background: var(--panel-muted);
}

.equipe-foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: var(--panel-muted);
}

.equipe-meta i {
    margin-right: 4px;
    opacity: 0.9;
}

.card h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.card p {
    margin-bottom: 20px;
}

.botao {
    display: inline-flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.botao.compact {
    width: auto;
    min-width: 240px;
}

.topo-exportar {
    width: auto;
    min-width: 0;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid rgba(134, 239, 172, 0.5);
    background: linear-gradient(135deg, #15803d 0%, #16a34a 48%, #22c55e 100%);
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.24), var(--inner-line);
    white-space: nowrap;
}

.topo-exportar:hover:not(:disabled) {
    background: linear-gradient(135deg, #166534 0%, #15803d 46%, #16a34a 100%);
    transform: translateY(-1px);
}

.topo-exportar:disabled {
    cursor: wait;
    opacity: 0.82;
    transform: none;
}

.topo-exportar .exportar-icone {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 14px;
}

.exportar-texto {
    display: grid;
    gap: 1px;
    min-width: 0;
    text-align: left;
    line-height: 1.05;
}

.exportar-label {
    font-size: 14px;
    font-weight: 900;
}

.exportar-sub {
    color: rgba(255, 255, 255, 0.82);
    font-size: 11px;
    font-weight: 700;
}

.topo-painel-admin {
    width: auto;
    min-width: 0;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.topo-painel-admin.carregando {
    opacity: 0.72;
    pointer-events: none;
}

.topo-exportar i,
.topo-painel-admin i,
.theme-toggle i,
.sair i {
    flex: 0 0 auto;
}

.azul {
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
}

a.botao.azul,
a.botao.azul:visited {
    color: #fff;
}

body.light-theme a.botao.azul {
    box-shadow: 0 10px 24px rgba(8, 79, 159, 0.22);
}

.verde {
    background: #16a34a;
}

.topo-exportar.verde {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 48%, #22c55e 100%);
}

.topo-exportar.verde:hover:not(:disabled) {
    background: linear-gradient(135deg, #166534 0%, #15803d 46%, #16a34a 100%);
}

.laranja {
    background: #ea580c;
}

.vermelho {
    background: #dc2626;
}

.botao.neutro {
    background: var(--panel-muted);
    color: var(--text);
    border: 1px solid var(--border);
}

.botao.neutro:hover {
    border-color: var(--border-strong);
}

.botao.chat-badge,
.botao.online-badge {
    color: var(--text);
}

.login-card button:hover,
.sair:hover,
.topo-painel-admin:hover,
.theme-toggle:hover,
.botao:hover,
#fechar:hover,
.card:hover,
.info:hover {
    transform: translateY(-2px);
}

#mapaContainer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    flex-direction: column;
    gap: 12px;
    padding:
        max(22px, calc(14px + env(safe-area-inset-top, 0px)))
        max(22px, calc(14px + env(safe-area-inset-right, 0px)))
        max(22px, calc(14px + env(safe-area-inset-bottom, 0px)))
        max(22px, calc(14px + env(safe-area-inset-left, 0px)));
    background: rgba(2, 12, 38, 0.95);
    overscroll-behavior: contain;
}

body.light-theme #mapaContainer {
    background: rgba(8, 32, 68, 0.72);
}

.mapa-barra {
    display: flex;
    flex-shrink: 0;
    gap: 10px;
    justify-content: flex-end;
}

.mapa-externo {
    width: auto;
}

#fechar {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    background: #dc2626;
    color: white;
    font-weight: 700;
}

#mapaFrame {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: white;
}

.mapa-conteudo {
    position: relative;
    display: flex;
    flex: 1;
    min-height: 0;
}

.mapa-carregando {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: var(--radius-lg);
    background: rgba(2, 12, 38, 0.9);
    color: #e0f2fe;
    text-align: center;
}

body.light-theme .mapa-carregando {
    background: rgba(8, 32, 68, 0.88);
}

.mapa-carregando p {
    margin: 0;
    font-weight: 700;
}

.mapa-carregando-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(125, 211, 252, 0.25);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: mapa-girar 0.8s linear infinite;
}

@keyframes mapa-girar {
    to {
        transform: rotate(360deg);
    }
}

.mapa-aviso-externo {
    position: fixed;
    left: 50%;
    bottom: max(18px, calc(10px + env(safe-area-inset-bottom, 0px)));
    z-index: 1000;
    width: min(92vw, 420px);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
    box-shadow: 0 12px 30px rgba(2, 12, 38, 0.45);
    transform: translateX(-50%);
}

body.light-theme .mapa-aviso-externo {
    background: rgba(255, 255, 255, 0.98);
    color: #0f172a;
}

.mapa-aviso-externo p {
    margin: 0;
}

.rodape {
    margin-top: 34px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 900px) {
    body {
        padding: 14px;
    }

    .topo,
    .layout,
    .mapa-topo-wrap,
    .section-heading.row {
        flex-direction: column;
        align-items: stretch;
    }

    .sidebar {
        position: static;
        width: 100%;
    }

    .topo {
        text-align: center;
    }

    .topo-actions {
        width: 100%;
        justify-content: center;
    }

    .botao.compact {
        width: 100%;
        min-width: 0;
    }

    .topo,
    .sidebar,
    .info,
    .card,
    .grafico,
    .mapa-campanha,
    .equipe-grupo,
    .aviso-card,
    .mapa-legenda,
    .chat-painel,
    .online-popover,
    .login-agente-popover {
        backdrop-filter: none;
        box-shadow: var(--inner-line);
    }

}

@media (max-width: 700px) {
    body {
        padding: 10px;
    }

    main,
    #painel {
        width: 100%;
        max-width: 100%;
    }

    .topo,
    .sidebar,
    .layout {
        width: 100%;
        max-width: 100%;
    }

    .login-card {
        margin: 28px auto;
        padding: 24px;
    }

    .topo {
        gap: 16px;
        padding: 16px;
        border-radius: var(--radius-md);
    }

    .topo > div {
        width: 100%;
        max-width: 100%;
    }

    .logo {
        width: min(100%, 310px);
        margin-bottom: 10px;
    }

    .topo h1 {
        max-width: min(100%, 315px);
        margin-right: auto;
        margin-left: auto;
        font-size: 18px;
        line-height: 1.2;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .topo p,
    #relogio {
        font-size: 14px;
    }

    .topo-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        min-width: 0;
        gap: 10px;
    }

    .theme-toggle,
    .sair,
    .topo-exportar,
    .topo-painel-admin {
        min-height: 48px;
        width: 100%;
        padding: 12px;
        border-radius: var(--radius-sm);
        font-size: 14px;
        line-height: 1.15;
        white-space: normal;
        text-align: center;
    }

    .chat-wrap,
    .online-wrap,
    .notificacoes-wrap,
    .login-agente-wrap {
        grid-column: 1 / -1;
        width: 100%;
    }

    .chat-badge,
    .online-badge,
    .notificacoes-botao,
    .login-agente-btn {
        width: 100%;
        justify-content: center;
    }

    .online-popover {
        left: 0;
        right: 0;
        top: auto;
        bottom: calc(100% + 10px);
    }

    .login-agente-btn {
        font-size: 13px;
        padding: 12px 10px;
    }

    #btnSistema {
        grid-column: 1 / -1;
        width: 100%;
    }

    .topo-exportar {
        grid-column: 1 / -1;
        width: 100%;
        order: 1;
        min-height: 56px;
        font-size: 15px;
    }

    .topo-exportar .exportar-icone {
        width: 32px;
        height: 32px;
    }

    .topo-exportar .exportar-texto {
        text-align: left;
    }

    .topo-exportar .exportar-label {
        font-size: 15px;
    }

    .theme-toggle {
        order: 2;
    }

    .sair {
        order: 3;
    }

    .sidebar {
        padding: 14px;
        border-radius: var(--radius-md);
    }

    .sidebar h2 {
        margin-bottom: 12px;
        text-align: left;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .sidebar h2 {
        grid-column: 1 / -1;
    }

    .menu-btn {
        min-height: 48px;
        margin-bottom: 0;
        padding: 10px;
        gap: 8px;
        font-size: 13px;
        line-height: 1.15;
    }

    .menu-btn i {
        width: 18px;
        flex: 0 0 auto;
        text-align: center;
    }

    .section-heading h2 {
        font-size: 23px;
    }

    .grafico {
        height: 420px;
        padding: 14px;
    }

    #mapaContainer {
        gap: 10px;
        padding:
            max(52px, calc(16px + env(safe-area-inset-top, 0px)))
            10px
            max(12px, calc(10px + env(safe-area-inset-bottom, 0px)))
            10px;
    }

    .mapa-barra {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .mapa-externo,
    #fechar {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        padding: 12px 10px;
        font-size: 14px;
        line-height: 1.15;
        white-space: normal;
        text-align: center;
    }

    .chat-painel {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
        height: min(72vh, calc(100vh - 20px));
    }

    #chatNotificacoesTexto {
        display: none;
    }

    .chat-notificacoes {
        width: 44px;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        padding: 0;
    }
}

@media (max-width: 480px) {
    .topo-actions {
        grid-template-columns: 1fr;
    }

    .topo-exportar,
    .theme-toggle,
    .topo-painel-admin,
    .sair {
        grid-column: 1;
        min-width: 0;
    }

    .topo-exportar {
        order: 1;
    }

    .theme-toggle {
        order: 2;
    }

    .topo-painel-admin {
        order: 3;
    }

    .sair {
        order: 4;
    }

    .dashboard,
    .grid,
    .mapa-grid,
    .equipe-grid {
        grid-template-columns: 1fr;
    }

    .info-split,
    .info-split-tres {
        grid-template-columns: 1fr;
    }
}

body.acesso-publico:not(.site-pronto) .conteudo > .secao,
body:not(.site-pronto) .conteudo > .secao {
    display: none;
}

body:not(.site-pronto) #mapaTopoWrap,
body:not(.site-pronto) #siteGpsBotao,
body:not(.site-pronto) #themeToggle,
body:not(.site-pronto) #exportarTopo,
body:not(.site-pronto) #btnSistema,
body:not(.site-pronto) #chatTopoWrap,
body:not(.site-pronto) #onlineTopoWrap,
body:not(.site-pronto) #notificacoesWrap,
body:not(.site-pronto) #btnPainelAdmin,
body:not(.site-pronto) #btnSairAgente,
body:not(.site-pronto) #saudacaoAgente,
body:not(.site-pronto) .sidebar .menu-btn:not([data-section="tudo"]) {
    display: none !important;
}

body.acesso-publico:not(.site-pronto) #mapaTopoWrap {
    display: none !important;
}

.notificacoes-wrap {
    position: relative;
}

.notificacoes-botao {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.12);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
}

.notificacoes-botao.ativo {
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.28);
}

.notificacoes-icone-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notificacoes-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #071e45;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.45);
}

.notificacoes-badge[hidden] {
    display: none !important;
}

body.light-theme .notificacoes-badge {
    border-color: #ffffff;
}

.notificacoes-painel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, 92vw);
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-strong, var(--panel));
    box-shadow: var(--shadow);
    z-index: 120;
}

.notificacoes-painel-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.notificacoes-lista {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.notificacao-item {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.notificacao-item.lida {
    opacity: 0.72;
}

.notificacao-item-topo {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.notificacao-tipo {
    margin: 4px 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--blue-light, #7dd3fc);
}

.notificacao-status {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
}

.notificacoes-vazio {
    margin: 0;
    padding: 16px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 700px) {
    .notificacoes-painel {
        left: 0;
        right: 0;
        width: auto;
    }
}

@media (hover: none) and (pointer: coarse), (max-width: 768px) {
    html,
    body {
        touch-action: manipulation;
    }

    body.mapa-aberto,
    html.mapa-aberto,
    body.chat-aberto,
    body.site-gps-aberto,
    body.rolagem-travada {
        touch-action: none;
    }

    .secao,
    .equipe-grupo,
    .info,
    .card,
    .grafico,
    .mapa-card,
    .aviso-card {
        content-visibility: visible;
        contain-intrinsic-size: auto;
    }
}

.site-gps-fixo {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(34, 197, 94, 0.55);
    border-radius: 50%;
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    cursor: pointer;
}

.site-gps-fixo:hover,
.site-gps-fixo:focus-visible {
    filter: brightness(1.05);
    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 2px;
}

.site-gps-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: grid;
    place-items: center;
    padding: 16px;
}

.site-gps-modal.oculta {
    display: none;
}

.site-gps-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 23, 0.72);
}

.site-gps-modal-painel {
    position: relative;
    width: min(100%, 480px);
    max-height: min(92vh, 720px);
    overflow: auto;
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--panel, rgba(6, 26, 63, 0.98));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.site-gps-modal-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.site-gps-modal-topo h2 {
    margin: 0;
    font-size: 1.05rem;
}

.site-gps-modal-fechar {
    border: none;
    background: transparent;
    color: inherit;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.site-gps-modal-descricao {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.site-gps-estado {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
}

body.light-theme .site-gps-estado {
    background: rgba(14, 91, 166, 0.06);
}

.site-gps-erro {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.12);
    color: inherit;
    font-size: 0.9rem;
    line-height: 1.45;
}

.site-gps-dados {
    margin: 0;
    display: grid;
    gap: 10px;
}

.site-gps-linha {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-muted, rgba(255, 255, 255, 0.04));
}

.site-gps-linha dt {
    margin: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.site-gps-linha dd {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

.site-gps-destaque {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.1);
}

.site-gps-destaque dd {
    color: #22c55e;
}

.site-gps-precisao-boa {
    color: #4ade80 !important;
}

.site-gps-refinando {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
    font-size: 0.86rem;
    line-height: 1.4;
}

body.light-theme .site-gps-destaque dd {
    color: #15803d;
}

.site-gps-modal-rodape {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.site-gps-modal-rodape .botao {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.site-gps-modal-rodape .site-gps-btn-fechar {
    grid-column: 1 / -1;
}

.site-gps-modal-rodape .site-gps-btn-acao {
    min-height: 46px;
    padding: 12px 14px;
}

.site-offline-aviso {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    padding-top: max(10px, env(safe-area-inset-top));
    background: linear-gradient(180deg, #92400e 0%, #78350f 100%);
    color: #fffbeb;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body.site-modo-offline .topo,
body.site-modo-offline .sistema-topo {
    margin-top: 42px;
}

.site-offline-dados {
    margin: 0;
    padding: 16px;
    border-radius: 10px;
    background: rgba(146, 64, 14, 0.15);
    color: inherit;
    text-align: center;
    line-height: 1.45;
}

body.light-theme .site-offline-dados {
    background: rgba(146, 64, 14, 0.08);
}
