/* Refinamento exclusivo do app em telas móveis. Reutiliza tema e white label. */
@media (max-width: 760px) {
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dado-icone,
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes a svg { display: none; }
}
.mapa-ficha-foto-icone svg { width: 25px; height: 25px; }
@media (max-width: 760px) {
    html.proteja-webview.visual-plataforma[data-area="mapas"] {
        --ficha-perigo-fundo: #fef2f2;
        --ficha-perigo-texto: #991b1b;
        --ficha-perigo-borda: #e6a5ac;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"][data-tema="escuro"] {
        --ficha-perigo-fundo: #3b171c;
        --ficha-perigo-texto: #ffe4e6;
        --ficha-perigo-borda: #853440;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] body[data-menu-ativo="inicial"] .mapa-webview-barra {
        background: var(--proteja-menu) !important;
        color: var(--proteja-menu-texto) !important;
        border-top: 1px solid color-mix(in srgb, var(--proteja-menu-texto) 20%, transparent) !important;
        box-shadow: none !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-webview-barra button {
        color: var(--proteja-menu-texto) !important;
        background: transparent !important;
        border-color: color-mix(in srgb, var(--proteja-menu-texto) 28%, transparent) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-webview-barra [data-identidade-logo] {
        background: transparent;
        padding: 0;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] body[data-menu-ativo="inicial"] .mapa-ficha {
        height: min(66dvh, 620px);
        border: 1px solid var(--ui-borda);
        border-bottom: 0;
        border-radius: 26px 26px 0 0;
        background: var(--ui-superficie) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-alca {
        color: var(--ui-secundario) !important;
        background: var(--ui-superficie) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta .mapa-ficha-alca {
        height: 48px;
        min-height: 48px;
        padding: 18px 18px 8px;
        border-bottom: 0;
    }
    /* Retirar somente o texto duplicado quando a ficha estiver aberta; manter a alça funcional. */
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta #mapa-ficha-resumo {
        display: none !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-puxador {
        background: var(--ui-secundario);
        opacity: .55;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-resumo {
        color: var(--ui-secundario) !important;
        font-size: 12px;
        font-weight: 600;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-corpo {
        height: calc(100% - 48px);
        padding: 6px 16px 20px;
        scrollbar-width: thin;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-seletor-box select {
        min-height: 44px;
        color: var(--ui-texto);
        background: var(--ui-suave);
        border-color: var(--ui-borda);
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-identidade {
        gap: 12px;
        margin: 4px 0 18px;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-identidade > div {
        min-width: 0;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-identidade small {
        color: var(--ui-secundario) !important;
        font-size: 9px;
        letter-spacing: .08em;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-identidade h2 {
        margin: 6px 0;
        font: 700 clamp(23px, 6.3vw, 30px)/1.15 Inter, system-ui, sans-serif;
        overflow-wrap: anywhere;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-subtitulo {
        color: var(--ui-secundario) !important;
        font-size: 12px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-foto {
        flex-basis: 82px;
        width: 82px;
        height: 82px;
        border-radius: 16px;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-foto-icone svg {
        width: 25px;
        height: 25px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 0 0 10px;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > div {
        display: grid;
        grid-template-columns: 20px minmax(0, 1fr);
        column-gap: 8px;
        position: relative;
        min-width: 0;
        padding: 13px 12px;
        border-radius: 14px;
        background: var(--ui-suave) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dado-icone {
        display: block;
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: center;
        width: 20px;
        height: 20px;
        fill: none;
        stroke: var(--ui-secundario);
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados :is(span,strong) {
        grid-column: 2;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados span,
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-endereco > span {
        color: var(--ui-secundario) !important;
        font-size: 11px;
        line-height: 1.35;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados strong {
        display: block;
        font-size: 13px;
        line-height: 1.45;
        font-weight: 650;
        overflow-wrap: anywhere;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-endereco {
        padding: 13px 12px;
        border-radius: 14px;
        background: var(--ui-suave) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes {
        gap: 10px;
        margin: 18px 0 0;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes a,
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > button {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        min-height: 58px;
        padding: 12px 8px;
        border: 1px solid var(--ui-borda) !important;
        border-radius: 14px;
        background: var(--ui-suave) !important;
        color: var(--ui-texto) !important;
        font: 600 12px/1.4 Inter, system-ui, sans-serif;
        font-size: 12px !important;
        font-weight: 600 !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes a svg {
        display: block;
        flex: 0 0 28px;
        width: 28px;
        height: 28px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-estacionamento::before {
        content: "P";
        display: grid;
        place-items: center;
        flex: 0 0 24px;
        height: 24px;
        border: 2px solid currentColor;
        border-radius: 50%;
        font-size: 15px;
        line-height: 1;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-estacionamento:not(:disabled) {
        background: var(--proteja-azul-700) !important;
        color: var(--ui-primaria-texto) !important;
        border-color: var(--proteja-azul-700) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-acao {
        min-height: 58px;
        border: 1px solid var(--ficha-perigo-borda) !important;
        border-radius: 14px;
        background: var(--ficha-perigo-fundo) !important;
        color: var(--ficha-perigo-texto) !important;
        font-size: 15px !important;
        font-weight: 600 !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes :is(a,button)[hidden] {
        display: none !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-trilho {
        background: var(--ui-suave) !important;
        border-color: var(--ui-borda);
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-instrucao {
        color: var(--ui-texto) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-pergunta {
        color: var(--ui-texto) !important;
        font-size: 13px;
        text-align: left;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha :is(button,a,select):focus-visible {
        outline: 2px solid var(--ui-texto) !important;
        outline-offset: 2px;
    }

    /* Mais mantém a navegação existente; apenas o retorno aparece acima da conta. */
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .topo-padrao-plataforma,
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile #menu-lateral-padrao,
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile #menu-overlay-padrao {
        display: none !important;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile {
        padding-top: 0 !important;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] .mais-retorno-mobile {
        display: flex;
        justify-content: flex-start;
        padding: 12px 12px 0;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] .mais-retorno-mobile a {
        min-height: 44px;
        padding: 0 14px;
        font-weight: 600;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-app {
        margin-top: 12px;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-capa {
        padding: 24px 18px;
        border-radius: 20px;
        background: var(--proteja-menu) !important;
        color: var(--proteja-menu-texto) !important;
        border-color: color-mix(in srgb, var(--proteja-menu-texto) 20%, transparent) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-marca {
        min-height: 112px;
        margin-bottom: 16px;
        padding: 4px 12px;
        background: transparent;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-capa :is(h1,p) {
        color: var(--proteja-menu-texto) !important;
        text-shadow: none !important;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-perfil h1 {
        font-size: clamp(21px, 5.5vw, 26px) !important;
        line-height: 1.3 !important;
    }
}
.mais-retorno-mobile { display: none; }

/* Ficha premium: somente o WebView mobile, preservando IDs, dados e handlers. */
@media (max-width: 760px) {
    html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-selecionado {
        display: grid;
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 10px;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-selecionado > .mapa-ficha-identidade {
        grid-column: 1 / -1;
        order: 0;
        margin-bottom: 4px;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-selecionado > :is(.mapa-ficha-dados,.mapa-ficha-acoes) {
        display: contents;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-titulo-linha {
        display: flex; align-items: center; gap: 8px; min-width: 0;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-titulo-linha h2 {
        min-width: 0; flex: 0 1 auto;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-editar {
        display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px;
        width: 44px; height: 44px; border-radius: 12px;
        color: var(--ui-secundario) !important; text-decoration: none;
        background: var(--ui-suave);
        border: 1px solid var(--ui-borda);
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-editar svg {
        width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8;
        stroke-linecap: round; stroke-linejoin: round;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-conexao {
        display: inline-flex; align-items: center; width: fit-content;
        min-height: 32px; margin: 5px 0; padding: 5px 13px;
        border-radius: 12px; background: var(--ui-suave); color: var(--ui-texto);
        border: 1px solid var(--ui-borda); font-size: 12px; font-weight: 800;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-conexao[data-online="sim"] {
        color: #00c48b; background: rgba(0,150,107,.13); border-color: rgba(0,176,121,.32);
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > .mapa-ficha-dado-ignicao { order: 10; grid-column: 1; }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > .mapa-ficha-dado-velocidade { order: 11; grid-column: 2; }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > .mapa-ficha-dado-bateria { display: none !important; }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > #mapa-ficha-historico { order: 20; grid-column: 1; }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > #mapa-ficha-estacionamento { order: 21; grid-column: 2; }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > #mapa-ficha-comandos {
        order: 22; grid-column: 1 / -1;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > .mapa-ficha-dado-gps {
        order: 30; grid-column: 1 / -1; margin: 4px 0 0;
        padding: 17px 15px 10px; border-radius: 16px 16px 0 0;
        box-shadow: 0 5px 16px rgba(0,0,0,.13) !important;
    }
    /* A leitura GPRS segue ativa internamente, mas não integra a ficha mobile. */
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > .mapa-ficha-dado-gprs {
        display: none !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-selecionado > .mapa-ficha-endereco {
        order: 32; grid-column: 1 / -1;
        margin: -10px 0 2px; padding: 10px 15px 17px;
        border-radius: 0 0 16px 16px;
        background: var(--ui-suave) !important;
        border-color: var(--ui-borda);
        box-shadow: 0 8px 17px rgba(0,0,0,.11) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > #mapa-ficha-bloqueio {
        order: 23; grid-column: 1 / -1; margin: 4px 0 0;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-selecionado > .mapa-ficha-mensagem {
        order: 50; grid-column: 1 / -1;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > :is(#mapa-ficha-historico,#mapa-ficha-estacionamento) {
        min-height: 62px; border-radius: 16px;
        box-shadow: 0 7px 15px rgba(0,0,0,.19), inset 0 1px 0 rgba(255,255,255,.16) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > #mapa-ficha-historico {
        background: linear-gradient(180deg, var(--ui-superficie), var(--ui-suave)) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > #mapa-ficha-estacionamento:not(:disabled) {
        box-shadow: 0 7px 19px color-mix(in srgb, var(--proteja-azul-700) 36%, transparent),
                    inset 0 1px 0 rgba(255,255,255,.30) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-acao {
        background: #55171c !important; color: #fff !important; border-color: #9e4349 !important;
        min-height: 66px;
        box-shadow: 0 8px 18px rgba(85,23,28,.22), inset 0 1px 0 rgba(255,255,255,.18) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes :is(a,button)[hidden],
    html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-bloqueio[hidden] {
        display: none !important;
    }
    /* Meia tela: somente identificação, foto, estado e endereço.
       Dados operacionais e botões continuam no painel expandido. */
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia.tem-selecao .mapa-ficha-selecao,
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia .mapa-ficha-editar,
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia #mapa-ficha-subtitulo,
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia #mapa-ficha-selecionado > :is(.mapa-ficha-dados,.mapa-ficha-acoes) {
        display: none !important;
    }
    /* Remover a data/hora de última posição apenas da interface mobile. */
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > .mapa-ficha-dado-gps {
        display: none !important;
    }
    /* A imagem é clicável e abre o modal existente sem faixa sobre a foto. */
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-foto.tem-foto {
        justify-content: center;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-foto.tem-foto .mapa-ficha-foto-rotulo {
        display: none !important;
    }
    html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-subtitulo[hidden] {
        display: none !important;
    }
    /* Endereço imediatamente após nome, estado e foto, inclusive na meia tela. */
    html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-selecionado > .mapa-ficha-endereco {
        order: 5;
        margin: 0 0 8px;
        padding: 13px 14px;
        border-radius: 14px;
        box-shadow: none !important;
        overflow-wrap: anywhere;
    }
}

/* Tela Mais no aplicativo: white label somente no cartão do perfil.
   Fundo, retorno e atalhos respeitam exclusivamente o tema Claro/Escuro. */
@media (max-width: 760px) {
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile,
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-app {
        background: var(--ui-fundo) !important;
        color: var(--ui-texto) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-retorno-mobile {
        background: var(--ui-fundo) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-retorno-mobile .mais-mapa-topo {
        background: var(--ui-superficie) !important;
        color: var(--ui-texto) !important;
        border-color: var(--ui-borda) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-capa {
        background: var(--proteja-menu) !important;
        color: var(--proteja-menu-texto) !important;
        border-color: color-mix(in srgb, var(--proteja-menu-texto) 20%, transparent) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-capa :is(h1,p) {
        color: var(--proteja-menu-texto) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-conteudo,
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-opcoes {
        background: transparent !important;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-opcoes > .mais-opcao {
        background: var(--ui-superficie) !important;
        color: var(--ui-texto) !important;
        border-color: var(--ui-borda) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-opcoes > .mais-opcao:hover:not(:disabled) {
        background: var(--ui-hover) !important;
    }
    html.proteja-webview.visual-plataforma[data-area="conta"] body.mais-mobile .mais-opcao-icone {
        background: var(--ui-suave) !important;
        color: var(--ui-texto) !important;
        border-color: var(--ui-borda) !important;
    }
}

/* Trilho premium de bloqueio: WebView mobile somente; gesto e limiar originais. */
@media (max-width:760px) {
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-confirmacao {
    gap:12px; margin-top:14px; min-width:0;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-pergunta {
    color:var(--ui-texto) !important; font-size:clamp(13px,3.6vw,16px); line-height:1.4;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-trilho {
    box-sizing:border-box; width:100%; min-width:0; height:70px; min-height:70px;
    border:1px solid var(--ui-borda) !important; border-radius:999px;
    background-color:var(--ui-suave) !important;
    background-image:linear-gradient(165deg,rgba(255,255,255,.04),transparent 65%) !important;
    box-shadow:inset 0 2px 7px rgba(0,0,0,.13),0 9px 22px rgba(0,0,0,.13);
    overflow:hidden; touch-action:pan-y;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-trilho::before {
    width:var(--preenchimento-bloqueio,0px);
    border-radius:999px 0 0 999px;
    background:linear-gradient(90deg,
      color-mix(in srgb,var(--proteja-azul-700) 28%,transparent),
      color-mix(in srgb,var(--proteja-azul-700) 12%,transparent)) !important;
    border-right:1px solid color-mix(in srgb,var(--proteja-azul-700) 35%,transparent);
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-instrucao {
    margin:0 11px 0 76px; padding:0; color:var(--ui-texto) !important;
    font-size:clamp(12px,3.45vw,15px); font-weight:750; line-height:1.35;
    text-align:center; text-wrap:balance; letter-spacing:-.01em;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-pegador {
    top:5px; left:5px; width:58px !important; min-width:58px !important;
    height:58px !important; min-height:58px !important; border-radius:50% !important;
    background:linear-gradient(145deg,
      color-mix(in srgb,var(--proteja-azul-700,#fc893a) 80%,white),
      var(--proteja-azul-700,#fc893a)) !important;
    color:var(--ui-primaria-texto,#fff) !important;
    box-shadow:0 7px 16px rgba(0,0,0,.32),0 0 0 2px rgba(255,255,255,.12),inset 0 2px 2px rgba(255,255,255,.33) !important;
    transition:box-shadow .16s ease,filter .16s ease;
    cursor:grab; touch-action:none; user-select:none;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-pegador::before {
    content:"➜"; color:var(--ui-primaria-texto,#fff) !important;
    font-size:28px; font-weight:800; line-height:1;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-pegador:active {
    filter:brightness(1.04); box-shadow:0 9px 22px rgba(0,0,0,.35),0 0 0 2px rgba(255,255,255,.15),inset 0 2px 2px rgba(255,255,255,.38) !important;
    cursor:grabbing;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-pegador:focus-visible {
    outline:3px solid var(--ui-texto) !important; outline-offset:2px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-pegador:disabled {
    filter:saturate(.65); cursor:wait;
  }
}
@media (prefers-reduced-motion:reduce) {
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes #mapa-ficha-bloqueio .proteja-bloqueio-pegador {
    transition:none !important;
  }
}

/* Ficha homologada: meia tela essencial; expandida = endereço, quatro dados e ações. */
@media (max-width: 760px) {
  html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-selecionado {
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 8px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-selecionado > .mapa-ficha-identidade {
    grid-column: 1 / -1;
    margin-bottom: 2px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-identidade h2 {
    margin: 3px 0 7px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-foto {
    flex: 0 0 108px;
    width: 108px;
    height: 100px;
    background-position: center;
    background-size: cover;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-conexao {
    margin: 0;
    font-size: 12px;
    padding: 5px 12px;
    min-height: 30px;
    border-radius: 10px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-conexao[data-online="sim"] {
    color: #ffffff !important;
    background: #166534 !important;
    border-color: #15803d !important;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-conexao[data-online="nao"] {
    color: #ffffff !important;
    background: #991b1b !important;
    border-color: #b91c1c !important;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-selecionado > .mapa-ficha-endereco {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    grid-column: 1 / -1;
    order: 5;
    margin: 0 0 4px;
    padding: 12px 10px 12px 14px;
    box-shadow: 0 5px 15px rgba(0,0,0,.08) !important;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-endereco-texto {
    flex: 1;
    min-width: 0;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-navegar {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    font-size: 28px;
    line-height: 1;
    border-radius: 12px;
    color: var(--ui-texto);
    background: var(--ui-superficie);
    border: 1px solid var(--ui-borda);
    box-shadow: none;
    cursor: pointer;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-navegar[hidden],
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-apps[hidden] {
    display: none !important;
  }
  /* Ao abrir os apps, trocar o texto do endereço pelos ícones no MESMO cartão;
     sem dropdown, overlay, modal ou painel inferior. */
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-endereco.navegacao-aberta .mapa-ficha-endereco-texto {
    display: none !important;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-endereco.navegacao-aberta {
    min-height: 84px;
    overflow: hidden;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-navegar {
    order: 2;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-apps {
    position: static;
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: clamp(3px,1.5vw,9px);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-apps button {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 68px;
    padding: 3px 0;
    border: 0 !important;
    border-radius: 12px;
    background: transparent !important;
    color: var(--ui-texto) !important;
    font: 600 10px/1.2 Inter,system-ui,sans-serif;
    text-align: center;
    box-shadow: none !important;
    cursor: pointer;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-apps .mapa-ficha-app-icone {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    margin: 0 !important;
    border: 1px solid var(--ui-borda);
    border-radius: 12px;
    background: var(--ui-superficie) !important;
    box-shadow: 0 2px 7px rgba(0,0,0,.14);
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-apps svg {
    display: block;
    width: 31px;
    height: 31px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-apps small {
    display: block;
    max-width: 100%;
    min-height: 22px;
    font: inherit;
    overflow-wrap: normal;
    white-space: normal;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-apps button:focus-visible {
    outline: 2px solid var(--proteja-azul-700);
    outline-offset: 1px;
  }
  /* Sobrepor as regras globais de botão primário do white label somente nestes atalhos. */
  html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-selecionado #mapa-ficha-apps > .mapa-ficha-app-botao {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--ui-texto) !important;
    padding: 3px 0 !important;
    text-transform: none !important;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-selecionado .mapa-ficha-navegar {
    color: var(--ui-texto) !important;
    background: var(--ui-superficie) !important;
    background-image: none !important;
    border: 1px solid var(--ui-borda) !important;
    box-shadow: none !important;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-selecionado #mapa-ficha-apps .mapa-ficha-app-icone {
    background: var(--ui-superficie) !important;
  }

  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia.tem-selecao #mapa-ficha-selecionado::after {
    content: "⌃  Deslize para cima para ver detalhes";
    order: 45;
    grid-column: 1 / -1;
    color: var(--ui-secundario);
    text-align: center;
    font: 500 11px Inter,system-ui,sans-serif;
    padding: 6px 0 0;
  }

  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > .mapa-ficha-dado-bateria {
    display: grid !important;
    order: 12;
    grid-column: auto;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > .mapa-ficha-dado-bateria-veiculo {
    display: flex !important;
    order: 13;
    grid-column: auto;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > .mapa-ficha-dado-velocidade {
    order: 10;
    grid-column: auto;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > .mapa-ficha-dado-ignicao {
    order: 13;
    grid-column: auto;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > .mapa-ficha-dado-sinal {
    order: 14;
    grid-column: auto;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > :is(.mapa-ficha-dado-velocidade,.mapa-ficha-dado-bateria,.mapa-ficha-dado-bateria-veiculo,.mapa-ficha-dado-ignicao,.mapa-ficha-dado-sinal) {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    grid-column: auto;
    gap: 3px;
    min-width: 0;
    min-height: 72px;
    margin: 0;
    padding: 7px 2px;
    background: var(--ui-suave) !important;
    border: 1px solid var(--ui-borda);
    border-radius: 12px;
    box-shadow: none;
    text-align: center;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > :is(.mapa-ficha-dado-velocidade,.mapa-ficha-dado-bateria,.mapa-ficha-dado-bateria-veiculo,.mapa-ficha-dado-ignicao,.mapa-ficha-dado-sinal) .mapa-ficha-dado-icone {
    display: block !important;
    grid-column: auto;
    grid-row: auto;
    flex: 0 0 16px;
    width: 17px;
    height: 17px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > :is(.mapa-ficha-dado-velocidade,.mapa-ficha-dado-bateria,.mapa-ficha-dado-bateria-veiculo,.mapa-ficha-dado-ignicao,.mapa-ficha-dado-sinal) span {
    grid-column: auto;
    margin: 0;
    font-size: 9px;
    line-height: 1.1;
    white-space: nowrap;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > :is(.mapa-ficha-dado-velocidade,.mapa-ficha-dado-bateria,.mapa-ficha-dado-bateria-veiculo,.mapa-ficha-dado-ignicao,.mapa-ficha-dado-sinal) strong {
    grid-column: auto;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > #mapa-ficha-historico {
    order: 20;
    grid-column: 1 / 3;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > #mapa-ficha-estacionamento {
    order: 21;
    grid-column: 3 / 5;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > #mapa-ficha-bloqueio {
    order: 23;
    grid-column: 1 / -1;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > #mapa-ficha-comandos {
    order: 24;
    grid-column: 1 / -1;
  }
  /* Uniformizar só as cores. Preservar layout, sombras, relevo e confirmação do bloqueio. */
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > #mapa-ficha-estacionamento:not(:disabled),
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-acoes > #mapa-ficha-bloqueio .proteja-bloqueio-acao {
    background-color: var(--ui-suave) !important;
    background-image: linear-gradient(180deg, var(--ui-superficie), var(--ui-suave)) !important;
    color: var(--ui-texto) !important;
    border-color: var(--ui-borda) !important;
  }
}

/* Ficha móvel: meia abertura informativa sem aumentar a área sobre o mapa.
   Reutiliza exatamente os indicadores e os handlers da ficha expandida. */
@media (max-width: 760px) {
  html.proteja-webview.visual-plataforma.sos-login-salvo[data-area="mapas"] body[data-menu-ativo="inicial"] .mapa-ficha.aberta.meia {
    transform: translateY(clamp(0px, calc(100% - 45dvh + 60px), calc(100% - 28px)));
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia .mapa-ficha-alca {
    height: 38px;
    min-height: 38px;
    padding: 10px 14px 2px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia .mapa-ficha-corpo {
    height: calc(100% - 38px);
    padding: 0 14px 8px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia #mapa-ficha-selecionado {
    gap: 6px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia .mapa-ficha-identidade {
    gap: 10px;
    margin: 0;
    align-items: center;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia .mapa-ficha-identidade h2 {
    font-size: clamp(21px, 5.8vw, 27px);
    margin: 0 0 6px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia .mapa-ficha-foto {
    flex: 0 0 82px;
    width: 82px;
    height: 76px;
  }
  /* .mapa-ficha-dados tinha display:none na meia ficha. Exibir os mesmos
     quatro indicadores já calculados para a ficha completa. */
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia.tem-selecao #mapa-ficha-selecionado > .mapa-ficha-dados {
    display: contents !important;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia #mapa-ficha-selecionado > .mapa-ficha-acoes {
    display: none !important;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia .mapa-ficha-dados > :is(.mapa-ficha-dado-velocidade,.mapa-ficha-dado-bateria,.mapa-ficha-dado-bateria-veiculo,.mapa-ficha-dado-ignicao,.mapa-ficha-dado-sinal) {
    min-height: 66px;
    padding: 5px 2px;
    gap: 2px;
    border-radius: 10px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia .mapa-ficha-dados > :is(.mapa-ficha-dado-velocidade,.mapa-ficha-dado-bateria,.mapa-ficha-dado-bateria-veiculo,.mapa-ficha-dado-ignicao,.mapa-ficha-dado-sinal) .mapa-ficha-dado-icone {
    flex-basis: 15px;
    width: 15px;
    height: 15px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia .mapa-ficha-dados > :is(.mapa-ficha-dado-velocidade,.mapa-ficha-dado-bateria,.mapa-ficha-dado-bateria-veiculo,.mapa-ficha-dado-ignicao,.mapa-ficha-dado-sinal) span {
    font-size: 9px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia .mapa-ficha-dados > :is(.mapa-ficha-dado-velocidade,.mapa-ficha-dado-bateria,.mapa-ficha-dado-bateria-veiculo,.mapa-ficha-dado-ignicao,.mapa-ficha-dado-sinal) strong {
    font-size: 10px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia #mapa-ficha-selecionado > .mapa-ficha-endereco {
    order: 18;
    margin: 2px 0 0;
    padding: 9px 10px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia .mapa-ficha-endereco-texto > span {
    font-size: 10px;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia .mapa-ficha-endereco-texto > strong {
    font-size: 12px;
    line-height: 1.3;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha.aberta.meia.tem-selecao #mapa-ficha-selecionado::after {
    padding: 2px 0 0;
  }
}

/* Cinco indicadores informativos: velocidade, baterias, ignição e GPS. */
@media(max-width:760px) {
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados {
    grid-template-columns: repeat(5, minmax(0,1fr));
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > .mapa-ficha-dado-bateria-veiculo {
    display: flex !important;
  }
  html.proteja-webview.visual-plataforma[data-area="mapas"] .mapa-ficha-dados > :is(.mapa-ficha-dado-bateria,.mapa-ficha-dado-bateria-veiculo) span {
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-align: center;
  }
}

/* Na meia ficha, os indicadores são filhos visuais de #mapa-ficha-selecionado
   (display:contents). Reservar cinco colunas também nesse grid. */
@media(max-width:760px) {
  html.proteja-webview.visual-plataforma[data-area="mapas"] #mapa-ficha-selecionado {
    grid-template-columns: repeat(5, minmax(0,1fr));
  }
}
