/* Estilos do redesign Veltora (02-design/tokens-design.json e prototipo aprovado, temas claro e escuro). */
/* ===== Tema claro (padrao do prototipo) ===== */
.app {
  color-scheme: light;
  --selo: #4338CA; --selo-v: #FFFFFF; --selo-ponto: #67E8F9;
  --fundo: #FFFFFF; --sup: #F8FAFC; --sup2: #F1F5F9;
  --texto: #0F172A; --texto2: #475569;
  --borda: #E2E8F0; --borda-ui: #64748B;
  --destaque: #4338CA; --destaque-texto: #4338CA; --sobre-destaque: #FFFFFF;
  --grafico: #4338CA; --trilho: #E0E7FF; --ciano: #0E7490; --foco: #4338CA;
  --sucesso: #15803D; --erro: #B91C1C; --alerta: #B45309;
  --b-frete-f: #DBEAFE; --b-frete-t: #1E40AF; --b-devol-f: #EDE9FE; --b-devol-t: #5B21B6;
  --b-tarifa-f: #FEF3C7; --b-tarifa-t: #92400E; --b-parcial-f: #CCFBF1; --b-parcial-t: #115E59;
  --b-semexp-f: #FEE2E2; --b-semexp-t: #991B1B; --b-neutro-f: #F1F5F9; --b-neutro-t: #334155;
  --b-ok-f: #DCFCE7; --b-ok-t: #166534;
  --alerta-f: #FFFBEB; --alerta-t: #92400E; --trava-f: #FEF2F2; --trava-t: #991B1B;
  --codigo-f: #F8FAFC; --codigo-t: #0F172A;
  --cont-f: #E2E8F0; --cont-t: #0F172A; --cont-alerta-f: #B91C1C; --cont-alerta-t: #FFFFFF;
  --sombra: 0 1px 2px rgba(15, 23, 42, 0.06);
}
/* ===== Tema escuro: data-tema="escuro" (cookie) ou preferencia do sistema sem escolha salva ===== */
.app[data-tema="escuro"] {
  color-scheme: dark;
  --selo: #5B54EE;
  --fundo: #0D1117; --sup: #161B22; --sup2: #21262D;
  --texto: #F5F7FA; --texto2: #A7B3BF;
  --borda: #2A313C; --borda-ui: #6E7B8B;
  --destaque: #4F46E5; --destaque-texto: #818CF8; --sobre-destaque: #FFFFFF;
  --grafico: #6366F1; --trilho: #1E2433; --ciano: #22D3EE; --foco: #22D3EE;
  --sucesso: #31CF76; --erro: #F87171; --alerta: #F59E0B;
  --b-frete-f: #142A40; --b-frete-t: #93C5FD; --b-devol-f: #2A1F3D; --b-devol-t: #C4B5FD;
  --b-tarifa-f: #3A2708; --b-tarifa-t: #FCD34D; --b-parcial-f: #0F2E2E; --b-parcial-t: #5EEAD4;
  --b-semexp-f: #3A1717; --b-semexp-t: #FCA5A5; --b-neutro-f: #21262D; --b-neutro-t: #D5DCE3;
  --b-ok-f: #12301F; --b-ok-t: #86EFAC;
  --alerta-f: #3A2708; --alerta-t: #FCD34D; --trava-f: #3A1717; --trava-t: #FCA5A5;
  --codigo-f: #0B0F14; --codigo-t: #E2E8F0;
  --cont-f: #21262D; --cont-t: #F5F7FA; --cont-alerta-f: #B91C1C; --cont-alerta-t: #FFFFFF;
  --sombra: none;
}
@media (prefers-color-scheme: dark) {
  .app:not([data-tema]) {
    color-scheme: dark;
    --selo: #5B54EE;
    --fundo: #0D1117; --sup: #161B22; --sup2: #21262D;
    --texto: #F5F7FA; --texto2: #A7B3BF;
    --borda: #2A313C; --borda-ui: #6E7B8B;
    --destaque: #4F46E5; --destaque-texto: #818CF8; --sobre-destaque: #FFFFFF;
    --grafico: #6366F1; --trilho: #1E2433; --ciano: #22D3EE; --foco: #22D3EE;
    --sucesso: #31CF76; --erro: #F87171; --alerta: #F59E0B;
    --b-frete-f: #142A40; --b-frete-t: #93C5FD; --b-devol-f: #2A1F3D; --b-devol-t: #C4B5FD;
    --b-tarifa-f: #3A2708; --b-tarifa-t: #FCD34D; --b-parcial-f: #0F2E2E; --b-parcial-t: #5EEAD4;
    --b-semexp-f: #3A1717; --b-semexp-t: #FCA5A5; --b-neutro-f: #21262D; --b-neutro-t: #D5DCE3;
    --b-ok-f: #12301F; --b-ok-t: #86EFAC;
    --alerta-f: #3A2708; --alerta-t: #FCD34D; --trava-f: #3A1717; --trava-t: #FCA5A5;
    --codigo-f: #0B0F14; --codigo-t: #E2E8F0;
    --cont-f: #21262D; --cont-t: #F5F7FA; --cont-alerta-f: #B91C1C; --cont-alerta-t: #FFFFFF;
    --sombra: none;
  }
}


* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
.app { min-height: 100vh; background: var(--fundo); color: var(--texto); font-family: "Inter Variable", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: 28px; }
h3 { font-size: 18px; }
h4 { font-size: 15px; }
p { margin: 0; }
a { color: var(--destaque-texto); }
.num { font-variant-numeric: tabular-nums; }
.sec { color: var(--texto2); }
.peq { font-size: 13px; }
.rotulo { font-size: 12px; font-weight: 600; color: var(--texto2); }
.pos { color: var(--sucesso); font-weight: 600; }
.neg { color: var(--erro); font-weight: 600; }
.zero { color: var(--texto2); }
.mt { margin-top: 16px; }
.mt-g { margin-top: 32px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; border-radius: 6px; }
.pular { position: absolute; left: 16px; top: -64px; background: #4338CA; color: #FFFFFF; padding: 12px 16px; border-radius: 8px; font-weight: 600; z-index: 10; text-decoration: none; }
.pular:focus { top: 12px; outline: 2px solid #22D3EE; outline-offset: 2px; }

/* Alternancia de tema sem JavaScript */
.tema-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tema-label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 8px; cursor: pointer; color: var(--texto2); font-weight: 500; }
.tema-label:hover { background: var(--sup2); color: var(--texto); }
.chave { position: relative; width: 32px; height: 18px; border-radius: 999px; background: var(--borda-ui); flex: none; }
.chave::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #FFFFFF; transition: transform 0.15s; }




/* ===== Estrutura ===== */
.layout { display: block; }
.lateral { background: var(--sup); border-bottom: 1px solid var(--borda); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.marca { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.selo { display: block; flex: none; }
.selo-fundo { fill: var(--selo); }
.selo-v { fill: var(--selo-v); }
.selo-ponto { fill: var(--selo-ponto); }
.marca strong { display: block; font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.marca span { display: block; font-size: 12px; color: var(--texto2); }
.busca { position: relative; }
.busca input { width: 100%; min-height: 40px; padding: 0 12px 0 34px; border-radius: 8px; border: 1px solid var(--borda-ui); background: var(--fundo); color: var(--texto); font: inherit; }
.busca input::placeholder { color: var(--texto2); opacity: 1; }
.lupa { position: absolute; left: 12px; top: 50%; width: 12px; height: 12px; margin-top: -7px; border: 2px solid var(--texto2); border-radius: 50%; pointer-events: none; }
.lupa::after { content: ""; position: absolute; width: 2px; height: 6px; background: var(--texto2); right: -4px; bottom: -5px; transform: rotate(-45deg); }

.nav-grupos { display: flex; flex-wrap: wrap; gap: 0 4px; min-width: 0; }
.nav-grupo { display: flex; flex-wrap: wrap; align-items: center; gap: 0; min-width: 0; }
.nav-grupo > .rotulo { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; min-width: 0; }
.nav-grupo, .nav ul { width: 100%; }
.nav li { flex: 1 1 50%; min-width: 0; }
.nav a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; border-radius: 8px; text-decoration: none; color: var(--texto2); font-weight: 500; font-size: 14px; }
.nav a:hover { background: var(--sup2); color: var(--texto); }
.nav a[aria-current="page"] { background: var(--sup2); color: var(--texto); font-weight: 600; }
.contador { flex: none; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--cont-f); color: var(--cont-t); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.contador-alerta { background: var(--cont-alerta-f); color: var(--cont-alerta-t); }
.lateral-rodape { display: flex; flex-wrap: wrap; gap: 0 4px; align-items: center; border-top: 1px solid var(--borda); padding-top: 4px; }
.lateral-rodape .sync { width: 100%; padding-top: 0; }
.sync { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--texto2); padding: 4px 10px; }
.ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--sucesso); flex: none; }
.link-lateral { display: flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 8px; color: var(--texto2); text-decoration: none; font-weight: 500; }
.link-lateral:hover { background: var(--sup2); color: var(--texto); }

main { padding: 24px 16px 64px; max-width: 1180px; }
.tela { padding: 8px 0 56px; scroll-margin-top: 16px; }
.tela + .tela { border-top: 1px solid var(--borda); padding-top: 48px; }
.cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.cab-texto { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 420px; }
.rota { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; color: var(--texto2); }
.periodos { display: flex; flex-wrap: wrap; gap: 2px; }
.pilula-periodo { min-height: 36px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; color: var(--texto2); font: inherit; font-weight: 500; cursor: pointer; }
.pilula-periodo:hover { color: var(--texto); background: var(--sup2); }
.pilula-periodo[aria-pressed="true"] { background: var(--sup2); color: var(--texto); font-weight: 600; }
.perguntas { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; }
.pergunta { color: var(--texto2); font-size: 13px; }
.pergunta::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--grafico); margin-right: 8px; vertical-align: middle; }

/* KPIs com hairlines */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.kpi { border-top: 1px solid var(--borda); padding: 16px 0; display: flex; flex-direction: column; gap: 4px; }
.kpi .rotulo { color: var(--texto); font-size: 13px; }
.kpi .v { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .c { font-size: 12px; color: var(--texto2); font-variant-numeric: tabular-nums; }
.no-periodo { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 12px 0; border-top: 1px solid var(--borda); border-bottom: 1px solid var(--borda); font-size: 13px; color: var(--texto2); font-variant-numeric: tabular-nums; }
.no-periodo strong { color: var(--texto); font-weight: 600; }

/* Blocos de duas colunas */
.duas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 32px; }
.bloco { border-top: 1px solid var(--borda); padding-top: 20px; min-width: 0; }
.bloco-cab { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; margin-bottom: 12px; }
.bloco-cab p { width: 100%; }
.abrir { font-size: 13px; font-weight: 500; text-decoration: none; }
.abrir:hover { text-decoration: underline; }

/* Barras estilo funil */
.barras { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.barras li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; font-size: 13px; }
.barras .trilho { grid-column: 1 / -1; }
.trilho { height: 6px; border-radius: 999px; background: var(--trilho); overflow: hidden; }
.preenche { height: 100%; border-radius: 999px; background: var(--grafico); }
.p-ok { background: var(--sucesso); }
.p-erro { background: var(--erro); }
.p-alerta { background: var(--alerta); }
.p-ciano { background: var(--ciano); }




/* Termometro de meta */
.termo { position: relative; height: 8px; border-radius: 999px; background: var(--trilho); margin: 18px 0 8px; }
.termo .real { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--grafico); }
.termo .marca-meta { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--texto); }
.termo .marca-proj { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed var(--alerta); }
.termo .marca-proj.ok { border-left-color: var(--sucesso); }

.legenda-termo { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--texto2); }

/* Colunas (Dinheiro a Receber) */
.colunas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.coluna { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; text-align: center; }
.coluna .area { height: 120px; display: flex; align-items: flex-end; }
.coluna .barra { width: 100%; border-radius: 6px 6px 2px 2px; background: var(--trilho); }
.coluna .barra.forte { background: var(--grafico); }
.coluna .v { font-size: 12px; color: var(--texto2); font-variant-numeric: tabular-nums; }
.coluna .r { font-size: 12px; color: var(--texto2); border-top: 1px solid var(--borda); padding-top: 6px; }


/* Cards de auditoria em grade hairline */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--borda); border-radius: 12px; background: var(--fundo); text-decoration: none; color: var(--texto); box-shadow: var(--sombra); transition: border-color 0.15s, background 0.15s; }
a.card:hover { border-color: var(--borda-ui); background: var(--sup); }
.card .v { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.card .rodape { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--texto2); }
.card .ver { font-size: 12px; font-weight: 600; color: var(--destaque-texto); }
.card-pendencia { border-style: dashed; border-color: var(--borda-ui); }

.origem { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--b-neutro-f); color: var(--b-neutro-t); white-space: nowrap; }
.origem-extrato { border: 1px solid var(--b-neutro-t); }
.origem-custo { border: 3px double var(--b-neutro-t); }
.origem-estimativa { border: 1px dashed var(--b-neutro-t); }

.aberturas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 32px; }
.abertura { border-top: 1px solid var(--borda); padding: 16px 0; scroll-margin-top: 16px; }
.abertura:target, .alvo:target { outline: 2px solid var(--foco); outline-offset: 4px; border-radius: 8px; }
.lista { list-style: none; margin: 8px 0 0; padding: 0; }
.lista li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--borda); font-size: 13px; font-variant-numeric: tabular-nums; }
.lista li:first-child { border-top: 0; }

/* Botoes */
button { font: inherit; cursor: pointer; }
.btn { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--borda-ui); background: var(--fundo); color: var(--texto); font-weight: 600; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { background: var(--sup2); }
.btn[aria-pressed="true"] { background: var(--sup2); border-color: var(--destaque-texto); color: var(--destaque-texto); }
.btn-primario { background: var(--destaque); border-color: var(--destaque); color: var(--sobre-destaque); }
.btn-primario:hover { background: var(--destaque); filter: brightness(1.1); }
.barra-acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.filtros { display: flex; flex-wrap: wrap; gap: 6px; }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Tabelas hairline */
.rolagem { overflow-x: auto; border: 1px solid var(--borda); border-radius: 12px; background: var(--fundo); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
.larga { min-width: 1180px; }
.media { min-width: 720px; }
caption { text-align: left; padding: 12px 14px; color: var(--texto2); font-size: 12px; }
th, td { padding: 10px 14px; border-top: 1px solid var(--borda); text-align: left; vertical-align: middle; }
.larga th, .larga td, .media th, .media td { white-space: nowrap; }
thead th { font-size: 12px; color: var(--texto2); background: var(--sup); font-weight: 600; }
td.m, th.m { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--sup); }
.fixa { position: sticky; left: 0; }
tbody .fixa { background: var(--fundo); }
tbody tr:hover .fixa { background: var(--sup); }
.subtotal th, .subtotal td { font-weight: 650; background: var(--sup); }
.final th, .final td { font-weight: 700; font-size: 14px; border-top: 2px solid var(--borda-ui); }
.col-venc { box-shadow: inset 0 0 0 2px var(--sucesso); }

.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.b-frete { background: var(--b-frete-f); color: var(--b-frete-t); }
.b-devol { background: var(--b-devol-f); color: var(--b-devol-t); }
.b-tarifa { background: var(--b-tarifa-f); color: var(--b-tarifa-t); }
.b-parcial { background: var(--b-parcial-f); color: var(--b-parcial-t); }
.b-semexp { background: var(--b-semexp-f); color: var(--b-semexp-t); }
.b-neutro { background: var(--b-neutro-f); color: var(--b-neutro-t); }
.b-ok { background: var(--b-ok-f); color: var(--b-ok-t); }
.pilula { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.s-pend { background: var(--b-neutro-f); color: var(--b-neutro-t); border: 1px solid var(--b-neutro-t); }
.s-disp { background: var(--b-tarifa-f); color: var(--b-tarifa-t); border: 1px solid var(--b-tarifa-t); }
.s-cred { background: var(--b-ok-f); color: var(--b-ok-t); border: 1px solid var(--b-ok-t); }

/* Paineis */
.painel { padding: 20px; border: 1px solid var(--borda); border-radius: 12px; background: var(--fundo); box-shadow: var(--sombra); scroll-margin-top: 16px; }
.painel h3 + * { margin-top: 12px; }
.grade { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.linhas { list-style: none; margin: 12px 0 0; padding: 0; }
.linhas li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 9px 0; border-top: 1px solid var(--borda); font-size: 13px; font-variant-numeric: tabular-nums; }
.linhas li .origem { grid-column: 1 / -1; justify-self: start; }
.linhas .total { font-weight: 650; font-size: 14px; }
.formula { margin-top: 12px; font-size: 12px; color: var(--texto2); }
.dossie { margin: 12px 0 0; padding: 14px; background: var(--codigo-f); color: var(--codigo-t); border: 1px solid var(--borda-ui); border-radius: 8px; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; line-height: 1.6; }

/* Sala de Guerra */
.total-fila { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.total-fila .v { font-size: 28px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fila { list-style: none; margin: 0; padding: 0; }
.item-fila { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--borda); }
.pos-fila { width: 28px; height: 28px; border-radius: 8px; background: var(--sup2); display: grid; place-items: center; font-weight: 650; font-size: 13px; }
.item-corpo { display: flex; flex-direction: column; gap: 6px; }
.impacto-v { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--texto); }

/* Precos */
.cascata { list-style: none; margin: 12px 0 0; padding: 0; }
.cascata li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; padding: 9px 0; border-top: 1px solid var(--borda); font-size: 13px; font-variant-numeric: tabular-nums; align-items: center; }
.cascata li:first-child { border-top: 0; }
.cascata .acum { min-width: 88px; text-align: right; font-weight: 650; }
.trava { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: var(--trava-f); color: var(--trava-t); border: 1px solid var(--trava-t); }
.trava strong { display: block; }
.vencedor { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--b-ok-f); color: var(--b-ok-t); }

/* Conversao */
.quadrantes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.quad { border-top: 1px solid var(--borda); padding: 14px 0; }
.quad .v { font-size: 28px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.quad-alerta { border-top: 2px solid var(--alerta); }
.autopsia { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 20px; margin-top: 8px; }
.peca { border-top: 1px solid var(--borda); padding: 14px 0; display: flex; flex-direction: column; gap: 4px; }
.peca .v { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.recomenda { border-top: 2px solid var(--sucesso); }

/* Simulador */
.simulador { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.campo { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.campo label { font-size: 12px; color: var(--texto2); font-weight: 600; }
.campo input { min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--borda-ui); background: var(--fundo); color: var(--texto); font: inherit; font-variant-numeric: tabular-nums; }
.impacto { border-color: var(--grafico); }
.decisivo { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; color: var(--destaque-texto); font-variant-numeric: tabular-nums; line-height: 1.05; margin-top: 6px; }
.mensagem { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--grafico); background: var(--sup); border-radius: 0 8px 8px 0; font-size: 15px; }
.registro { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 20px; margin-top: 8px; }
.registro div { border-top: 1px solid var(--borda); padding: 10px 0; }
.linha-tempo { list-style: none; margin: 12px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--borda); }
.linha-tempo li { position: relative; padding: 0 0 12px 8px; font-size: 13px; }
.linha-tempo li::before { content: ""; position: absolute; left: -23px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--grafico); border: 2px solid var(--fundo); }
.alerta { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 12px; border-radius: 8px; background: var(--alerta-f); color: var(--alerta-t); margin-top: 10px; border: 1px solid var(--alerta-t); }
.alerta .icone { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--alerta-t); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.alerta p { font-size: 13px; }
.alerta strong { display: block; }

/* Capital de giro */
.regua { position: relative; height: 4px; background: var(--trilho); border-radius: 999px; margin: 44px 8px 52px; }
.marco { position: absolute; top: -8px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--fundo); border: 3px solid var(--grafico); }
.marco span { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; color: var(--texto2); }
.marco b { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 650; }
.marco-fim { border-color: var(--sucesso); }
.marco-ini span, .marco-ini b { left: 0; transform: none; }
.marco-fim span, .marco-fim b { left: auto; right: 0; transform: none; }
.kv { list-style: none; margin: 12px 0 0; padding: 0; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--borda); font-size: 13px; font-variant-numeric: tabular-nums; }
.kv li:first-child { border-top: 0; }
.kv .forte { font-weight: 650; font-size: 14px; }

/* Estados */
.estados { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.estado { padding: 18px; border: 1px solid var(--borda); border-radius: 12px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: var(--fundo); }
.estado-erro { border-color: var(--erro); }
.estado-erro h3 { color: var(--erro); }
.estado-sucesso { border-color: var(--sucesso); }
.estado-sucesso h3 { color: var(--sucesso); }
.estado-vazio { border-style: dashed; border-color: var(--borda-ui); }
.esqueleto { height: 12px; width: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--sup2) 0%, var(--borda) 50%, var(--sup2) 100%); background-size: 200% 100%; animation: brilho 1.4s ease-in-out infinite; }
.esqueleto.alto { height: 28px; width: 60%; }
.esqueleto.curto { width: 40%; }
.faixa-sync { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: var(--sup); border: 1px solid var(--borda); font-size: 13px; width: 100%; }
@keyframes brilho { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .esqueleto { animation: none; } html { scroll-behavior: auto; } .card, .chave::after { transition: none; } }
.pendente-aprov { margin-top: 24px; padding: 12px 14px; border: 1px dashed var(--borda-ui); border-radius: 8px; color: var(--texto2); font-size: 13px; }

/* Inteligencia IA (prototipo secao 6.9; origem, atalhos e foco sao links GET, sem JavaScript) */
.segmentado { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--borda); border-radius: 10px; background: var(--sup); max-width: 100%; }
.segmentado a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 8px; color: var(--texto2); font-weight: 500; text-decoration: none; }
.segmentado a:hover { color: var(--texto); }
.segmentado a[aria-current="page"] { background: var(--fundo); color: var(--texto); font-weight: 600; box-shadow: inset 0 0 0 1px var(--borda-ui); }
.lista-sku input, .motor input { accent-color: var(--destaque); }
.atalhos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; min-width: 0; }
.atalhos .btn { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.lista-sku { list-style: none; margin: 12px 0 0; padding: 0; }
.lista-sku li { border-top: 1px solid var(--borda); }
.lista-sku label { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 44px; padding: 6px 0; cursor: pointer; font-size: 13px; }
.lista-sku input, .motor input { width: 18px; height: 18px; margin: 0; }
.filtros-extrato { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 16px; }
.campo input[type="file"] { font: inherit; color: var(--texto2); max-width: 100%; }
.motor-grupo { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.motor-grupo legend { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; padding: 0; margin-bottom: 8px; }
.motores { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.motor { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 4px 10px; align-items: start; padding: 12px; border: 1px solid var(--borda); border-radius: 10px; cursor: pointer; background: var(--fundo); }
.motor:hover { border-color: var(--borda-ui); }
.motor:has(input:checked) { border: 2px solid var(--destaque-texto); padding: 11px; }
.motor input { margin-top: 2px; }
.motor .badge, .motor .peq { grid-column: 2; justify-self: start; }
.aviso-info { display: none; margin-top: 10px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--borda-ui); background: var(--sup); font-size: 13px; }
.motor-grupo:has(input[value="openai"]:checked) .aviso-sem-chave-openai,
.motor-grupo:has(input[value="gemini"]:checked) .aviso-sem-chave-gemini,
.motor-grupo:has(input[value="anthropic"]:checked) .aviso-sem-chave-anthropic,
.motor-grupo:has(input[value="openai"]:checked) .aviso-externo,
.motor-grupo:has(input[value="gemini"]:checked) .aviso-externo,
.motor-grupo:has(input[value="anthropic"]:checked) .aviso-externo { display: block; }
.indicadores-ia { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.kpi-piso { border-top: 2px solid var(--erro); }
.comparativo-seo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.lado-sugestao { border-color: var(--destaque-texto); }
.score { display: flex; align-items: baseline; gap: 6px; }
.score .v { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.titulo-sug { margin-top: 6px; padding: 10px 12px; border-radius: 8px; background: var(--sup); font-weight: 600; }
.contador-chars { font-size: 12px; color: var(--texto2); font-variant-numeric: tabular-nums; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 8px 0 0; }
.tags li { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--b-frete-f); color: var(--b-frete-t); user-select: all; }
.falhas { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
.pendente-ficha { font-weight: 600; color: var(--alerta-t); background: var(--alerta-f); padding: 0 4px; border-radius: 4px; }
.desc-sug h5 { margin: 12px 0 4px; font-size: 13px; font-weight: 650; }
.desc-sug ul { margin: 0; padding-left: 18px; font-size: 13px; }
.atalho-ia { font-size: 13px; font-weight: 600; text-decoration: none; }
.atalho-ia:hover { text-decoration: underline; }
.acoes form { display: inline-flex; }

/* Contencao anti-vazamento horizontal (secao 4.1, obrigatoria em 360px, 768px e 1280px) */
pre, code, .formula, .dossie { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; max-width: 100%; box-sizing: border-box; overflow-x: auto; }
.layout > *, .layout > main, .tela, .painel, .card, .kpi, .quad, .peca, .bloco, .coluna, .estado, .abertura, .item-fila, .alerta, .trava,
.motores > *, .indicadores-ia > *, .comparativo-seo > *, .filtros-extrato > *, .lista-sku label > *, .motor > *,
.grade > *, .cards > *, .simulador > *, .duas > *, .aberturas > *, .quadrantes > *, .autopsia > *, .colunas > *, .estados > *, .kpis > *, .registro > *, .item-corpo > *, .item-fila > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
p, li, h2, h3, h4, .pergunta, .rotulo { overflow-wrap: anywhere; }
.rolagem { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }

@media (min-width: 768px) {
  .lateral { padding: 12px 24px; }
  .nav-grupos { gap: 4px 16px; }
  .nav-grupo, .nav ul { gap: 4px; width: auto; }
  .nav li { flex: none; }
  .lateral-rodape .sync { width: auto; }
  .nav a { padding: 0 10px; }
  main { padding: 32px 24px 64px; }
  h2 { font-size: 30px; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; }
  .kpi .v { font-size: 28px; }
  .duas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
  .barras li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; }
  .barras .trilho { grid-column: auto; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards .card-pendencia { grid-column: 1 / -1; }
  .grade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aberturas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quadrantes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .autopsia { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .registro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .estados { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .linhas li { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
  .linhas li .origem { grid-column: auto; justify-self: end; }
  .item-corpo { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; }
  .item-corpo .peq { grid-column: 1; }
  .filtros-extrato { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .motores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .indicadores-ia { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .comparativo-seo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .motores { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .indicadores-ia { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  .lateral { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-bottom: 0; border-right: 1px solid var(--borda); padding: 16px 12px; }
  .nav-grupos { flex-direction: column; flex-wrap: nowrap; gap: 16px; }
  .nav-grupo { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-grupo > .rotulo { display: block; padding: 0 10px 2px; font-weight: 500; }
  .nav ul { flex-direction: column; flex-wrap: nowrap; gap: 2px; }
  .nav a { min-height: 36px; justify-content: space-between; }
  .lateral-rodape { margin-top: auto; flex-direction: column; align-items: stretch; }
  main { padding: 48px 56px 80px; }
  h2 { font-size: 32px; }
  .cards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cards .card { grid-column: span 2; }
  .cards .card-pendencia, .cards .card-recuperado { grid-column: span 3; }
  .aberturas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rolagem .larga { min-width: 0; }
  .simulador, .divide-5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .divide-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .autopsia { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .estados { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ===== Complementos da implementacao E06 (sem JavaScript; larguras e posicoes por .w-N, .l-N, .fb-N, .h-N) ===== */
a.sync { text-decoration: none; }
a.sync:hover { color: var(--texto); }
.ponto-erro { background: var(--erro); }
.nav a > span:first-child { min-width: 0; }

/* Controle de tema: um unico interruptor clicavel (link GET com cookie), chave e rotulo no mesmo alvo */
.tema-alternar { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border-radius: 8px; color: var(--texto2); text-decoration: none; font-weight: 500; }
.tema-alternar:hover { background: var(--sup2); color: var(--texto); }
.tema-alternar.ligado .chave { background: var(--destaque); }
.tema-alternar.ligado .chave::after { transform: translateX(14px); }
/* Sem escolha salva: o servidor manda as duas versoes e o CSS mostra so a do tema do sistema */
.tema-se-escuro { display: none; }
@media (prefers-color-scheme: dark) {
  .tema-se-escuro { display: flex; }
  .tema-se-claro { display: none; }
}

/* Pilulas de periodo e filtros como links */
a.pilula-periodo { display: inline-flex; align-items: center; text-decoration: none; }
.pilula-periodo[aria-current="page"] { background: var(--sup2); color: var(--texto); font-weight: 600; }
.btn[aria-current="true"] { background: var(--sup2); border-color: var(--destaque-texto); color: var(--destaque-texto); }
.botao-link { text-decoration: none; }

/* Apelidos das classes usadas nas demais telas */
.legenda { font-size: 12px; font-weight: 600; color: var(--texto2); }
.secundario { color: var(--texto2); }
.pequeno { font-size: 13px; }
.valor { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cab-tela { display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; }
.aviso-dados { font-size: 13px; color: var(--texto2); }
.titulo-bloco { margin: 32px 0 16px; }
.item-topo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.total-fila .valor { font-size: 28px; }
.quad .valor { font-size: 28px; }
.autopsia .bloco { border-top: 1px solid var(--borda); padding: 14px 0; display: flex; flex-direction: column; gap: 4px; }
.autopsia .bloco.recomenda { border-top: 2px solid var(--sucesso); }
.receber { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.janela { padding: 16px; border: 1px solid var(--borda); border-radius: 12px; background: var(--fundo); display: flex; flex-direction: column; gap: 8px; }
.janela .valor { font-size: 20px; }
.p-info, .p-atual { background: var(--ciano); }
.p-minimo { background: var(--sucesso); }
.p-120 { background: var(--erro); }
.p-meta { background: var(--grafico); }
.trilho .preenche { min-width: 0; }

/* Formularios */
select, textarea { font: inherit; color: var(--texto); background: var(--fundo); border: 1px solid var(--borda-ui); border-radius: 8px; }
select { min-height: 40px; padding: 0 12px; }
textarea { width: 100%; padding: 12px; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13px; }
td input { min-height: 40px; width: 100%; min-width: 96px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--borda-ui); background: var(--fundo); color: var(--texto); font: inherit; font-variant-numeric: tabular-nums; }
.campo select { min-height: 40px; }
.seletor { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.grupo { margin: 16px 0 0; padding: 12px 16px 16px; border: 1px solid var(--borda); border-radius: 8px; }
.grupo legend { padding: 0 6px; font-size: 13px; font-weight: 650; color: var(--texto); }
td.m .origem { margin-left: 6px; }
.estado ul { margin: 0; padding-left: 20px; font-size: 13px; }
.estado + .barra-acoes, .estado + .simulador, .estado + form, .estado + .grade { margin-top: 16px; }
.estado[tabindex="-1"]:focus { outline: 2px solid var(--foco); outline-offset: 2px; }
.form-status { margin-top: 16px; display: grid; gap: 8px; max-width: 480px; }
.painel .btn { margin-top: 16px; }
.acoes .btn, .acoes form .btn, td form .btn { margin-top: 0; }
main > .faixa-sync { margin-bottom: 16px; }
select, .campo input, textarea, .busca input { max-width: 100%; box-sizing: border-box; }

@media (min-width: 768px) {
  .receber { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .receber { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Fase 6: acesso, conta, licencas e menu */

.faixa-validade { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 8px 12px; margin-bottom: 16px; border: 1px solid var(--borda); border-radius: 8px; background: var(--sup); font-size: 13px; }
.faixa-validade.vencendo { background: var(--alerta-f); color: var(--alerta-t); border-color: var(--alerta-t); }
.faixa-validade a { font-weight: 600; }
.auth-cartao { width: 100%; max-width: 400px; padding: 24px; border: 1px solid var(--borda); border-radius: 12px; background: var(--fundo); box-shadow: var(--sombra); }
.auth-marca { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.auth-cartao h3 { font-size: 20px; }
.auth-cartao .campo input { width: 100%; }
.auth-cartao .btn-primario { width: 100%; min-height: 44px; margin-top: 16px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 14px; font-size: 13px; }
.selo-teste { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--b-ok-f); color: var(--b-ok-t); }
.requisitos { list-style: none; margin: 6px 0 0; padding: 0; font-size: 12px; color: var(--texto2); }
.requisitos li::before { content: "- "; }
.ajuda { font-size: 12px; color: var(--texto2); }
.erro-auth { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--trava-f); color: var(--trava-t); border: 1px solid var(--trava-t); font-size: 13px; }
.chave-manual { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 15px; letter-spacing: 0.08em; padding: 10px 12px; border-radius: 8px; background: var(--codigo-f); color: var(--codigo-t); border: 1px solid var(--borda-ui); user-select: all; }
.codigos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; list-style: none; margin: 8px 0 0; padding: 12px; border-radius: 8px; background: var(--codigo-f); color: var(--codigo-t); border: 1px solid var(--borda-ui); font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13px; user-select: all; }
.passos { margin: 8px 0 0; padding-left: 20px; font-size: 13px; }
.status-cartoes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.form-admin { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 16px; }
.form-admin .campo input, .form-admin .campo select { width: 100%; }
.acoes-linha { display: flex; flex-wrap: nowrap; gap: 4px; }
.acoes-linha .btn { position: relative; min-height: 32px; padding: 0 8px; font-size: 12px; }
.link-temporario { margin-top: 8px; }
.barra-acoes .busca { flex: 1 1 280px; max-width: 420px; }

/* Menu recolhivel abaixo de 768px, sem JavaScript */
.menu-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.menu-botao { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--borda-ui); border-radius: 8px; background: var(--fundo); color: var(--texto); font-weight: 600; cursor: pointer; }
.menu-botao .mais { font-weight: 700; }
.menu-botao .estado-aberto { display: none; }
#menu-aberto:checked + .menu-botao .estado-aberto { display: inline; }
#menu-aberto:checked + .menu-botao .estado-fechado { display: none; }
#menu-aberto:focus-visible + .menu-botao { outline: 2px solid var(--foco); outline-offset: 2px; }
.lateral .nav, .lateral .lateral-rodape { display: none; }
#menu-aberto:checked ~ .nav { display: block; }
#menu-aberto:checked ~ .lateral-rodape { display: flex; }

.auth-pagina { min-height: 100vh; display: grid; place-items: center; padding: 64px 16px 16px; position: relative; }
.auth-tema { position: absolute; top: 12px; right: 16px; }
.auth-cartao .campo { margin-top: 12px; }
.chave-manual, .codigos li { overflow-wrap: anywhere; }
.nav .nav-sair { width: 100%; text-align: left; padding: 0 8px; min-height: 44px; border: 0; border-radius: 8px; color: var(--texto2); background: none; font: inherit; cursor: pointer; }
.nav .nav-sair:hover { background: var(--sup2); color: var(--texto); }
@media (min-width: 768px) {
  .menu-input, .menu-botao { display: none; }
  .lateral .nav { display: block; }
  .lateral .lateral-rodape { display: flex; }
  .status-cartoes, .form-admin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Campeões de Venda */
.modos-cp .motor { align-content: start; }
.modos-cp .motor .badge { white-space: normal; }
.modos-cp .motor-off { border-style: dashed; cursor: default; }
.campos-cp { grid-template-columns: minmax(0, 1fr); align-items: end; }
.pesquisa-cp .campo-canal { margin: 0; }
.pesquisa-cp .segmentado label { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 8px; border-radius: 8px; }
.pesquisa-cp .segmentado input { width: auto; min-height: 0; accent-color: var(--destaque); margin: 0; }
.pesquisa-cp .segmentado label:has(:checked) { background: var(--fundo); box-shadow: inset 0 0 0 1px var(--borda-ui); }
.pesquisa-cp .area-importacao, .pesquisa-cp .selecao-cp span { display: none; }
.pesquisa-cp:has([value="importacao_manual"]:checked) .area-importacao { display: block; }
.pesquisa-cp:has([value="importacao_manual"]:checked) .selecao-cp [data-modo="importacao_manual"],
.pesquisa-cp:has([value="apis_oficiais"]:checked) .selecao-cp [data-modo="apis_oficiais"],
.pesquisa-cp:has([value="provedor_externo"]:checked) .selecao-cp [data-modo="provedor_externo"],
.pesquisa-cp:has([value="shopee"]:checked) .selecao-cp [data-canal="shopee"],
.pesquisa-cp:has([value="mercado_livre"]:checked) .selecao-cp [data-canal="mercado_livre"],
.pesquisa-cp:has([value="ambos"]:checked) .selecao-cp [data-canal="ambos"] { display: inline; }
.pesquisa-cp:has([value="apis_oficiais"]:checked):has([value="ambos"]:checked) .aviso-cp[data-modo="apis_oficiais"],
.pesquisa-cp:has([value="provedor_externo"]:checked):has([value="ambos"]:checked) .aviso-cp[data-modo="provedor_externo"],
.pesquisa-cp:has([value="apis_oficiais"]:checked):has([value="shopee"]:checked) .aviso-cp[data-modo="apis_oficiais"][data-canal="shopee"],
.pesquisa-cp:has([value="apis_oficiais"]:checked):has([value="mercado_livre"]:checked) .aviso-cp[data-modo="apis_oficiais"][data-canal="mercado_livre"],
.pesquisa-cp:has([value="provedor_externo"]:checked):has([value="shopee"]:checked) .aviso-cp[data-modo="provedor_externo"][data-canal="shopee"],
.pesquisa-cp:has([value="provedor_externo"]:checked):has([value="mercado_livre"]:checked) .aviso-cp[data-modo="provedor_externo"][data-canal="mercado_livre"] { display: block; }
.pesquisa-cp .acoes .btn { margin-top: 0; }
.pesquisa-cp input[type="file"], .pesquisa-cp textarea { width: 100%; min-width: 0; }
.lista-cache { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lista-cache li { min-width: 0; max-width: 100%; }
.lista-cache a { display: inline-block; min-height: 40px; padding: 8px 12px; border: 1px solid var(--borda-ui); border-radius: 999px; text-decoration: none; color: var(--texto); font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.lista-cache a:hover, .lista-cache a[aria-current="page"], .filtros-cp a[aria-current="true"] { background: var(--sup2); }
.filtros-cp { display: flex; flex-direction: column; gap: 10px; }
.tabela-cp { min-width: 1090px; }
.tabela-cp .fixa { z-index: 1; width: clamp(120px, 23vw, 260px); }
.tabela-cp .prod, .tabela-cp .loja { display: block; overflow-wrap: anywhere; white-space: normal; }
.tabela-cp .prod { font-weight: 600; max-width: 260px; }
.tabela-cp .loja { font-size: 12px; color: var(--texto2); font-weight: 400; }
.tabela-cp th .badge { margin-top: 4px; white-space: normal; }
.tabela-cp .sobra { display: block; margin-top: 4px; font-size: 12px; }
.tabela-cp .nota-degrau { display: block; margin-top: 4px; max-width: 240px; white-space: normal; font-size: 12px; color: var(--texto2); }
.tabela-cp .acoes-linha { display: flex; gap: 4px; flex-direction: column; align-items: stretch; }
.tabela-cp td, .tabela-cp th { padding: 10px; }
.tabela-cp .acoes-linha .btn { width: 100%; }
.custo-linha { display: inline-flex; gap: 4px; align-items: center; }
.custo-linha input { width: 88px; min-width: 88px; padding: 0 8px; }
.custo-linha .btn, .tabela-cp .acoes-linha .btn { padding: 0 8px; font-size: 12px; }
.formula { margin-top: 10px; color: var(--texto2); font-size: 12px; }
@media (min-width: 768px) {
  .pesquisa-cp .campos-cp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .pesquisa-cp .modos-cp { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


/* Motor de Aceleração */
.aceleracao { min-width: 0; max-width: 100%; }
.aceleracao .badge, .aceleracao .pilula { white-space: normal; overflow-wrap: anywhere; }
.aceleracao .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.aceleracao .btn:disabled { border-style: dashed; background: var(--sup); color: var(--texto2); cursor: not-allowed; }
.aceleracao textarea, .aceleracao input[type="file"], .aceleracao select { width: 100%; min-width: 0; }
.aceleracao .kv li > * { min-width: 0; overflow-wrap: anywhere; }
.acel-check { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.acel-check input { accent-color: var(--destaque); }
.estados-conector, .gatilhos { list-style: none; padding: 0; margin: 8px 0; }
.estados-conector { display: flex; flex-wrap: wrap; gap: 6px; }
.estados-conector li, .janela-item { border: 1px solid var(--borda); border-radius: 8px; padding: 6px 8px; }
.estados-conector li.atual, .janela-item[aria-current="true"] { border-color: var(--borda-ui); font-weight: 650; }
.gatilhos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 176px), 1fr)); gap: 15px; }
.gatilho { min-width: 0; border-top: 1px solid var(--borda); padding-top: 12px; }
.gatilho .v { font-size: 21px; font-weight: 650; overflow-wrap: anywhere; }
.gatilho .c { font-size: 12px; color: var(--texto2); }
.aceleracao .kpi-piso { border-top-color: var(--erro); }
.aceleracao .proximo-campeao { border-color: var(--sucesso); overflow-wrap: anywhere; }
.aceleracao .aviso-fixo { display: block; }
.janela-item { display: inline-block; }
.tabela-acel tbody .fixa { z-index: 1; }
.tabela-acel td .badge { max-width: 250px; }
.tabela-acel tbody th.fixa, .tabela-acel td:not(.m) { white-space: normal; overflow-wrap: anywhere; }
.tabela-acel tbody th.fixa { max-width: clamp(128px, 25vw, 250px); }
.tabela-acel td:not(.m) { min-width: 100px; max-width: 280px; }
.acel-linha { display: block; margin-top: 4px; }

.w-0 { width: 0%; } .fb-0 { flex-basis: 0%; } .l-0 { left: 0%; } .h-0 { height: 0%; }
.w-1 { width: 1%; } .fb-1 { flex-basis: 1%; } .l-1 { left: 1%; } .h-1 { height: 1%; }
.w-2 { width: 2%; } .fb-2 { flex-basis: 2%; } .l-2 { left: 2%; } .h-2 { height: 2%; }
.w-3 { width: 3%; } .fb-3 { flex-basis: 3%; } .l-3 { left: 3%; } .h-3 { height: 3%; }
.w-4 { width: 4%; } .fb-4 { flex-basis: 4%; } .l-4 { left: 4%; } .h-4 { height: 4%; }
.w-5 { width: 5%; } .fb-5 { flex-basis: 5%; } .l-5 { left: 5%; } .h-5 { height: 5%; }
.w-6 { width: 6%; } .fb-6 { flex-basis: 6%; } .l-6 { left: 6%; } .h-6 { height: 6%; }
.w-7 { width: 7%; } .fb-7 { flex-basis: 7%; } .l-7 { left: 7%; } .h-7 { height: 7%; }
.w-8 { width: 8%; } .fb-8 { flex-basis: 8%; } .l-8 { left: 8%; } .h-8 { height: 8%; }
.w-9 { width: 9%; } .fb-9 { flex-basis: 9%; } .l-9 { left: 9%; } .h-9 { height: 9%; }
.w-10 { width: 10%; } .fb-10 { flex-basis: 10%; } .l-10 { left: 10%; } .h-10 { height: 10%; }
.w-11 { width: 11%; } .fb-11 { flex-basis: 11%; } .l-11 { left: 11%; } .h-11 { height: 11%; }
.w-12 { width: 12%; } .fb-12 { flex-basis: 12%; } .l-12 { left: 12%; } .h-12 { height: 12%; }
.w-13 { width: 13%; } .fb-13 { flex-basis: 13%; } .l-13 { left: 13%; } .h-13 { height: 13%; }
.w-14 { width: 14%; } .fb-14 { flex-basis: 14%; } .l-14 { left: 14%; } .h-14 { height: 14%; }
.w-15 { width: 15%; } .fb-15 { flex-basis: 15%; } .l-15 { left: 15%; } .h-15 { height: 15%; }
.w-16 { width: 16%; } .fb-16 { flex-basis: 16%; } .l-16 { left: 16%; } .h-16 { height: 16%; }
.w-17 { width: 17%; } .fb-17 { flex-basis: 17%; } .l-17 { left: 17%; } .h-17 { height: 17%; }
.w-18 { width: 18%; } .fb-18 { flex-basis: 18%; } .l-18 { left: 18%; } .h-18 { height: 18%; }
.w-19 { width: 19%; } .fb-19 { flex-basis: 19%; } .l-19 { left: 19%; } .h-19 { height: 19%; }
.w-20 { width: 20%; } .fb-20 { flex-basis: 20%; } .l-20 { left: 20%; } .h-20 { height: 20%; }
.w-21 { width: 21%; } .fb-21 { flex-basis: 21%; } .l-21 { left: 21%; } .h-21 { height: 21%; }
.w-22 { width: 22%; } .fb-22 { flex-basis: 22%; } .l-22 { left: 22%; } .h-22 { height: 22%; }
.w-23 { width: 23%; } .fb-23 { flex-basis: 23%; } .l-23 { left: 23%; } .h-23 { height: 23%; }
.w-24 { width: 24%; } .fb-24 { flex-basis: 24%; } .l-24 { left: 24%; } .h-24 { height: 24%; }
.w-25 { width: 25%; } .fb-25 { flex-basis: 25%; } .l-25 { left: 25%; } .h-25 { height: 25%; }
.w-26 { width: 26%; } .fb-26 { flex-basis: 26%; } .l-26 { left: 26%; } .h-26 { height: 26%; }
.w-27 { width: 27%; } .fb-27 { flex-basis: 27%; } .l-27 { left: 27%; } .h-27 { height: 27%; }
.w-28 { width: 28%; } .fb-28 { flex-basis: 28%; } .l-28 { left: 28%; } .h-28 { height: 28%; }
.w-29 { width: 29%; } .fb-29 { flex-basis: 29%; } .l-29 { left: 29%; } .h-29 { height: 29%; }
.w-30 { width: 30%; } .fb-30 { flex-basis: 30%; } .l-30 { left: 30%; } .h-30 { height: 30%; }
.w-31 { width: 31%; } .fb-31 { flex-basis: 31%; } .l-31 { left: 31%; } .h-31 { height: 31%; }
.w-32 { width: 32%; } .fb-32 { flex-basis: 32%; } .l-32 { left: 32%; } .h-32 { height: 32%; }
.w-33 { width: 33%; } .fb-33 { flex-basis: 33%; } .l-33 { left: 33%; } .h-33 { height: 33%; }
.w-34 { width: 34%; } .fb-34 { flex-basis: 34%; } .l-34 { left: 34%; } .h-34 { height: 34%; }
.w-35 { width: 35%; } .fb-35 { flex-basis: 35%; } .l-35 { left: 35%; } .h-35 { height: 35%; }
.w-36 { width: 36%; } .fb-36 { flex-basis: 36%; } .l-36 { left: 36%; } .h-36 { height: 36%; }
.w-37 { width: 37%; } .fb-37 { flex-basis: 37%; } .l-37 { left: 37%; } .h-37 { height: 37%; }
.w-38 { width: 38%; } .fb-38 { flex-basis: 38%; } .l-38 { left: 38%; } .h-38 { height: 38%; }
.w-39 { width: 39%; } .fb-39 { flex-basis: 39%; } .l-39 { left: 39%; } .h-39 { height: 39%; }
.w-40 { width: 40%; } .fb-40 { flex-basis: 40%; } .l-40 { left: 40%; } .h-40 { height: 40%; }
.w-41 { width: 41%; } .fb-41 { flex-basis: 41%; } .l-41 { left: 41%; } .h-41 { height: 41%; }
.w-42 { width: 42%; } .fb-42 { flex-basis: 42%; } .l-42 { left: 42%; } .h-42 { height: 42%; }
.w-43 { width: 43%; } .fb-43 { flex-basis: 43%; } .l-43 { left: 43%; } .h-43 { height: 43%; }
.w-44 { width: 44%; } .fb-44 { flex-basis: 44%; } .l-44 { left: 44%; } .h-44 { height: 44%; }
.w-45 { width: 45%; } .fb-45 { flex-basis: 45%; } .l-45 { left: 45%; } .h-45 { height: 45%; }
.w-46 { width: 46%; } .fb-46 { flex-basis: 46%; } .l-46 { left: 46%; } .h-46 { height: 46%; }
.w-47 { width: 47%; } .fb-47 { flex-basis: 47%; } .l-47 { left: 47%; } .h-47 { height: 47%; }
.w-48 { width: 48%; } .fb-48 { flex-basis: 48%; } .l-48 { left: 48%; } .h-48 { height: 48%; }
.w-49 { width: 49%; } .fb-49 { flex-basis: 49%; } .l-49 { left: 49%; } .h-49 { height: 49%; }
.w-50 { width: 50%; } .fb-50 { flex-basis: 50%; } .l-50 { left: 50%; } .h-50 { height: 50%; }
.w-51 { width: 51%; } .fb-51 { flex-basis: 51%; } .l-51 { left: 51%; } .h-51 { height: 51%; }
.w-52 { width: 52%; } .fb-52 { flex-basis: 52%; } .l-52 { left: 52%; } .h-52 { height: 52%; }
.w-53 { width: 53%; } .fb-53 { flex-basis: 53%; } .l-53 { left: 53%; } .h-53 { height: 53%; }
.w-54 { width: 54%; } .fb-54 { flex-basis: 54%; } .l-54 { left: 54%; } .h-54 { height: 54%; }
.w-55 { width: 55%; } .fb-55 { flex-basis: 55%; } .l-55 { left: 55%; } .h-55 { height: 55%; }
.w-56 { width: 56%; } .fb-56 { flex-basis: 56%; } .l-56 { left: 56%; } .h-56 { height: 56%; }
.w-57 { width: 57%; } .fb-57 { flex-basis: 57%; } .l-57 { left: 57%; } .h-57 { height: 57%; }
.w-58 { width: 58%; } .fb-58 { flex-basis: 58%; } .l-58 { left: 58%; } .h-58 { height: 58%; }
.w-59 { width: 59%; } .fb-59 { flex-basis: 59%; } .l-59 { left: 59%; } .h-59 { height: 59%; }
.w-60 { width: 60%; } .fb-60 { flex-basis: 60%; } .l-60 { left: 60%; } .h-60 { height: 60%; }
.w-61 { width: 61%; } .fb-61 { flex-basis: 61%; } .l-61 { left: 61%; } .h-61 { height: 61%; }
.w-62 { width: 62%; } .fb-62 { flex-basis: 62%; } .l-62 { left: 62%; } .h-62 { height: 62%; }
.w-63 { width: 63%; } .fb-63 { flex-basis: 63%; } .l-63 { left: 63%; } .h-63 { height: 63%; }
.w-64 { width: 64%; } .fb-64 { flex-basis: 64%; } .l-64 { left: 64%; } .h-64 { height: 64%; }
.w-65 { width: 65%; } .fb-65 { flex-basis: 65%; } .l-65 { left: 65%; } .h-65 { height: 65%; }
.w-66 { width: 66%; } .fb-66 { flex-basis: 66%; } .l-66 { left: 66%; } .h-66 { height: 66%; }
.w-67 { width: 67%; } .fb-67 { flex-basis: 67%; } .l-67 { left: 67%; } .h-67 { height: 67%; }
.w-68 { width: 68%; } .fb-68 { flex-basis: 68%; } .l-68 { left: 68%; } .h-68 { height: 68%; }
.w-69 { width: 69%; } .fb-69 { flex-basis: 69%; } .l-69 { left: 69%; } .h-69 { height: 69%; }
.w-70 { width: 70%; } .fb-70 { flex-basis: 70%; } .l-70 { left: 70%; } .h-70 { height: 70%; }
.w-71 { width: 71%; } .fb-71 { flex-basis: 71%; } .l-71 { left: 71%; } .h-71 { height: 71%; }
.w-72 { width: 72%; } .fb-72 { flex-basis: 72%; } .l-72 { left: 72%; } .h-72 { height: 72%; }
.w-73 { width: 73%; } .fb-73 { flex-basis: 73%; } .l-73 { left: 73%; } .h-73 { height: 73%; }
.w-74 { width: 74%; } .fb-74 { flex-basis: 74%; } .l-74 { left: 74%; } .h-74 { height: 74%; }
.w-75 { width: 75%; } .fb-75 { flex-basis: 75%; } .l-75 { left: 75%; } .h-75 { height: 75%; }
.w-76 { width: 76%; } .fb-76 { flex-basis: 76%; } .l-76 { left: 76%; } .h-76 { height: 76%; }
.w-77 { width: 77%; } .fb-77 { flex-basis: 77%; } .l-77 { left: 77%; } .h-77 { height: 77%; }
.w-78 { width: 78%; } .fb-78 { flex-basis: 78%; } .l-78 { left: 78%; } .h-78 { height: 78%; }
.w-79 { width: 79%; } .fb-79 { flex-basis: 79%; } .l-79 { left: 79%; } .h-79 { height: 79%; }
.w-80 { width: 80%; } .fb-80 { flex-basis: 80%; } .l-80 { left: 80%; } .h-80 { height: 80%; }
.w-81 { width: 81%; } .fb-81 { flex-basis: 81%; } .l-81 { left: 81%; } .h-81 { height: 81%; }
.w-82 { width: 82%; } .fb-82 { flex-basis: 82%; } .l-82 { left: 82%; } .h-82 { height: 82%; }
.w-83 { width: 83%; } .fb-83 { flex-basis: 83%; } .l-83 { left: 83%; } .h-83 { height: 83%; }
.w-84 { width: 84%; } .fb-84 { flex-basis: 84%; } .l-84 { left: 84%; } .h-84 { height: 84%; }
.w-85 { width: 85%; } .fb-85 { flex-basis: 85%; } .l-85 { left: 85%; } .h-85 { height: 85%; }
.w-86 { width: 86%; } .fb-86 { flex-basis: 86%; } .l-86 { left: 86%; } .h-86 { height: 86%; }
.w-87 { width: 87%; } .fb-87 { flex-basis: 87%; } .l-87 { left: 87%; } .h-87 { height: 87%; }
.w-88 { width: 88%; } .fb-88 { flex-basis: 88%; } .l-88 { left: 88%; } .h-88 { height: 88%; }
.w-89 { width: 89%; } .fb-89 { flex-basis: 89%; } .l-89 { left: 89%; } .h-89 { height: 89%; }
.w-90 { width: 90%; } .fb-90 { flex-basis: 90%; } .l-90 { left: 90%; } .h-90 { height: 90%; }
.w-91 { width: 91%; } .fb-91 { flex-basis: 91%; } .l-91 { left: 91%; } .h-91 { height: 91%; }
.w-92 { width: 92%; } .fb-92 { flex-basis: 92%; } .l-92 { left: 92%; } .h-92 { height: 92%; }
.w-93 { width: 93%; } .fb-93 { flex-basis: 93%; } .l-93 { left: 93%; } .h-93 { height: 93%; }
.w-94 { width: 94%; } .fb-94 { flex-basis: 94%; } .l-94 { left: 94%; } .h-94 { height: 94%; }
.w-95 { width: 95%; } .fb-95 { flex-basis: 95%; } .l-95 { left: 95%; } .h-95 { height: 95%; }
.w-96 { width: 96%; } .fb-96 { flex-basis: 96%; } .l-96 { left: 96%; } .h-96 { height: 96%; }
.w-97 { width: 97%; } .fb-97 { flex-basis: 97%; } .l-97 { left: 97%; } .h-97 { height: 97%; }
.w-98 { width: 98%; } .fb-98 { flex-basis: 98%; } .l-98 { left: 98%; } .h-98 { height: 98%; }
.w-99 { width: 99%; } .fb-99 { flex-basis: 99%; } .l-99 { left: 99%; } .h-99 { height: 99%; }
.w-100 { width: 100%; } .fb-100 { flex-basis: 100%; } .l-100 { left: 100%; } .h-100 { height: 100%; }
