
/* =========================================================
   TEMA GLOBAL PROTEJA SERVIÇOS
   Paleta baseada na página institucional da Proteja
   ========================================================= */

:root {
    --proteja-azul-900: #10243d;
    --proteja-azul-800: #173a5c;
    --proteja-azul-700: #1f5f89;
    --proteja-azul-600: #237fa8;
    --proteja-ciano: #17b7df;
    --proteja-ciano-2: #39c9ee;
    --proteja-bg: #f4f8fc;
    --proteja-bg-2: #eaf4fb;
    --proteja-card: #ffffff;
    --proteja-texto: #13233a;
    --proteja-muted: #66758a;
    --proteja-borda: rgba(16, 36, 61, 0.12);
    --proteja-sombra: 0 18px 45px rgba(16, 36, 61, 0.13);
    --proteja-sombra-leve: 0 8px 24px rgba(16, 36, 61, 0.10);
    --proteja-red: #dc3545;
    --proteja-green: #23a96e;
    --proteja-yellow: #f5b82e;
}

/* Fundo institucional claro com grade suave */
body {
    background:
        linear-gradient(rgba(16,36,61,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16,36,61,0.045) 1px, transparent 1px),
        radial-gradient(circle at 15% 20%, rgba(23,183,223,0.16), transparent 32%),
        radial-gradient(circle at 80% 10%, rgba(31,95,137,0.10), transparent 28%),
        var(--proteja-bg) !important;
    background-size: 110px 110px, 110px 110px, auto, auto, auto !important;
    color: var(--proteja-texto) !important;
}

h1, h2, h3, h4 {
    color: var(--proteja-texto) !important;
    font-family: Inter, Arial, sans-serif !important;
    letter-spacing: -0.02em !important;
    text-transform: none !important;
}

/* Cards globais */
.glass-panel,
.card,
.panel,
.status-card,
.rastreador-card,
.alerta-card,
.box,
.container-card {
    background: rgba(255,255,255,0.94) !important;
    color: var(--proteja-texto) !important;
    border: 1px solid var(--proteja-borda) !important;
    box-shadow: var(--proteja-sombra-leve) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Botões globais */
button,
.btn,
.botao,
button.btn-small {
    border-radius: 10px !important;
    font-family: Inter, Arial, sans-serif !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

button:hover,
.btn:hover,
.botao:hover {
    transform: translateY(-1px) !important;
}

/* Inputs */
input,
select,
textarea {
    background: #ffffff !important;
    color: var(--proteja-texto) !important;
    border: 1px solid var(--proteja-borda) !important;
    border-radius: 10px !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--proteja-ciano) !important;
    box-shadow: 0 0 0 3px rgba(23,183,223,0.16) !important;
    outline: none !important;
}

/* Página principal: mapa operacional com identidade Proteja */
.topbar {
    background: rgba(255,255,255,0.94) !important;
    color: var(--proteja-texto) !important;
    border-bottom: 1px solid var(--proteja-borda) !important;
    box-shadow: 0 6px 22px rgba(16,36,61,0.12) !important;
}

.topbar h2,
.topbar h2::after {
    color: var(--proteja-azul-900) !important;
}

#btn-menu-mobile {
    background: var(--proteja-azul-900) !important;
    color: #ffffff !important;
    border-right: 1px solid rgba(255,255,255,0.16) !important;
}

#btn-menu-mobile:hover {
    background: var(--proteja-azul-800) !important;
}

#nome-usuario-logado {
    color: var(--proteja-azul-900) !important;
}

/* Dropdown/menu da central */
.sidebar {
    background: rgba(255,255,255,0.96) !important;
    color: var(--proteja-texto) !important;
    border: 1px solid var(--proteja-borda) !important;
    box-shadow: var(--proteja-sombra) !important;
}

.logo-area {
    background:
        linear-gradient(135deg, rgba(23,183,223,0.16), rgba(255,255,255,0.92)) !important;
    border-bottom: 1px solid var(--proteja-borda) !important;
}

.logo-area::before {
    content: "PROTEJA" !important;
    color: var(--proteja-azul-900) !important;
    font-weight: 900 !important;
}

.logo-area::after {
    content: "Serviços • Central de Rastreamento" !important;
    color: var(--proteja-ciano) !important;
    font-weight: 800 !important;
}

.sidebar button {
    background: #ffffff !important;
    color: var(--proteja-azul-900) !important;
    border: 1px solid var(--proteja-borda) !important;
}

.sidebar button:hover {
    background: var(--proteja-bg-2) !important;
    border-color: rgba(23,183,223,0.35) !important;
}

.menu-section-title {
    color: var(--proteja-muted) !important;
    border-top: 1px solid var(--proteja-borda) !important;
}

.btn-add {
    background: linear-gradient(135deg, var(--proteja-ciano), var(--proteja-azul-700)) !important;
    color: #ffffff !important;
    border: none !important;
}

.btn-alertas-sos {
    background: rgba(220,53,69,0.10) !important;
    color: var(--proteja-red) !important;
    border-color: rgba(220,53,69,0.30) !important;
}

.btn-rastreadores {
    background: rgba(23,183,223,0.12) !important;
    color: var(--proteja-azul-700) !important;
    border-color: rgba(23,183,223,0.35) !important;
}

.btn-status-sistema {
    background: rgba(31,95,137,0.10) !important;
    color: var(--proteja-azul-800) !important;
    border-color: rgba(31,95,137,0.25) !important;
}

/* Lista de veículos */
.device-list {
    background: rgba(244,248,252,0.72) !important;
}

.device-card {
    background: #ffffff !important;
    color: var(--proteja-texto) !important;
    border: 1px solid var(--proteja-borda) !important;
    border-left: 4px solid var(--proteja-ciano) !important;
    box-shadow: 0 6px 18px rgba(16,36,61,0.08) !important;
}

.device-card h4,
.device-card p {
    color: var(--proteja-texto) !important;
}

/* Mapa */
.map-container {
    background: #dfeaf3 !important;
}

/* Login/modal */
.overlay-screen {
    background: rgba(16,36,61,0.70) !important;
}

.login-box {
    background: #ffffff !important;
    color: var(--proteja-texto) !important;
    border: 1px solid rgba(255,255,255,0.75) !important;
    border-top: 5px solid var(--proteja-ciano) !important;
    box-shadow: 0 28px 80px rgba(16,36,61,0.28) !important;
}

.login-box h2,
.login-box h3 {
    color: var(--proteja-azul-900) !important;
}

.login-box button {
    background: linear-gradient(135deg, var(--proteja-ciano), var(--proteja-azul-700)) !important;
    color: #ffffff !important;
}

/* Tabelas e relatórios */
table {
    background: #ffffff !important;
}

th {
    background: var(--proteja-bg-2) !important;
    color: var(--proteja-azul-900) !important;
    border-bottom: 1px solid var(--proteja-borda) !important;
}

td {
    color: var(--proteja-texto) !important;
    border-bottom: 1px solid rgba(16,36,61,0.08) !important;
}

.relatorio-panel {
    background: #ffffff !important;
    border-top: 1px solid var(--proteja-borda) !important;
}

.relatorio-header {
    background: var(--proteja-bg-2) !important;
    color: var(--proteja-azul-900) !important;
}

/* Alertas SOS permanecem fortes */
.alert-sos {
    background: rgba(220,0,0,0.96) !important;
    color: #ffffff !important;
}

/* Páginas internas */
body .page-title,
body .titulo,
body header,
body .header,
body .topo {
    color: var(--proteja-azul-900) !important;
}

/* Links */
a {
    color: var(--proteja-azul-700);
}


/* === AJUSTE TOPO PROTEJA MAIS COMPRIDO 20260618 === */

/* Barra superior mais alta, parecida com a capa institucional */
.topbar {
    height: 72px !important;
    min-height: 72px !important;
    padding: 0 18px !important;
    background: rgba(255,255,255,0.96) !important;
    border-bottom: 1px solid rgba(16,36,61,0.12) !important;
}

/* Botão Menu acompanha a altura nova */
#btn-menu-mobile {
    height: 72px !important;
    min-height: 72px !important;
    padding: 0 16px !important;
}

/* Título Rastreamento centralizado na barra maior */
.topbar h2::after {
    height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 16px !important;
}

/* Usuário e botão sair ajustados na barra maior */
.user-area {
    height: 72px !important;
    align-items: center !important;
}

#nome-usuario-logado {
    font-size: 0.90rem !important;
}

/* Dropdown começa abaixo da barra nova */
.sidebar {
    top: 72px !important;
    max-height: calc(100vh - 82px) !important;
}

/* Controles do mapa descem para não ficar por baixo da barra */
.leaflet-top.leaflet-left,
.leaflet-top.leaflet-right {
    top: 88px !important;
}

/* Alertas também descem um pouco */
#alert-container {
    top: 88px !important;
}

@media (max-width: 768px) {
    .topbar {
        height: 64px !important;
        min-height: 64px !important;
    }

    #btn-menu-mobile {
        height: 64px !important;
        min-height: 64px !important;
    }

    .user-area {
        height: 64px !important;
    }

    .sidebar {
        top: 64px !important;
        max-height: calc(100vh - 72px) !important;
    }

    .leaflet-top.leaflet-left,
    .leaflet-top.leaflet-right {
        top: 78px !important;
    }

    #alert-container {
        top: 78px !important;
    }
}



/* === FIX CLIQUES MENU E BOTOES 20260618 === */
#btn-menu-mobile,
.topbar,
.topbar button,
.sidebar,
.sidebar button,
.sidebar a {
    pointer-events: auto !important;
}

.sidebar.aberta {
    pointer-events: auto !important;
}


/* === PAINEL CERCAS DESENHADAS PROTEJA 20260618 === */
.proteja-cercas-panel {
    position: absolute;
    top: 86px;
    left: 18px;
    width: 390px;
    max-width: calc(100vw - 36px);
    z-index: 4300;
    background: rgba(255,255,255,0.97);
    border: 1px solid rgba(16,36,61,0.14);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 24px 55px rgba(16,36,61,0.20);
    padding: 18px;
    color: var(--proteja-texto, #13233a);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.proteja-cercas-panel.aberto {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.proteja-cercas-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.proteja-cercas-head span {
    display: block;
    color: var(--proteja-ciano, #17b7df);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.10em;
}

.proteja-cercas-head h3 {
    margin: 2px 0 0 0;
    color: var(--proteja-azul-900, #10243d) !important;
    font-size: 1.30rem;
    font-weight: 900;
}

.proteja-cercas-close {
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #eef5fb !important;
    color: var(--proteja-azul-900, #10243d) !important;
    border: 1px solid rgba(16,36,61,0.12) !important;
    font-size: 1.25rem !important;
    text-align: center !important;
}

.proteja-cercas-texto {
    color: var(--proteja-muted, #66758a);
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0 0 14px 0;
}

.proteja-cercas-panel label {
    display: block;
    color: var(--proteja-azul-900, #10243d);
    font-size: 0.78rem;
    font-weight: 900;
    margin-bottom: 6px;
}

.proteja-cercas-panel input {
    width: 100%;
    height: 42px;
    margin-bottom: 12px;
}

.proteja-cercas-acoes {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.proteja-cercas-acoes.secundarias {
    grid-template-columns: 1fr 1fr;
}

.proteja-cercas-acoes button {
    width: 100% !important;
    min-height: 40px !important;
    padding: 9px 8px !important;
    background: linear-gradient(135deg, var(--proteja-ciano, #17b7df), var(--proteja-azul-700, #1f5f89)) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 0.80rem !important;
    font-weight: 900 !important;
    text-align: center !important;
}

.proteja-cercas-acoes.secundarias button {
    background: #eef5fb !important;
    color: var(--proteja-azul-900, #10243d) !important;
    border: 1px solid rgba(16,36,61,0.12) !important;
}

.proteja-cercas-ajuda {
    margin-top: 10px;
    padding: 10px;
    background: rgba(23,183,223,0.10);
    border: 1px solid rgba(23,183,223,0.18);
    border-radius: 12px;
    color: var(--proteja-muted, #66758a);
    font-size: 0.80rem;
    line-height: 1.35;
}

#btn-desenho.ativo {
    background: linear-gradient(135deg, var(--proteja-ciano, #17b7df), var(--proteja-azul-700, #1f5f89)) !important;
    color: #ffffff !important;
}

/* === MAPA DE FROTA: MARCADORES SVG E PAINEL DE VEÍCULOS === */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.proteja-icone-rastreador {
    background: transparent !important;
    border: 0 !important;
}

.marcador-veiculo-conjunto {
    position: relative;
    display: flex;
    width: 92px;
    align-items: center;
    flex-direction: column;
    color: #334155;
}

.marcador-veiculo-icone {
    position: relative;
    display: grid;
    width: 50px;
    height: 34px;
    place-items: center;
    color: #334155;
    background: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 10px;
    box-shadow:
        0 4px 12px rgba(16, 36, 61, 0.30),
        0 0 0 2px #1f5f89;
}

.icone-veiculo-svg {
    width: 42px;
    height: 24px;
    fill: currentColor;
    stroke: none;
}

.marcador-veiculo-icone .icone-veiculo-svg {
    width: 30px;
    height: 30px;
}

.icone-veiculo-emoji {
    display: inline-grid;
    place-items: center;
    font-family:
        "Apple Color Emoji",
        "Segoe UI Emoji",
        "Noto Color Emoji",
        sans-serif;
    font-size: 24px;
    font-style: normal;
    line-height: 1;
}

.marcador-veiculo-identificacao {
    display: block;
    max-width: 92px;
    margin-top: 5px;
    padding: 3px 7px;
    overflow: hidden;
    color: #10243d;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(16, 36, 61, 0.18);
    border-radius: 6px;
    box-shadow: 0 3px 9px rgba(16, 36, 61, 0.20);
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marcador-online .marcador-veiculo-icone {
    box-shadow:
        0 4px 12px rgba(22, 163, 74, 0.24),
        0 0 0 2px #16a34a;
}

.marcador-offline .marcador-veiculo-icone {
    box-shadow:
        0 4px 12px rgba(220, 38, 38, 0.26),
        0 0 0 2px #dc2626;
}

.marcador-offline-alerta .marcador-veiculo-icone {
    color: #334155;
    background: #ffffff;
    box-shadow:
        0 5px 15px rgba(194, 65, 12, 0.35),
        0 0 0 3px #ea580c;
}

.marcador-selecionado .marcador-veiculo-icone {
    box-shadow:
        0 5px 15px rgba(2, 132, 199, 0.35),
        0 0 0 3px #0284c7,
        0 0 0 8px rgba(14, 165, 233, 0.22);
}

.marcador-estacionamento-ativo .marcador-veiculo-icone,
.marcador-estacionamento-ativo .marcador-veiculo-identificacao {
    position: relative;
    z-index: 1;
}

.marcador-estacionamento-halo {
    position: absolute;
    top: 17px;
    left: 50%;
    z-index: 0;
    width: 66px;
    height: 66px;
    pointer-events: none;
    background: color-mix(
        in srgb,
        var(--proteja-azul-700) 14%,
        transparent
    );
    border: 3px solid var(--proteja-azul-700);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: proteja-estacionamento-pulso 1.8s ease-in-out infinite;
}

.marcador-estacionamento-badge {
    position: absolute;
    top: -9px;
    right: 10px;
    z-index: 2;
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    color: var(--proteja-azul-700);
    background: #ffffff;
    border: 2px solid var(--proteja-azul-700);
    border-radius: 50%;
    box-shadow: 0 3px 9px rgba(16, 36, 61, 0.24);
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
}

@keyframes proteja-estacionamento-pulso {
    0%, 100% {
        opacity: 0.48;
        transform: translate(-50%, -50%) scale(0.88);
    }
    50% {
        opacity: 0.82;
        transform: translate(-50%, -50%) scale(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .marcador-estacionamento-halo {
        opacity: 0.68;
        animation: none;
    }
}

.proteja-status-estacionamento {
    display: flex;
    margin: 9px 0 0;
    padding: 7px 9px;
    align-items: center;
    gap: 7px;
    color: #111827;
    background: color-mix(
        in srgb,
        var(--proteja-azul-700) 10%,
        #ffffff
    );
    border: 1px solid color-mix(
        in srgb,
        var(--proteja-azul-700) 45%,
        #ffffff
    );
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
}

.proteja-status-estacionamento > span {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: var(--proteja-azul-700);
    background: #ffffff;
    border: 1px solid var(--proteja-azul-700);
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 900;
}

.indicador-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    background: #7b8797;
    border-radius: 50%;
}

.indicador-status-online {
    background: #16a34a;
}

.indicador-status-offline {
    background: #dc2626;
}

.indicador-status-offline-alerta {
    width: 10px;
    height: 10px;
    background: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.16);
}

.btn-painel-veiculos {
    position: absolute;
    right: 18px;
    bottom: 42px;
    z-index: 1100;
    display: grid;
    width: 54px !important;
    height: 54px;
    margin: 0 !important;
    padding: 0 !important;
    place-items: center;
    color: #ffffff !important;
    background: linear-gradient(145deg, #1f5f89, #164e75) !important;
    border: 2px solid #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 22px rgba(16, 36, 61, 0.20) !important;
}

.btn-painel-veiculos:hover {
    transform: none !important;
    background: linear-gradient(145deg, #246b98, #164e75) !important;
}

.btn-painel-veiculos strong {
    position: absolute;
    top: -8px;
    right: -8px;
    display: grid;
    min-width: 23px;
    min-height: 23px;
    padding: 0 5px;
    place-items: center;
    color: #ffffff;
    background: #ea580c;
    border: 2px solid #ffffff;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 900;
}

.btn-painel-veiculos > svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.painel-veiculos-mapa {
    position: absolute;
    top: 140px;
    left: 18px;
    z-index: 4200;
    display: flex;
    width: min(360px, calc(100vw - 36px));
    max-height: calc(100vh - 172px);
    overflow: hidden;
    flex-direction: column;
    color: #10243d;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(16, 36, 61, 0.14);
    border-radius: 16px;
    box-shadow: 0 22px 55px rgba(16, 36, 61, 0.24);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-16px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.painel-veiculos-mapa.aberto {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.painel-veiculos-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 16px 10px;
}

.painel-veiculos-cabecalho span {
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.painel-veiculos-cabecalho h3 {
    margin: 2px 0 0;
    color: #10243d !important;
    font-size: 1.05rem;
    font-weight: 900;
}

.painel-veiculos-fechar {
    width: 34px !important;
    height: 34px;
    margin: 0 !important;
    padding: 0 !important;
    color: #475569 !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 9px !important;
    box-shadow: none !important;
    font-size: 1.25rem !important;
    line-height: 1 !important;
}

.painel-veiculos-busca {
    display: block;
    padding: 0 16px 12px;
}

.painel-veiculos-busca input {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    color: #10243d;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
}

.painel-veiculos-busca input:focus {
    border-color: #17b7df;
    box-shadow: 0 0 0 3px rgba(23, 183, 223, 0.14);
}

.painel-veiculos-mapa .device-list {
    min-height: 80px;
    padding: 0 10px 12px !important;
    overflow-y: auto;
    background: transparent !important;
}

.painel-veiculos-mapa .device-card {
    display: grid;
    width: 100% !important;
    min-height: 82px;
    margin: 0 0 8px !important;
    padding: 10px !important;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    color: #10243d !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #7b8797 !important;
    border-radius: 11px !important;
    box-shadow: 0 4px 13px rgba(16, 36, 61, 0.07) !important;
    text-align: left;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.painel-veiculos-mapa .device-card:hover,
.painel-veiculos-mapa .device-card.selecionado {
    transform: none !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.16) !important;
}

.painel-veiculos-mapa .device-card-online {
    border-left-color: #16a34a !important;
}

.painel-veiculos-mapa .device-card-offline {
    border-left-color: #dc2626 !important;
}

.painel-veiculos-mapa .device-card-offline-alerta {
    border-left-color: #ea580c !important;
    background: #fff7ed !important;
}

.device-card-icone {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #334155;
    background: #eff6ff;
    border-radius: 9px;
}

.device-card-icone .icone-veiculo-svg {
    width: 24px;
    height: 24px;
}

.device-card-icone .icone-veiculo-emoji {
    font-size: 21px;
}

.device-card-conteudo,
.device-card-conteudo > span {
    display: block;
    min-width: 0;
}

.device-card-conteudo > strong {
    display: block;
    overflow: hidden;
    color: #10243d;
    font-size: 0.86rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.device-card-nome {
    margin-top: 2px;
    overflow: hidden;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.device-card .device-card-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.68rem !important;
}

.device-card-telemetria {
    display: flex !important;
    margin-top: 5px;
    flex-wrap: wrap;
    gap: 3px 10px;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 650;
}

.painel-veiculos-vazio {
    padding: 24px 12px;
    color: #64748b;
    font-size: 0.82rem;
    text-align: center;
}

.proteja-popup-titulo {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 4px;
}

.proteja-popup-titulo .icone-veiculo-svg {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    color: #334155;
}

.proteja-popup-titulo .icone-veiculo-emoji {
    flex: 0 0 auto;
    font-size: 23px;
}

.proteja-popup-titulo strong {
    color: #10243d;
    font-size: 1rem;
}

.proteja-popup-nome {
    margin: 0 0 8px 35px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.proteja-status-comunicacao {
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 768px) {
    .btn-painel-veiculos {
        right: 14px;
        bottom: 38px;
    }

    .painel-veiculos-mapa {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: min(68vh, 560px);
        border-radius: 18px 18px 0 0;
        transform: translateY(100%);
    }

    .painel-veiculos-mapa.aberto {
        transform: translateY(0);
    }

    .painel-veiculos-mapa::before {
        width: 42px;
        height: 4px;
        margin: 8px auto 0;
        background: #cbd5e1;
        border-radius: 999px;
        content: "";
    }

}


.device-card.device-card-online {
    border-left-color: #22a35a !important;
}

.device-card.device-card-offline {
    border-left-color: #b4232c !important;
}

.device-card.device-card-offline-alerta {
    border-left-color: #e27600 !important;
    background: #fff8ed !important;
}

.device-card.device-card-desconhecido {
    border-left-color: #7b8797 !important;
}

.device-card .device-card-status {
    margin-top: 5px;
    font-size: 0.76rem !important;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.device-card-online .device-card-status {
    color: #15803d !important;
}

.device-card-offline .device-card-status {
    color: #b4232c !important;
}

.device-card-offline-alerta .device-card-status {
    color: #b45309 !important;
}

.device-card-desconhecido .device-card-status {
    color: #64748b !important;
}

.device-card .device-card-tempo {
    margin-top: 4px;
    color: #66758a !important;
    font-size: 0.72rem !important;
    line-height: 1.35;
}

.proteja-popup-rastreador {
    min-width: 210px;
    color: var(--proteja-azul-900, #10243d);
}

.proteja-popup-rastreador > strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.proteja-status-comunicacao {
    font-size: 0.80rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.proteja-status-comunicacao.online {
    color: #15803d;
}

.proteja-status-comunicacao.offline {
    color: #b4232c;
}

.proteja-status-comunicacao.offline-alerta {
    color: #b45309;
}

.proteja-status-comunicacao.desconhecido {
    color: #64748b;
}

.proteja-tempo-comunicacao {
    margin-top: 4px;
    color: #536274;
    font-size: 0.78rem;
    font-weight: 700;
}

.proteja-popup-meta {
    display: grid;
    gap: 3px;
    margin-top: 9px;
    padding-top: 8px;
    color: #536274;
    border-top: 1px solid rgba(16, 36, 61, 0.10);
    font-size: 0.75rem;
}

.proteja-popup-ponto-rastro {
    min-width: 220px;
    color: var(--proteja-azul-900, #10243d);
}

.proteja-popup-ponto-rastro h4 {
    margin: 0 0 8px;
    color: var(--proteja-azul-900, #10243d) !important;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.proteja-ponto-rastro-linha {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(16, 36, 61, 0.08);
    font-size: 0.74rem;
}

.proteja-ponto-rastro-linha:last-child {
    border-bottom: 0;
}

.proteja-ponto-rastro-linha span {
    color: #66758a;
}

.proteja-ponto-rastro-linha strong {
    color: var(--proteja-azul-900, #10243d);
    font-weight: 800;
    text-align: right;
}

@media (max-width: 768px) {
    .proteja-cercas-panel {
        top: 74px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        border-radius: 0 0 16px 16px;
    }

    .proteja-cercas-acoes {
        grid-template-columns: 1fr;
    }

    .proteja-cercas-acoes.secundarias {
        grid-template-columns: 1fr 1fr;
    }
}


/* === FIX VISUAL PAINEL CERCAS FUNCIONANDO 20260618 === */
#painel-cercas-desenhadas {
    display: block !important;
}

.proteja-cercas-panel {
    z-index: 5400 !important;
    pointer-events: none;
}

.proteja-cercas-panel.aberto {
    pointer-events: auto !important;
}

.proteja-cercas-panel input,
.proteja-cercas-panel button {
    pointer-events: auto !important;
}

.modo-desenho-ativo .leaflet-draw {
    display: block !important;
    z-index: 5300 !important;
}

#btn-desenho.ativo {
    background: linear-gradient(135deg, var(--proteja-ciano, #17b7df), var(--proteja-azul-700, #1f5f89)) !important;
    color: #ffffff !important;
}


/* === FIX PAINEL CERCAS SINTAXE 20260618 === */
#painel-cercas-desenhadas {
    display: block !important;
}

.proteja-cercas-panel {
    z-index: 5400 !important;
    pointer-events: none;
}

.proteja-cercas-panel.aberto {
    pointer-events: auto !important;
}

.proteja-cercas-panel input,
.proteja-cercas-panel button {
    pointer-events: auto !important;
}

#btn-desenho.ativo {
    background: linear-gradient(135deg, var(--proteja-ciano, #17b7df), var(--proteja-azul-700, #1f5f89)) !important;
    color: #ffffff !important;
}

