/* Sage Análise Web – estilo base (sem bibliotecas externas). Cores WRINF: #004681 azul, #00B5E8 ciano, #102969 azul-noite */
:root {
    color-scheme: light;   /* o site é sempre claro, mesmo com o telemóvel em modo escuro */
    --fundo: #f5f6f8; --cartao: #ffffff; --texto: #1d2433; --suave: #5b6475; --linha: #dde1e8;
    --principal: #004681; --principal-escuro: #00355f; --ciano: #00B5E8; --noite: #102969;
    --ok: #1d7a46; --ok-fundo: #e6f4ec; --erro: #b42318; --erro-fundo: #fdecea; --info-fundo: #e5f0f8;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; font-size: 15px;
       color: var(--texto); background: var(--fundo); }
a { color: var(--principal); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 .5rem; }
code { background: #eef0f4; padding: 0 .3em; border-radius: 3px; }

/* Cabeçalho: barra azul com a marca e o utilizador; por baixo, o menu numa barra azul-noite */
.topo { background: var(--principal); color: #fff; }
.barra-marca { display: flex; align-items: center; gap: 1rem 1.5rem; padding: .55rem 1.5rem; min-height: 56px; flex-wrap: wrap; }
.marca { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; color: #fff; text-decoration: none; font-size: 1.1rem; white-space: nowrap; }
.marca img { width: 28px; height: 28px; display: block; }
.utilizador { margin-left: auto; display: flex; align-items: center; gap: 1rem; color: #d6e4f3; flex-wrap: wrap; min-width: 0; }
.utilizador a, .utilizador button.ligacao { color: #fff; text-decoration: none; }
.utilizador a:hover, .utilizador button.ligacao:hover { text-decoration: underline; }
.utilizador .empresa { font-weight: 600; color: #fff; }
.logo-cliente { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 6px;
                padding: 3px 6px; height: 36px; max-width: 140px; }
.logo-cliente img { max-height: 30px; max-width: 128px; display: block; object-fit: contain; }
.menu { display: flex; gap: .25rem; padding: 0 1.25rem; background: var(--noite); overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu:not(:has(a)) { display: none; }
.menu a { white-space: nowrap; text-decoration: none; color: #c9d6ee; padding: .6rem .7rem .5rem; border-bottom: 3px solid transparent; }
.menu a:hover { color: #fff; }
.menu a.active { color: #fff; border-bottom-color: var(--ciano); font-weight: 600; }
main { max-width: 1200px; margin: 1.5rem auto; padding: 0 1.5rem; }
footer.rodape { display: flex; justify-content: center; gap: .3rem 1.5rem; flex-wrap: wrap; color: var(--suave); font-size: .82rem;
                padding: 1.5rem 1rem 2rem; border-top: 1px solid var(--linha); margin-top: 2rem; }

.cartao { background: var(--cartao); border: 1px solid var(--linha); border-radius: 8px; padding: 1.25rem; margin-bottom: 1rem; }
.cartao.estreito { max-width: 440px; margin: 3rem auto; }
.cartao.destaque { border-color: var(--principal); }
.grelha-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }

label { display: block; margin-bottom: .8rem; color: var(--suave); font-size: .9rem; }
input, select { display: block; width: 100%; margin-top: .25rem; padding: .5rem .6rem; font: inherit; color: var(--texto);
                border: 1px solid var(--linha); border-radius: 6px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ciano); outline-offset: -1px; }
.formulario-linha { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }

/* color: inherit — no telemóvel em modo escuro, o texto dos botões ficava branco sobre fundo branco */
button { font: inherit; cursor: pointer; color: inherit; }
button.principal { background: var(--principal); color: #fff; border: 0; border-radius: 6px; padding: .55rem 1.1rem; }
button.principal:hover { background: var(--principal-escuro); }
button.principal:disabled { opacity: .6; cursor: default; }
button.ligacao { background: none; border: 0; color: var(--principal); padding: 0; text-decoration: underline; }
form.em-linha { display: inline; margin: 0; }

.aviso { border-radius: 6px; padding: .7rem .9rem; margin: .5rem 0 1rem; }
.aviso.ok { background: var(--ok-fundo); color: var(--ok); }
.aviso.erro { background: var(--erro-fundo); color: var(--erro); }
.aviso.info { background: var(--info-fundo); }
.etiqueta { display: inline-block; font-size: .78rem; padding: .05rem .45rem; border-radius: 10px; }
.etiqueta.ok { background: var(--ok-fundo); color: var(--ok); }
.etiqueta.erro { background: var(--erro-fundo); color: var(--erro); }
.nota { color: var(--suave); font-size: .85rem; }
.contacto { font-weight: 500; }
.validation-message { color: var(--erro); font-size: .85rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--linha); vertical-align: top; }
th { color: var(--suave); font-weight: 500; font-size: .85rem; }
table.compacta td { font-size: .85rem; padding: .3rem .5rem; }
tr.inativo td { color: var(--suave); }
td.acoes { white-space: nowrap; }
td.acoes button { margin-right: .75rem; }

.lista-escolha button { color: var(--texto); display: flex; justify-content: space-between; width: 100%; margin-bottom: .5rem; padding: .8rem 1rem;
                        background: #fff; border: 1px solid var(--linha); border-radius: 6px; text-align: left; }
.lista-escolha button:hover { border-color: var(--principal); }
.lista-escolha span { color: var(--suave); }

.copiar { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.copiar input { margin: 0; font-family: Consolas, monospace; font-size: .85rem; }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: .8rem 1.5rem;
                   background: var(--erro-fundo); color: var(--erro); }

/* ---------------------------------------------------------------- análise */
:root { --sobe: #2F7A47; --desce: #B03A2E; }
main:has(.indicadores) { max-width: 1440px; }
.cabecalho-analise { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.cabecalho-analise h1 { margin: 0; }
.cabecalho-analise .nota { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }

.barra-analise { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .6rem 0 .9rem; }
label.em-linha { display: inline-flex; align-items: center; gap: .4rem; margin: 0; color: var(--texto); }
label.em-linha select { width: auto; margin: 0; padding: .35rem .5rem; }
label.caixa input { width: auto; margin: 0; }
.separador-barra { flex: 1; }
button.secundario { background: #fff; color: var(--texto); border: 1px solid var(--linha); border-radius: 6px; padding: .4rem .9rem; }
button.secundario:hover:not(:disabled) { border-color: var(--principal); color: var(--principal); }
button.secundario:disabled { opacity: .55; cursor: default; }

.indicadores { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .75rem; transition: opacity .2s; }
.indicadores.a-carregar { opacity: .5; }
.indicador { background: #fff; border: 1px solid var(--linha); border-radius: 8px; padding: .8rem 1rem; min-width: 0; }
.indicador .titulo { color: var(--suave); font-weight: 600; font-size: .85rem; }
.indicador .valor { font-size: 1.65rem; font-weight: 700; margin: .2rem 0 .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.indicador .comparacao, .indicador .detalhe { font-size: .82rem; color: var(--suave); }
.indicador .comparacao span:first-child { font-weight: 700; margin-right: .3rem; }
.indicador .detalhe { margin-top: .2rem; }
.sobe { color: var(--sobe); }
.desce { color: var(--desce); }
.neutro { color: var(--suave); }
.periodo { margin: .6rem 0; }

.separadores { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--linha); }
.separadores a { padding: .5rem .9rem; color: var(--suave); border: 1px solid transparent; border-bottom: 0;
                 border-radius: 6px 6px 0 0; margin-bottom: -1px; text-decoration: none; white-space: nowrap; }
.separadores a:hover { color: var(--principal); }
.separadores a.ativo { background: #fff; border-color: var(--linha); color: var(--texto); font-weight: 600; }
.separadores button { background: none; border: 1px solid transparent; border-bottom: 0; padding: .5rem .9rem; color: var(--suave);
                      border-radius: 6px 6px 0 0; margin-bottom: -1px; }
.separadores button:hover { color: var(--principal); }
.separadores button.ativo { background: #fff; border-color: var(--linha); color: var(--texto); font-weight: 600; }
.separador-conteudo { border-top-left-radius: 0; }

.grelha-graficos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; }
.grafico { margin: 0 0 1rem; min-width: 0; overflow-x: auto; }
.grafico figcaption { font-weight: 600; margin-bottom: .25rem; }
.grafico svg { width: 100%; min-width: 520px; height: auto; display: block; font-family: inherit; }
.grafico text { font-size: 11px; fill: var(--suave); }
.grafico .legenda text { fill: var(--texto); }
.grafico .grelha { stroke: #ECEFEE; }
.grafico .zero { stroke: #B8C0C2; }
.grafico .sem-dados { padding: 2rem 0; text-align: center; }

.barra-ranking { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: .75rem; }
.tabela-dados { overflow: auto; max-height: 70vh; border: 1px solid var(--linha); border-radius: 6px; }
.tabela-dados table { font-size: .87rem; }
.tabela-dados th { position: sticky; top: 0; background: #F2F5F9; z-index: 1; padding: 0; white-space: nowrap; }
.tabela-dados th button { background: none; border: 0; width: 100%; padding: .55rem .6rem; text-align: inherit; color: var(--suave);
                          font-weight: 600; font-size: .82rem; }
.tabela-dados th.num { text-align: right; }
.tabela-dados td { padding: .4rem .6rem; vertical-align: middle; }
.tabela-dados td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabela-dados td.larga, .tabela-dados th.larga { min-width: 220px; }
.tabela-dados tbody tr:hover td { background: #F0F6FB; }
.tabela-dados tfoot td { font-weight: 700; border-top: 2px solid var(--linha); position: sticky; bottom: 0; background: #fff; }

@media (max-width: 900px) { .grelha-graficos { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
    main { padding: 0 .75rem; }
    .indicador .valor { font-size: 1.35rem; }
}

/* ---------------------------------------------------------------- telemóvel e tablet */
.tabela-rolar { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Tabelas de administração em cartões (um registo por bloco) em ecrãs estreitos */
@media (max-width: 900px) {
    table.responsiva thead { display: none; }
    table.responsiva tr { display: block; padding: .6rem 0; border-bottom: 1px solid var(--linha); }
    table.responsiva td { display: block; border: 0; padding: .15rem 0 .15rem 8.5rem; position: relative; min-height: 1.5rem; overflow-wrap: anywhere; }
    table.responsiva td::before { content: attr(data-rotulo); position: absolute; left: 0; width: 8rem; color: var(--suave); font-size: .8rem; padding-top: .1rem; }
    table.responsiva td[data-rotulo=""] { padding-left: 0; }
    table.responsiva td.acoes { white-space: normal; padding-top: .4rem; }
    table.responsiva td.acoes button { margin: 0 1rem .4rem 0; }
}

@media (max-width: 700px) {
    body { font-size: 14px; }
    .barra-marca { padding: .5rem .75rem; gap: .4rem 1rem; min-height: 0; }
    .marca { font-size: 1rem; }
    .marca img { width: 24px; height: 24px; }
    .utilizador { margin-left: 0; width: 100%; gap: .5rem .8rem; font-size: .85rem; }
    .utilizador .empresa { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .logo-cliente { height: 30px; padding: 2px 5px; }
    .logo-cliente img { max-height: 26px; max-width: 100px; }
    .menu { padding: 0 .5rem; }
    .menu a { padding: .55rem .6rem .45rem; }
    main { margin-top: 1rem; }
    h1 { font-size: 1.25rem; }
    .cartao { padding: .9rem; }

    /* Indicadores 2 a 2 */
    .indicadores { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .indicador { padding: .6rem .7rem; }
    .indicador .valor { font-size: 1.2rem; }
    .indicador .comparacao span:last-child, .indicador .detalhe { display: block; }
    .indicador:last-child:nth-child(odd) { grid-column: 1 / -1; }

    /* Separadores numa só linha, a deslizar com o dedo */
    .separadores { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .separadores::-webkit-scrollbar { display: none; }
    .separadores button { white-space: nowrap; flex: 0 0 auto; padding: .55rem .8rem; }

    /* Barra de filtros: botões maiores para o dedo */
    .barra-analise { gap: .5rem; }
    .barra-analise button.secundario { padding: .5rem .8rem; }
    .separador-barra { display: none; }

    /* Rankings: o nome fica fixo à esquerda ao deslizar para ver os valores */
    .tabela-dados { max-height: none; }
    .tabela-dados td.larga, .tabela-dados th.larga { min-width: 150px; max-width: 180px; position: sticky; left: 0; background: #fff; z-index: 1; }
    .tabela-dados th.larga { background: #F2F5F9; z-index: 2; }
    .tabela-dados td { padding: .45rem .5rem; }
}
.indicadores.pequenos { margin-bottom: 1rem; }

/* ---------------------------------------------------------------- detalhe ao clicar */
.tabela-dados tr.clicavel { cursor: pointer; }
.tabela-dados tr.clicavel:hover td { background: #E3EEF8; }
.fundo-detalhe { position: fixed; inset: 0; background: rgba(20, 28, 40, .35); z-index: 20; }
.painel-detalhe { position: fixed; top: 0; right: 0; bottom: 0; width: min(980px, 94vw); background: var(--fundo); z-index: 21;
                  overflow-y: auto; padding: 1rem 1.25rem 2rem; box-shadow: -8px 0 24px rgba(0,0,0,.18); }
.painel-detalhe header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .75rem; }
.painel-detalhe h2 { margin: .2rem 0; font-size: 1.2rem; }
.painel-detalhe .acoes-detalhe { display: flex; gap: .5rem; flex-shrink: 0; }
.painel-detalhe .grafico, .painel-detalhe .tabela-dados { background: #fff; }
.painel-detalhe .grafico { padding: .75rem; border: 1px solid var(--linha); border-radius: 8px; margin: 1rem 0; }
@media (max-width: 700px) {
    .painel-detalhe { width: 100vw; padding: .75rem; }
    .painel-detalhe header { flex-direction: column-reverse; }
    .painel-detalhe .acoes-detalhe { align-self: flex-end; }
}

/* ------------------------------------------------------------------ análise ABC / XYZ */
.barra-ranking button.secundario.ativo { background: var(--principal); color: #fff; border-color: transparent; }
.permissoes label.opcao { display: inline-flex; align-items: center; gap: .3rem; margin: 0 .8rem .2rem 0; font-weight: normal; white-space: nowrap; font-size: .9rem; }
.permissoes.convite { margin: .5rem 0 .8rem; display: flex; flex-wrap: wrap; gap: .3rem .2rem; align-items: center; }
.permissoes.convite > span { margin-right: .6rem; color: var(--suave); }
.matriz-abc table { width: 100%; border-collapse: separate; border-spacing: 4px; margin-top: .5rem; }
.matriz-abc th { font-size: .8rem; font-weight: 600; text-align: center; color: #555; }
.matriz-abc tbody th { font-size: 1.1rem; width: 2.2rem; }
.matriz-abc td { text-align: center; padding: .7rem .3rem; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.matriz-abc td strong { display: block; font-size: 1.25rem; }
.matriz-abc td span { font-size: .8rem; color: #333; }
.matriz-abc td:hover, .matriz-abc td.escolhida { border-color: #222; }
.matriz-abc .celula-ax { background: #b9dfc7; } .matriz-abc .celula-ay { background: #cfe8d7; } .matriz-abc .celula-az { background: #f3e2b5; }
.matriz-abc .celula-bx { background: #d7ebdd; } .matriz-abc .celula-by { background: #eef3e2; } .matriz-abc .celula-bz { background: #f6ead0; }
.matriz-abc .celula-cx { background: #eceff1; } .matriz-abc .celula-cy { background: #f1f1ee; } .matriz-abc .celula-cz { background: #f6dcd8; }

/* ------------------------------------------------------------------ análises avançadas, stocks, contas, relatório */
.barra-analise.sub { padding-top: 0; min-height: 0; }
.barra-analise.sub:empty { display: none; }
nav.separadores { margin-bottom: .6rem; }
.botoes-exportar { display: inline-flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.erro-texto { color: var(--erro); }
.mapa-calor { overflow-x: auto; }
.mapa-calor table { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 520px; font-size: .82rem; }
.mapa-calor th { font-weight: 600; color: var(--suave); padding: .2rem .4rem; text-align: center; }
.mapa-calor tbody th { text-align: right; width: 3.2rem; }
.mapa-calor td { text-align: center; padding: .35rem .2rem; border-radius: 4px; font-variant-numeric: tabular-nums; }
ul.alertas { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
ul.alertas li { padding: .45rem .7rem; border-radius: 6px; border-left: 4px solid; }
ul.alertas li.alerta-alto { background: var(--erro-fundo); border-color: var(--erro); }
ul.alertas li.alerta-medio { background: #fdf3e2; border-color: #b07a1e; }
ul.alertas li.alerta-info { background: var(--info-fundo); border-color: var(--principal); }
.grelha-2-relatorio { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 1rem; }
.relatorio.a-carregar { opacity: .5; }
table.compacta td.num, table.compacta th.num { text-align: right; }

/* ------------------------------------------------------------------ impressão / PDF (A4) */
.cabecalho-impressao { display: none; }
.so-impressao { display: none; }
@page { size: A4; margin: 12mm 10mm 14mm; }
@media print {
    :root { font-size: 10pt; }
    body { background: #fff !important; color: #000; }
    .topo, footer, .rodape, #blazor-error-ui, .barra-analise, .barra-ranking button, .separadores,
    .nao-imprimir, button:not(.tabela-dados th button), .fundo-detalhe { display: none !important; }
    .tabela-dados th button { padding: 0 !important; border: 0 !important; background: none !important; font: inherit; font-weight: 600; }
    .tabela-dados th .seta { display: none; }
    .so-impressao { display: block; }
    main { max-width: none !important; padding: 0 !important; margin: 0 !important; }
    .cabecalho-impressao { display: flex; align-items: center; gap: 1em;
        border-bottom: 1.5pt solid #004681; padding-bottom: 4pt; margin-bottom: 8pt; font-size: 9pt; }
    .cabecalho-impressao .logo-cliente { background: none; padding: 0; height: auto; max-width: none; }
    .cabecalho-impressao .logo-cliente img { max-height: 14mm; max-width: 45mm; }
    .cabecalho-impressao .produto { margin-left: auto; color: #444; }
    .cabecalho-impressao strong { font-size: 12pt; }
    .cartao { box-shadow: none !important; border: none !important; padding: 0 !important; margin: 0 0 8pt !important; }
    h1 { font-size: 15pt; margin: 0 0 4pt; }
    h2 { font-size: 12pt; margin: 8pt 0 4pt; break-after: avoid; }
    h3 { font-size: 10.5pt; break-after: avoid; }
    .indicadores { display: flex !important; gap: 4pt !important; }
    .indicadores > * { flex: 1 1 0; min-width: 0; }
    .indicador .valor { font-size: 14pt !important; }
    .indicador { border: 0.5pt solid #999 !important; box-shadow: none !important; padding: 4pt !important; break-inside: avoid; }
    .grelha-graficos { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
    .grafico { overflow: visible !important; }
    .grafico svg { width: 100% !important; min-width: 0 !important; }
    .barra-ranking label, .barra-ranking select { display: none !important; }
    .quebra-antes { break-before: page; }
    .mapa-calor table { min-width: 0; font-size: 7.5pt; }
    .grelha-2-relatorio { grid-template-columns: 1fr 1fr !important; }
    ul.alertas li { break-inside: avoid; padding: 2pt 5pt; }
    .grafico { break-inside: avoid; border: none !important; box-shadow: none !important; }
    .grafico svg { max-width: 100%; height: auto; }
    .tabela-dados, .tabela-rolar { overflow: visible !important; max-height: none !important; }
    .tabela-dados table, table { width: 100%; font-size: 8pt; border-collapse: collapse; }
    .tabela-dados th, .tabela-dados td, th, td { padding: 1.5pt 3pt !important; border-bottom: 0.4pt solid #ccc; }
    .tabela-dados th { position: static !important; background: #eee !important; }
    .tabela-dados td, .tabela-dados tfoot td { position: static !important; }
    thead { display: table-header-group; }
    tr { break-inside: avoid; }
    .painel-detalhe { position: static !important; width: auto !important; max-height: none !important; box-shadow: none !important;
        overflow: visible !important; transform: none !important; }
    a { color: #000; text-decoration: none; }
    .sobe { color: #0a6b2d !important; } .desce { color: #b3261e !important; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Tabelas com linhas que abrem (subscrições) */
table.expansivel tr.linha-resumo { cursor: pointer; }
table.expansivel tr.linha-resumo:hover td { background: #EEF3FA; }
table.expansivel tr.linha-resumo.aberta td { background: #E3ECF8; font-weight: 600; }
table.expansivel tr.linha-detalhe > td { background: #F7F9FC; padding: 1rem 1.2rem 1.4rem; border-top: none; }
table.expansivel .seta { display: inline-block; width: 1rem; color: var(--suave); transition: transform .15s; }
table.expansivel tr.aberta .seta { transform: rotate(90deg); }
.detalhe-bloco { margin-top: 1rem; }
.detalhe-bloco h3 { margin: 0 0 .4rem; font-size: 1rem; }
.zona-perigo { margin-top: 1rem; padding: .8rem 1rem; border: 1px solid #f0c2c2; border-radius: 8px; background: #fff7f7; }
button.perigo { background: #b42318; color: #fff; border: none; border-radius: 6px; padding: .45rem .9rem; }
table.expansivel td.num, table.expansivel th.num { text-align: right; white-space: nowrap; }

/* Extratos por email */
textarea { display: block; width: 100%; margin-top: .25rem; padding: .5rem .6rem; font: inherit; color: var(--texto);
           border: 1px solid var(--linha, #d0d5dd); border-radius: 6px; resize: vertical; background: var(--fundo-cartao, #fff); }
img.logotipo-previa { max-width: 220px; max-height: 90px; border: 1px solid var(--linha, #d0d5dd); padding: .4rem; background: #fff; }
.extratos td.email input { margin: 0; min-width: 14rem; padding: .3rem .45rem; }
.extratos tr.sem-email td.email input { border-color: #b42318; }
.previa-email { white-space: pre-wrap; background: var(--fundo, #f6f7f9); border: 1px solid var(--linha, #d0d5dd);
                border-radius: 6px; padding: .8rem; font-size: .92rem; }
.barra-analise .contador { font-weight: 600; }
a.botao { display: inline-block; background: #fff; color: var(--texto); border: 1px solid var(--linha); border-radius: 6px;
          padding: .4rem .9rem; text-decoration: none; margin-right: .4rem; }
a.botao:hover { border-color: var(--principal); color: var(--principal); }
.procura { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: .8rem; }
.procura label, .procura > input { flex: 1 1 260px; max-width: 480px; margin-bottom: 0; }
.procura > input { margin-top: 0; }
.procura button { flex: 0 0 auto; }

/* A minha conta */
.conta section { border-top: 1px solid var(--linha); padding-top: 1rem; margin-top: 1rem; }
.conta section:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.lista-simples { margin: 0; padding-left: 1.1rem; }
.lista-simples li { margin: .2rem 0; }

/* ------------------------------------------------------------------ entrada (login e convite), ao estilo do wr.CRM */
.entrada { display: grid; grid-template-columns: minmax(320px, 46%) 1fr; min-height: 100vh; background: #fff; }
.entrada-marca { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem;
                 color: #fff; overflow: hidden;
                 background: radial-gradient(circle at 70% 28%, rgba(0, 181, 232, .28) 0, rgba(0, 181, 232, 0) 45%),
                             radial-gradient(circle at 30% 80%, rgba(26, 99, 184, .45) 0, rgba(26, 99, 184, 0) 55%),
                             linear-gradient(160deg, #0a3c8c 0%, var(--noite) 70%); }
.entrada-centro { text-align: center; }
.entrada-simbolo { width: 120px; height: 120px; filter: drop-shadow(0 0 18px rgba(0, 181, 232, .6)); }
.entrada-nome { font-size: 2rem; font-weight: 700; margin: 1.1rem 0 .2rem; letter-spacing: .01em; }
.entrada-boas-vindas { font-size: 1.25rem; margin: 0; color: #cfe0f5; }
.entrada-wrinf { position: absolute; left: 1.5rem; bottom: 1.25rem; width: 150px; height: auto; }
.entrada-formulario { display: flex; flex-direction: column; padding: 2rem 1.5rem 1.25rem; min-width: 0; }
.entrada-conteudo { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 400px; margin: 0 auto; }
.entrada .cartao.estreito { border: 0; padding: 0; margin: 0; max-width: none; background: none; }
.entrada h1 { color: var(--noite); font-size: 1.6rem; margin-bottom: .25rem; }
.entrada .subtitulo { margin: 0 0 1.5rem; }
.entrada button.principal { width: 100%; padding: .7rem 1rem; font-weight: 600; margin-top: .4rem; }
.entrada-rodape { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
                  max-width: 400px; width: 100%; margin: 2rem auto 0; color: var(--suave); font-size: .78rem; }
.entrada-rodape img { height: 35px; width: auto; display: block; }
.entrada-rodape span { text-align: right; }
@media (max-width: 800px) {
    .entrada { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .entrada-marca { flex-direction: row; justify-content: flex-start; padding: .9rem 1rem; }
    .entrada-centro { display: flex; align-items: center; gap: .7rem; text-align: left; }
    .entrada-simbolo { width: 40px; height: 40px; filter: drop-shadow(0 0 8px rgba(0, 181, 232, .6)); }
    .entrada-nome { font-size: 1.2rem; margin: 0; }
    .entrada-boas-vindas, .entrada-wrinf { display: none; }
    .entrada-formulario { padding: 1.5rem 1rem 1rem; }
    .entrada-conteudo { justify-content: flex-start; }
    .entrada-rodape { justify-content: center; }
    .entrada-rodape span { text-align: center; }
}
