.tela-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: linear-gradient(135deg, #004049 0%, #00838F 55%, #26A69A 100%);
}

/* Tabelas: números alinhados à direita */
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }

.mud-table-row.linha-clicavel { cursor: pointer; }

/* Impressão do relatório: só o conteúdo */
@media print {
    .mud-appbar, .mud-drawer, .nao-imprimir { display: none !important; }
    .mud-main-content { padding-top: 0 !important; margin-left: 0 !important; }
}

/* Cabeçalho dos relatórios: logomarca + nome da empresa */
.cabecalho-relatorio { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid #005662; }
.cabecalho-relatorio .logomarca { width: auto; max-width: 240px; object-fit: contain; }
.cabecalho-relatorio .empresa { font-size: 1.25rem; font-weight: 700; color: #005662; line-height: 1.2; }
.cabecalho-relatorio .titulo { font-size: .95rem; color: #444; }
.so-impressao { display: none; }
@media print { .so-impressao { display: flex !important; } }

/* Logomarca no topo escuro do portal: fundo branco para qualquer logo aparecer */
.logo-fundo { display: inline-flex; vertical-align: middle; background: #fff; border-radius: 6px; padding: 3px 6px; margin-right: 10px; }
.logo-fundo:has(img[style*="display: none"]) { display: none; }
.logo-fundo .logomarca { width: auto; max-width: 140px; object-fit: contain; }
.logo-previa { min-height: 90px; display: flex; align-items: center; padding: 16px; border: 1px dashed #bbb; border-radius: 8px; background: #fafafa; }
.logo-previa img { max-height: 120px; max-width: 100%; }

/* ---------- App de campo (celular) ---------- */
.app-conteudo {
    max-width: 640px;
    margin: 0 auto;
    padding: calc(56px + env(safe-area-inset-top)) 12px calc(24px + env(safe-area-inset-bottom));
}
/* iPhone com o app instalado: a barra começa abaixo do relógio/entalhe */
.app-campo .mud-appbar { padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.app-campo .mud-input { font-size: 1.05rem; }
.app-campo .botao-voltar { min-height: 40px; }
.app-campo .mud-button-root.botao-grande { min-height: 52px; font-size: 1.05rem; }

.app-blocos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.app-bloco {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px;
    min-height: 104px; padding: 14px; border-radius: 12px; background: #fff; color: inherit; text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12); border: 1px solid #eee;
}
.app-bloco:active { background: #e0f2f1; }
.app-bloco .mud-icon-root { font-size: 2rem; color: #00838F; }
.app-bloco b { font-size: 1.02rem; line-height: 1.2; }
.app-bloco small { color: #6b6b6b; line-height: 1.2; }
.app-bloco.destaque { background: #00838F; color: #fff; }
.app-bloco.destaque .mud-icon-root, .app-bloco.destaque small { color: #fff; }

.foto-botao {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; cursor: pointer;
    border: 2px dashed #00838F; color: #00838F; font-weight: 500; background: #fff;
}
.foto-miniatura { position: relative; }
.foto-miniatura img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid #ddd; }
.foto-miniatura button {
    position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: none;
    background: #c62828; color: #fff; font-size: 12px; line-height: 22px; padding: 0;
}

canvas.assinatura { width: 100%; height: 180px; background: #fff; border: 2px solid #999; border-radius: 8px; display: block; }

.cartao-item { padding: 12px; border-radius: 10px; background: #fff; border: 1px solid #e6e3df; margin-bottom: 8px; }

/* ---------- Resumo do dia (cliente) ---------- */
.resumo-dia { background: #fff; border-radius: 8px; overflow: hidden; }
.resumo-dia h4 { margin: 16px 0 6px; font-size: 15px; }
.resumo-dia > :not(.resumo-topo) { margin-left: 16px; margin-right: 16px; }
.resumo-topo { background: #005662; color: #fff; padding: 16px; }
.resumo-numeros { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.resumo-numeros div { flex: 1; min-width: 110px; text-align: center; background: #e0f2f1; border-radius: 6px; padding: 8px; }
.resumo-numeros small { display: block; color: #6b6b6b; font-size: 11px; }
.resumo-numeros b { font-size: 20px; color: #005662; }
@media print { .resumo-dia { border-radius: 0; } .resumo-topo { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #00838F;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    font-family: Roboto, sans-serif;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Carregando");
}

/* ---------- Portal do cliente e rastreio ---------- */
.portal-topo { background: #005662; color: #fff; padding: calc(12px + env(safe-area-inset-top)) 16px 0; }
.portal-topo .linha { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.portal-topo .marca { font-size: 1.25rem; font-weight: 700; line-height: 1.1; display: flex; align-items: center; }
.portal-topo .marca small { display: block; font-size: .8rem; font-weight: 400; opacity: .8; }
.portal-abas { max-width: 1100px; margin: 10px auto 0; display: flex; gap: 4px; overflow-x: auto; }
.portal-abas a { color: #cfe3f1; text-decoration: none; padding: 10px 14px; border-radius: 8px 8px 0 0; font-weight: 500; white-space: nowrap; }
.portal-abas a.active { background: #F4F6F8; color: #005662; }
.portal-conteudo { max-width: 1100px; margin: 0 auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }

.cliente-cartao { background: #fff; border: 1px solid #e3e8ee; border-radius: 12px; padding: 16px; }
.cliente-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cliente-titulo { font-size: 1.2rem; font-weight: 600; color: #005662; line-height: 1.3; }
.cliente-rotulo { color: #5b6772; font-size: .9rem; }
.cliente-etapa { display: inline-block; padding: 4px 12px; border-radius: 16px; font-weight: 600; font-size: .85rem; background: #eef1f4; color: #52606d; white-space: nowrap; }
.cliente-etapa.andamento { background: #e3f0fa; color: #00838F; }
.cliente-etapa.ok { background: #e3f6ee; color: #11734f; }

.cliente-etapas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.cliente-etapas .passo { display: flex; gap: 8px; align-items: flex-start; opacity: .45; }
.cliente-etapas .passo span { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #c9d2db; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; }
.cliente-etapas .passo b { display: block; font-size: .9rem; }
.cliente-etapas .passo small { color: #5b6772; font-size: .78rem; }
.cliente-etapas .passo.feito, .cliente-etapas .passo.atual { opacity: 1; }
.cliente-etapas .passo.feito span { background: #1baf7a; }
.cliente-etapas .passo.atual span { background: #00838F; box-shadow: 0 0 0 4px #cfe3f1; }
@media (max-width: 600px) { .cliente-etapas { grid-template-columns: repeat(2, 1fr); } }

.cliente-numeros { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cliente-numeros div { flex: 1; min-width: 120px; background: #f4f7fa; border-radius: 8px; padding: 8px 10px; }
.cliente-numeros small { display: block; color: #5b6772; font-size: .75rem; }
.cliente-numeros b { font-size: 1.05rem; color: #005662; }

.cliente-recebedor { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef1f4; }
.cliente-recebedor small { color: #5b6772; }
.cliente-assinatura { max-width: 240px; max-height: 110px; border: 1px solid #dfe5eb; border-radius: 8px; background: #fff; }
.cliente-fotos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cliente-fotos img, .cliente-foto-vazia { width: 104px; height: 104px; object-fit: cover; border-radius: 8px; border: 1px solid #dfe5eb; display: block; }
.cliente-foto-vazia { display: flex; align-items: center; justify-content: center; color: #9aa5b1; background: #f4f7fa; font-size: .8rem; }
a.cliente-link { display: block; color: inherit; text-decoration: none; }
a.cliente-link:hover .cliente-cartao { border-color: #00838F; }

/* ---------- Painel dos viveiros ---------- */
.painel-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.viveiro-card { background: #fff; border-radius: 10px; border: 1px solid #e3e7ea; padding: 10px 12px; cursor: pointer; border-left: 6px solid #9e9e9e; }
.viveiro-card.povoado { border-left-color: #2e7d32; }
.viveiro-card.seco { border-left-color: #b8860b; }
.viveiro-card.enchendo, .viveiro-card.correcao { border-left-color: #0277bd; }
.viveiro-card.pronto { border-left-color: #00838F; }
.viveiro-card .linha { display: flex; justify-content: space-between; font-size: .86rem; line-height: 1.5; }
.viveiro-card .linha span:first-child { color: #6b6b6b; }
.viveiro-card h4 { margin: 0 0 4px; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
.faixa-dentro { color: #2e7d32; font-weight: 600; }
.faixa-acima { color: #c62828; font-weight: 600; }
.faixa-abaixo { color: #d97706; font-weight: 600; }
.fora { color: #c62828; font-weight: 600; }
.alerta-linha { font-size: .8rem; color: #b71c1c; }

/* ---------- Terminal touch do campo ---------- */
.terminal { min-height: 100vh; background: #eef3f4; display: flex; flex-direction: column; user-select: none; }
.terminal-topo { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #005662; color: #fff; }
.terminal-marca { display: flex; flex-direction: column; line-height: 1.1; }
.terminal-marca b { font-size: 1.4rem; }
.terminal-marca small { opacity: .85; }
.terminal-funcionario { margin-left: auto; font-size: 1.3rem; font-weight: 600; }
.terminal-status { margin-left: auto; color: #fff; text-decoration: none; padding: 8px 16px; border-radius: 20px; font-size: 1.05rem; font-weight: 600; }
.terminal-funcionario + .terminal-status { margin-left: 12px; }
.terminal-tela-cheia { background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 8px; font-size: 1.4rem; padding: 2px 10px; }
.terminal-conteudo { flex: 1; padding: 16px; max-width: 1100px; width: 100%; margin: 0 auto; }
.terminal h2 { font-size: 1.8rem; margin: 4px 0 14px; color: #004049; }
.terminal .instrucao { font-size: 1.25rem; color: #37474f; margin-bottom: 10px; }
.terminal-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.terminal-botao {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 130px;
    border-radius: 16px; border: none; background: #00838F; color: #fff; font-size: 1.5rem; font-weight: 600; cursor: pointer; padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,.2); text-align: center;
}
.terminal-botao:active { transform: scale(.98); background: #006064; }
.terminal-botao .mud-icon-root { font-size: 3rem; }
.terminal-botao.secundario { background: #fff; color: #004049; border: 2px solid #00838F; }
.terminal-botao.perigo { background: #c62828; }
.terminal-botao.ok { background: #2e7d32; }
.terminal-botao:disabled { opacity: .45; }
.terminal-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.terminal-lista .terminal-botao { min-height: 80px; font-size: 1.25rem; }
.terminal-lista .terminal-botao.selecionado { background: #2e7d32; }
.terminal-visor {
    background: #fff; border: 3px solid #00838F; border-radius: 12px; font-size: 2.6rem; font-weight: 700; text-align: right;
    padding: 8px 18px; min-height: 76px; letter-spacing: 2px; font-variant-numeric: tabular-nums;
}
.terminal-visor small { font-size: 1.2rem; color: #6b6b6b; margin-left: 8px; }
.terminal-teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.terminal-teclado button {
    min-height: 78px; font-size: 2rem; font-weight: 700; border-radius: 12px; border: 1px solid #b0bec5; background: #fff; color: #263238; cursor: pointer;
}
.terminal-teclado button:active { background: #e0f2f1; }
.terminal-duas { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 800px) { .terminal-duas { grid-template-columns: 1fr; } }
.terminal-acoes { display: flex; gap: 12px; margin-top: 16px; }
.terminal-acoes .terminal-botao { flex: 1; min-height: 80px; }
.terminal-aviso { background: #fff3e0; border-left: 6px solid #d97706; padding: 12px 16px; border-radius: 8px; font-size: 1.15rem; margin: 10px 0; }
.terminal-erro { background: #ffebee; border-left: 6px solid #c62828; padding: 12px 16px; border-radius: 8px; font-size: 1.15rem; margin: 10px 0; }
.terminal-resumo { background: #fff; border-radius: 12px; padding: 16px 20px; font-size: 1.35rem; line-height: 1.8; }

.linha-dupla { display: flex; justify-content: space-between; gap: 8px; line-height: 1.7; }
.linha-dupla span { color: #6b6b6b; }
.agua-povoamento td { padding: 2px 4px !important; }

/* Rótulo dos viveiros no mapa */
.leaflet-tooltip.rotulo-mapa { background: rgba(0,0,0,.55); color: #fff; border: none; box-shadow: none; font-size: 11px; padding: 1px 5px; }
.leaflet-tooltip.rotulo-mapa::before { display: none; }

/* ---------- Painel moderno: cartões dos viveiros ---------- */
.painel-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.vcard {
    --cor: #9e9e9e;
    background: #fff; border-radius: 14px; padding: 14px 16px 12px; cursor: pointer; position: relative; overflow: hidden;
    box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10); transition: box-shadow .15s, transform .15s;
    border-top: 5px solid var(--cor);
}
.vcard:hover { box-shadow: 0 8px 20px rgba(16,24,40,.12); transform: translateY(-1px); }
.vcard.povoado { --cor: #2e7d32; }
.vcard.seco { --cor: #b8860b; }
.vcard.enchendo, .vcard.correcao { --cor: #0277bd; }
.vcard.pronto { --cor: #00838F; }
.vcard.preparacao { --cor: #78909c; }
.vcard-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.vcard-nome { font-size: 1.1rem; font-weight: 700; color: #1f2933; line-height: 1.2; }
.vcard-sub { font-size: .8rem; color: #6b7280; margin-top: 2px; }
.vcard-selos { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.selo-situacao { font-size: .72rem; font-weight: 600; color: var(--cor); background: color-mix(in srgb, var(--cor) 12%, white); padding: 3px 9px; border-radius: 999px; }
.selo-alerta { font-size: .72rem; font-weight: 700; color: #fff; background: #d32f2f; padding: 3px 8px; border-radius: 999px; }
.vcard-racao { margin-top: 12px; background: #f6f8f9; border-radius: 10px; padding: 10px 12px; }
.vcard-racao-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.vcard-racao-linha .rotulo { font-size: .75rem; color: #6b7280; }
.vcard-racao-linha .valor { font-size: 1.35rem; font-weight: 700; color: #1f2933; }
.vcard-racao-linha.pequeno { font-size: .75rem; color: #6b7280; margin-top: 6px; }
.barra-faixa { position: relative; height: 8px; background: #e3e8eb; border-radius: 999px; margin-top: 8px; }
.barra-faixa .zona { position: absolute; top: 0; bottom: 0; background: #a5d6a7; border-radius: 999px; }
.barra-faixa .marca { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: #1f2933; }
.barra-faixa .marca.faixa-dentro { background: #2e7d32; }
.barra-faixa .marca.faixa-acima { background: #d32f2f; }
.barra-faixa .marca.faixa-abaixo { background: #ef6c00; }
.vcard-numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.vcard-numeros div { background: #fafbfc; border: 1px solid #eef1f3; border-radius: 8px; padding: 5px 8px; }
.vcard-numeros small { display: block; font-size: .68rem; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; }
.vcard-numeros b { font-size: .98rem; color: #1f2933; }
.vcard-numeros i { font-style: normal; font-weight: 400; font-size: .75rem; color: #6b7280; }
.vcard-rodape { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: .74rem; color: #6b7280; }
.vcard-rodape .vencido { color: #d32f2f; font-weight: 600; }
.vcard-vazio { margin-top: 12px; font-size: .85rem; color: #6b7280; }

/* Filtros do painel */
.painel-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }

/* Lista compacta do painel: uma linha por viveiro, nome fixo à esquerda */
.lista-painel { background: #fff; border-radius: 14px; box-shadow: 0 1px 3px rgba(16,24,40,.10); overflow: auto; max-height: calc(100vh - 290px); }
.lista-painel table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.lista-painel th { position: sticky; top: 0; background: #f6f8f9; color: #52606d; font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .03em;
    padding: 10px 10px; text-align: right; white-space: nowrap; z-index: 2; border-bottom: 1px solid #e3e8eb; cursor: pointer; user-select: none; }
.lista-painel td { padding: 9px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid #f0f2f4; font-variant-numeric: tabular-nums; }
.lista-painel th:first-child, .lista-painel td:first-child { text-align: left; position: sticky; left: 0; background: inherit; z-index: 1; }
.lista-painel th:first-child { z-index: 3; background: #f6f8f9; }
.lista-painel tbody tr { background: #fff; cursor: pointer; }
.lista-painel tbody tr:hover { background: #f1f8f8; }
.lista-painel .ponto { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.lista-painel .esq { text-align: left; }

/* Lista do painel: leitura mais fácil */
.lista-painel table { font-size: .92rem; }
.lista-painel td { padding: 11px 12px; }
.lista-painel tbody tr:nth-child(even) { background: #f9fbfb; }
.lista-painel tbody tr:nth-child(even) td:first-child { background: #f9fbfb; }
.lista-painel tbody tr td:first-child { background: #fff; }
.lista-painel tbody tr:hover td { background: #e8f4f4; }
.lista-painel td small { color: #8a96a3; font-size: .78em; }
.lista-painel td.agua { color: #1f2933; }
.pilula { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #eef1f3; font-weight: 700; }
.pilula.faixa-dentro { background: #e6f4ea; color: #1e6b2f; }
.pilula.faixa-acima { background: #fdecea; color: #b71c1c; }
.pilula.faixa-abaixo { background: #fff3e0; color: #b45309; }
.pilula small { font-weight: 400; color: inherit !important; opacity: .8; }
.vcard-numeros div.fora { background: #fdecea; border-color: #f5c2c0; }
.vcard-numeros div.fora b { color: #c62828; }

/* ---------- painel dos viveiros no terminal (para ver de longe) ---------- */
.terminal-conteudo:has(.painel-tv) { max-width: none; }
.painel-tv-topo { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.painel-tv-topo .terminal-botao { min-height: 64px; padding: 8px 20px; flex-direction: row; gap: 8px; font-size: 1.15rem; }
.painel-tv-topo .terminal-botao .mud-icon-root { font-size: 1.8rem; }
.painel-tv-titulo { flex: 1; }
.painel-tv-titulo h2 { margin: 0; }
.painel-tv-hora { font-size: 1.1rem; color: #2e7d32; font-weight: 600; }
.painel-tv-hora.antiga { color: #b45309; }
.painel-tv-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.painel-tv-resumo div { background: #fff; border-radius: 14px; padding: 12px 16px; border-left: 6px solid #00838F; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.painel-tv-resumo div.ok { border-left-color: #2e7d32; }
.painel-tv-resumo div.fora { border-left-color: #c62828; }
.painel-tv-resumo div.fora b { color: #c62828; }
.painel-tv-resumo small { display: block; font-size: .9rem; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; }
.painel-tv-resumo b { font-size: 1.9rem; color: #1f2933; line-height: 1.2; }
.painel-tv-resumo i { font-style: normal; font-size: 1rem; font-weight: 400; color: #6b7280; }
.painel-tv-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.painel-tv-filtros button { border: 2px solid #00838F; background: #fff; color: #004049; border-radius: 28px; padding: 10px 22px; font-size: 1.15rem; font-weight: 600; }
.painel-tv-filtros button.ativo { background: #00838F; color: #fff; }
.painel-tv-legenda { margin-left: auto; font-size: 1rem; color: #4b5563; display: flex; align-items: center; gap: 6px; }
.painel-tv-legenda i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; margin-left: 10px; }
.painel-tv-legenda i.dentro { background: #2e7d32; }
.painel-tv-legenda i.abaixo { background: #d97706; }
.painel-tv-legenda i.acima { background: #d32f2f; }
.painel-tv-grade { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.painel-tv .vcard { cursor: default; padding: 16px 18px; }
.painel-tv .vcard-nome { font-size: 1.6rem; }
.painel-tv .vcard-sub { font-size: 1.05rem; }
.painel-tv .vcard-racao .valor { font-size: 1.7rem; }
.painel-tv .vcard-racao-linha { font-size: 1.05rem; }
.painel-tv .barra-faixa { height: 14px; }
.painel-tv .vcard-numeros small { font-size: .8rem; }
.painel-tv .vcard-numeros b { font-size: 1.35rem; }
.painel-tv .vcard-rodape { font-size: 1rem; }
@media (max-width: 700px) { .painel-tv-legenda { margin-left: 0; } .painel-tv-topo h2 { font-size: 1.4rem; } }

/* ---------- financeiro ---------- */
.texto-fraco { color: #6b7280; font-size: .85em; }
.texto-ok { color: #1b7f4b; }
.texto-perigo { color: #c62828; }
.negativo { color: #c62828; }
.positivo { color: #1b7f4b; }
.subcabecalho { font-weight: 700; color: #00838F; text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; }

.fin-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.fin-resumo > button, .fin-resumo > div { text-align: left; background: #fff; border: 1px solid #e3e8eb; border-left: 5px solid #00838F; border-radius: 12px;
    padding: 10px 14px; font: inherit; cursor: default; display: flex; flex-direction: column; }
.fin-resumo > button { cursor: pointer; transition: box-shadow .15s; }
.fin-resumo > button:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.fin-resumo > .ativo { background: #e0f2f1; }
.fin-resumo .perigo { border-left-color: #c62828; }
.fin-resumo .perigo b { color: #c62828; }
.fin-resumo .alerta { border-left-color: #d97706; }
.fin-resumo .ok { border-left-color: #2e7d32; }
.fin-resumo small { font-size: .72rem; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; }
.fin-resumo b { font-size: 1.35rem; color: #1f2933; }
.fin-resumo i { font-style: normal; font-size: .78rem; color: #6b7280; }

.fin-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.fin-kpi { background: #fff; border: 1px solid #e3e8eb; border-radius: 14px; padding: 14px 18px; display: flex; flex-direction: column; gap: 2px;
    text-decoration: none; color: inherit; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
a.fin-kpi:hover { box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.fin-kpi small { font-size: .75rem; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; }
.fin-kpi b { font-size: 1.7rem; color: #1f2933; line-height: 1.2; }
.fin-kpi b.negativo { color: #c62828; }
.fin-kpi b.positivo { color: #1b7f4b; }
.fin-kpi i { font-style: normal; font-size: .8rem; color: #6b7280; }
.fin-kpi i.alerta { color: #c62828; font-weight: 600; }

.fin-tabela-meses { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 8px; }
.fin-tabela-meses th, .fin-tabela-meses td { padding: 3px 6px; text-align: right; border-bottom: 1px solid #f0f2f4; white-space: nowrap; }
.fin-tabela-meses th:first-child, .fin-tabela-meses td:first-child { text-align: left; color: #6b7280; }
.fin-tabela-meses th { color: #6b7280; font-weight: 600; text-transform: capitalize; }

.fin-barras { display: flex; flex-direction: column; gap: 8px; }
.fin-barra { display: grid; grid-template-columns: 150px 1fr 110px; align-items: center; gap: 8px; font-size: .88rem; }
.fin-barra .rotulo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-barra .trilho { background: #f0f2f4; border-radius: 999px; height: 12px; overflow: hidden; }
.fin-barra .cheio { display: block; height: 100%; background: #2a78d6; border-radius: 999px; }
.fin-barra .cheio.operacao { background: #1baf7a; }
.fin-barra .valor { text-align: right; font-weight: 600; }
@media (max-width: 600px) { .fin-barra { grid-template-columns: 100px 1fr 90px; } }

.fin-mini { display: flex; flex-direction: column; }
.fin-mini small { font-size: .7rem; color: #6b7280; text-transform: uppercase; }
.fin-mini b { font-size: 1.1rem; }

.fin-vencimento { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid #f0f2f4;
    text-decoration: none; color: inherit; }
.fin-vencimento:hover { background: #f7fafa; }
.fin-vencimento .data { font-weight: 700; color: #00838F; text-align: center; background: #e0f2f1; border-radius: 8px; padding: 4px 0; }
.fin-vencimento .data.vencida { color: #c62828; background: #fdecea; }
.fin-vencimento .desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-vencimento .desc small { display: block; color: #6b7280; }
.fin-vencimento .valor { font-weight: 700; white-space: nowrap; }

.fin-saldo { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f0f2f4; }
.fin-saldo span { flex: 1; }

.fin-contas { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.fin-contas > button, .fin-contas > .total { background: #fff; border: 1px solid #e3e8eb; border-radius: 14px; padding: 12px 16px; text-align: left; font: inherit;
    display: flex; flex-direction: column; gap: 2px; cursor: pointer; color: inherit; }
.fin-contas > button .mud-icon-root { color: #00838F; }
.fin-contas > button.ativo { border: 2px solid #00838F; background: #f2fbfb; }
.fin-contas > .total { cursor: default; background: #00838F; color: #fff; border: none; justify-content: center; }
.fin-contas small { font-size: .78rem; color: inherit; opacity: .8; }
.fin-contas b { font-size: 1.4rem; }
.fin-contas i { font-style: normal; font-size: .75rem; color: #6b7280; }

.fin-dados { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; font-size: .92rem; }
.fin-dados dt { color: #6b7280; }
.fin-dados dd { margin: 0; }
.fin-anexo { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f2f4; }
.fin-vendas { display: flex; flex-direction: column; gap: 10px; }
.fin-tabela-ciclos td, .fin-tabela-ciclos th { white-space: nowrap; font-size: .85rem; }
.fin-tabela-ciclos .mud-table-container { overflow-x: auto; }
.fin-tabela td, .fin-tabela th { white-space: nowrap; }
.fin-tabela td:nth-child(2) { white-space: normal; min-width: 240px; }
