/* SPEED — layout base (sem build front-end). Visual no padrão do GenFlow (Genesis): trilho verde-escuro,
   barra superior translúcida, fonte Manrope, cartões arredondados com sombra suave. */

:root {
    /* Paleta Genesis (mesmos nomes de antes; valores do padrão GenFlow). */
    --verde: #044930;
    --verde-medio: #0a6b47;
    --verde-escuro: #033a26;
    --verde-profundo: #022b1c;
    --verde-claro: #e2efe7;
    --verde-vivo: #3fbf86;
    --fundo: #f3f6f4;
    --superficie: #ffffff;
    --superficie-2: #eef3ef;
    --texto: #0e1d16;
    --texto-suave: #5f6f66;
    --texto-mudo: #74837a;
    --borda: rgba(4, 73, 48, .12);
    --borda-forte: #dbe5df;
    --info: #2081b5;
    --info-fundo: #e8f3fa;
    --alerta: #b5651d;
    --alerta-fundo: #fbf1e6;
    --sucesso: #23911b;
    --sucesso-fundo: #eaf6e9;
    --perigo: #c0392b;
    --sombra: 0 1px 2px rgba(10, 40, 26, .05), 0 10px 28px rgba(10, 40, 26, .06);
    --raio: 14px;
    --fonte: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    /* Menu lateral */
    --lado-fundo: #044930;
    --lado-texto: #e6f2eb;
    --lado-mudo: #9cc3ad;
    --lado-hover: rgba(255, 255, 255, .08);
    --lado-ativo: rgba(255, 255, 255, .14);
    --trilho: 68px;
    --lado-aberto: 260px;
    --topo-h: 58px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--fonte);
    font-size: 14px;
    line-height: 1.5;
    background: var(--fundo);
    color: var(--texto);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--verde-medio); }

h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }

.icone { width: 18px; height: 18px; flex-shrink: 0; }

:focus-visible { outline: 2px solid var(--verde-medio); outline-offset: 2px; }

/* ---------- Estrutura: trilho lateral + barra superior ---------- */

@media (min-width: 760px) { body.com-trilho { padding-left: var(--trilho); } }

.conteudo { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.app-top {
    position: sticky;
    top: 0;
    z-index: 35;
    height: var(--topo-h);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    background: rgba(243, 246, 244, .86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--borda);
}

.top-title { font-weight: 700; font-size: 14px; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top-title b { color: var(--texto); }
.top-title .trilha { color: var(--texto-suave); font-weight: 700; }
.top-title .trilha a { color: inherit; text-decoration: none; }
.top-title .trilha a:hover { color: var(--verde-medio); }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-right form { margin: 0; }
.top-usuario { font-size: 13px; font-weight: 700; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.top-btn {
    height: 36px;
    border-radius: 10px;
    padding: 0 14px;
    cursor: pointer;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border: 1px solid var(--borda);
    background: var(--superficie);
    color: var(--texto);
}
.top-btn:hover { border-color: rgba(10, 107, 71, .45); color: var(--verde-medio); }
.top-btn .icone { width: 16px; height: 16px; }
.menu-btn { padding: 0 10px; flex: none; }

main { padding: 24px; width: 100%; }

/* Menu lateral: trilho de ícones; aberto, passa por cima do conteúdo. */
.app-side {
    position: fixed;
    z-index: 45;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--trilho);
    background: var(--lado-fundo);
    color: var(--lado-texto);
    display: flex;
    flex-direction: column;
    padding: 12px 10px 14px;
    gap: 14px;
    overflow: hidden;
    transition: width .26s cubic-bezier(.22, .8, .24, 1), box-shadow .26s ease;
}
.app-side.open { width: var(--lado-aberto); box-shadow: 8px 0 40px rgba(0, 0, 0, .28); overflow-y: auto; }

.side-head { display: flex; align-items: center; gap: 6px; min-height: 44px; }
.app-logo { position: relative; display: flex; align-items: center; padding: 4px; text-decoration: none; min-height: 44px; }
/* Logos verdes da Genesis em branco sobre o trilho. */
.app-logo img { filter: brightness(0) invert(1); }
/* Os dois logos ficam sobrepostos e trocam por opacidade (sem salto). */
.app-logo .logo-mark { width: 36px; height: 36px; margin-left: 2px; flex: none; transition: opacity .18s ease; }
.app-logo .logo-full { position: absolute; left: 6px; top: 50%; width: 160px; height: auto; max-width: none; opacity: 0; transform: translateY(-50%); transition: opacity .2s ease; pointer-events: none; }
.app-side.open .logo-mark { opacity: 0; }
.app-side.open .logo-full { opacity: 1; transition-delay: .06s; }

.rail-btn {
    width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--lado-texto);
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.rail-btn:hover { background: var(--lado-hover); }
.side-close { margin-left: auto; opacity: 0; visibility: hidden; transition: opacity .15s ease, visibility 0s linear .15s; }
.app-side.open .side-close { opacity: 1; visibility: visible; transition: opacity .2s ease .08s, visibility 0s; }

.app-sub { opacity: 0; transition: opacity .12s ease; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--lado-mudo); padding: 0 8px; margin-top: -8px; white-space: nowrap; }
.app-side.open .app-sub { opacity: 1; transition: opacity .2s ease .08s; }

.app-nav { display: grid; gap: 4px; margin: 0; }

.app-nav > a,
.nav-grupo > summary,
.nav-botao {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    color: var(--lado-texto);
    text-decoration: none;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: .85;
    cursor: pointer;
    list-style: none;
    background: none;
    border: 0;
    width: 100%;
    text-align: left;
}
.nav-grupo > summary::-webkit-details-marker { display: none; }
.app-nav > a:hover, .nav-grupo > summary:hover, .nav-botao:hover { background: var(--lado-hover); opacity: 1; }
.app-nav > a[aria-current="page"], .nav-grupo.ativo > summary { background: var(--lado-ativo); opacity: 1; box-shadow: inset 3px 0 0 #8fe0b6; }
.app-nav .icone { width: 20px; height: 20px; }

/* Rótulos: somem rápido ao fechar; ao abrir, entram deslizando depois que a largura começa a crescer. */
.app-nav .lbl { opacity: 0; transform: translateX(-6px); transition: opacity .1s ease, transform .1s ease; }
.app-side.open .app-nav .lbl { opacity: 1; transform: none; transition: opacity .2s ease .07s, transform .24s cubic-bezier(.22, .8, .24, 1) .07s; }
.nav-grupo .seta { margin-left: auto; display: inline-flex; opacity: 0; transition: transform .15s, opacity .1s ease; }
.nav-grupo .seta .icone { width: 16px; height: 16px; }
.app-side.open .nav-grupo .seta { opacity: .8; transition: transform .15s, opacity .2s ease .07s; }
.nav-grupo[open] .seta { transform: rotate(90deg); }

/* Subitens abrem e fecham deslizando (0fr → 1fr) em vez de surgirem de uma vez. */
.nav-sub { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .2s ease, opacity .12s ease; }
.nav-sub > div { overflow: hidden; display: grid; gap: 2px; min-height: 0; }
.nav-sub > div::before, .nav-sub > div::after { content: ""; display: block; }
.nav-sub > div::before { height: 0; } .nav-sub > div::after { height: 4px; }
.app-side.open .nav-grupo[open] .nav-sub { grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows .26s cubic-bezier(.22, .8, .24, 1) .04s, opacity .2s ease .1s; }
.nav-sub a {
    display: block; padding: 7px 12px 7px 46px; border-radius: 8px; color: var(--lado-texto); opacity: .78;
    text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.nav-sub a:hover { background: var(--lado-hover); opacity: 1; }
.nav-sub a[aria-current="page"] { opacity: 1; color: #fff; background: var(--lado-hover); box-shadow: inset 3px 0 0 #8fe0b6; }

.side-foot { margin-top: auto; display: grid; gap: 6px; }
.side-foot .who { opacity: 0; transition: opacity .12s ease; font-size: 12px; color: var(--lado-mudo); padding: 0 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-side.open .side-foot .who { opacity: 1; transition: opacity .2s ease .08s; }

.side-backdrop { position: fixed; inset: 0; z-index: 44; background: rgba(0, 0, 0, .28); display: none; }
.side-backdrop.show { display: block; }

/* Celular: o trilho some; o ☰ da barra abre o menu inteiro. */
@media (max-width: 759px) {
    .app-side { transform: translateX(-100%); width: var(--lado-aberto); transition: transform .2s ease; }
    .app-side.open { transform: none; }
    .app-side .app-nav .lbl { opacity: 1; transform: none; }
    .app-side .logo-mark { opacity: 0; }
    .app-side .logo-full { opacity: 1; }
    .app-side .side-close { opacity: 1; visibility: visible; }
    .app-side .app-sub, .app-side .side-foot .who { opacity: 1; }
    .app-side .nav-grupo .seta { opacity: .8; }
    .app-side .nav-grupo[open] .nav-sub { grid-template-rows: 1fr; opacity: 1; }
    .app-top { padding: 0 16px; gap: 8px; }
    .top-usuario { display: none; }
    main { padding: 16px; }
}

@media (max-width: 480px) { .top-btn .lbl { display: none; } .top-btn { padding: 0 11px; } }

@media (prefers-reduced-motion: reduce) { .app-side, .app-side * { transition: none !important; } }

/* ---------- Componentes ---------- */

.cartao {
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--sombra);
}

.cartao h2 { font-size: 15px; font-weight: 750; margin-bottom: 4px; }
.cartao .subtitulo { color: var(--texto-suave); font-size: 13px; margin: 0 0 16px; }

.aviso {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--verde-claro);
    border: 1px solid #c6dccf;
    border-radius: var(--raio);
    padding: 12px 16px;
    margin-bottom: 20px;
    color: var(--verde-escuro);
}

.aviso p { margin: 0; }

.saudacao { margin-bottom: 20px; }
.saudacao h1 { font-size: 25px; font-weight: 800; letter-spacing: -.02em; }
.saudacao p { margin: 4px 0 0; color: var(--texto-suave); }

.grade-indicadores {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.indicador {
    display: block;
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-top: 3px solid var(--info);
    border-radius: var(--raio);
    padding: 14px 16px;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--sombra);
    transition: transform .15s ease, border-color .15s ease;
}

.indicador:hover { border-color: rgba(10, 107, 71, .4); transform: translateY(-1px); }
.indicador.alerta { border-top-color: var(--alerta); }
.indicador.sucesso { border-top-color: var(--sucesso); }
.indicador .rotulo { font-size: 13px; font-weight: 600; }
.indicador .valor { font-size: 28px; font-weight: 700; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.indicador .detalhe { font-size: 12px; color: var(--texto-suave); }

.vazio { color: var(--texto-suave); }

.grade-paineis {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 960px) {
    .grade-paineis { grid-template-columns: 1fr; }
}

.grafico-vazio {
    height: 220px;
    border: 1px dashed var(--borda);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--texto-suave);
    padding: 16px;
    background:
        repeating-linear-gradient(to top, transparent 0, transparent 43px, var(--fundo) 43px, var(--fundo) 44px);
}

.lista-pendencias { list-style: none; margin: 0; padding: 0; }
.lista-pendencias li { border-top: 1px solid var(--borda); }
.lista-pendencias li:first-child { border-top: 0; }
.lista-pendencias a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    color: inherit;
    text-decoration: none;
}
.lista-pendencias a:hover { color: var(--verde); }
.lista-pendencias .valor { font-weight: 700; font-variant-numeric: tabular-nums; }

.atalhos { display: flex; flex-wrap: wrap; gap: 8px; }
.atalho {
    border: 1px solid var(--borda);
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--texto);
    text-decoration: none;
    background: var(--fundo);
}
.atalho:hover { border-color: var(--verde); color: var(--verde); }

/* Abas (ex.: Faturamento / Aflatoxinas / Outros Produtos) */
.abas {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--borda);
    margin-bottom: 20px;
    overflow-x: auto;
    overflow-y: hidden;
}

.aba {
    padding: 10px 16px;
    color: var(--texto-suave);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    font-weight: 600;
}

.aba:hover { color: var(--verde); }
.aba.ativa { color: var(--verde); border-bottom-color: var(--verde); }

/* Tela de módulo em migração */
.migracao { max-width: 720px; }
.migracao .grupo { color: var(--texto-suave); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.migracao h1 { font-size: 22px; margin: 4px 0 12px; }
.migracao .descricao { font-size: 15px; margin: 0 0 20px; }
.migracao dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 20px; }
.migracao dt { color: var(--texto-suave); }
.migracao dd { margin: 0; }

.botao {
    display: inline-block;
    background: linear-gradient(135deg, var(--verde-medio) 0%, var(--verde) 60%, var(--verde-escuro) 100%);
    color: #fff;
    border-radius: 10px;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 8px 18px -12px rgba(4, 73, 48, .7);
}
.botao:hover { filter: brightness(1.08); }

/* Tela sem menu (erro de acesso): box branco centralizado sobre o verde profundo do login, com a foto bem suave. */
.fundo-agro {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background:
        radial-gradient(60% 60% at 20% 10%, rgba(31, 194, 131, .35), transparent 70%),
        radial-gradient(50% 50% at 90% 90%, rgba(11, 122, 79, .45), transparent 70%),
        var(--verde-profundo);
}

.fundo-agro::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('../img/fundo-login.jpg') center / cover no-repeat;
    opacity: .18;
    mix-blend-mode: luminosity;
}

.tela-simples {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--superficie);
    border-radius: 18px;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55);
    padding: 32px;
}

/* Dentro do box, as seções não têm moldura própria; seções seguintes ganham um separador. */
.tela-simples .cartao { border: 0; border-radius: 0; padding: 0; background: none; }
.tela-simples .cartao + .cartao { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--borda); }
.tela-simples h2 { text-align: center; }
.tela-simples .subtitulo { text-align: center; }

.marca-simples { display: flex; justify-content: center; margin-bottom: 22px; }
.marca-simples .logo-speed { font-size: 40px; }

/* Logo do Speed (partials/logo-speed): símbolo da Genesis + "Speed" em Figtree 800, nas proporções do logo Genesis. */
.logo-speed { display: inline-flex; align-items: center; gap: .3em; font: 800 44px/1 "Figtree", var(--fonte); color: var(--verde); letter-spacing: -.01em; white-space: nowrap; }
.logo-speed img { height: .92em; width: auto; flex: none; }
.botao-bloco { display: block; width: 100%; border: 0; cursor: pointer; font: inherit; font-weight: 600; text-align: center; }
.botao-secundario { background: var(--superficie); color: var(--verde); border: 1px solid var(--verde); }
.botao-secundario:hover { background: var(--verde-claro); }
.tela-simples .cartao.alerta { border-left: 4px solid var(--perigo); padding-left: 16px; }
.campo { margin-bottom: 14px; }
.campo label { display: block; margin-bottom: 4px; font-weight: 600; }
.campo input { width: 100%; padding: 8px 10px; border: 1px solid var(--borda); border-radius: 6px; font: inherit; }
.erro-campo { color: var(--perigo); }
.dica { font-size: 13px; color: var(--texto-suave); }

/* ---------- Faturas ---------- */

/* Telas com tabela larga usam a largura toda. */
main.main-largo { max-width: none; }

/* Aviso de uma linha (telas com muito conteúdo). */
.aviso.aviso-compacto { margin-bottom: 12px; padding: 8px 14px; font-size: 13px; align-items: center; }
.aviso-compacto .icone { width: 16px; height: 16px; }

/* Filtro: linha principal com os campos mais usados e os botões; o resto em "Mais filtros". */
.filtros { padding: 14px 16px; margin-bottom: 12px; }

.filtros-principal {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .85fr) minmax(0, .85fr);
    gap: 0 10px;
    align-items: end;
}


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

@media (max-width: 1400px) {
    .filtros-linha { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .filtros-principal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .filtros-linha { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .filtros-principal, .filtros-linha { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filtros-principal .campo:has(select[data-dependente]) { grid-column: 1 / -1; }
    .filtros-rodape .acoes { width: 100%; }
    .filtros-rodape .acoes .botao { flex: 1; text-align: center; }
}

.filtros .campo { margin-bottom: 10px; min-width: 0; }
.filtros .campo label, .filtros .rotulo-campo { display: block; margin-bottom: 3px; font-weight: 600; font-size: 12px; color: var(--texto-suave); }
.filtros input:not([type="checkbox"]), .filtros select, .valor-fixo, .multipla summary {
    width: 100%;
    height: 38px;
    padding: 5px 9px;
    border: 1px solid var(--borda);
    border-radius: 10px;
    font: inherit;
    font-size: 13px;
    background: var(--superficie);
    color: var(--texto);
}
.filtros input:focus, .filtros select:focus, .multipla summary:focus { outline: 2px solid var(--verde-claro); border-color: var(--verde); }
.valor-fixo { display: flex; align-items: center; background: var(--fundo); }

.filtros .botao { border: 0; cursor: pointer; font: inherit; font-weight: 600; height: 38px; padding: 6px 16px; border-radius: 10px; white-space: nowrap; }
.filtros .botao-secundario { border: 1px solid var(--verde); }

/* Filtro inteiro recolhível: "Ocultar" (aberto, padrão) / "Mostrar" (fechado, com o resumo do que está filtrado). */
.filtro-dobra > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    min-height: 34px;
    user-select: none;
}
.filtro-dobra > summary::-webkit-details-marker { display: none; }
.filtro-dobra[open] > summary { margin-bottom: 10px; }
.filtro-titulo { font-weight: 750; font-size: 15px; color: var(--texto); flex: none; }
.filtro-resumo { min-width: 0; flex: 1; font-size: 12.5px; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filtro-dobra[open] .filtro-resumo { visibility: hidden; }
.filtro-alternar {
    margin-left: auto; flex: none;
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 12px; border-radius: 10px;
    border: 1px solid var(--borda); background: var(--superficie);
    color: var(--verde-medio); font-size: 13px; font-weight: 700;
}
.filtro-dobra > summary:hover .filtro-alternar { border-color: rgba(10, 107, 71, .45); background: var(--verde-claro); }
.filtro-alternar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.filtro-dobra:not([open]) .filtro-alternar svg { transform: rotate(180deg); }
.filtro-dobra .quando-fechado, .filtro-dobra:not([open]) .quando-aberto { display: none; }
.filtro-dobra:not([open]) .quando-fechado { display: inline; }
.filtro-dobra > summary:focus-visible { outline: 2px solid var(--verde-medio); outline-offset: 2px; border-radius: 10px; }

/* Campos complementares (antes em "Mais filtros"), sempre visíveis com o filtro aberto. */
.filtros-extra { border-top: 1px dashed var(--borda); padding-top: 10px; }

/* Rodapé do filtro: opções em "chips" marcáveis e os botões no fim. */
.filtros-rodape {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
    margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--borda);
}
.filtros-rodape .acoes { display: flex; gap: 8px; margin-left: auto; }
.filtros-opcoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.filtros-opcoes .dica { font-size: 12px; color: var(--texto-mudo); }
.filtros-opcoes .opcao {
    display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 10px;
    border: 1px solid var(--borda); border-radius: 999px; background: var(--superficie);
    font-size: 13px; font-weight: 600; color: var(--texto); cursor: pointer; user-select: none;
    transition: background .12s, border-color .12s, color .12s;
}
.filtros-opcoes .opcao small { font-weight: 500; color: var(--texto-suave); }
.filtros-opcoes .opcao:hover { border-color: rgba(10, 107, 71, .35); background: var(--superficie-2); }
.filtros-opcoes .opcao:has(input:checked) { background: var(--verde-claro); border-color: rgba(10, 107, 71, .45); color: var(--verde-medio); }
.filtros-opcoes .opcao:has(input:focus-visible) { outline: 2px solid var(--verde-medio); outline-offset: 2px; }
.filtros .filtros-opcoes .opcao input {
    appearance: none; -webkit-appearance: none; flex: none; margin: 0; width: 17px; height: 17px;
    border: 1.5px solid #b9c8bf; border-radius: 5px; background: #fff center / 11px no-repeat; cursor: pointer;
    transition: background-color .12s, border-color .12s;
}
.filtros .filtros-opcoes .opcao input:checked {
    border-color: var(--verde-medio); background-color: var(--verde-medio);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.filtros-opcoes .opcao input:focus { outline: none; }

/* Lista de situações com caixas de seleção (sem plugin). */
.multipla { position: relative; }
.multipla summary {
    list-style: none;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 28px;
    line-height: 22px;
}
.multipla summary::-webkit-details-marker { display: none; }
.multipla summary::after { content: "▾"; position: absolute; right: 10px; top: 6px; color: var(--texto-suave); }
.multipla-opcoes {
    position: absolute;
    z-index: 5;
    top: 38px;
    left: 0;
    min-width: 260px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    padding: 6px 0;
}
.multipla-opcoes label { display: flex; gap: 8px; align-items: center; padding: 5px 12px; font-weight: 400 !important; font-size: 13px !important; color: var(--texto) !important; margin: 0 !important; cursor: pointer; }
.multipla-opcoes label:hover { background: var(--verde-claro); }
/* .campo input (login) deixa campos com 100% de largura; caixas de seleção não. */
.filtros input[type="checkbox"] { width: auto; margin: 0; padding: 0; flex-shrink: 0; accent-color: var(--verde); }

/* Totalizadores: faixa de indicadores, cada um com a sua cor; só o valor final em destaque. */
.totais {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.3fr);
    gap: 10px;
    margin-bottom: 12px;
}

.total {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-left: 4px solid var(--cor-total, var(--borda));
    border-radius: var(--raio);
    padding: 8px 14px;
    min-width: 0;
}
.total .rotulo { font-size: 12px; font-weight: 600; color: var(--texto-suave); }
.total .valor {
    font-size: 18px;
    font-weight: 700;
    color: var(--texto);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.total-pedidos { --cor-total: var(--info); }
.total-volume { --cor-total: #7a5fb0; }
.total-valor { --cor-total: #2c8c8a; }
.total-desconto { --cor-total: var(--alerta); }
.total-desconto .valor { color: var(--alerta); }
.total-final { --cor-total: var(--verde); background: var(--verde-claro); border-color: #c6dccf; border-left-color: var(--verde); }
.total-final .rotulo { color: var(--verde-escuro); }
.total-final .valor { color: var(--verde); font-size: 22px; }

@media (max-width: 1100px) {
    .totais { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .total-final { grid-column: 1 / -1; }
}

.lista-cabecalho { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; }
.lista-cabecalho .periodo { margin-left: auto; }
.lista-cabecalho h2 { margin: 0; }
.lista-vazia { text-align: center; font-size: 16px; padding: 40px 0; margin: 0; }

.tabela-rolagem { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }

.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela th {
    text-align: left;
    font-size: 11.5px;
    color: var(--texto-mudo);
    font-weight: 700;
    padding: 9px 10px;
    border-bottom: 1px solid var(--borda);
    white-space: nowrap;
    background: var(--superficie-2);
}
.tabela th:first-child { border-top-left-radius: 10px; }
.tabela th:last-child { border-top-right-radius: 10px; }
.tabela td { padding: 9px 10px; border-bottom: 1px solid #e2e8e4; vertical-align: top; }
.tabela tbody tr:hover { background: var(--superficie-2); }
.tabela tbody tr:last-child td { border-bottom: 0; }
.tabela .num { text-align: left; font-variant-numeric: tabular-nums; }
.tabela .centro { text-align: left; }
/* Títulos e conteúdo das tabelas sempre à esquerda (inclusive colunas numéricas e de ícones). */
.tabela th, .tabela th.num, .tabela th.centro { text-align: left; }
.tabela .nowrap { white-space: nowrap; }
.tabela-faturas .cliente { min-width: 220px; }
.tabela-faturas .cliente strong { display: block; font-weight: 600; font-size: 11px; }
.tabela-faturas .cnpj { color: var(--texto-suave); font-size: 12px; }
/* Lista de faturas: textos em até 12px (nome do cliente 11px). */
.tabela-faturas { font-size: 12px; }
/* Colunas curtas só com a largura do conteúdo; o espaço que sobra vai para Cliente e Produtos. */
.tabela-faturas th, .tabela-faturas td { width: 1%; }
.tabela-faturas .cliente, .tabela-faturas .produtos { width: auto; }
/* Situações longas ("Pendente desc. não conformidade (...)") quebram em até duas linhas em vez de alargar a coluna. */
.tabela-faturas .situacao { white-space: normal; max-width: 150px; line-height: 1.3; border-radius: 8px; }
.tabela-faturas .produtos { min-width: 90px; color: var(--texto-suave); }
/* Serviço e Situação com espaço para "Silo Bag - Extraído" e "A Faturar" numa linha só. */
.tabela-faturas .col-servico { min-width: 130px; }
.tabela-faturas .col-situacao { min-width: 140px; }

/* Mesmas marcações de linha do SPEED atual. */
.tabela-faturas tr.pendente-desconto td { background: var(--alerta-fundo); }
.tabela-faturas tr.conciliado-broncas td { background: var(--info-fundo); }

.situacao { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--fundo); color: var(--texto); }
.situacao-sucesso { background: var(--sucesso-fundo); color: var(--sucesso); }
.situacao-perigo { background: #fbe9ea; color: var(--perigo); }
.situacao-info { background: var(--info-fundo); color: var(--info); }
.situacao-alerta { background: var(--alerta-fundo); color: var(--alerta); }

.selo { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--borda); border-radius: 8px; font-size: 11px; color: var(--texto-suave); white-space: nowrap; }
.marcador {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; margin-left: 4px; border-radius: 50%;
    background: var(--texto); color: #fff; font-size: 11px; font-weight: 700; cursor: help; vertical-align: middle;
}
.marcador.info { background: var(--info); }
button.marcador { border: 0; padding: 0; font-family: inherit; line-height: 1; cursor: pointer; transition: transform .12s, box-shadow .12s, opacity .12s; }
button.marcador:hover { transform: scale(1.15); box-shadow: 0 0 0 3px rgba(32, 129, 181, .18); }
button.marcador:focus-visible { outline: 2px solid var(--verde-medio); outline-offset: 2px; }
.marcador.marcador-alerta { background: var(--perigo); }
.marcador.marcador-alerta:hover { box-shadow: 0 0 0 3px rgba(192, 57, 43, .18); }
/* Sem informações: só aparece ao passar o mouse na linha (quem pode editar), como no SPEED atual. */
.marcador.marcador-vazio { opacity: 0; background: var(--texto-suave); }
.tabela-faturas tr:hover .marcador-vazio, .marcador-vazio:focus-visible { opacity: .55; }
.tabela-faturas tr:hover .marcador-vazio:hover { opacity: 1; }

/* Janelas dos ícones da lista (informações, descontos, observações). */
.janela.janela-larga { width: min(860px, calc(100vw - 32px)); }
.janela .tabela-rolagem { margin: 0 0 8px; padding: 0; max-height: 55vh; overflow: auto; }
.janela .tabela { width: 100%; font-size: 12px; }
.janela .tabela td.motivo { min-width: 260px; }
.janela-sub { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--texto-suave); }
.janela .rotulo-campo { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.janela textarea[readonly] { background: var(--fundo); }
.janela .tabela td.valor-desconto { color: var(--perigo); font-weight: 600; white-space: nowrap; }
.janela .tabela td.nowrap { white-space: nowrap; }
.lista-anexos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lista-anexos a { display: inline-block; padding: 3px 10px; border-radius: 10px; border: 1px solid var(--borda); background: var(--verde-claro); color: var(--verde-medio); font-size: 12.5px; font-weight: 600; text-decoration: none; word-break: break-all; }
.lista-anexos a:hover { border-color: var(--verde-medio); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.paginacao { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 16px; }
.botao.desabilitado { opacity: .45; pointer-events: none; }

@media (max-width: 860px) {
    .tabela-rolagem { margin: 0 -16px; padding: 0 16px; }
}

/* ---------- Detalhe da fatura ---------- */

.botao-pequeno { padding: 4px 12px; font-size: 13px; }
.lista-cabecalho .botao-pequeno { border: 1px solid var(--verde); }

.detalhe-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; }
.detalhe-cliente { font-size: 18px; font-weight: 700; }
.situacao-grande { font-size: 13px; padding: 4px 12px; }
.detalhe-acoes { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.detalhe-acoes .botao-secundario { border: 1px solid var(--verde); }

.detalhe-grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; align-items: start; }
.detalhe-grade-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .detalhe-grade, .detalhe-grade-2 { grid-template-columns: 1fr; } }

.detalhe-grade h2, .bloco-detalhe h2 { margin-bottom: 10px; }
.bloco-detalhe { margin-bottom: 12px; }

.dados { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 13px; }
.dados dt { color: var(--texto-suave); }
.dados dd { margin: 0; overflow-wrap: anywhere; }
.dados-texto { grid-template-columns: 1fr; gap: 2px; }
.dados-texto dd { margin-bottom: 8px; }

/* Histórico em linha do tempo (mesmas cores do C#). */
.linha-tempo { list-style: none; margin: 0; padding: 0; }
.linha-tempo li { position: relative; padding: 0 0 14px 22px; font-size: 13px; }
.linha-tempo li::before { content: ""; position: absolute; left: 3px; top: 5px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--cor-tom, var(--info)); background: var(--superficie); }
.linha-tempo li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--borda); }
.linha-tempo li:last-child::after { display: none; }
.linha-tempo-topo { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.linha-tempo .autor { font-weight: 600; }
.tom-sucesso { --cor-tom: var(--sucesso); }
.tom-perigo { --cor-tom: var(--perigo); }
.tom-alerta { --cor-tom: var(--alerta); }
.tom-info { --cor-tom: var(--info); }
.tom-neutro { --cor-tom: var(--texto-suave); }
.tabela .coluna-local { min-width: 220px; }

/* Dashboard: título do bloco de indicadores com o período. */
.titulo-indicadores { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.titulo-indicadores h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-suave); }
.titulo-indicadores .dica { font-size: 12px; }

/* ---------- Ações da fatura ---------- */

.detalhe-acoes form { margin: 0; }
.detalhe-acoes .botao { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.botao-sucesso { background: var(--sucesso); }
.botao-sucesso:hover { background: #1b7315; }
.botao-perigo { background: var(--perigo); }
.botao-perigo:hover { background: #941520; }
.botao:disabled { opacity: .6; cursor: wait; }

.mensagem { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--raio); font-weight: 600; }
.mensagem-sucesso { background: var(--sucesso-fundo); color: var(--sucesso); border: 1px solid #c7e6c4; }
.mensagem-erro { background: #fbe9ea; color: var(--perigo); border: 1px solid #f1c6ca; }

.janela {
    width: min(560px, calc(100vw - 32px));
    border: 0;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
    color: var(--texto);
}
.janela::backdrop { background: rgba(0, 0, 0, .45); }
.janela h2 { font-size: 17px; margin-bottom: 14px; }
.janela .campo label { font-size: 13px; }
.janela textarea, .janela select, .janela input:not([type="file"]) {
    width: 100%; padding: 7px 10px; border: 1px solid var(--borda); border-radius: 6px; font: inherit; background: var(--superficie);
}
.janela input[type="file"] { width: 100%; padding: 0; border: 0; }
.janela .dica { display: block; margin-top: 4px; font-size: 12px; }
.janela-acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.janela-acoes .botao { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.janela-acoes .botao-secundario { border: 1px solid var(--verde); }

/* Atalhos de ação na lista de faturas. */
.acoes-linha { display: flex; gap: 4px; }
.acao-linha {
    display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600;
    text-decoration: none; border: 1px solid currentColor; white-space: nowrap;
}
.acao-aprovar { color: var(--sucesso); }
.acao-rejeitar { color: var(--perigo); }
.acao-linha:hover { background: var(--fundo); }

/* ---------- Tela de entrada (layouts/login), no padrão GenFlow: hero verde à esquerda, formulário à direita ---------- */

.pagina-login { background: var(--fundo); }

.login {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    padding: 0;
    max-width: none;
}

/* ===== Hero (esquerda), decorativo ===== */
.login-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background: var(--verde-profundo);
    padding: clamp(32px, 6vh, 72px) clamp(28px, 5.5vw, 88px);
    display: flex;
    flex-direction: column;
}

/* Foto da colheita bem suave por baixo do verde (referência ao agro). */
.login-foto {
    position: absolute; inset: 0; z-index: -4;
    background: url('../img/fundo-login.jpg') center / cover no-repeat;
    opacity: .22; mix-blend-mode: luminosity;
}

/* Aurora: manchas de luz que se movem devagar. */
.login-aurora { position: absolute; inset: -20%; z-index: -3; filter: blur(70px) saturate(1.2); opacity: 0; animation: login-aparecer 1.6s ease .1s forwards; }
.login-aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.login-aurora i:nth-child(1) { width: 60%; height: 60%; left: 5%; top: 0; background: #0b7a4f; animation: login-deriva1 18s ease-in-out infinite alternate; }
.login-aurora i:nth-child(2) { width: 55%; height: 55%; right: 0; top: 20%; background: #12965f; opacity: .7; animation: login-deriva2 22s ease-in-out infinite alternate; }
.login-aurora i:nth-child(3) { width: 50%; height: 50%; left: 25%; bottom: -5%; background: #1fc283; opacity: .45; animation: login-deriva3 26s ease-in-out infinite alternate; }

/* Grade de pontos que some nas bordas. */
.login-pontos {
    position: absolute; inset: 0; z-index: -2;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.2px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(70% 60% at 35% 40%, #000 0%, transparent 75%);
    mask-image: radial-gradient(70% 60% at 35% 40%, #000 0%, transparent 75%);
    opacity: 0; animation: login-aparecer 1.2s ease .5s forwards;
}
.login-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(2, 43, 28, .55) 0%, transparent 35%, transparent 60%, rgba(2, 43, 28, .5) 100%); }

.login-tag {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    margin-top: clamp(8px, 3vh, 32px); padding: 7px 14px 7px 10px; border-radius: 999px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
    font-size: 13px; font-weight: 600; color: #d6f5e6; backdrop-filter: blur(6px);
    animation: login-subir .8s cubic-bezier(.16, 1, .3, 1) .45s both;
}
.login-tag b { width: 8px; height: 8px; border-radius: 50%; background: #6ee8b0; animation: login-pulso 2.2s ease-out infinite; }

.login-hero h1 { position: relative; z-index: 1; margin: 18px 0 0; font-size: clamp(34px, 3.9vw, 60px); line-height: 1.04; font-weight: 800; letter-spacing: -.035em; max-width: 12em; }
.login-hero h1 .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.login-hero h1 .ln > span { display: block; animation: login-linha 1s cubic-bezier(.16, 1, .3, 1) both; }
.login-hero h1 .ln:nth-child(1) > span { animation-delay: .55s; }
.login-hero h1 .ln:nth-child(2) > span { animation-delay: .67s; }
.login-hero h1 .ln:nth-child(3) > span { animation-delay: .79s; }
.login-hero h1 em {
    font-style: normal;
    background: linear-gradient(90deg, #6ee8b0, #b7f7d6 40%, #3fbf86 70%, #6ee8b0);
    background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: login-reflexo 6s linear 1.8s infinite;
}
.login-hero p {
    position: relative; z-index: 1; margin: 20px 0 0; max-width: 25em;
    font-size: clamp(15px, 1.15vw, 18px); line-height: 1.65; color: rgba(225, 245, 235, .82);
    text-shadow: 0 1px 12px rgba(2, 43, 28, .6);
    animation: login-subir .9s cubic-bezier(.16, 1, .3, 1) .95s both;
}

/* Palco do gráfico: barras e curva subindo por trás do texto. */
.login-palco { position: relative; flex: 1; min-height: 300px; margin-top: 28px; z-index: 0; }
.login-barras { position: absolute; left: -8%; right: -8%; bottom: calc(-1 * clamp(32px, 6vh, 72px)); height: 190%; z-index: -1; }
.login-barras svg { width: 100%; height: 100%; display: block; overflow: visible; }
/* Colunas crescem da base, uma após a outra (--i no HTML); o ponto final aparece depois da curva. */
.login-barras .barra { transform-box: fill-box; transform-origin: 50% 100%; animation: login-crescer 1.1s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(.55s + var(--i, 0) * .07s); }
.login-barras .curva { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: login-desenhar 2s cubic-bezier(.16, 1, .3, 1) 1.3s forwards; }
.login-barras .ponto-final { opacity: 0; animation: login-aparecer .4s ease 2.6s forwards; }
.login-barras .brilho { opacity: 0; animation: login-aparecer .4s ease 2.6s forwards; }

/* ===== Formulário (direita) ===== */
.login-lado {
    position: relative; display: grid; place-items: center; padding: 48px clamp(20px, 5vw, 80px); overflow: hidden;
    background:
        radial-gradient(60% 50% at 100% 0%, rgba(63, 191, 134, .12), transparent 70%),
        radial-gradient(50% 45% at 0% 100%, rgba(4, 73, 48, .07), transparent 70%),
        var(--fundo);
}
.login-painel { width: 100%; max-width: 420px; }
.login-logo { display: inline-flex; font-size: clamp(40px, 3.4vw, 50px); margin-bottom: clamp(28px, 5vh, 48px); animation: login-subir .8s cubic-bezier(.16, 1, .3, 1) .35s both; }
.login-ola { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--verde-medio); animation: login-subir .8s cubic-bezier(.16, 1, .3, 1) .5s both; }
.login-titulo { margin: 10px 0 8px; font-size: clamp(28px, 2.4vw, 36px); line-height: 1.12; font-weight: 800; letter-spacing: -.025em; animation: login-subir .8s cubic-bezier(.16, 1, .3, 1) .58s both; }
.login-sub { margin: 0; color: var(--texto-suave); font-size: 15.5px; line-height: 1.55; animation: login-subir .8s cubic-bezier(.16, 1, .3, 1) .66s both; }

.login-form { margin: 30px 0 0; display: grid; gap: 16px; }
.login-form > * { animation: login-subir .8s cubic-bezier(.16, 1, .3, 1) both; }
.login-form > :nth-child(2) { animation-delay: .74s; }
.login-form > :nth-child(3) { animation-delay: .82s; }
.login-form > :nth-child(4) { animation-delay: .9s; }
.login-form > :nth-child(5) { animation-delay: .98s; }

/* Campo com ícone e rótulo flutuante. */
.login-campo {
    position: relative; height: 62px; border-radius: 14px; overflow: hidden;
    background: #fff; border: 1.5px solid var(--borda-forte); display: flex; align-items: center;
    transition: border-color .2s, box-shadow .25s; box-shadow: 0 1px 2px rgba(4, 73, 48, .04);
}
.login-campo:hover { border-color: #c4d4ca; }
.login-campo:focus-within { border-color: var(--verde-medio); box-shadow: 0 0 0 5px rgba(10, 107, 71, .1), 0 10px 24px -14px rgba(4, 73, 48, .35); }
.login-campo.erro { border-color: var(--perigo); box-shadow: 0 0 0 5px rgba(192, 57, 43, .09); }
.login-campo .ico { width: 21px; height: 21px; margin: 0 4px 0 18px; flex: none; fill: none; stroke: #8a9a91; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.login-campo:focus-within .ico { stroke: var(--verde-medio); }
.login-campo .caixa { position: relative; flex: 1; height: 100%; min-width: 0; }
.login-campo input {
    position: absolute; inset: 0; width: 100%; border: 0; outline: 0; background: transparent;
    font: inherit; font-size: 16px; font-weight: 600; color: var(--texto); padding: 24px 14px 6px 12px; letter-spacing: .01em;
}
.login-campo label { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 15.5px; color: #85948b; pointer-events: none; transition: all .18s cubic-bezier(.16, 1, .3, 1); }
.login-campo:focus-within label,
.login-campo input:not(:placeholder-shown) + label,
.login-campo input:-webkit-autofill + label { top: 17px; font-size: 12px; font-weight: 700; color: var(--verde-medio); letter-spacing: .02em; }
/* Preenchimento automático do navegador sem o fundo azul. */
.login-campo input:-webkit-autofill,
.login-campo input:-webkit-autofill:hover,
.login-campo input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset; box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: var(--texto); caret-color: var(--texto); transition: background-color 99999s ease 0s;
}

.login-olho { width: 44px; height: 44px; margin-right: 8px; border: 0; background: transparent; border-radius: 11px; display: grid; place-items: center; cursor: pointer; color: #8a9a91; flex: none; }
.login-olho:hover { background: #f0f6f2; color: var(--verde-medio); }
.login-olho[hidden] { display: none; }
.login-olho svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-olho .off { display: none; }
.login-olho[aria-pressed="true"] .on { display: none; }
.login-olho[aria-pressed="true"] .off { display: block; }

.login-msg { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.45; background: #fdecea; color: var(--perigo); }
.login-msg::before { content: "!"; flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--perigo); color: #fff; }
.login-msg span { flex: 1; }

.login-botao {
    position: relative; height: 60px; margin-top: 6px; border: 0; border-radius: 14px; color: #fff;
    font: inherit; font-size: 17px; font-weight: 700; letter-spacing: .01em;
    background: linear-gradient(135deg, #0a6b47 0%, #044930 55%, #033a26 100%);
    box-shadow: 0 14px 30px -14px rgba(4, 73, 48, .75), inset 0 1px 0 rgba(255, 255, 255, .14);
    display: inline-flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; overflow: hidden;
    transition: transform .2s cubic-bezier(.16, 1, .3, 1), box-shadow .25s;
}
.login-botao::before { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent); transform: skewX(-20deg); }
.login-botao:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -14px rgba(4, 73, 48, .8), inset 0 1px 0 rgba(255, 255, 255, .14); }
.login-botao:hover::before { animation: login-varrer .9s ease; }
.login-botao:active { transform: none; }
.login-botao:focus-visible { outline: 3px solid var(--verde-vivo); outline-offset: 3px; }
.login-botao svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.login-botao:hover svg { transform: translateX(5px); }
.login-botao .giro { display: none; width: 22px; height: 22px; border: 2.5px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; animation: login-girar .7s linear infinite; }
.login-botao.ocupado { pointer-events: none; }
.login-botao.ocupado .giro { display: block; }
.login-botao.ocupado .lbl, .login-botao.ocupado svg { display: none; }
.login-botao-secundario { height: 48px; font-size: 15px; background: #fff; color: var(--verde); border: 1.5px solid var(--verde); box-shadow: none; }
.login-botao-secundario:hover { box-shadow: none; background: var(--verde-claro); }

.login-dev { margin-top: 24px; padding-top: 14px; border-top: 1px dashed var(--borda-forte); font-size: 13px; color: var(--texto-suave); }
.login-dev summary { cursor: pointer; }
.login-dev p { margin: 8px 0 0; }
.login-dev .login-form { margin-top: 12px; }

.login-rodape { margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #8a9a91; font-size: 12.5px; animation: login-subir .8s cubic-bezier(.16, 1, .3, 1) 1.2s both; }
.login-rodape img { height: 24px; width: auto; opacity: .9; }
.login-cadeado { display: inline-flex; align-items: center; gap: 6px; }
.login-cadeado svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@keyframes login-aparecer { to { opacity: 1; } }
@keyframes login-subir { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes login-linha { from { transform: translateY(110%); } to { transform: none; } }
@keyframes login-crescer { from { transform: scaleY(0); opacity: 0; } 25% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes login-desenhar { to { stroke-dashoffset: 0; } }
@keyframes login-pulso { 0% { box-shadow: 0 0 0 0 rgba(110, 232, 176, .7); } 80%, 100% { box-shadow: 0 0 0 10px rgba(110, 232, 176, 0); } }
@keyframes login-reflexo { to { background-position: -200% 0; } }
@keyframes login-varrer { from { left: -60%; } to { left: 130%; } }
@keyframes login-girar { to { transform: rotate(360deg); } }
@keyframes login-deriva1 { to { transform: translate(18%, 12%) scale(1.15); } }
@keyframes login-deriva2 { to { transform: translate(-20%, 15%) scale(.9); } }
@keyframes login-deriva3 { to { transform: translate(10%, -18%) scale(1.2); } }

/* Notebook de tela baixa: menos espaço. */
@media (min-width: 901px) and (max-height: 820px) {
    .login-tag { margin-top: 0; }
    .login-hero h1 { margin-top: 12px; }
    .login-hero p { margin-top: 12px; }
    .login-logo { margin-bottom: 24px; }
    .login-palco { min-height: 160px; margin-top: 12px; }
}

/* Tablet e celular: hero vira faixa no topo, formulário embaixo. */
@media (max-width: 900px) {
    .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .login-hero { padding: 26px 22px 30px; }
    .login-tag { margin-top: 0; }
    .login-hero h1 { font-size: clamp(30px, 7vw, 44px); margin-top: 14px; }
    .login-hero p { font-size: 15px; margin-top: 12px; }
    .login-palco { position: absolute; inset: auto 0 0 auto; width: 55%; height: 100%; margin: 0; min-height: 0; opacity: .55; pointer-events: none; }
    .login-barras { bottom: -30px; height: 100%; }
    .login-lado { place-items: start center; padding: 34px 20px 40px; }
    .login-painel { max-width: 460px; }
}

@media (max-width: 480px) {
    .login-hero { padding: 22px 20px 26px; }
    .login-hero p { display: none; }
    .login-tag { font-size: 12px; }
    .login-logo { font-size: 38px; margin-bottom: 22px; }
    .login-titulo { font-size: 26px; }
    .login-form { margin-top: 26px; }
    .login-rodape { margin-top: 30px; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    .pagina-login *, .pagina-login *::before, .pagina-login *::after {
        animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important;
    }
}

/* Número do pedido na lista de faturas: badge clicável que abre o detalhe. */
.pedido-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px 2px 9px;
    border-radius: 999px;
    border: 1px solid rgba(10, 107, 71, .25);
    background: var(--verde-claro);
    color: var(--verde);
    font-weight: 700;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.pedido-link svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.pedido-link:hover { background: var(--verde); border-color: var(--verde); color: #fff; }
.pedido-link:hover svg { transform: translateX(2px); }
.pedido-link:focus-visible { outline: 2px solid var(--verde-medio); outline-offset: 2px; }

/* Lista de faturas: área de rolagem com a altura da tela (barra horizontal sempre visível), cabeçalho fixo e
   sombra na borda enquanto houver colunas escondidas (classes tem-mais-* ligadas por public/js/faturas.js). */
.tabela-moldura { position: relative; margin: 0 -20px; }
.tabela-moldura::before,
.tabela-moldura::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 28px; pointer-events: none; z-index: 3;
    opacity: 0; transition: opacity .15s;
}
.tabela-moldura::before { left: 0; background: linear-gradient(90deg, rgba(10, 40, 26, .14), transparent); }
.tabela-moldura::after { right: 0; background: linear-gradient(270deg, rgba(10, 40, 26, .14), transparent); }
.tabela-moldura.tem-mais-esquerda::before { opacity: 1; }
.tabela-moldura.tem-mais-direita::after { opacity: 1; }

.tabela-rolagem-lista {
    margin: 0;
    padding: 0 20px;
    max-height: calc(100vh - var(--topo-h) - 120px);
    max-height: calc(100dvh - var(--topo-h) - 120px);
    min-height: 260px;
    overflow: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(4, 73, 48, .35) transparent;
}
.tabela-rolagem-lista:focus-visible { outline: 2px solid var(--verde-medio); outline-offset: -2px; }
.tabela-rolagem-lista::-webkit-scrollbar { width: 10px; height: 10px; }
.tabela-rolagem-lista::-webkit-scrollbar-thumb { background: rgba(4, 73, 48, .3); border-radius: 10px; border: 2px solid var(--superficie); }
.tabela-rolagem-lista::-webkit-scrollbar-track { background: transparent; }
.tabela-rolagem-lista .tabela thead th { position: sticky; top: 0; z-index: 2; }

/* Telas menores: tabela mais compacta. */
@media (max-width: 1280px) {
    .tabela-faturas th, .tabela-faturas td { padding: 7px 8px; }
    .tabela-faturas .cliente { min-width: 180px; }
    .tabela-faturas .produtos { min-width: 80px; }
}

@media (max-width: 860px) {
    .tabela-moldura { margin: 0 -16px; }
    .tabela-rolagem-lista { padding: 0 16px; max-height: calc(100dvh - var(--topo-h) - 90px); }
    .tabela-faturas { font-size: 12px; }
    .tabela-faturas .cliente { min-width: 160px; }
}

/* Link da N.F. na lista: mesmo badge do pedido, num verde mais claro (abre a nota em nova aba). */
.nf-link { background: #f1f8f4; border-color: rgba(63, 191, 134, .35); color: var(--verde-medio); }
.nf-link svg { width: 12px; height: 12px; stroke-width: 2.2; margin-left: 2px; }
.nf-link:hover { background: var(--verde-vivo); border-color: var(--verde-vivo); color: #fff; }
.nf-link:hover svg { transform: translate(1px, -1px); }

/* Botões com ícone (detalhe e barra de seleção). */
.botao:has(> .icone) { display: inline-flex; align-items: center; gap: 6px; }
.botao > .icone { width: 16px; height: 16px; }
.botao.enviando { opacity: .6; cursor: wait; }
.botao-perigo-contorno { color: var(--perigo); border-color: rgba(192, 57, 43, .55) !important; }
.botao-perigo-contorno:hover { background: #fbe9ea; }
.botao-link { border: 0; background: none; padding: 4px 6px; font: inherit; font-size: 13px; font-weight: 600; color: var(--texto-suave); cursor: pointer; text-decoration: underline; }
.botao-link:hover { color: var(--texto); }

/* Detalhe: ações internas do Faturamento. */
.acoes-faturamento { margin-bottom: 16px; }
.acoes-faturamento h2 { margin-bottom: 10px; }
.acoes-faturamento-botoes { display: flex; flex-wrap: wrap; gap: 8px; }
.acoes-faturamento-botoes form { margin: 0; }
.acoes-faturamento-botoes .botao { border: 0; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; padding: 7px 14px; }
.acoes-faturamento-botoes .botao-secundario { border: 1px solid var(--verde); }
.acoes-faturamento .dica { margin: 10px 0 0; font-size: 12.5px; }
.opcoes-lista { border: 0; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.opcoes-lista .opcao { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.campos-lado { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .campos-lado { grid-template-columns: 1fr; } }

/* Lista: seleção e barra de ações do topo. */
.col-marcar { width: 1%; text-align: center !important; padding-left: 10px !important; padding-right: 4px !important; }
.col-marcar input { width: 15px; height: 15px; accent-color: var(--verde-medio); cursor: pointer; vertical-align: middle; }
.tabela-faturas tr.marcada td { background: #eef7f1; }
.barra-lote {
    position: sticky; top: calc(var(--topo-h, 64px) + 8px); z-index: 5;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin: 0 0 12px; padding: 8px 12px; border-radius: 12px;
    background: var(--verde-profundo); color: #fff; box-shadow: var(--sombra);
}
.barra-lote[hidden] { display: none; }
.barra-lote-contagem { margin-right: 6px; font-size: 13.5px; }
.barra-lote > .botao { border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
.barra-lote > .botao-secundario { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.barra-lote > .botao-secundario:hover { background: rgba(255, 255, 255, .2); }
.barra-lote > .botao-link { color: rgba(255, 255, 255, .8); margin-left: auto; }
.barra-lote > .botao-link:hover { color: #fff; }
.barra-lote .janela { color: var(--texto); }

/* Mega em simulação e ações de risco. */
.selo-alerta { margin-left: 0; margin-right: 4px; border-color: #e8c27a; background: #fff6e2; color: #8a5a00; font-weight: 700; }
.barra-lote > .botao-lote-perigo { border-color: rgba(255, 150, 140, .6); color: #ffd9d4; }
.barra-lote > .botao-lote-perigo:hover { background: rgba(192, 57, 43, .45); color: #fff; }
.mensagem-erro { white-space: pre-line; }
.barra-lote .janela .janela-acoes .botao { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.barra-lote .janela .janela-acoes .botao-secundario { border: 1px solid var(--verde); }
.barra-lote .janela h2 { color: var(--texto); }
.janela .opcoes-lista input[type="radio"] { width: auto; flex: none; margin: 0; padding: 0; accent-color: var(--verde-medio); }
.janela .opcoes-lista .opcao { justify-content: flex-start; text-align: left; }
.detalhe-grade > .bloco-detalhe { margin-bottom: 0; }
/* Descontos no detalhe (bloco estreito, ao lado dos dados da fatura). */
.lista-descontos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 340px; overflow-y: auto; }
.lista-descontos li { padding: 10px 12px; border: 1px solid var(--borda); border-radius: 10px; background: var(--fundo); }
.desconto-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.desconto-topo .selo { margin-left: 0; }
.desconto-valor { font-weight: 750; color: var(--perigo); white-space: nowrap; }
.desconto-motivo { margin: 0 0 4px; font-size: 13px; overflow-wrap: anywhere; }
.lista-descontos .dica { font-size: 12px; }
/* Situação da fatura na barra do topo, ao lado do número do pedido. */
.top-title .situacao-topo { margin-left: 10px; vertical-align: middle; font-size: 12px; }
.top-title .selo-topo { vertical-align: middle; font-weight: 600; }

/* Menu de relatórios da fatura (detalhe). */
.menu-relatorios { position: relative; }
.menu-relatorios > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; border: 1px solid var(--verde); }
.menu-relatorios > summary::-webkit-details-marker { display: none; }
.menu-relatorios > summary::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.menu-relatorios > summary .icone { width: 16px; height: 16px; }
.menu-relatorios-lista {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 340px; max-height: 70vh; overflow-y: auto;
    padding: 6px; border-radius: 12px; border: 1px solid var(--borda); background: var(--superficie); box-shadow: 0 16px 40px rgba(4, 73, 48, .18);
}
.menu-relatorios-grupo { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-suave); }
.menu-relatorios-grupo:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--borda); padding-top: 10px; }
.menu-relatorios-opcao { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--texto); text-decoration: none; font-size: 13px; }
.menu-relatorios-opcao:hover, .menu-relatorios-opcao:focus-visible { background: var(--verde-claro); color: var(--verde); }
.menu-relatorios-opcao small { margin-left: auto; font-size: 10.5px; color: var(--texto-suave); white-space: nowrap; }
.menu-relatorios-opcao.legado span:not(.formato) { color: var(--texto-suave); }
.formato { flex: none; min-width: 38px; padding: 2px 0; border-radius: 6px; font-size: 9.5px; font-weight: 800; text-align: center; letter-spacing: .04em; }
.formato-pdf { background: #fbe9ea; color: #b42318; }
.formato-xls, .formato-xlsx { background: #e3f4ea; color: #0a6b47; }
.formato-tela { background: #e8f3fa; color: #2081b5; }

/* Visualizar pedido (Relatório de Faturamento na tela) */
.pedido-tela-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.tabela-pedido td, .tabela-pedido th { white-space: nowrap; }
.tabela-pedido .num { text-align: right; }
.tabela-pedido td.aviso-linha { white-space: normal; min-width: 260px; color: #8a5a00; font-weight: 500; font-size: 12px; }
.tabela-pedido .linha-total td { background: #c8ddd0; font-weight: 750; }
.tabela-pedido .linha-os td { background: #e2efe7; font-weight: 650; }
.tabela-pedido .linha-dia td { padding-top: 6px; padding-bottom: 6px; }
.tabela-pedido .col-expandir { width: 34px; padding-left: 6px; padding-right: 0; }
.tabela-pedido .expandir {
    width: 22px; height: 22px; border-radius: 6px; border: 1px solid #c9d6ce; background: #fff;
    color: #0a6b47; font-weight: 700; line-height: 1; cursor: pointer;
}
.tabela-pedido .expandir:hover { background: #e3f4ea; }
.tabela-pedido .linha-cargas > td { background: #f7faf8; padding: 8px 10px 12px 44px; }
.tabela-cargas { border-collapse: collapse; font-size: 12px; }
.tabela-cargas th { text-align: left; background: #eef2ef; color: #33413a; padding: 5px 12px; font-weight: 650; }
.tabela-cargas td { padding: 4px 12px; border-bottom: 1px solid #e8ece9; }
.tabela-cargas .num { text-align: right; }

/* Select estilizado e pesquisável (public/js/selecao.js). O nativo fica escondido no formulário. */
.selecao { position: relative; min-width: 0; }
.selecao .selecao-nativo { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.selecao-botao {
    display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 5px 9px 5px 11px;
    border: 1px solid var(--borda); border-radius: 10px; background: var(--superficie); color: var(--texto);
    font: inherit; font-size: 13px; text-align: left; cursor: pointer;
    transition: border-color .12s, box-shadow .12s;
}
.selecao-botao:hover { border-color: rgba(10, 107, 71, .35); }
.selecao-botao:focus-visible, .selecao.aberta .selecao-botao { outline: none; border-color: var(--verde-medio); box-shadow: 0 0 0 3px var(--verde-claro); }
.selecao-botao:disabled { background: var(--fundo); color: var(--texto-mudo); cursor: not-allowed; }
.selecao-valor { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selecao-vazia .selecao-valor { color: var(--texto-mudo); }
.selecao-botao svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--verde-medio); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.selecao.aberta .selecao-botao svg { transform: rotate(180deg); }

.selecao-painel {
    position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; max-width: min(560px, 92vw);
    padding: 6px; border: 1px solid var(--borda-forte); border-radius: 12px; background: var(--superficie);
    box-shadow: 0 12px 32px rgba(10, 40, 26, .16), 0 2px 6px rgba(10, 40, 26, .06);
}
.selecao.para-cima .selecao-painel { top: auto; bottom: calc(100% + 6px); }
.filtros .selecao-painel input.selecao-busca, .selecao-busca {
    width: 100%; height: 34px; margin-bottom: 6px; padding: 5px 10px 5px 32px;
    border: 1px solid var(--borda); border-radius: 8px; font: inherit; font-size: 13px; color: var(--texto);
    background: var(--fundo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6f66' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 10px center / 15px;
}
.selecao-busca:focus { outline: none; border-color: var(--verde-medio); background-color: var(--superficie); }
.selecao-lista { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; outline: none; }
.selecao-lista li {
    position: relative; padding: 7px 30px 7px 10px; border-radius: 8px; font-size: 13px; line-height: 1.35;
    color: var(--texto); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.selecao-lista li.ativo { background: var(--superficie-2); }
.selecao-lista li[aria-selected="true"] { color: var(--verde-medio); font-weight: 700; background: var(--verde-claro); }
.selecao-lista li[aria-selected="true"]::after {
    content: ""; position: absolute; right: 10px; top: 50%; width: 5px; height: 9px; margin-top: -6px;
    border: solid var(--verde-medio); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.selecao-lista li.selecao-op-vazia { color: var(--texto-suave); font-style: italic; }
.selecao-lista mark { background: #fff1b8; color: inherit; border-radius: 3px; padding: 0 1px; }
.selecao-vazio { margin: 0; padding: 10px; font-size: 13px; color: var(--texto-suave); text-align: center; }

/* Selos de ambiente no topo: só com SPEED_DEV=true (DEV + situação do Mega). */
.selo-ambiente {
    display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
    font-size: 11px; font-weight: 800; letter-spacing: .06em; line-height: 1; flex: none;
}
.selo-dev { background: var(--alerta-fundo); color: var(--alerta); border: 1px solid rgba(181, 101, 29, .35); }
.selo-mega-ligado { background: #fdecea; color: var(--perigo); border: 1px solid rgba(192, 57, 43, .35); }
.selo-mega-desligado { background: var(--superficie-2); color: var(--texto-suave); border: 1px solid var(--borda-forte); }

/* Administração › Parametrização */
.parametrizacao-intro { margin: 0 0 12px; }
.parametrizacao { display: grid; gap: 14px; }
.parametro-topo { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.parametro-topo .subtitulo { margin-bottom: 12px; }
.parametro-total { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--superficie-2); color: var(--texto-suave); font-size: 12px; font-weight: 700; }
.parametro-usuarios { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.usuario-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 12px;
    border: 1px solid rgba(10, 107, 71, .3); border-radius: 999px; background: var(--verde-claro);
    color: var(--verde-medio); font-size: 13px; font-weight: 600;
}
.usuario-chip.novo { border-style: dashed; }
.usuario-remover {
    width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--verde-medio);
    font-size: 16px; line-height: 1; cursor: pointer;
}
.usuario-remover:hover { background: rgba(192, 57, 43, .12); color: var(--perigo); }
.parametro-vazio { color: var(--texto-mudo); font-size: 13px; }
.parametro-acoes { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--borda); padding-top: 12px; }
.parametro-adicionar { flex: 1; min-width: 240px; max-width: 520px; margin: 0; }
.parametro-adicionar label { display: block; margin-bottom: 3px; font-weight: 600; font-size: 12px; color: var(--texto-suave); }
.parametro .botao { border: 0; cursor: pointer; font: inherit; font-weight: 600; height: 38px; padding: 6px 18px; border-radius: 10px; }
.parametro.alterado .botao { box-shadow: 0 0 0 3px var(--verde-claro); }

/* Janela de desconto: não conformidades e três campos lado a lado. */
.campos-lado.campos-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 620px) { .campos-lado.campos-3 { grid-template-columns: 1fr; } }
.lista-broncas { max-height: 240px; overflow: auto; margin: 0 0 12px; border: 1px solid var(--borda); border-radius: 10px; padding: 0; }
.lista-broncas .tabela { font-size: 12.5px; }
.lista-broncas .tabela td, .lista-broncas .tabela th { padding: 6px 8px; }
.lista-broncas tr:has(input:checked) td { background: var(--verde-claro); }
.lista-broncas label { cursor: pointer; }

/* Lista: indicador do e-mail da N.F. */
.acao-linha.acao-email { color: var(--info); border-color: rgba(32, 129, 181, .35); }
.acao-linha.acao-email.enviado { color: var(--sucesso); border-color: rgba(35, 145, 27, .35); background: var(--sucesso-fundo); }

/* Clientes › Configuração do cliente */
.cfg-matriz .campo { max-width: 640px; margin: 0; }
.cfg-abas { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--borda); }
.cfg-aba { padding: 9px 14px; border-radius: 10px 10px 0 0; color: var(--texto-suave); font-weight: 600; font-size: 13.5px; text-decoration: none; border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; }
.cfg-aba:hover { color: var(--verde-medio); background: var(--superficie-2); }
.cfg-aba.ativa { color: var(--verde-medio); background: var(--superficie); border-color: var(--borda); }
.cfg-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.cfg-acoes-topo { display: flex; gap: 8px; flex-wrap: wrap; }
.cfg-linha-matriz td { background: var(--verde-claro); font-weight: 600; }
.cfg-bancarios { white-space: pre-line; max-width: 380px; font-size: 12.5px; }
.cfg-emails { max-width: 320px; word-break: break-word; font-size: 12.5px; }
.cfg-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 4px 0; cursor: pointer; }
.cfg-check input { width: auto; flex: none; accent-color: var(--verde); }
.cfg-envio { columns: 2 320px; column-gap: 24px; margin: 6px 0 14px; }
.cfg-rodape { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--borda); padding-top: 12px; margin-top: 8px; }
.cfg-inline { display: inline; margin: 0; }
.cfg-inline button { cursor: pointer; font: inherit; }
.cfg-filiais-lista details summary { cursor: pointer; color: var(--verde-medio); font-weight: 600; }
.cfg-filiais-lista ul { margin: 6px 0 0; padding-left: 16px; font-size: 12.5px; max-width: 360px; }
.cfg-hist-filtro { min-width: 280px; padding: 0; box-shadow: none; border: 0; background: transparent; margin: 0; }
.tabela-historico-preco td { font-size: 12.5px; }
.cfg-mudou { background: #fff6d9; font-weight: 700; }
.cfg-hist-excluida td { color: var(--texto-mudo); text-decoration: line-through; }
.cfg-hist-excluida td:last-child { text-decoration: none; }

.cfg-form input:not([type="checkbox"]):not([type="radio"]), .cfg-form select, .cfg-form textarea {
    width: 100%; height: 38px; padding: 5px 9px; border: 1px solid var(--borda); border-radius: 10px; font: inherit; font-size: 13px; background: var(--superficie); color: var(--texto);
}
.cfg-form .campo label { display: block; margin-bottom: 3px; font-weight: 600; font-size: 12px; color: var(--texto-suave); }
.cfg-grade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; margin-top: 6px; }
.cfg-grade .campo { margin-bottom: 12px; }
.cfg-largo { grid-column: span 2; }
@media (max-width: 900px) { .cfg-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cfg-grade { grid-template-columns: 1fr; } .cfg-largo { grid-column: auto; } }
.cfg-opcoes { margin: 2px 0 14px; padding: 0; box-shadow: none; border: 0; background: transparent; }
.cfg-bloco { border: 1px solid var(--borda); border-radius: 12px; padding: 10px 14px 12px; margin: 0 0 14px; }
.cfg-bloco legend { padding: 0 6px; font-weight: 700; font-size: 13px; color: var(--texto); }
.cfg-bloco legend small { font-weight: 500; color: var(--texto-suave); }
.cfg-pares { display: grid; gap: 6px; margin-bottom: 6px; }
.cfg-par { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; max-width: 560px; }
.cfg-busca-filial { max-width: 360px; margin: 2px 0 10px; }
.cfg-filiais { max-height: 360px; overflow: auto; columns: 2 300px; column-gap: 20px; }
.cfg-uf { break-inside: avoid; margin-bottom: 8px; }
.cfg-uf-topo { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--texto-suave); padding: 4px 0 2px; border-bottom: 1px dashed var(--borda); margin-bottom: 2px; }
.cfg-filial small { font-size: 11.5px; }
.cfg-filial:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.cfg-tipo-fixo { margin: 0 0 10px; font-size: 13px; color: var(--texto-suave); }
.cfg-check input[type="checkbox"] {
    appearance: none; -webkit-appearance: none; flex: none; margin: 0; width: 17px; height: 17px;
    border: 1.5px solid #b9c8bf; border-radius: 5px; background: #fff center / 11px no-repeat; cursor: pointer;
    transition: background-color .12s, border-color .12s;
}
.cfg-check input[type="checkbox"]:checked {
    border-color: var(--verde-medio); background-color: var(--verde-medio);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.cfg-check input[type="checkbox"]:focus-visible { outline: 2px solid var(--verde-medio); outline-offset: 2px; }
.cfg-check input[type="checkbox"]:disabled { background-color: var(--superficie-2); cursor: not-allowed; }

/* Follow-up */
.fu-filtros { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .fu-filtros { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fu-barra { position: sticky; top: 8px; z-index: 5; margin: 0 0 12px; }
.fu-dia-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.fu-dia-topo h2 { margin: 0; }
.fu-dia-totais { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--texto-suave); }
.fu-dia-totais b { color: var(--texto); }
.fu-tabela .fu-cliente td { background: var(--verde-claro); font-weight: 700; }
.fu-tabela .fu-cliente small { font-weight: 500; color: var(--texto-suave); margin-left: 6px; }
.fu-matriz { font-size: 12px; font-weight: 500; color: var(--texto-suave); }
.fu-acomp { min-width: 220px; }
.fu-prev { font-size: 12px; color: var(--texto-suave); margin-left: 6px; white-space: nowrap; }
.fu-obs { font-size: 12px; color: var(--texto-suave); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.fu-acoes { display: flex; gap: 4px; flex-wrap: wrap; }
.fu-acoes button.acao-linha { cursor: pointer; font: inherit; }
.fu-historico { list-style: none; margin: 0 0 12px; padding: 0; max-height: 420px; overflow: auto; }
.fu-historico li { padding: 10px 0; border-bottom: 1px solid var(--borda); }
.fu-historico p { margin: 6px 0 0; font-size: 13px; white-space: pre-line; }
.fu-hist-topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fu-quem { font-size: 12px; color: var(--texto-suave); margin-left: auto; }
.fu-excluir { color: var(--perigo); font-size: 12px; }
.fu-obs-texto { white-space: pre-line; font-size: 13.5px; line-height: 1.6; }

/* Indicador de carregamento (layout.js) */
.carregando { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.carregando[hidden] { display: none; }
.carregando-barra {
    position: absolute; top: 0; left: 0; height: 3px; width: 100%;
    background: linear-gradient(90deg, transparent 0, var(--verde-vivo) 30%, var(--verde-medio) 60%, transparent 100%);
    background-size: 40% 100%; background-repeat: no-repeat;
    animation: carregando-barra 1.1s ease-in-out infinite;
}
@keyframes carregando-barra { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.carregando.com-caixa { pointer-events: auto; background: rgba(243, 246, 244, .55); backdrop-filter: blur(1.5px); cursor: progress; }
.carregando-caixa {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.96);
    display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 14px;
    background: var(--superficie); border: 1px solid var(--borda-forte); box-shadow: var(--sombra);
    font-size: 14px; font-weight: 600; color: var(--texto); opacity: 0; transition: opacity .15s, transform .15s;
}
.carregando.com-caixa .carregando-caixa { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.carregando-giro {
    width: 20px; height: 20px; border-radius: 50%; flex: none;
    border: 2.5px solid var(--verde-claro); border-top-color: var(--verde-medio);
    animation: carregando-giro .7s linear infinite;
}
@keyframes carregando-giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .carregando-barra, .carregando-giro { animation-duration: 2.4s; }
}

/* Editar pedido */
.totais-edicao { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr); }
.tabela-edicao .col-marcar, .tabela-cargas .col-marcar { width: 30px; padding-right: 0; }
.tabela-edicao .cfg-check { padding: 0; }
.cfg-check input[type="checkbox"]:indeterminate {
    border-color: var(--verde-medio); background-color: var(--verde-medio);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");
}
.tabela-edicao .linha-os.os-removida td { background: #f6eeee; color: #9a8f8f; }
.tabela-edicao .linha-os.os-removida td:nth-child(3) { text-decoration: line-through; }
.tabela-edicao .linha-cargas > td { padding-left: 74px; }
.tabela-edicao [data-novo-os] { color: var(--verde); }
.edicao-pedido .lista-cabecalho { display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; }
.edicao-pedido .lista-cabecalho h2 { margin: 0; }
.edicao-rodape { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.total .valor.calculando { opacity: .45; }
@media (max-width: 1100px) { .totais-edicao { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Pedido de serviço */
.pedido-servico { max-width: 860px; }
.campos-lado.campos-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) { .campos-lado.campos-3, .campos-lado.campos-4 { grid-template-columns: 1fr 1fr; } }
.pedido-servico .campo textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--borda); border-radius: 6px; font: inherit; resize: vertical; }
.edicao-rodape .edicao-solicitacao { margin-right: auto; }

/* Dia Zero */
.dia-zero .lista-cabecalho { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.dia-zero .lista-cabecalho h2 { margin: 0; }
.dia-zero .lista-cabecalho .botao { margin-left: auto; }
.dz-legenda { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border: 1px solid #e4e9ef; border-radius: 999px; background: #f7f9fc; color: #535f6b; font-size: 12px; }
.dz-cliente { border: 1px solid var(--borda); border-radius: var(--raio); margin-bottom: 8px; background: var(--superficie); }
.dz-cliente > summary { cursor: pointer; padding: 10px 14px; font-weight: 650; background: #f5f7fa; border-radius: var(--raio); list-style: none; display: flex; align-items: center; gap: 8px; }
.dz-cliente > summary::-webkit-details-marker { display: none; }
.dz-cliente > summary::before { content: '+'; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid #c9d6ce; border-radius: 6px; color: var(--verde); font-weight: 700; }
.dz-cliente[open] > summary::before { content: '−'; }
.dz-qtd { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--texto-suave); }
.dz-tabela tr.dz-validada td { background: #edf7f0; }
.dz-status { display: inline-block; border-radius: 999px; padding: 3px 10px; line-height: 1.25; font-weight: 600; white-space: nowrap; }
.dz-status-validado { background: #dcefe1; color: #28633c; }
.dz-status-bf { background: #e6eef8; border: 1px solid #d0deef; color: #345476; }
.dz-cliente { overflow: hidden; }
.dz-cliente .tabela-rolagem { margin: 0; padding: 0; position: relative; }
.dz-tabela th, .dz-tabela td { vertical-align: middle; }
.dz-tabela .dz-curta { white-space: nowrap; }
.dz-tabela .dz-local { min-width: 220px; }
.dz-tabela th:first-child, .dz-tabela th:last-child { border-radius: 0; }
.dz-acoes { width: 1%; white-space: nowrap; }
.dz-botoes { display: flex; gap: 6px; justify-content: flex-end; }
.dz-botoes form { margin: 0; }
.dz-botao {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 650;
    cursor: pointer; border: 1px solid var(--verde-medio); background: #fff; color: var(--verde); transition: background-color .12s, color .12s;
}
.dz-botao .icone { width: 14px; height: 14px; }
.dz-botao:hover { background: var(--verde-medio); color: #fff; }
.dz-botao-desfazer { border-color: #c9d1cc; color: #55615a; }
.dz-botao-desfazer:hover { background: #eef2ef; color: #33413a; }
.dz-tabela th:nth-child(9), .dz-tabela th:nth-child(10) { min-width: 150px; }

/* ---------- Fórmulas de cálculo ---------- */
.fo-secao { margin-bottom: 20px; }
.fo-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fo-topo h2 { margin: 0; }
.fo-tabela .fo-nome { min-width: 200px; font-weight: 700; }
.fo-tabela .fo-nome a { color: var(--verde-medio); text-decoration: none; }
.fo-tabela .fo-nome a:hover { text-decoration: underline; }
.fo-tabela .fo-nome small { display: block; font-weight: 500; color: var(--texto-suave); margin-top: 2px; }
.fo-tabela code, .fo-codigo code { font-size: 12px; background: var(--superficie-2); padding: 1px 6px; border-radius: 6px; color: var(--texto-suave); }
.fo-acoes { width: 1%; white-space: nowrap; text-align: right; }
.fo-tabela td.num { width: 1%; }

.fo-grade { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 1100px) { .fo-grade { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); } }
.fo-lado { display: grid; gap: 20px; min-width: 0; }
.fo-lado .cartao h2 { margin-bottom: 12px; }
.fo-codigo { display: inline-flex; align-items: center; gap: 8px; }

.fo-form select, .fo-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--borda); border-radius: 6px; font: inherit; background: var(--superficie); }
.fo-form textarea { resize: vertical; }
.fo-blocos { border: 1px solid var(--borda-forte); border-radius: 12px; padding: 14px 16px 2px; margin: 4px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; min-width: 0; }
.fo-blocos legend { padding: 0 6px; font-weight: 750; font-size: 13px; color: var(--texto-suave); text-transform: uppercase; letter-spacing: .06em; }
.fo-blocos .fo-largo { grid-column: 1 / -1; }
.fo-blocos [hidden] { display: none; }
@media (max-width: 640px) { .fo-blocos { grid-template-columns: minmax(0, 1fr); } }
.fo-resumo { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--verde-claro); color: var(--verde-escuro); font-weight: 600; line-height: 1.45; }

.fo-sim-busca { display: flex; align-items: flex-end; gap: 10px; }
.fo-sim-busca .campo { flex: 1; margin-bottom: 0; }
.fo-sim-busca .botao { flex: none; }
[data-fo-sim-resultado] > * { margin-top: 14px; }
.fo-sim-cab { display: grid; gap: 2px; }
.fo-sim-cab span { color: var(--texto-suave); font-weight: 600; }
.fo-sim-cab small { color: var(--texto-suave); }
.fo-sim-tabela th:first-child { white-space: nowrap; }
.fo-sim-tabela td.num, .fo-sim-tabela th.num { text-align: right; white-space: nowrap; }
.fo-sim-tabela tbody th { font-weight: 600; text-align: left; padding: 9px 10px; border-bottom: 1px solid #e2e8e4; background: none; color: var(--texto); text-transform: none; letter-spacing: 0; font-size: 13px; }
.fo-sim-destaque { background: var(--verde-claro); }
.fo-sim-destaque th, .fo-sim-destaque td { font-weight: 750; color: var(--verde-escuro); }
.fo-sim-totais { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin-bottom: 0; }
.fo-sim-totais dt { color: var(--texto-suave); }
.fo-sim-totais dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.fo-sim-aviso { color: var(--alerta); font-size: 13px; }
.fo-sim-carregando { color: var(--texto-suave); }

.fo-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fo-lista a { color: var(--verde-medio); font-weight: 600; text-decoration: none; }
.fo-lista small { color: var(--texto-suave); margin-left: 4px; }
.fo-situacao { margin-top: 14px; }
.fo-historico { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fo-historico li { display: grid; gap: 1px; padding-left: 12px; border-left: 3px solid var(--borda-forte); }
.fo-historico span, .fo-historico small { color: var(--texto-suave); font-size: 12.5px; }
.fo-lado .lista-vazia { padding: 4px 0; text-align: left; font-size: 14px; color: var(--texto-suave); }
.fo-aviso { background: var(--alerta-fundo); color: var(--alerta); border: 1px solid rgba(181, 101, 29, .3); }
.fo-vazio { margin: 0; color: var(--texto-suave); }
.fo-resumo-celula { min-width: 260px; color: var(--texto-suave); }
.fo-blocos .fo-check { display: flex; align-items: center; }
.fo-blocos .fo-check label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; cursor: pointer; }
.fo-blocos .fo-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--verde-medio); }
.fo-blocos [data-fo-param][hidden] { display: none !important; }
.fo-tabela td.fo-acoes > * + * { margin-top: 4px; } .fo-tabela td.fo-acoes .botao { display: flex; justify-content: center; }
.cfg-speed2 { display: block; color: var(--texto-suave); font-size: 12px; }

/* ---------- Faturamento ---------- */
.ft-opcoes { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 6px; }
.ft-opcoes label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.ft-opcoes input { width: 16px; height: 16px; accent-color: var(--verde-medio); }
.ft-resumo { margin: 18px 0; }
.ft-resumo .indicador { display: grid; gap: 2px; }
.ft-resumo .indicador span { color: var(--texto-suave); font-size: 12.5px; font-weight: 600; }
.ft-resumo .indicador b { font-size: 18px; font-variant-numeric: tabular-nums; }
.ft-cliente { margin-bottom: 12px; padding: 0; overflow: hidden; }
.ft-cliente > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; }
.ft-cliente > summary::-webkit-details-marker { display: none; }
.ft-cliente > summary:hover { background: var(--superficie-2); }
.ft-cliente-nome { font-weight: 750; }
.ft-cliente-nome small { color: var(--texto-suave); font-weight: 600; margin-left: 6px; }
.ft-cliente-valores { display: flex; gap: 16px; align-items: baseline; color: var(--texto-suave); font-variant-numeric: tabular-nums; }
.ft-cliente-valores b { color: var(--verde-escuro); font-size: 15px; }
.ft-tabela-info { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; padding: 0 18px 12px; font-size: 13px; }
.ft-speed2 { color: var(--verde-medio); }
.ft-cliente .tabela-rolagem { margin: 0; padding: 0 0 4px; }
.ft-tabela td.num, .ft-tabela th.num { text-align: right; }
.ft-tabela tfoot th { background: var(--superficie-2); color: var(--texto); border-top: 1px solid var(--borda-forte); }
.ft-fim { display: block; color: var(--texto-suave); font-size: 11px; }
.ft-acoes { display: flex; justify-content: flex-end; padding: 12px 18px 16px; }
.ft-janela { width: min(560px, calc(100vw - 32px)); }
.ft-previa { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; }
.ft-previa dt { color: var(--texto-suave); font-weight: 600; }
.ft-previa dd { margin: 0; font-weight: 700; }
.ft-previa-os { margin: 0 0 14px; padding-left: 18px; color: var(--texto-suave); display: grid; gap: 3px; font-size: 13px; }
.ft-calculando { color: var(--texto-suave); }
.ft-tabela .col-marcar { width: 1%; }
.ft-marca-grupo { width: 16px; height: 16px; margin-right: 8px; vertical-align: -2px; accent-color: var(--verde-medio); }

/* Faturamento › Aflatoxinas: O.S. com as cargas abaixo. */
.af-cargas > summary { cursor: pointer; font-weight: 700; color: var(--verde-escuro); }
.af-detalhe > td { background: var(--superficie-2); padding: 8px 12px 12px; }
.af-sub { font-size: 12.5px; }
.af-sub td.num, .af-sub th.num { text-align: right; }

.op-organizacao { display: inline-flex; align-items: center; gap: 8px; margin-right: 12px; font-size: 13px; font-weight: 600; }
.op-organizacao select { width: auto; }
