/* Appyon Payments Cockpit : Payments Analytics v4.1 (dados simulados). Só var(--token); nenhuma cor literal.
   v4.1 = redesenho visual (forma de mostrar): hierarquia em 3 perguntas (o que está errado, quanto mudou, onde olhar),
   metadados no popover "i", abas sublinhadas, pílulas de controle, barra de alertas compacta, KPIs de 3 níveis.
   Escala de espaçamento 4/8/12/16/24/32; pesos 400/500/600; tamanhos 12/13/15/22/28 (11 só nos eixos do gráfico). */
:root{
  --an-gap:12px; --an-radius:12px; --an-pill-h:34px;
  --an-ctl-border:color-mix(in srgb, var(--text-3) 85%, var(--bg));   /* borda de controle >= 3:1 nos dois temas */
  --an4-assist-w:400px;
  --an-ring-a:18%; --an-alert-a:16%; --an-tint-a:10%;   /* anel do card ativo, fundo do alerta crítico e tinta do controle: escuro */
}
:root[data-theme="light"]{ --an-ring-a:14%; --an-alert-a:8%; }
@media (prefers-color-scheme:light){ :root:not([data-theme]){ --an-ring-a:14%; --an-alert-a:8%; } }
[hidden]{ display:none !important; }
.an4-sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }

/* `.main` é item de grid de `.app` (shell.css): sem min-width:0 o min-content de tabela larga estoura a página no mobile.
   Regra local desta página; margens da v4.1: 24 (igual ao restante do cockpit) e 16 (<=640). */
body[data-page="analytics-pagamentos"] .main{ min-width:0; padding:12px 24px 32px; background:var(--an-canvas); }
@media (max-width:640px){ body[data-page="analytics-pagamentos"] .main{ padding:12px 16px 24px; } }

.an4-head{ flex-direction:row; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; margin-bottom:8px; }
.an4-head h1{ margin:0; font-size:24px; line-height:32px; font-weight:600; letter-spacing:-0.01em; color:var(--an-text); }
.an4-title{ display:flex; align-items:center; gap:12px; min-width:0; }
.an4-head .btn{ height:34px; min-height:34px; padding:0 14px; border-radius:8px; border:1px solid var(--an-ctl-border); background:transparent; color:var(--an-text); font-size:13px; font-weight:500; transition:background var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard), opacity var(--motion-base) var(--ease-standard); }
.an4-head .btn:hover{ background:var(--an-surface-2); }
.an4-head .btn:focus-visible{ outline:2px solid var(--an-primary); outline-offset:2px; }
.an4-head .btn svg{ width:14px; height:14px; }
.an4-head .btn-primary{ background:var(--accent); border-color:var(--accent); color:var(--on-accent); font-weight:600; }
.an4-head .btn-primary:hover{ background:color-mix(in srgb, var(--accent) 88%, var(--text)); border-color:color-mix(in srgb, var(--accent) 88%, var(--text)); }
.lbl-short{ display:none; }
.an-tabs [role="tab"] > .lbl-short{ display:none; }
/* Selo do cabeçalho: bolinha de estado + texto + ícone de info (verde = dados reais; âmbar = simulado) */
.an4-head .an4-badge-sim{ gap:8px; height:28px; min-width:0; padding:0 4px; border:0; border-radius:var(--radius-pill); background:transparent; color:var(--an-text); font:inherit; font-size:13px; font-weight:500; }
.an4-head .an4-badge-sim::before{ content:""; width:8px; height:8px; flex:none; border-radius:50%; background:var(--warn); }
.an4-head .an4-badge-sim.is-real::before{ background:var(--good); }
.an4-head .an4-badge-sim svg{ order:2; width:16px; height:16px; color:var(--an-text-3); }
.an4-head .an4-badge-sim span{ order:1; }

/* ---------- Abas sublinhadas ---------- */
.an-tabs{ display:flex; flex-wrap:wrap; gap:0 24px; margin-bottom:12px; border-bottom:1px solid var(--an-border-subtle); }
.an-tabs [role="tab"]{ position:relative; min-height:36px; padding:4px 0 8px; border:0; background:transparent; color:var(--an-text-2); font:inherit; font-size:14px; font-weight:500; cursor:pointer; white-space:nowrap; transition:color var(--motion-base) var(--ease-standard); }
.an-tabs [role="tab"] > span{ display:inline-grid; }
.an-tabs [role="tab"] > span::after{ content:attr(data-t); height:0; overflow:hidden; visibility:hidden; font-weight:600; }   /* reserva a largura da aba ativa: sem salto ao trocar */
.an-tabs [role="tab"]:hover{ color:var(--an-text); }
.an-tabs [role="tab"][aria-selected="true"]{ color:var(--an-text); font-weight:600; }
.an-tabs [role="tab"][aria-selected="true"]::after{ content:""; position:absolute; left:0; right:0; bottom:-1px; height:2px; border-radius:2px 2px 0 0; background:var(--an-primary); }
.an-tabs [role="tab"]:focus-visible{ outline:2px solid var(--an-primary); outline-offset:2px; border-radius:4px; }
.an-tabpanel{ display:none; }
@keyframes an-fade-in{ from{ opacity:0; } to{ opacity:1; } }
.an-tabpanel.is-active{ display:block; animation:an-fade-in var(--motion-base) var(--ease-standard); }

/* ---------- Barra de filtros: uma superfície só; controles de 34 px; só o ativo em destaque ---------- */
.an4-toolbar{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-bottom:12px; min-height:52px; padding:8px; background:var(--an-surface); border:1px solid var(--an-border-subtle); border-radius:var(--an-radius-card); box-shadow:var(--an-shadow-card); }
.an4-toolbar > div{ display:contents; }
.an4-divider{ order:5; width:1px; height:24px; margin:0 2px; background:var(--an-border-subtle); }
#anChipBar > *{ order:10; }
.an4-ctl{ position:relative; display:flex; min-width:0; }
.an4-ctl-btn{ display:inline-flex; align-items:center; gap:6px; height:var(--an-pill-h); padding:0 8px; background:var(--an-surface); border:1px solid var(--an-ctl-border); border-radius:10px; color:var(--an-text); font:inherit; font-size:13px; font-weight:500; cursor:pointer; white-space:nowrap; text-align:left; transition:background var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard), opacity var(--motion-base) var(--ease-standard); }
.an4-ctl-btn:hover{ background:var(--an-surface-2); }
.an4-ctl-btn[aria-expanded="true"]{ border-color:var(--an-primary); }
.an4-ctl-btn[aria-disabled="true"]{ color:var(--an-text-2); cursor:not-allowed; }
.an4-ctl[data-ctl="gran"] .an4-ctl-btn{ color:var(--an-primary); background:color-mix(in srgb, var(--an-primary) var(--an-tint-a), var(--an-surface)); }
.an4-ctl-btn svg{ width:14px; height:14px; flex:none; color:var(--an-text-2); }
.an4-ctl-btn .chev{ width:12px; height:12px; color:var(--an-text-3); }
.an4-pill-txt{ display:inline-flex; align-items:center; gap:6px; }
.an4-ctl-clear{ order:99; margin-left:auto; display:flex; align-items:center; }
.an4-ctl-clear:has(button:not([hidden])){ height:24px; padding-left:6px; border-left:1px solid var(--an-border-subtle); }
.an4-ctl-clear button{ display:inline-flex; align-items:center; gap:6px; height:var(--an-pill-h); padding:0 6px; background:transparent; border:0; border-radius:var(--radius-sm); color:var(--an-primary); font:inherit; font-size:13px; font-weight:500; cursor:pointer; transition:background var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard), opacity var(--motion-base) var(--ease-standard); }
.an4-ctl-clear button::after{ content:""; width:14px; height:14px; flex:none; background:currentColor; -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14M10 11v6M14 11v6'/%3E%3C/svg%3E") center/contain no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14M10 11v6M14 11v6'/%3E%3C/svg%3E") center/contain no-repeat; }
.an4-ctl-clear button:hover{ background:var(--accent-soft); }
.an4-metric-seg{ display:inline-flex; box-sizing:border-box; height:var(--an-pill-h); padding:0; gap:0; background:var(--an-surface); border:1px solid var(--an-ctl-border); border-radius:var(--radius-pill); max-width:100%; overflow:hidden; }
.an4-metric-seg button{ height:100%; padding:0 10px; border:0; background:transparent; color:var(--an-text-2); font:inherit; font-size:13px; font-weight:500; border-radius:var(--radius-pill); cursor:pointer; white-space:nowrap; transition:background var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard), opacity var(--motion-base) var(--ease-standard); }
.an4-metric-seg button[aria-pressed="true"]{ background:var(--accent); color:var(--on-accent); font-weight:600; border-radius:var(--radius-pill); }
.an4-ctl-seg{ align-items:center; gap:8px; }
.an4-seg-hint{ font-size:12px; color:var(--an-text-2); white-space:nowrap; }
.an4-metric-seg.is-off button{ cursor:not-allowed; opacity:.6; }
.an4-metric-seg button:hover:not([aria-pressed="true"]):not(:disabled){ background:var(--an-surface-2); color:var(--an-text); }

.an4-menu{ position:absolute; top:calc(100% + 4px); left:0; min-width:100%; width:max-content; max-width:min(360px,92vw); background:var(--panel); border:1px solid var(--hairline-strong); border-radius:var(--radius-md); box-shadow:var(--menu-shadow); padding:var(--space-1); z-index:var(--z-menu); display:none; }
.an4-menu.show{ display:block; }
.an4-menu-group{ padding:8px 12px 4px; font-size:12px; font-weight:600; color:var(--text-2); }
.an4-opt{ display:flex; align-items:flex-start; gap:var(--space-2); width:100%; padding:8px var(--space-3); border:0; border-radius:var(--radius-sm); background:transparent; color:var(--text); font:inherit; font-size:13px; text-align:left; cursor:pointer; }
.an4-opt:hover{ background:var(--panel-hover); }
.an4-opt[aria-selected="true"]{ background:var(--accent-soft); font-weight:600; }
.an4-opt[aria-selected="true"]::before{ content:"\2713"; color:var(--accent-strong); font-weight:600; }
.an4-opt-body{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.an4-opt-win{ font-size:12px; color:var(--text-2); font-variant-numeric:tabular-nums; }
.an4-opt[aria-disabled="true"]{ cursor:not-allowed; color:var(--text-2); }
.an4-opt[aria-disabled="true"]:hover{ background:transparent; }
.an4-opt-why{ display:block; font-size:12px; font-weight:500; color:var(--text-2); font-style:italic; }
.an4-opt[aria-disabled="true"] .an4-opt-why::before{ content:"Indispon\00EDvel: "; font-style:normal; font-weight:600; }
.an4-custom{ gap:8px; padding:8px 12px; align-items:center; flex-wrap:wrap; }

.an4-fchip{ flex-direction:row; align-items:center; }
.an4-fchip-btn{ display:inline-flex; align-items:center; gap:4px; height:var(--an-pill-h); padding:0 8px; border:1px solid var(--an-ctl-border); border-radius:var(--radius-pill); background:transparent; color:var(--an-text-2); font:inherit; font-size:13px; font-weight:500; cursor:pointer; white-space:nowrap; max-width:24ch; transition:background var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard), opacity var(--motion-base) var(--ease-standard); }
.an4-fchip-btn > span{ overflow:hidden; text-overflow:ellipsis; }
.an4-fchip-btn svg{ width:12px; height:12px; flex:none; }
.an4-fchip-btn:hover{ background:var(--an-surface-2); color:var(--an-text); }
.an4-fchip.is-on .an4-fchip-btn{ border-color:var(--accent-strong); background:var(--accent-soft); color:var(--text); border-top-right-radius:0; border-bottom-right-radius:0; max-width:none; }
.an4-fchip-x{ display:inline-flex; align-items:center; justify-content:center; width:32px; height:var(--an-pill-h); border:1px solid var(--accent-strong); border-left:0; border-radius:0 var(--radius-pill) var(--radius-pill) 0; background:var(--accent-soft); color:var(--accent-strong); cursor:pointer; }
.an4-fchip-x svg{ width:12px; height:12px; }
.an4-fchip-clear{ height:var(--an-pill-h); border:0; background:transparent; color:var(--an-primary); font:inherit; font-size:13px; font-weight:500; cursor:pointer; padding:0 8px; }
.an4-fchip .an4-menu{ min-width:220px; max-height:320px; overflow-y:auto; }

/* ---------- Cabeçalho de seção, seletor de comparação e popover "i" ---------- */
.an4-sec-head{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; margin-bottom:12px; min-width:0; }
.an4-metrics-head{ justify-content:flex-start; margin-bottom:8px; }
.an4-sec-title{ margin:0; font-size:16px; line-height:24px; font-weight:600; color:var(--an-text); }
.an4-tagrow{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }
.an4-cmp{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; min-width:0; }
.an4-cmp-lbl{ font-size:13px; color:var(--an-text-2); white-space:nowrap; }
.an4-cmp-pill{ position:relative; display:inline-flex; align-items:center; height:var(--an-pill-h); background:transparent; border:1px solid transparent; border-radius:var(--radius-sm); transition:background var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard), opacity var(--motion-base) var(--ease-standard); }
.an4-cmp-pill:hover{ background:var(--an-surface-2); }
.an4-cmp-pill:focus-within{ outline:2px solid var(--an-primary); outline-offset:2px; }
.an4-cmp-select{ appearance:none; -webkit-appearance:none; height:32px; max-width:260px; padding:0 28px 0 8px; border:0; outline:0; background:transparent; color:var(--an-text); font:inherit; font-size:13px; font-weight:600; border-radius:var(--radius-sm); text-overflow:ellipsis; cursor:pointer; }
.an4-cmp-pill .chev{ position:absolute; right:8px; width:12px; height:12px; color:var(--an-text-3); pointer-events:none; }
.an4-cmp-dates{ min-width:0; font-size:13px; color:var(--an-text-2); font-variant-numeric:tabular-nums; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.an4-cmp-warn{ flex-basis:100%; font-size:12px; color:var(--warn); }
.only-narrow{ display:none; }
.mob-only{ display:none; }
.an4-changes{ display:flex; align-items:flex-start; gap:8px; margin:0 0 0 auto; font-size:12px; line-height:16px; color:var(--an-text-2); }
.an4-changes > span{ min-width:0; display:flex; align-items:flex-end; gap:4px; }
.an4-chg-items{ display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.an4-chg-more{ white-space:nowrap; }
.an4-changes svg{ width:14px; height:14px; margin-top:1px; color:var(--an-text-2); flex:none; }
.an4-changes b{ font-weight:500; }
/* Faixa "Principais métricas": título + comparação, selos abaixo e mudanças à direita (>= 1280); abaixo disso as mudanças descem em largura total */
.an4-strip{ display:grid; grid-template-columns:auto auto minmax(0,1fr); grid-template-areas:"t c m" "g g m"; align-items:center; gap:8px 16px; margin-bottom:12px; padding:12px 16px; background:var(--an-surface); border:1px solid var(--an-border-subtle); border-radius:var(--an-radius-card); box-shadow:var(--an-shadow-card); }
.an4-strip > .an4-metrics-head{ display:contents; }
.an4-strip .an4-sec-title{ grid-area:t; }
.an4-strip .an4-cmp{ grid-area:c; }
.an4-strip .an4-changes{ grid-area:m; margin:0; align-self:start; }
.an4-strip > .an4-tagrow{ grid-area:g; }
@media (max-width:1279px){ .an4-strip{ grid-template-columns:auto minmax(0,1fr); grid-template-areas:"t c" "g g" "m m"; } }
@media (max-width:640px){ .an4-strip{ padding:12px; } }

.an4-infowrap{ position:relative; display:inline-flex; align-items:center; gap:4px; }
.an4-info{ display:inline-flex; align-items:center; justify-content:center; gap:4px; min-width:28px; height:28px; padding:0; border:0; border-radius:var(--radius-pill); background:transparent; color:var(--text-2); font:inherit; cursor:pointer; }
.an4-info svg{ width:16px; height:16px; flex:none; }
.an4-info:hover{ background:var(--panel-hover); color:var(--text); }
.an4-info:focus-visible{ outline:2px solid var(--accent-strong); outline-offset:2px; }
.an4-info.has-txt{ height:var(--an-pill-h); padding:0 12px; border:1px solid var(--an-ctl-border); font-size:13px; font-weight:500; }
.an4-info.has-txt svg{ width:14px; height:14px; }
.an4-info.is-cross{ color:var(--text-2); }
.an4-info.is-mix{ color:var(--accent-strong); }
.an4-pop{ position:fixed; z-index:calc(var(--z-menu) + 1); width:280px; max-width:calc(100vw - 16px); max-height:min(60vh,420px); overflow-y:auto; padding:12px; background:var(--panel); border:1px solid var(--hairline-strong); border-radius:var(--radius-md); box-shadow:var(--menu-shadow); color:var(--text); font-size:12px; font-weight:400; line-height:1.5; text-align:left; white-space:normal; }
.an4-pop:focus{ outline:none; }
.an4-pop p{ margin:0; }
.an4-pop-dl{ display:flex; flex-direction:column; gap:4px; margin:0; }
.an4-pop-dl dt{ margin-top:4px; color:var(--text-2); font-weight:500; }
.an4-pop-dl dt:first-child{ margin-top:0; }
.an4-pop-dl dd{ margin:0; color:var(--text); font-variant-numeric:tabular-nums; }
.an4-pop-dl ul{ margin:0; padding-left:16px; }
.an4-pop .an4-kpi-stack{ margin-top:4px; }
.an4-pop .an4-legend-marcos{ margin:0; padding:0; border:0; grid-template-columns:1fr; }
@media (max-width:640px){
  .an4-pop{ left:8px; right:8px; bottom:8px; top:auto; width:auto; max-width:none; }
  .an4-info{ min-width:32px; height:32px; }
  .only-narrow{ display:inline-flex; }
  .mob-only{ display:block; }
  .an4-cmp-dates{ display:none; }
}

/* ---------- Selos e etiquetas (só exceções) ---------- */
.an4-seal{ display:inline-flex; align-items:center; height:20px; padding:0 8px; border-radius:var(--radius-pill); border:1px dashed var(--an-ctl-border); color:var(--text-2); font-size:12px; font-weight:500; white-space:nowrap; }
.an4-seal.is-parecer{ border-style:solid; border-color:var(--warn-line); background:var(--warn-bg); color:var(--warn); }
.an4-tag{ display:inline-flex; align-items:center; min-height:20px; padding:0 8px; border-radius:var(--radius-pill); border:1px solid var(--hairline-strong); color:var(--text-2); font-size:12px; font-weight:500; }
.an4-tag.is-mix{ border-color:var(--accent-strong); color:var(--accent-strong); background:var(--accent-soft); }
.an4-tag.is-cross{ border-color:var(--warn-line); color:var(--warn); background:var(--warn-bg); }
.an4-tag.is-quality-warn{ border-color:var(--warn-line); color:var(--warn); background:var(--warn-bg); }
.an4-tag.is-quality-bad{ border-color:var(--bad-line); color:var(--bad); background:var(--bad-bg); }
.an4-origin{ font-size:12px; color:var(--text-2); }
.an4-origin.is-marg::before{ content:""; display:inline-block; width:8px; height:8px; margin-right:4px; border:1px dashed var(--text-2); border-radius:50%; }
.an4-state{ display:inline-flex; align-items:center; gap:4px; font-size:12px; color:var(--text-2); white-space:nowrap; }
.an4-state i{ width:8px; height:8px; border-radius:50%; background:var(--text-3); }
.an4-state.is-ok i{ background:var(--good); } .an4-state.is-warn i{ background:var(--warn); }

/* ---------- Delta: seta + sinal + texto; cor só quando significativo ---------- */
.an4-delta{ display:inline-flex; align-items:center; gap:4px; font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
.an4-delta svg{ width:12px; height:12px; flex:none; }
.an4-delta.is-good{ color:var(--good); }
.an4-delta.is-bad{ color:var(--bad); }
.an4-delta.is-noise,.an4-delta.is-off{ color:var(--an-text-2); font-weight:400; }
.an4-delta.is-off{ white-space:normal; }
.an4-ruido{ font-weight:400; }
.an4-ruido .sh{ display:none; }
.an4-delta-rel{ font-size:12px; color:var(--an-text-2); font-variant-numeric:tabular-nums; white-space:nowrap; }
.an4-deltas{ display:inline-flex; align-items:baseline; justify-content:flex-end; gap:8px; white-space:nowrap; }
.an4-nbaixo{ font-size:12px; font-weight:500; color:var(--warn); white-space:nowrap; }
.an4-nbaixo::before{ content:""; display:inline-block; width:8px; height:8px; margin-right:4px; border-radius:50%; background:var(--warn); }

/* ---------- KPI: chip da métrica + rótulo, valor, delta, apoio e tendência. O resto vai para o popover ---------- */
.an4-kpis{ display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:var(--an-gap); margin-bottom:16px; }
@media (max-width:1279px){ .an4-kpis{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:1023px){ .an4-kpis{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:639px){ .an4-kpis{ grid-template-columns:minmax(0,1fr); } }
.an4-kpis > *,.an4-split > *{ min-width:0; }
.an4-kpi{ position:relative; display:flex; min-width:0; background:var(--an-surface); border:1px solid var(--an-border-subtle); border-radius:var(--an-radius-card); box-shadow:var(--an-shadow-card); container-type:inline-size; transition:border-color var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard), background var(--motion-base) var(--ease-standard); }
.an4-kpi-main,.an4-kpi-body{ display:flex; flex-direction:column; gap:5px; flex:1; min-width:0; padding:10px 12px; border:0; border-radius:inherit; background:transparent; color:inherit; font:inherit; text-align:left; transition:background var(--motion-base) var(--ease-standard); }
button.an4-kpi-main{ cursor:pointer; }
button.an4-kpi-main:hover{ background:var(--an-surface-2); }
button.an4-kpi-main:focus-visible{ outline:2px solid var(--an-primary); outline-offset:2px; }
.an4-kpi-label{ display:flex; align-items:center; gap:8px; padding-right:20px; font-size:12px; line-height:16px; min-height:32px; font-weight:500; color:var(--an-text-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.an4-kpi-lt{ min-width:0; white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.an4-kpi-ic{ display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; flex:none; border-radius:8px; }
.an4-kpi-ic svg{ width:16px; height:16px; }
.an4-kpi-ic.is-receita{ color:var(--kpi-ic-receita); background:var(--kpi-ic-receita-bg); }
.an4-kpi-ic.is-aprov_cit{ color:var(--kpi-ic-cit); background:var(--kpi-ic-cit-bg); }
.an4-kpi-ic.is-captura{ color:var(--kpi-ic-captura); background:var(--kpi-ic-captura-bg); }
.an4-kpi-ic.is-aprov_mit{ color:var(--kpi-ic-mit); background:var(--kpi-ic-mit-bg); }
.an4-kpi-ic.is-recuperacao{ color:var(--kpi-ic-recuperacao); background:var(--kpi-ic-recuperacao-bg); }
.an4-kpi-ic.is-disputas{ color:var(--kpi-ic-disputas); background:var(--kpi-ic-disputas-bg); }
.an4-dot{ display:none; }   /* o alerta do card é o filete vermelho à esquerda; a bolinha duplicaria o sinal */
.an4-kpi-row{ display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:0; }
.an4-kpi-d{ display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; min-width:0; }
.an4-kpi-value{ font-family:var(--font-sans); font-size:clamp(18px,15cqi,28px); font-weight:600; letter-spacing:-0.01em; line-height:1.1; color:var(--an-text); font-variant-numeric:tabular-nums; white-space:nowrap; }
.an4-kpi-value.is-sm{ font-size:22px; }
.an4-kpi-sec{ display:block; min-height:16px; font-size:12px; line-height:16px; color:var(--an-text-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Disputas: a linha secundária (chargebacks e VAMP) quebra em duas linhas em vez de cortar o número */
.an4-kpi[data-met="disputas"] .an4-kpi-sec{ white-space:normal; overflow:visible; text-overflow:clip; }
.an4-kpi-sec.has-src{ display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 6px; }
.an4-kpi-sec.has-src > .t{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:inherit; }
.an4-kpi[data-met="disputas"] .an4-kpi-sec.has-src > .t{ flex:1 1 100%; overflow:visible; text-overflow:clip; white-space:normal; }   /* chip em linha própria, nada se sobrepõe */
.an4-kpi-src{ flex:none; font-size:10px; line-height:14px; padding:0 5px; border:1px dashed var(--an-ctl-border); border-radius:var(--radius-pill); color:var(--text-2); white-space:nowrap; }
.an4-kpi-tools{ position:absolute; top:8px; right:8px; }
.an4-kpi-tools .an4-info{ min-width:24px; height:24px; }
.an4-kpi.is-on{ border-color:var(--an-primary); box-shadow:0 0 0 .5px var(--an-primary), 0 0 0 3px color-mix(in srgb, var(--an-primary) var(--an-ring-a), transparent); }
.an4-kpi.is-alert{ border-left:3px solid var(--bad); }
.an4-kpi.is-nodata{ background:transparent; border-style:dashed; border-color:var(--an-ctl-border); box-shadow:none; }
.an4-kpi.is-nodata .an4-kpi-value{ font-size:15px; font-weight:500; color:var(--an-text-2); }
/* Tendência: série real (média móvel de 7 dias), traço neutro; legenda sempre visível */
.an4-spark{ display:flex; flex-direction:column; gap:2px; margin-top:auto; padding-top:0; }
.an4-kpi-main > .an4-kpi-sec:last-child,.an4-kpi-body > .an4-kpi-sec:last-child{ margin-top:auto; }
.an-spark{ display:block; width:100%; height:20px; }
.an-spark path{ fill:none; stroke:var(--an-spark-stroke); stroke-width:1.5; stroke-linejoin:round; stroke-linecap:round; vector-effect:non-scaling-stroke; }
.an-spark path.fill{ fill:var(--an-spark-fill); stroke:none; }
.an4-spark-cap{ font-size:11px; line-height:1.25; color:var(--an-text-2); }
.an4-kpi-stack{ display:flex; flex-direction:column; gap:4px; }
.an4-kpi-line{ display:flex; justify-content:space-between; gap:var(--space-2); font-size:12px; color:var(--text-2); font-variant-numeric:tabular-nums; }
.an4-kpi-line b{ color:var(--text); font-weight:600; }
.an4-kpi-line.is-bad b{ color:var(--bad); }
.an4-kpi-meta{ font-size:12px; line-height:1.5; color:var(--an-text-2); font-variant-numeric:tabular-nums; }
@container (min-width:230px){
  .an4-kpi-main,.an4-kpi-body{ padding:12px 14px; }
  .an4-kpi-label{ font-size:13px; }
}
@container (max-width:219px){
  .an4-ruido .lg{ display:none; }
  .an4-ruido .sh{ display:inline; }
}
@media (max-width:639px){
  .an4-kpi-value{ font-size:22px; }
  .an4-kpi-main{ display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:12px; padding:12px; }
  .an4-kpi-label{ grid-column:1 / -1; }
  .an4-kpi-row{ grid-column:1 / -1; }
  .an4-kpi-sec,.an4-spark{ grid-column:1 / -1; }
}

/* ---------- Barra de alertas ---------- */
.an4-alertbar{ margin-bottom:12px; border:1px solid var(--an-border-subtle); border-radius:var(--an-radius-card); background:var(--an-surface); font-size:13px; color:var(--an-text); }
.an4-alertbar.is-bad{ background:color-mix(in srgb, var(--bad) var(--an-alert-a), var(--an-surface)); border-color:color-mix(in srgb, var(--bad) 40%, transparent); }
.an4-alertbar.is-warn{ background:color-mix(in srgb, var(--warn) var(--an-alert-a), var(--an-surface)); border-color:color-mix(in srgb, var(--warn) 40%, transparent); }
.an4-alertbar.is-ok{ display:flex; align-items:center; gap:8px; min-height:32px; padding:0 12px; background:transparent; border-color:var(--an-border-subtle); color:var(--an-text-2); }
.an4-alertbar.is-ok svg{ color:var(--good); }
.an4-alertbar svg{ width:16px; height:16px; flex:none; }
.an4-alertbar.is-bad > .an4-alertbar-head > svg,.an4-alertbar.is-bad .an4-alertbar-count{ color:var(--bad); }
.an4-alertbar.is-warn > .an4-alertbar-head > svg,.an4-alertbar.is-warn .an4-alertbar-count{ color:var(--warn); }
.an4-alertbar-head{ display:flex; align-items:center; gap:8px; min-height:40px; padding:0 8px 0 16px; }
.an4-alertbar-count{ font-weight:600; white-space:nowrap; }
.an4-alertbar-first{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--an-text); }
.an4-alertbar-rest{ color:var(--an-text-2); white-space:nowrap; }
.an4-alertbar-more{ flex:none; height:32px; padding:0 12px; border:0; border-radius:var(--radius-sm); background:transparent; color:var(--an-text); font:inherit; font-weight:600; text-decoration:none; cursor:pointer; transition:background var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard), opacity var(--motion-base) var(--ease-standard); }
.an4-alertbar-more::after{ content:"\2192"; margin-left:8px; }
.an4-alertbar-more[aria-expanded="true"]::after{ content:"\2191"; }
.an4-alertbar-more:hover{ background:color-mix(in srgb, var(--an-text) 8%, transparent); }
.an4-alertbar-more:focus-visible{ outline:2px solid var(--an-primary); outline-offset:2px; }
.an4-alertlist{ margin:0; padding:0; list-style:none; border-top:1px solid color-mix(in srgb, var(--an-text) 12%, transparent); }
.an4-alertitem{ display:flex; align-items:flex-start; gap:12px; padding:12px 16px; border-top:1px solid color-mix(in srgb, var(--an-text) 8%, transparent); }
.an4-alertitem:first-child{ border-top:0; }
.an4-alertitem.is-bad svg{ color:var(--bad); } .an4-alertitem.is-warn svg{ color:var(--warn); } .an4-alertitem.is-info svg{ color:var(--an-text-2); }
.an4-alert-body{ flex:1; min-width:0; overflow-wrap:anywhere; }
.an4-alert-title{ display:block; font-weight:600; }
.an4-alert-meta{ display:block; margin-top:2px; font-size:12px; color:var(--an-text-2); font-variant-numeric:tabular-nums; }
@media (max-width:640px){
  .an4-alertbar-head{ flex-wrap:wrap; padding:8px 4px 8px 12px; }
  .an4-alertbar-first{ flex-basis:100%; order:3; white-space:normal; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; }
  .an4-alertbar-more{ margin-left:auto; }
}

/* ---------- Gráfico principal ---------- */
.an4-chart-card{ padding:16px 20px; background:var(--an-surface); border:1px solid var(--an-border-subtle); border-radius:var(--an-radius-card); box-shadow:var(--an-shadow-card); margin-bottom:16px; min-width:0; }
.an4-chart-card:has(.an-empty.has-ic){ padding-top:12px; padding-bottom:12px; }   /* gráfico vazio: cartão compacto */
.an4-chart-head{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; margin-bottom:8px; }
.an4-chart-tools{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; }
.an4-chart-key{ display:flex; flex-wrap:wrap; gap:4px 16px; font-size:12px; color:var(--text-2); font-variant-numeric:tabular-nums; min-width:0; }
.an4-chart-key span{ display:inline-flex; align-items:center; gap:8px; }
.an4-chart-key i{ display:inline-block; width:16px; height:0; border-top:2px solid var(--accent-strong); }
.an4-chart-key i.is-cmp{ border-top:2px dashed var(--text-3); }
.an4-chart-key i.is-synthetic{ height:8px; border:1px solid var(--text-3); background:repeating-linear-gradient(45deg,var(--text-3) 0 1px,transparent 1px 4px); opacity:.7; }
.an4-marcos-d{ font-size:13px; }
.an4-marcos-d > summary{ display:inline-flex; align-items:center; height:var(--an-pill-h); padding:0 12px; border:1px solid var(--an-ctl-border); border-radius:var(--radius-pill); color:var(--text-2); font-weight:500; cursor:pointer; list-style:none; }
.an4-marcos-d[open]{ flex-basis:100%; }
@media (min-width:1024px){ .an4-marcos-d{ display:none; } }
@media (max-width:1023px){ .wide-only{ display:none; } }
.an4-plot{ position:relative; }
.an4-plot svg{ width:100%; height:240px; display:block; }
@media (max-width:1024px){ .an4-plot svg{ height:220px; } }
@media (max-width:640px){ .an4-plot svg{ height:200px; } }
.an4-plot .line-cur{ fill:none; stroke:var(--accent-strong); stroke-width:2; }
.an4-plot .line-cmp{ fill:none; stroke:var(--text-3); stroke-width:1.5; stroke-dasharray:5 4; }
.an4-plot .area-cur{ stroke:none; }
.an4-plot .grid{ stroke:var(--text); stroke-opacity:.08; stroke-width:1; }
.an4-plot .axis-label{ font-family:var(--font-sans); font-size:11px; fill:var(--text-2); font-variant-numeric:tabular-nums; }
.an4-plot .mk{ stroke:var(--text-2); stroke-width:1; stroke-opacity:.6; }
.an4-plot .mk.is-soft{ stroke-dasharray:3 3; }
.an4-plot .mk-badge{ fill:var(--panel); stroke:var(--text-2); stroke-width:1; }
.an4-plot .mk-num{ font-family:var(--font-sans); font-size:11px; font-weight:600; fill:var(--text); text-anchor:middle; }
.an4-plot .incident{ fill:var(--bad-bg); stroke:none; opacity:.7; }
.an4-plot .synthetic{ stroke:none; opacity:.55; }
.an4-plot .synthetic-line{ stroke:var(--text-3); stroke-width:1; }
.an4-plot .cross{ stroke:var(--hairline-strong); stroke-width:1; display:none; }
.an4-plot .dot-cur{ fill:var(--accent-strong); stroke:var(--panel); stroke-width:2; display:none; }
.an4-plot .dot-cmp{ fill:var(--text-3); stroke:var(--panel); stroke-width:2; display:none; }
.an4-plot-range{ position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:crosshair; }
.an4-plot-range:focus-visible{ opacity:1; outline:2px solid var(--accent-strong); outline-offset:2px; background:transparent; }
.an4-tip{ position:absolute; z-index:5; display:none; pointer-events:none; min-width:200px; padding:var(--space-3); background:var(--panel); border:1px solid var(--hairline-strong); border-radius:var(--radius-md); box-shadow:var(--menu-shadow); font-size:12px; color:var(--text); font-variant-numeric:tabular-nums; }
.an4-tip-row{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); padding:2px 0; }
.an4-tip-row .k{ display:inline-flex; align-items:center; gap:8px; color:var(--text-2); }
.an4-tip-row .k i{ width:12px; height:0; border-top:2px solid var(--accent-strong); }
.an4-tip-row .k i.is-cmp{ border-top:2px dashed var(--text-3); }
.an4-tip-row b{ font-weight:600; }
.an4-tip-foot{ margin-top:var(--space-2); padding-top:var(--space-2); border-top:1px solid var(--hairline); display:flex; justify-content:space-between; align-items:center; gap:var(--space-2); }
.an4-legend-marcos{ display:grid; grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr)); gap:8px 16px; margin:0; padding:0; list-style:none; font-size:12px; color:var(--text-2); }
.an4-legend-marcos li{ display:flex; align-items:baseline; gap:8px; }
.an4-legend-marcos .n{ display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; flex:none; border-radius:50%; border:1px solid var(--text-2); font-size:12px; font-weight:600; color:var(--text); }
.an4-legend-marcos .n.is-soft{ border-style:dashed; }
.an4-legend-marcos time{ color:var(--text-2); font-variant-numeric:tabular-nums; font-weight:500; }

/* ---------- Mix: "O que explica a variação" (recolhível); a frase do eixo fica ao lado do seletor (>= 1024) ---------- */
.an4-mix{ padding:0; }
.an4-mix > summary{ display:flex; align-items:center; gap:16px; min-height:52px; padding:8px 20px; cursor:pointer; list-style:none; }
.an4-mix > summary::-webkit-details-marker{ display:none; }
.an4-mix > summary:focus-visible{ outline:2px solid var(--an-primary); outline-offset:-2px; border-radius:var(--an-radius-card); }
.an4-mix > summary .chev{ width:14px; height:14px; margin-left:auto; flex:none; color:var(--an-text-3); transition:transform var(--motion-base) var(--ease-standard); }
.an4-mix[open] > summary .chev{ transform:rotate(180deg); }
.an4-mix-sum{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; min-width:0; }
.an4-mix-label{ font-size:13px; color:var(--an-text-2); }
.an4-mix-body{ display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:12px 16px; padding:0 20px 16px; min-width:0; }
.an4-mix-body > *,.an4-mix-panel > *{ grid-column:1 / -1; min-width:0; }
.an4-mix-body > p{ margin:0; }
.an4-mix-line{ margin:0; font-size:12px; line-height:16px; color:var(--an-text-2); }
.an4-mix-line b{ font-weight:500; color:var(--an-text-2); }
.an4-mix-panel{ display:contents; }
.an4-mix-body > .an4-metric-seg{ justify-self:start; }
@media (min-width:1024px){
  .an4-mix-body > .an4-metric-seg{ grid-column:1; }
  .an4-mix-body > .an4-metric-seg ~ .an4-mix-panel > .an4-mix-line{ grid-column:2; }
}

/* ---------- Tabelas ---------- */
.an4-tablewrap{ position:relative; max-width:100%; overflow-x:auto; border:1px solid var(--an-border-subtle); border-radius:8px; background:var(--an-surface); }
.an4-tablewrap:focus-visible{ outline:2px solid var(--an-primary); outline-offset:2px; }
@media (max-width:1024px){ .an4-tablewrap::after{ content:"Role para ver mais"; position:sticky; left:0; display:block; padding:4px 12px; font-size:12px; color:var(--an-text-2); } }
table.an4-table{ width:100%; border-collapse:collapse; min-width:560px; font-size:13px; font-variant-numeric:tabular-nums; }
table.an4-table thead th{ height:36px; padding:4px 16px; text-align:right; font-size:12px; font-weight:600; color:var(--an-text-2); background:var(--an-surface-2); border-bottom:1px solid var(--an-border-subtle); white-space:nowrap; }
table.an4-table thead th:first-child,table.an4-table tbody td:first-child{ text-align:left; }
table.an4-table tbody td{ padding:4px 16px; height:36px; text-align:right; color:var(--an-text); vertical-align:middle; border:0; border-bottom:1px solid var(--an-border-subtle); }
table.an4-table tbody tr:last-child td{ border-bottom:0; }
table.an4-table tbody tr{ transition:background var(--motion-base) var(--ease-standard); }
table.an4-table tbody tr:hover{ background:var(--an-surface-2); }
table.an4-table tbody td:first-child{ position:sticky; left:0; background:var(--an-surface); font-weight:500; transition:background var(--motion-base) var(--ease-standard); }
table.an4-table tbody tr:hover td:first-child{ background:var(--an-surface-2); }
table.an4-table tr.is-row.is-click{ cursor:pointer; }
table.an4-table tr.is-row.is-click td{ height:48px; }
table.an4-table .sub{ display:block; font-size:12px; font-weight:400; color:var(--an-text-2); white-space:nowrap; }
table.an4-table td .sub{ margin-top:2px; }
table.an4-table td b{ font-weight:600; }
table.an4-table tr.is-group td{ height:auto; padding:12px 16px 4px; background:transparent; border-top:1px solid var(--an-border-subtle); border-bottom:0; font-size:12px; font-weight:600; color:var(--an-text-2); text-align:left; }
table.an4-table tr.is-group:first-child td{ border-top:0; }
/* Logo de PSP (20 px) ao lado do nome; o nome textual fica sempre visível */
.an4-psp{ display:inline-flex; align-items:center; gap:12px; }
.an4-psp-ic::before{ content:attr(data-l); }
.an4-psp-ic{ user-select:none; display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; flex:none; border-radius:5px; font-size:12px; font-weight:600; line-height:1; }
.an4-psp-ic.is-stripe{ background:var(--psp-stripe); color:var(--psp-stripe-ink); }
.an4-psp-ic.is-adyen{ background:var(--psp-adyen); color:var(--psp-adyen-ink); }
table.an4-table .num-muted{ color:var(--text-2); }
.an4-trend{ display:inline-block; width:72px; height:20px; vertical-align:middle; }
.an4-trend path{ fill:none; stroke:var(--text-2); stroke-width:1.5; }
.an4-lowN{ color:var(--text-2); font-style:italic; font-size:12px; }
.an4-note{ margin:var(--space-2) 0 0; font-size:12px; line-height:1.5; color:var(--text-2); }
.an4-tablewrap.is-compact table.an4-table{ min-width:0; }
.an4-tablewrap.is-compact table.an4-table thead th{ white-space:normal; }
.an4-drillbtn{ display:inline-flex; align-items:center; justify-content:center; gap:4px; min-height:32px; min-width:32px; padding:0 8px; border:0; border-radius:var(--radius-sm); background:transparent; color:var(--accent-strong); font:inherit; font-size:12px; font-weight:500; cursor:pointer; white-space:nowrap; }
.an4-drillbtn svg{ width:14px; height:14px; }
.an4-drillbtn:hover{ background:var(--accent-soft); }
.an4-drillbtn:focus-visible{ outline:2px solid var(--accent-strong); outline-offset:2px; }
.an4-drillbtn[disabled]{ color:var(--text-3); cursor:not-allowed; background:transparent; }
.an4-more{ margin:8px 0 0; height:32px; padding:0 12px; border:0; border-radius:var(--radius-sm); background:transparent; color:var(--accent-strong); font:inherit; font-size:13px; font-weight:500; cursor:pointer; }
.an4-more:hover{ background:var(--accent-soft); }
.an4-more:focus-visible{ outline:2px solid var(--accent-strong); outline-offset:2px; }
.an4-how{ margin-top:8px; font-size:12px; color:var(--text-2); }
.an4-how > summary{ display:inline-flex; align-items:center; min-height:32px; cursor:pointer; font-weight:500; list-style:none; }
.an4-how > summary::before{ content:"+"; display:inline-block; width:16px; color:var(--text-3); }
.an4-how[open] > summary::before{ content:"\2212"; }
.an4-how > summary::-webkit-details-marker{ display:none; }
.an4-how > summary:focus-visible{ outline:2px solid var(--accent-strong); outline-offset:2px; border-radius:4px; }
.an4-how-body p{ margin:0 0 8px; line-height:1.5; }
.an4-toggle{ display:inline-flex; align-items:center; gap:8px; min-height:32px; font-size:13px; color:var(--text-2); cursor:pointer; }
.an4-toggle input{ width:16px; height:16px; accent-color:var(--accent-strong); }
.is-so-mudou tr.is-quiet{ display:none; }
.an4-cols-menu{ position:relative; }
.an4-cols-menu > summary{ display:inline-flex; align-items:center; height:var(--an-pill-h); padding:0 12px; border:1px solid var(--an-ctl-border); border-radius:var(--radius-pill); color:var(--text-2); font-size:13px; font-weight:500; cursor:pointer; list-style:none; }
.an4-cols-menu > summary::-webkit-details-marker{ display:none; }
.an4-cols-list{ position:absolute; right:0; top:calc(100% + 4px); z-index:var(--z-menu); display:flex; flex-direction:column; gap:4px; min-width:200px; padding:8px; background:var(--panel); border:1px solid var(--hairline-strong); border-radius:var(--radius-md); box-shadow:var(--menu-shadow); }
.an4-cols-list label{ display:flex; align-items:center; gap:8px; min-height:32px; padding:0 8px; font-size:13px; cursor:pointer; }
.an4-cols-list input{ width:16px; height:16px; accent-color:var(--accent-strong); }

/* ---------- Abas 2 a 5: estrutura ---------- */
.an4-tab{ display:flex; flex-direction:column; gap:16px; min-width:0; }
.an4-tab > *{ min-width:0; }
.an4-tab .an4-chart-card{ margin-bottom:0; }
.an4-tab .an4-metrics-head{ margin-bottom:0; }
.an4-tab > .an4-how{ margin:-8px 0 0; }
.an4-split{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--an-gap); }
@media (max-width:1023px){ .an4-split{ grid-template-columns:minmax(0,1fr); } }
.an4-cols{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
@media (max-width:1023px){ .an4-cols{ grid-template-columns:minmax(0,1fr); } }
.an4-foot{ margin:8px 0 0; font-size:12px; line-height:1.5; color:var(--text-2); }
.an-empty{ text-align:center; padding:var(--space-6) var(--space-4); color:var(--text-2); font-size:13px; }
.an-empty.has-ic{ display:flex; flex-direction:column; align-items:center; gap:8px; padding:8px 16px 4px; color:var(--an-text-2); font-size:13px; line-height:18px; }
.an-empty.has-ic .an-empty-ic{ display:inline-flex; color:var(--an-primary); opacity:.7; }
.an-empty.has-ic .an-empty-ic svg{ width:24px; height:24px; }
.an-empty.has-ic .an-empty-txt{ max-width:480px; text-wrap:balance; }

/* ---------- Famílias de recusa: um só matiz com variação de luminosidade ---------- */
.an4-fam{ display:flex; width:100%; height:32px; border-radius:var(--radius-sm); overflow:hidden; background:var(--panel-hover); gap:2px; }
.an4-fam > b{ display:flex; align-items:center; min-width:0; padding:0 8px; overflow:hidden; white-space:nowrap; font-size:12px; font-weight:500; color:var(--text); }
.an4-fam .f-emissor,.an4-fam-legend .f-emissor{ background:var(--accent); color:var(--on-accent); }
.an4-fam .f-bloqueio,.an4-fam-legend .f-bloqueio{ background:color-mix(in srgb, var(--accent) 70%, transparent); }
.an4-fam .f-tecnico,.an4-fam-legend .f-tecnico{ background:color-mix(in srgb, var(--accent) 45%, transparent); }
.an4-fam .f-auth,.an4-fam-legend .f-auth{ background:color-mix(in srgb, var(--accent) 25%, transparent); }
.an4-fam-legend .f-invalido{ background:var(--text-3); }
.an4-fam-legend{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:8px 16px; margin:12px 0 0; font-size:12px; color:var(--text-2); }
.an4-fam-legend > div{ display:flex; flex-direction:column; gap:2px; min-width:0; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.an4-fam-legend .k{ display:inline-flex; align-items:center; gap:8px; font-weight:600; color:var(--text); }
.an4-fam-legend .k i{ width:10px; height:10px; border-radius:3px; display:inline-block; }
.an4-fam-legend .sub{ font-size:12px; color:var(--text-2); }

/* ---------- Bandeiras: barras horizontais ---------- */
.an4-hbars{ display:flex; flex-direction:column; gap:12px; margin:0; padding:0; list-style:none; }
.an4-hbar{ display:grid; grid-template-columns:minmax(80px,140px) minmax(0,1fr) auto; align-items:center; gap:12px; min-width:0; font-size:13px; font-variant-numeric:tabular-nums; }
.an4-hbar .lab{ min-width:0; display:flex; flex-direction:column; font-weight:500; color:var(--text); }
.an4-hbar .lab small{ font-size:12px; font-weight:400; color:var(--text-2); }
.an4-hbar .track{ position:relative; height:8px; border-radius:99px; background:var(--panel-hover); overflow:hidden; }
.an4-hbar .track b{ position:absolute; inset:0 auto 0 0; border-radius:99px; background:var(--accent-strong); }
.an4-hbar .val{ display:flex; flex-direction:column; align-items:flex-end; min-width:0; text-align:right; font-weight:600; color:var(--text); overflow-wrap:anywhere; }
.an4-hbar .val small{ font-size:12px; font-weight:400; color:var(--text-2); }
.an4-hbar.has-drill{ grid-template-columns:minmax(80px,140px) minmax(0,1fr) minmax(84px,auto) auto; }
.an4-hbar.is-lown .track b{ display:none; }
.an4-hbar.is-lown .track{ background:transparent; border:1px dashed var(--an-ctl-border); }
.an4-hbar.is-lown .val{ font-weight:400; font-style:italic; color:var(--text-2); }
.an4-hbar.is-zero .val{ color:var(--text-2); }
@media (max-width:640px){
  .an4-hbar{ grid-template-columns:minmax(64px,96px) minmax(0,1fr) auto; gap:8px; }
  .an4-hbar.has-drill{ grid-template-columns:minmax(64px,96px) minmax(0,1fr) auto; }
  .an4-hbar .an4-drillbtn{ grid-column:1 / -1; justify-self:start; }
}

/* ---------- Análise do dia ---------- */
.an4-daynav{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.an4-daynav-btn{ display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border:1px solid var(--an-ctl-border); border-radius:var(--radius-sm); background:var(--panel); color:var(--text); cursor:pointer; }
.an4-daynav-btn:hover{ background:var(--panel-hover); }
.an4-daynav-btn[disabled]{ opacity:.5; cursor:not-allowed; }
.an4-daynav-btn svg{ width:16px; height:16px; }
.an4-daynav-date{ display:flex; flex-direction:column; min-width:0; }
.an4-daynav-date b{ font-size:15px; line-height:20px; font-weight:600; color:var(--text); font-variant-numeric:tabular-nums; }
.an4-daynav-info{ margin-left:auto; }
.an4-cal{ position:absolute; top:calc(100% + 4px); left:0; width:280px; padding:var(--space-3); background:var(--panel); border:1px solid var(--hairline-strong); border-radius:var(--radius-md); box-shadow:var(--menu-shadow); z-index:var(--z-menu); display:none; }
.an4-cal.show{ display:block; }
.an4-cal-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:var(--space-2); font-size:13px; font-weight:600; }
.an4-cal-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:2px; text-align:center; }
.an4-cal-grid .dow{ font-size:12px; font-weight:500; color:var(--text-2); padding:4px 0; }
.an4-cal-day{ height:32px; border:1px solid transparent; border-radius:var(--radius-sm); background:transparent; color:var(--text); font:inherit; font-size:12px; font-variant-numeric:tabular-nums; cursor:pointer; }
.an4-cal-day:hover{ background:var(--panel-hover); }
.an4-cal-day[aria-selected="true"]{ background:var(--accent); color:var(--on-accent); font-weight:600; }
.an4-cal-day.is-today{ border-color:var(--accent-strong); }
.an4-cal-day.has-alert{ box-shadow:inset 0 -3px 0 var(--bad); }
.an4-cal-day[disabled]{ color:var(--text-3); opacity:.6; cursor:not-allowed; }
.an4-day-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.an4-day-grid > *{ min-width:0; }
@media (max-width:1199px){ .an4-day-grid{ grid-template-columns:minmax(0,1fr); } }
.an4-day-card{ display:flex; flex-direction:column; gap:12px; min-width:0; padding:20px; background:var(--panel); border:1px solid var(--hairline); border-radius:var(--an-radius); overflow-wrap:anywhere; }
.an4-day-card.is-wide{ grid-column:1 / -1; }
.an4-day-card .an4-tablewrap{ overflow-wrap:normal; }
.an4-day-card-head{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-2); }
.an4-day-card-head h3{ display:flex; align-items:center; gap:8px; margin:0; font-size:15px; line-height:20px; font-weight:600; color:var(--text); }
.an4-day-card-head .idx{ font-size:12px; font-weight:500; color:var(--text-2); font-variant-numeric:tabular-nums; }
.an4-sentence{ margin:0; padding:8px 0; border-bottom:1px solid var(--hairline); font-size:13px; line-height:1.5; color:var(--text); }
.an4-sentence:last-child{ border-bottom:0; }
.an4-timeline{ list-style:none; margin:0; padding:0 0 0 16px; border-left:1px solid var(--hairline-strong); display:flex; flex-direction:column; gap:12px; }
.an4-timeline li{ position:relative; font-size:13px; color:var(--text); }
.an4-timeline li::before{ content:""; position:absolute; left:-21px; top:5px; width:7px; height:7px; border-radius:50%; background:var(--text-3); border:2px solid var(--panel); box-sizing:content-box; }
.an4-timeline li.is-incident::before{ background:var(--bad); }
.an4-timeline time{ display:block; font-size:12px; color:var(--text-2); font-variant-numeric:tabular-nums; }
.an4-empty-ok{ display:flex; align-items:center; gap:var(--space-2); margin:0; font-size:13px; color:var(--text-2); }
.an4-empty-ok svg{ width:16px; height:16px; color:var(--good); }
.an4-actions{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:var(--space-2); }
.an4-actions li{ padding:var(--space-3) var(--space-4); border:1px solid var(--hairline); border-radius:var(--radius-md); background:var(--panel-hover); font-size:13px; }
.an4-drill{ padding:var(--space-4) var(--space-5); background:var(--panel); border:1px solid var(--accent-strong); border-radius:var(--an-radius); min-width:0; }
.an4-drill:focus{ outline:none; }
.an4-drill > .an4-tablewrap,.an4-drill > .an4-drill-rows{ margin-top:var(--space-3); }
.an4-drill-ctl{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-2) var(--space-4); margin-bottom:var(--space-2); }
.an4-drill-ctl label{ display:flex; align-items:center; gap:var(--space-2); }
.an4-drill-rows{ max-height:380px; overflow:auto; border-radius:var(--radius-md); }
@media (max-width:640px){
  .an4-drill{ padding:var(--space-3); }
  .an4-drill-ctl{ flex-direction:column; align-items:flex-start; }
  .an4-cal{ position:fixed; left:var(--space-3); right:var(--space-3); top:auto; bottom:var(--space-3); width:auto; }
  .an4-tablewrap table.an4-table{ min-width:560px; }
}

/* ---------- Foco visível, alvo de toque, mobile e movimento reduzido ---------- */
.an4-ctl-btn:focus-visible,.an4-opt:focus-visible,.an4-ctl-clear button:focus-visible,.an4-metric-seg button:focus-visible,.an4-fchip-btn:focus-visible,.an4-fchip-x:focus-visible,.an4-fchip-clear:focus-visible,
.an4-daynav-btn:focus-visible,.an4-cal-day:focus-visible,.an4-history button:focus-visible,.an4-front input:focus-visible,.an4-toggle input:focus-visible,.an4-cols-menu > summary:focus-visible,.an4-marcos-d > summary:focus-visible,.an4-badge-sim:focus-visible{ outline:2px solid var(--accent-strong); outline-offset:2px; }
@media (max-width:640px){
  .an-tabs [role="tab"] > .lbl-full,.an4-head .lbl-full{ display:none; }
  .an-tabs [role="tab"] > .lbl-short{ display:inline-grid; } .an4-head .lbl-short{ display:inline; }
  .an4-head .btn .lbl-txt{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
  .an4-head .btn{ height:36px; min-height:36px; }
  .an-tabs{ gap:0 16px; }
  .an-tabs [role="tab"]{ font-size:13px; min-height:44px; min-width:44px; text-align:center; }
  .an4-fchip[data-chip="funding"]:not(.is-on),.an4-fchip[data-chip="pais"]:not(.is-on){ display:none; }
  .an4-alertbar-first{ -webkit-line-clamp:1; }
  .an4-ctl-btn,.an4-fchip-btn,.an4-fchip-x,.an4-fchip-clear,.an4-ctl-clear button,.an4-metric-seg,.an4-cmp-pill,.an4-info.has-txt,.an4-cols-menu > summary{ height:36px; }
  .an4-cmp-select{ height:34px; }
  .an4-toolbar{ gap:8px; }
  .an4-divider{ display:none; }
  .an4-fam > b{ font-size:0; padding:0; }   /* D11: no mobile os rótulos ficam só na legenda abaixo da barra */
  .an4-menu{ position:fixed; left:var(--space-3); right:var(--space-3); top:auto; bottom:var(--space-3); width:auto; max-width:none; }
  .an4-opt{ min-height:44px; align-items:center; }
  .an4-chart-card,.an4-day-card{ padding:16px; }
  .an4-mix > summary,.an4-mix-body{ padding-left:16px; padding-right:16px; }
  .an4-mix > summary{ flex-direction:column; align-items:flex-start; gap:4px; padding-right:40px; position:relative; }
  .an4-mix > summary .chev{ position:absolute; right:16px; top:16px; }
  .an4-daynav-btn{ width:36px; height:36px; }
  .an4-daynav-date{ flex:1 1 auto; }
  .an4-progress-row{ grid-template-columns:84px minmax(0,1fr) 40px; }
  .an4-step{ font-size:12px; }
}
@media (prefers-reduced-motion:reduce){ .an4-ctl-btn,.an4-mix > summary .chev,.an-tabs [role="tab"],.an4-kpi,.an4-kpi-main,.an4-metric-seg button,.an4-fchip-btn,.an4-cmp-pill,.an4-ctl-clear button,.an4-alertbar-more,.an4-head .btn,table.an4-table tbody tr,table.an4-table tbody td:first-child{ transition:none; } .an-tabpanel.is-active{ animation:none; } }

/* ---------- Gaveta (drill e especialistas), painel de especialistas, Assistente (herdam os tokens v4.1) ---------- */
body[data-page="analytics-pagamentos"]{ --an4-sticky-top:var(--header-h); }

/* ---------- Gaveta lateral (drill-down e especialistas) ---------- */
/* ---------- Drill-down sheet ---------- */
.an-scrim{ position:fixed; inset:0; background:var(--overlay); z-index:var(--z-overlay); opacity:0; pointer-events:none; transition:opacity var(--motion-base) var(--ease-standard); }
.an-scrim.show{ opacity:1; pointer-events:auto; }
/* Viewport fixo do tamanho exato da tela + overflow:hidden: o `.an-drawer` fechado fica
   deslocado via transform para fora da tela (padrão de sheet lateral) : sem este invólucro,
   esse deslocamento conta como overflow do documento e estoura scrollWidth no mobile mesmo
   nunca sendo visível nem scrollável de fato (ver nota no min-width:0 acima). */
.an-drawer-viewport{ position:fixed; inset:0; overflow:hidden; pointer-events:none; z-index:var(--z-drawer); }
.an-drawer{ position:fixed; top:0; right:0; width:min(480px,100vw); height:100vh; background:var(--panel); border-left:1px solid var(--hairline-strong); box-shadow:var(--shadow-2); pointer-events:auto; transform:translateX(100%); transition:transform var(--motion-slow) var(--ease-standard); display:flex; flex-direction:column; }
.an-drawer.open{ transform:translateX(0); }
.an-drawer-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:var(--space-4) var(--space-5); border-bottom:1px solid var(--hairline); flex:none; }
.an-drawer-head h3{ margin:0 0 4px; font-size:15px; }
.an-drawer-head p{ margin:0; font-size:12px; color:var(--text-3); }
.an-drawer-body{ padding:var(--space-4) var(--space-5); overflow-y:auto; flex:1; min-height:0; }
.an-drawer-foot{ padding:var(--space-3) var(--space-5); border-top:1px solid var(--hairline); font-size:12px; color:var(--text-3); flex:none; }
body.an-drawer-open{ overflow:hidden; }
.an-empty{ text-align:center; padding:var(--space-6) var(--space-4); color:var(--text-3); font-size:13px; }

.an4-drawer{ width:min(560px,100vw); }
.an4-drawer-actions{ display:flex; flex-wrap:wrap; gap:var(--space-2); }
.an4-scope{ display:grid; grid-template-columns:auto 1fr; gap:4px var(--space-3); margin:0 0 var(--space-4); padding:var(--space-3); background:var(--panel-hover); border:1px solid var(--hairline); border-radius:var(--radius-md); font-size:13px; }
.an4-scope dt{ color:var(--text-3); font-weight:600; }
.an4-scope dd{ margin:0; color:var(--text); font-variant-numeric:tabular-nums; }
.an4-fronts{ display:flex; flex-direction:column; gap:var(--space-2); margin:0 0 var(--space-4); padding:0; list-style:none; }
.an4-front{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-3); border:1px solid var(--hairline-strong); border-radius:var(--radius-md); background:var(--panel); }
.an4-front input{ width:16px; height:16px; accent-color:var(--accent-strong); flex:none; }
.an4-front-body{ flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.an4-front-body b{ font-size:13px; }
.an4-front-body span{ font-size:12px; color:var(--text-3); }
.an4-front-cost{ font-size:12px; font-weight:600; color:var(--text-2); font-variant-numeric:tabular-nums; }
.an4-cost{ display:flex; align-items:baseline; justify-content:space-between; gap:var(--space-3); margin-bottom:var(--space-4); padding:var(--space-3); border:1px dashed var(--hairline-strong); border-radius:var(--radius-md); font-size:13px; color:var(--text-2); font-variant-numeric:tabular-nums; }
.an4-cost b{ font-size:15px; color:var(--text); }
.an4-cost small{ display:block; font-size:12px; color:var(--text-3); }
.an4-stepper{ display:flex; align-items:flex-start; margin:0 0 var(--space-4); padding:0; list-style:none; counter-reset:step; }
.an4-step{ position:relative; flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; font-size:12px; font-weight:600; color:var(--text-3); }
.an4-step::before{ counter-increment:step; content:counter(step); display:flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:50%; background:var(--panel); border:1px solid var(--hairline-strong); color:var(--text-3); font-size:12px; font-weight:600; position:relative; z-index:1; }
.an4-step::after{ content:""; position:absolute; top:12px; left:calc(50% + 14px); right:calc(-50% + 14px); height:2px; background:var(--hairline-strong); }
.an4-step:last-child::after{ display:none; }
.an4-step.is-done{ color:var(--text-2); }
.an4-step.is-done::before{ content:"\2713"; background:var(--good-bg); border-color:var(--good-line); color:var(--good); }
.an4-step.is-done::after{ background:var(--good); }
.an4-step.is-current{ color:var(--text); }
.an4-step.is-current::before{ background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.an4-progress{ display:flex; flex-direction:column; gap:var(--space-2); margin-bottom:var(--space-4); }
.an4-progress-row{ display:grid; grid-template-columns:110px minmax(0,1fr) 44px; align-items:center; gap:var(--space-3); font-size:12px; color:var(--text-2); font-variant-numeric:tabular-nums; }
.an4-progress-row .bar{ height:6px; border-radius:99px; background:var(--panel-hover); overflow:hidden; }
.an4-progress-row .bar b{ display:block; height:100%; border-radius:99px; background:var(--accent-strong); transition:width var(--motion-slow) var(--ease-standard); }
.an4-progress-row.is-done .bar b{ background:var(--good); }
.an4-progress-row .pct{ text-align:right; font-weight:600; color:var(--text); }
.an4-parecer{ display:flex; flex-direction:column; gap:var(--space-3); }
.an4-parecer-sec{ padding:var(--space-3) var(--space-4); border:1px solid var(--hairline); border-radius:var(--radius-md); background:var(--panel); }
.an4-parecer-sub{ margin:var(--space-2) 0 var(--space-1); font-size:12px; font-weight:600; color:var(--text-2); }
.an4-parecer-sec h4{ margin:0 0 var(--space-2); font-size:12px; font-weight:600; color:var(--text-3); }
.an4-parecer-sec p,.an4-parecer-sec li{ margin:0; font-size:13px; line-height:1.5; color:var(--text); }
.an4-parecer-sec ul{ margin:0; padding-left:var(--space-4); display:flex; flex-direction:column; gap:4px; }
.an4-parecer-sec.is-confirm{ border-color:var(--warn-line); background:var(--warn-bg); }
.an4-parecer-sec.is-confirm h4{ color:var(--warn); }
.an4-conf{ display:inline-flex; align-items:center; height:18px; margin-left:8px; padding:0 8px; border-radius:var(--radius-pill); border:1px solid var(--hairline-strong); font-size:12px; font-weight:600; color:var(--text-2); }
.an4-conf.is-alta{ border-color:var(--good-line); color:var(--good); background:var(--good-bg); }
.an4-conf.is-media{ border-color:var(--warn-line); color:var(--warn); background:var(--warn-bg); }
.an4-conf.is-baixa{ border-style:dashed; }
.an4-history{ margin:var(--space-4) 0 0; padding:0; list-style:none; border:1px solid var(--hairline); border-radius:var(--radius-md); overflow:hidden; }
.an4-history li{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-2); padding:var(--space-3); border-bottom:1px solid var(--hairline); font-size:13px; font-variant-numeric:tabular-nums; }
.an4-history li:last-child{ border-bottom:0; }
.an4-history button{ border:0; background:transparent; color:var(--accent-strong); font:inherit; font-size:13px; font-weight:600; cursor:pointer; padding:4px 8px; border-radius:var(--radius-sm); }
.an4-history button:hover{ background:var(--accent-soft); }
.an4-reuse{ margin-bottom:var(--space-3); padding:var(--space-2) var(--space-3); border-radius:var(--radius-sm); background:var(--accent-soft); color:var(--accent-strong); font-size:12px; font-weight:600; }


/* Assistente: painel lateral fixo. */
/* ---------- v4 rodada C: painel dos especialistas (pareceres), Assistente e ajustes de largura ---------- */
.an4-drawer-sub{ margin:var(--space-4) 0 var(--space-2); font-size:12px; font-weight:600; color:var(--text-3); }
.an4-drawer .an-drawer-foot{ display:flex; flex-direction:column; align-items:flex-start; gap:var(--space-2); }
.an4-drawer .an-drawer-foot .btn{ min-height:36px; }
.an4-front{ cursor:default; }
.an4-front label.an4-front-body{ cursor:pointer; }
.an4-front-cost{ white-space:nowrap; }
.an4-cost > div{ min-width:0; }
.an4-cost-cap{ text-align:right; }
.an4-cost-cap b{ font-size:13px; }
.an4-reuse.is-bad{ background:var(--bad-bg); color:var(--bad); }
.an4-history li > span{ min-width:0; overflow-wrap:anywhere; }
.an4-parecer-wrap{ display:flex; flex-direction:column; gap:var(--space-3); min-width:0; }
.an4-parecer-head{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-2) var(--space-3); }
.an4-parecer-title{ margin:var(--space-2) 0 0; font-size:15px; font-weight:600; color:var(--text); }
.an4-parecer{ min-width:0; }
.an4-parecer-sec{ min-width:0; overflow-wrap:anywhere; }
.an4-parecer-sec li .an4-kpi-meta{ display:inline; line-height:1.5; }
.an4-parecer-sec .an4-conf{ vertical-align:1px; }
.an4-parecer-frente{ border:1px solid var(--hairline-strong); border-radius:var(--radius-md); background:var(--panel-hover); min-width:0; }
.an4-parecer-frente > summary{ cursor:pointer; padding:var(--space-3) var(--space-4); font-size:13px; font-weight:600; color:var(--text); min-height:44px; display:flex; align-items:center; gap:var(--space-2); }
.an4-parecer-frente > summary:focus-visible{ outline:2px solid var(--accent-strong); outline-offset:2px; border-radius:var(--radius-md); }
.an4-parecer-frente[open] > summary{ border-bottom:1px solid var(--hairline); }
.an4-parecer-frente > .an4-parecer{ padding:var(--space-3); }
.an4-day-card .an4-parecer-wrap .an4-scope{ margin:0; }
.an4-drawer-actions .btn{ min-height:36px; }

/* Assistente: painel lateral fixo. >= 1360 px empurra o conteúdo (nada coberto); abaixo, sobrepõe com largura contida; em 640 px, folha cheia. */
:root{ --an4-assist-w:400px; }
.an4-assist{ position:fixed; top:var(--header-h); right:0; bottom:0; width:var(--an4-assist-w); z-index:var(--z-menu); display:none; flex-direction:column; background:var(--panel); border-left:1px solid var(--hairline-strong); box-shadow:var(--shadow-2); min-height:0; }
.an4-assist.open{ display:flex; animation:an4-assist-in var(--motion-base) var(--ease-standard); }
@keyframes an4-assist-in{ from{ opacity:0; transform:translateX(24px); } to{ opacity:1; transform:none; } }
.an4-assist[hidden]{ display:none; }
.an4-assist-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:var(--space-2); padding:var(--space-4); border-bottom:1px solid var(--hairline); flex:none; }
.an4-assist-head h3{ margin:0 0 2px; font-size:15px; }
.an4-assist-head p{ margin:0; font-size:12px; color:var(--text-3); }
.an4-assist-log{ position:relative; flex:1; min-height:0; overflow-y:auto; padding:var(--space-4); display:flex; flex-direction:column; gap:var(--space-3); }
.an4-assist-log:focus-visible{ outline:2px solid var(--accent-strong); outline-offset:-2px; }
.an4-assist-msg{ max-width:100%; min-width:0; overflow-wrap:anywhere; font-size:13px; line-height:1.5; border-radius:var(--radius-md); }
.an4-assist-msg.is-user{ align-self:flex-end; max-width:88%; padding:var(--space-2) var(--space-3); background:var(--accent-soft); color:var(--accent-strong); font-weight:600; }
.an4-assist-msg.is-bot{ padding:var(--space-3); background:var(--panel-hover); border:1px solid var(--hairline); color:var(--text); }
.an4-assist-msg h4{ margin:0 0 var(--space-2); font-size:13px; }
.an4-assist-msg p{ margin:0 0 var(--space-2); }
.an4-assist-msg ul{ margin:0 0 var(--space-2); padding-left:var(--space-4); display:flex; flex-direction:column; gap:4px; }
.an4-assist-caveat{ margin-top:var(--space-2); padding:var(--space-2) var(--space-3); border:1px solid var(--warn-line); border-radius:var(--radius-sm); background:var(--warn-bg); font-size:12px; }
.an4-assist-caveat b{ display:block; margin-bottom:2px; color:var(--warn); font-size:12px; }
.an4-assist-caveat ul{ margin:0; }
.an4-assist-hello{ padding:var(--space-3); color:var(--text-2); font-size:13px; }
.an4-assist-hello p{ margin:0 0 var(--space-2); }
.an4-assist-chips-wrap{ flex:none; padding:0 var(--space-4); }
.an4-assist-chips{ display:flex; flex-wrap:wrap; gap:var(--space-2); margin-top:var(--space-2); }
.an4-assist-chip{ min-height:32px; padding:4px var(--space-3); border:1px solid var(--hairline-strong); border-radius:var(--radius-pill); background:var(--panel); color:var(--text-2); font:inherit; font-size:13px; text-align:left; cursor:pointer; max-width:100%; }
.an4-assist-chip:hover{ background:var(--accent-soft); border-color:var(--accent-strong); color:var(--accent-strong); }
.an4-assist-chip:focus-visible,.an4-assist-form input:focus-visible{ outline:2px solid var(--accent-strong); outline-offset:2px; }
.an4-assist-tools{ flex:none; padding:var(--space-2) var(--space-4) 0; }
.an4-assist-form{ flex:none; display:flex; gap:var(--space-2); padding:var(--space-3) var(--space-4); }
.an4-assist-form input{ flex:1; min-width:0; }
.an4-assist-foot{ flex:none; margin:0; padding:var(--space-2) var(--space-4) var(--space-3); border-top:1px solid var(--hairline); font-size:12px; color:var(--text-3); }
/* D13: a partir de 1024 px o Assistente empurra o conteúdo (nada de controle coberto). */
@media (min-width:1024px){
  body.an4-assist-open .main{ margin-right:var(--an4-assist-w); }
  body.an4-assist-open .an4-kpis{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.an4-assist-open .an4-day-grid,body.an4-assist-open .an4-cols,body.an4-assist-open .an4-split{ grid-template-columns:minmax(0,1fr); }
}
@media (min-width:1440px){ body.an4-assist-open .an4-kpis{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:640px){
  .an4-assist{ top:0; width:100vw; border-left:0; }
  .an4-assist-chip,.an4-assist-form .btn,.an4-assist-form input,.an4-assist-tools .btn,.an4-assist-head .btn{ min-height:44px; }
  .an4-assist-head .drawer-close{ min-width:44px; min-height:44px; }
  .an4-drawer .an-drawer-foot .btn{ min-height:44px; }
  .an4-parecer-frente > summary{ min-height:44px; }
}
@media (prefers-reduced-motion:reduce){ .an4-assist.open{ animation:none; } }

/* tabelas compactas (colunas enxutas): sem largura mínima, cabeçalho pode quebrar linha */
.an4-tablewrap.is-compact table.an4-table,.an4-tablewrap.is-compact table.an4-table{ min-width:0; }
@media (max-width:640px){ .an4-tablewrap.is-compact table.an4-table{ min-width:0; } }
.an4-tablewrap.is-compact table.an4-table thead th{ white-space:normal; }

/* ---------- Modo real (E4): selo de seção, estado "sem fonte" e carregamento ---------- */
.an4-seal.is-real{ height:24px; border:1px solid color-mix(in srgb, var(--good) 40%, transparent); background:color-mix(in srgb, var(--good) 10%, transparent); color:var(--good); }
.an4-semfonte{ display:flex; flex-direction:column; gap:2px; padding:var(--space-3) var(--space-4); border:1px dashed var(--an-ctl-border); border-radius:var(--radius-md); color:var(--text-2); font-size:13px; }
.an4-semfonte b{ color:var(--text-1); font-weight:600; }
.an4-skel{ display:grid; gap:var(--space-3); padding:var(--space-4) 0; }
.an4-skel-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:var(--space-3); }
.an4-skel-box{ height:84px; border-radius:var(--radius-md); background:linear-gradient(90deg,var(--panel-hover),var(--hairline-strong),var(--panel-hover)); background-size:200% 100%; animation:an4Shimmer 1.4s infinite; }
.an4-skel-box.is-tall{ height:220px; }
.an4-skel-msg{ color:var(--text-2); font-size:13px; }
.an4-erro-carga{ display:flex; flex-direction:column; align-items:flex-start; gap:var(--space-3); padding:var(--space-4); border:1px solid var(--bad-line, var(--an-ctl-border)); border-radius:var(--radius-md); background:var(--bad-bg, transparent); }
.an4-erro-carga p{ margin:0; color:var(--text-1); font-size:13px; }
@keyframes an4Shimmer{ 0%{ background-position:200% 0; } 100%{ background-position:-200% 0; } }
@media (prefers-reduced-motion: reduce){ .an4-skel-box{ animation:none; } }
.an4-badge-sim.is-real{ border-style:solid; }

/* ---- Sala dos especialistas (modo real): cartão no drawer, tela cheia, legendas sobre o 3D. A cena segue o tema (cenario.js); painéis, HUD, dock, etiquetas e balões usam só tokens. ---- */
.an4-sala-card{ margin:0 0 var(--space-4); padding:var(--space-4); border:1px solid var(--hairline-strong); border-radius:var(--radius-md); background:var(--bg-elevated); }
.an4-parecer-wrap ~ .an4-sala-card{ margin-top:var(--space-4); }
.an4-sala-head{ display:flex; gap:var(--space-2); align-items:center; flex-wrap:wrap; }
.an4-sala-ico{ display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; flex:none; border-radius:var(--radius-sm); background:var(--accent-soft); border:1px solid var(--hairline-strong); color:var(--accent-strong); }
.an4-sala-ico svg{ width:18px; height:18px; }
.an4-sala-h{ margin:0; flex:1 1 auto; min-width:0; font-size:16px; line-height:24px; font-weight:600; color:var(--text); }
.an4-sala-pill{ display:inline-flex; align-items:center; gap:6px; height:24px; padding:0 10px; border-radius:var(--radius-pill); border:1px solid var(--good-line); background:var(--good-bg); color:var(--good); font:600 12px var(--font-sans); white-space:nowrap; }
.an4-sala-pill::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--good); }
.an4-sala-chip{ display:inline-flex; align-items:center; gap:6px; height:24px; padding:0 10px; border-radius:var(--radius-pill); border:1px solid var(--hairline-strong); background:var(--panel); color:var(--text-2); font:500 12px var(--font-sans); white-space:nowrap; font-variant-numeric:tabular-nums; }
.an4-sala-chip svg{ width:14px; height:14px; flex:none; }
.an4-sala-pill[hidden],.an4-sala-chip[hidden],.an4-sala-cont[hidden],.an4-sala-bar[hidden]{ display:none; }
.an4-sala-btns{ display:flex; gap:var(--space-2); align-items:center; margin-left:auto; }
.an4-sala-expand{ display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border:1px solid var(--hairline-strong); border-radius:var(--radius-sm); background:var(--panel); color:var(--text-2); cursor:pointer; }
.an4-sala-expand:hover{ background:var(--panel-hover); color:var(--text); }
.an4-sala-expand:focus-visible{ outline:2px solid var(--accent-strong); outline-offset:2px; }
.an4-sala-expand svg{ width:18px; height:18px; }
.an4-sala-sub{ margin:var(--space-2) 0 0; font-size:13px; color:var(--text-2); }
.an4-sala-body{ margin-top:var(--space-3); }
.an4-sala-steps{ list-style:none; display:flex; flex-wrap:wrap; gap:6px; margin:0 0 var(--space-2); padding:0; font-size:12px; font-weight:600; color:var(--text-3); }
.an4-sala-steps li{ padding:2px 8px; border:1px solid var(--hairline); border-radius:999px; }
.an4-sala-steps li.ok{ color:var(--text-2); }
.an4-sala-steps li.on{ color:var(--on-accent); background:var(--accent); border-color:var(--accent); }
.an4-sala-stage{ position:relative; overflow:hidden; background:#eef1f6; border:1px solid var(--hairline); border-radius:var(--radius-md); }
:root[data-theme="dark"] .an4-sala-stage{ background:#0b1120; }
@media (prefers-color-scheme:dark){ :root:not([data-theme]) .an4-sala-stage{ background:#0b1120; } }
.an4-sala-stage canvas{ display:block; width:100%; height:100%; }
.an4-sala-stage-mini{ aspect-ratio:3 / 2; min-height:280px; border-radius:var(--radius-md); }
.an4-sala-stage-cheia{ position:absolute; top:0; bottom:0; left:0; right:352px; border:0; border-radius:0; }
.an4-sala-over{ position:absolute; inset:0; pointer-events:none; }
.an4-sala-fade{ position:absolute; inset:0; background:inherit; opacity:0; pointer-events:none; transition:opacity .3s; z-index:3; }
.an4-sala-fade.on{ opacity:1; }
.an4-sala-tag{ position:absolute; transform:translate(-50%,-100%); display:flex; gap:6px; align-items:center; background:var(--panel); color:var(--text); border:1px solid var(--hairline-strong); border-radius:var(--radius-sm); padding:3px 8px; font:500 12px var(--font-sans); white-space:nowrap; box-shadow:var(--shadow-1); }
.an4-sala-tag i{ width:8px; height:8px; border-radius:50%; background:var(--text-3); flex:none; }
.an4-sala-tag.busy i{ background:var(--accent-strong); } .an4-sala-tag.done i{ background:var(--good); } .an4-sala-tag.flag i{ background:var(--bad); }
.an4-sala-tag small{ color:var(--text-3); font-size:11px; font-weight:400; }
.an4-sala-tag.meet small{ display:none; }
.an4-sala-tag.mini{ font-size:11px; padding:2px 6px; border-radius:6px; pointer-events:auto; } .an4-sala-tag.mini small{ display:none; }
.an4-sala-area{ position:absolute; transform:translate(-50%,-50%); font:500 11px var(--font-sans); color:var(--text-2); background:color-mix(in srgb, var(--panel) 88%, transparent); border:1px solid var(--hairline); padding:2px 10px; border-radius:999px; white-space:nowrap; }
.an4-sala-over.mini .an4-sala-area{ font-size:10px; padding:1px 8px; }
.an4-sala-bub{ position:absolute; transform:translate(-50%,-100%); max-width:200px; background:var(--panel); color:var(--text); border:1px solid var(--hairline-strong); border-radius:var(--radius-sm); padding:8px 10px; font:500 12px/1.35 var(--font-sans); white-space:normal; text-align:center; box-shadow:var(--shadow-1); opacity:0; transition:opacity .25s; }
.an4-sala-over.mini .an4-sala-bub{ max-width:150px; font-size:11px; padding:6px 8px; z-index:1; }
.an4-sala-over.mini .an4-sala-tag{ z-index:2; }
.an4-sala-bub.on{ opacity:1; }
.an4-sala-bub b{ font:600 12px var(--font-mono); color:var(--accent-strong); margin-left:4px; }
.an4-sala-bub .n,.an4-sala-bub .rg{ color:var(--text-2); font-size:11px; }
.an4-sala-bub .fn{ display:block; color:var(--text-3); font-size:10px; margin-top:2px; }
.an4-sala-bub.neutro{ color:var(--text-3); font-style:italic; }
.an4-sala-bub::after{ content:""; position:absolute; left:50%; bottom:-6px; margin-left:-6px; width:12px; height:12px; background:var(--panel); border-right:1px solid var(--hairline-strong); border-bottom:1px solid var(--hairline-strong); transform:rotate(45deg); }
.an4-sala-scr{ position:absolute; transform:translate(-50%,-50%); background:#0b1730; color:#bfdbfe; border-radius:5px; padding:3px 9px; font:600 10.5px var(--font-mono); white-space:nowrap; }
.an4-sala-scr[data-tom="bloqueado"]{ background:#7f1d1d; color:#fecaca; }
.an4-sala-brd{ position:absolute; transform:translate(-50%,-50%); background:#fff; color:#0f172a; border:1px solid rgba(15,23,42,.15); border-radius:5px; padding:3px 8px; font:600 10px var(--font-sans); white-space:nowrap; }
.an4-sala-msg,.an4-sala-fallback{ position:absolute; inset:0; display:flex; flex-direction:column; gap:6px; align-items:center; justify-content:center; padding:16px; text-align:center; color:var(--text-2); font-size:13px; overflow:auto; background:inherit; z-index:4; }
.an4-sala-fallback{ align-items:flex-start; text-align:left; justify-content:flex-start; color:var(--text); }
.an4-sala-fallback ul{ margin:0; padding-left:18px; }
.an4-sala-rod{ display:flex; align-items:center; gap:var(--space-2); margin-top:var(--space-3); color:var(--text-3); }
.an4-sala-rod svg{ width:18px; height:18px; flex:none; }
.an4-sala-legenda{ margin:var(--space-2) 0 0; font-size:12px; color:var(--text-2); min-height:1.4em; }
.an4-sala-rod .an4-sala-legenda{ margin:0; font-size:13px; }
/* tela cheia: colunas (palco | inspector de 320px), HUD, chips e dock sobre o palco */
.an4-sala-full{ position:fixed; inset:0; z-index:calc(var(--z-drawer) + 10); background:var(--bg); }
.an4-sala-full[hidden]{ display:none; }
.an4-sala-hud,.an4-sala-side,.an4-sala-dock,.an4-sala-chips{ position:absolute; z-index:5; color:var(--text-2); font-size:12px; }
.an4-sala-hud,.an4-sala-side,.an4-sala-dock{ background:var(--panel); border:1px solid var(--hairline-strong); box-shadow:var(--shadow-2); }
.an4-sala-hud{ left:16px; top:16px; width:360px; max-width:calc(100% - 384px); border-radius:var(--radius-md); padding:var(--space-4); }
.an4-sala-hud-top{ display:flex; gap:var(--space-3); align-items:center; }
.an4-sala-hud-tit{ flex:1; min-width:0; display:flex; flex-direction:column; }
.an4-sala-hud-tit b{ color:var(--text); font-size:16px; line-height:24px; font-weight:600; }
.an4-sala-hud-tit span{ font-size:12px; color:var(--text-3); }
.an4-sala-cont{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-2); margin-top:var(--space-3); padding-top:var(--space-3); border-top:1px solid var(--hairline); }
.an4-sala-cont div{ display:flex; flex-direction:column; }
.an4-sala-cont b{ font-size:20px; line-height:24px; font-weight:600; color:var(--text); font-variant-numeric:tabular-nums; }
.an4-sala-cont span{ font-size:11px; color:var(--text-3); }
.an4-sala-chips{ top:16px; right:368px; display:flex; gap:var(--space-2); flex-wrap:wrap; justify-content:flex-end; max-width:calc(100% - 800px); }
.an4-sala-chips .an4-sala-chip{ height:32px; padding:0 12px; background:var(--panel); box-shadow:var(--shadow-1); }
.an4-sala-side{ right:16px; top:16px; bottom:16px; width:320px; overflow:auto; border-radius:var(--radius-md); padding:var(--space-4); display:flex; flex-direction:column; gap:var(--space-2); }
.an4-sala-side h4{ margin:0 0 var(--space-1); font-size:16px; line-height:24px; font-weight:600; color:var(--text); }
.an4-sala-box{ padding:var(--space-3); border:1px solid var(--hairline); border-radius:var(--radius-sm); background:var(--panel-hover); }
.an4-sala-box-t{ margin-bottom:var(--space-2); font-size:13px; font-weight:600; color:var(--text); }
.an4-sala-box .an4-sala-legenda{ margin:var(--space-2) 0 0; }
.an4-sala-ring{ display:flex; gap:var(--space-3); align-items:center; }
.an4-sala-ring svg{ width:56px; height:56px; flex:none; } .an4-sala-ring .trilho{ stroke:var(--hairline-strong); } .an4-sala-ring .arco{ stroke:var(--text-3); } .an4-sala-ring .arco[data-tom="ok"]{ stroke:var(--good); } .an4-sala-ring .arco[data-tom="bloqueado"], .an4-sala-ring .arco[data-tom="erro"]{ stroke:var(--bad); }
.an4-sala-ring b{ display:block; font:600 16px var(--font-mono); color:var(--text); } .an4-sala-ring span{ font-size:11px; color:var(--an-text-2); }
.an4-sala-kv{ display:grid; grid-template-columns:auto 1fr; gap:var(--space-1) var(--space-3); margin:0; } .an4-sala-kv dt,.an4-sala-kv dd{ margin:0; } .an4-sala-kv dt{ font-size:12px; color:var(--an-text-2); } .an4-sala-kv dd{ font:600 13px var(--font-mono); color:var(--text); text-align:right; font-variant-numeric:tabular-nums; }
.an4-sala-bar{ height:6px; margin-top:var(--space-2); border-radius:var(--radius-pill); background:var(--hairline-strong); overflow:hidden; }
.an4-sala-bar b{ display:block; height:100%; width:0; border-radius:var(--radius-pill); background:var(--accent-strong); transition:width var(--motion-slow) var(--ease-standard); }
.an4-sala-box-feed{ flex:1 1 auto; min-height:120px; }
.an4-sala-feed{ display:grid; gap:var(--space-2); max-height:240px; overflow:auto; }
.an4-sala-feed div{ display:grid; grid-template-columns:6px 56px minmax(0,1fr); gap:var(--space-2); align-items:baseline; font-size:12px; color:var(--text-2); }
.an4-sala-feed div::before{ content:""; width:6px; height:6px; border-radius:50%; background:var(--good); align-self:center; }
.an4-sala-feed time{ order:1; font:500 11px var(--font-mono); color:var(--an-text-2); } .an4-sala-feed span{ order:2; }
.an4-sala-dock{ left:calc((100% - 352px) / 2); bottom:16px; transform:translateX(-50%); display:flex; gap:var(--space-2); flex-wrap:nowrap; justify-content:center; border-radius:var(--radius-md); padding:var(--space-2); max-width:calc(100% - 384px); }
.an4-sala-dock button{ display:inline-flex; align-items:center; justify-content:center; gap:var(--space-2); border:1px solid var(--hairline); border-radius:var(--radius-sm); padding:0 var(--space-4); min-height:44px; font:600 13px var(--font-sans); background:transparent; color:var(--text); cursor:pointer; white-space:nowrap; }
.an4-sala-dock button svg{ width:18px; height:18px; flex:none; }
.an4-sala-dock button:hover{ background:var(--panel-hover); }
.an4-sala-dock button[data-dock="nova"]{ background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.an4-sala-dock button[data-dock="nova"]:hover{ background:var(--accent-strong); }
.an4-sala-dock button[aria-pressed="true"]{ background:var(--accent-soft); border-color:var(--accent-strong); color:var(--accent-strong); }
.an4-sala-dock button:focus-visible{ outline:2px solid var(--accent-strong); outline-offset:2px; }
body.an4-sala-cheia-aberta{ overflow:hidden; }
@media (max-width:1360px){ .an4-sala-dock{ gap:var(--space-1); padding:var(--space-1); } .an4-sala-dock button{ padding:0 10px; gap:6px; font-size:12px; } }
@media (max-width:1100px){ .an4-sala-chips{ display:none; } .an4-sala-dock{ flex-wrap:wrap; } }
@media (max-width:760px){ .an4-sala-side{ display:none; } .an4-sala-stage-cheia{ right:0; } .an4-sala-hud{ max-width:calc(100% - 32px); } .an4-sala-dock{ left:50%; max-width:calc(100% - 24px); } }
@media (max-width:640px){ .an4-sala-expand{ width:44px; height:44px; } }
@media (prefers-reduced-motion:reduce){ .an4-sala-bub,.an4-sala-fade,.an4-sala-bar b{ transition:none; } }

/* ---- Drawer dos especialistas: cabeçalho com ícone, frentes como cards com marca, rodapé em grade ---- */
.an4-drawer .an-drawer-head{ align-items:center; gap:var(--space-3); }
.an-drawer-ico{ display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; flex:none; border-radius:var(--radius-md); background:var(--accent-soft); border:1px solid var(--hairline-strong); color:var(--accent-strong); }
.an-drawer-ico svg{ width:22px; height:22px; }
.an-drawer-tit{ flex:1; min-width:0; }
.an4-drawer .an-drawer-head h3{ margin:0 0 2px; font-size:20px; line-height:26px; font-weight:600; color:var(--text); }
.an4-drawer .an-drawer-head p{ font-size:13px; }
.an4-drawer .drawer-close{ width:40px; height:40px; flex:none; border:1px solid var(--hairline-strong); border-radius:var(--radius-sm); background:var(--panel); }
.an4-drawer .drawer-close:hover{ background:var(--panel-hover); }
.an4-parecer-frente{ border-radius:var(--radius-md); background:var(--panel); transition:background .15s, border-color .15s; }
.an4-parecer-frente:hover{ background:var(--panel-hover); }
.an4-parecer-frente > summary{ list-style:none; gap:var(--space-3); padding:var(--space-4); min-height:56px; font-size:15px; }
.an4-parecer-frente > summary::-webkit-details-marker{ display:none; }
.an4-parecer-frente > summary::after{ content:""; flex:none; margin:0 var(--space-1) 0 auto; width:8px; height:8px; border-right:2px solid var(--text-3); border-bottom:2px solid var(--text-3); transform:translateY(-2px) rotate(45deg); transition:transform .15s; }
.an4-parecer-frente[open] > summary::after{ transform:translateY(2px) rotate(-135deg); }
.an4-frente-nome{ min-width:0; }
.an4-marca{ display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; flex:none; border-radius:var(--radius-sm); }
.an4-marca svg{ width:20px; height:20px; }
.an4-marca.is-stripe{ background:var(--psp-stripe); color:var(--psp-stripe-ink); }
.an4-marca.is-primer{ background:var(--psp-primer); color:var(--psp-primer-ink); }
.an4-marca.is-funnelfox{ background:var(--psp-funnelfox); color:var(--psp-funnelfox-ink); }
.an4-parecer-acoes{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-2); width:100%; }
.an4-parecer-acoes .btn{ display:inline-flex; align-items:center; justify-content:center; gap:var(--space-2); min-height:44px; }
.an4-parecer-acoes .btn svg{ width:18px; height:18px; flex:none; }
.an4-parecer-acoes .btn-primary:first-child{ grid-column:1 / -1; }
@media (prefers-reduced-motion:reduce){ .an4-parecer-frente,.an4-parecer-frente > summary::after{ transition:none; } }

/* ---- Conversão por PSP, aba Conversão, bandeiras com ícone e valor aprovado (07/10/2026). Só tokens; vale nos dois temas. ---- */
.an4-psp-ic.is-unk{ background:var(--panel-hover); color:var(--text-2); box-shadow:inset 0 0 0 1px var(--hairline-strong); }
table.an4-conv-table{ min-width:0; font-size:13px; }
table.an4-conv-table thead th{ white-space:normal; padding:6px 5px; line-height:1.25; vertical-align:bottom; height:auto; }
table.an4-conv-table thead th.an4-conv-grp{ text-align:center; border-bottom:1px solid var(--an-border-subtle); }
table.an4-conv-table tbody td{ padding:4px 5px; white-space:nowrap; }
table.an4-conv-table tbody td[data-col="nome"]{ white-space:normal; min-width:80px; max-width:112px; }
table.an4-conv-table.is-psp thead th,table.an4-conv-table.is-psp tbody td{ padding-left:12px; padding-right:12px; }
table.an4-conv-table tbody tr.is-total td,table.an4-conv-table tbody tr.is-total td:first-child{ background:var(--an-surface-2); font-weight:600; }
table.an4-conv-table tbody tr.is-total:hover td{ background:var(--an-surface-2); }
table.an4-conv-table .an4-conv-contrib{ color:var(--good); font-weight:500; }
table.an4-conv-table .an4-lowN{ font-size:12px; white-space:nowrap; }
.an4-conv-nome{ display:inline-flex; align-items:center; gap:8px; }
.an4-conv-nome .an4-flag{ width:22px; font-size:15px; }
.an4-dot-c{ width:10px; height:10px; border-radius:50%; flex:none; box-shadow:0 0 0 1px var(--hairline-strong); }
.an4-chip{ display:inline-flex; align-items:center; height:22px; padding:0 10px; border-radius:var(--radius-pill); border:1px solid var(--hairline-strong); background:var(--panel-hover); color:var(--text-2); font-size:12px; font-weight:600; }
.an4-chip.is-front{ background:var(--good-bg); border-color:var(--good-line); color:var(--good); }
.an4-chip.is-upsell{ background:var(--accent-soft); border-color:var(--hairline-strong); color:var(--accent-strong); }
.an4-chip.is-back_end{ background:var(--warn2-bg); border-color:var(--warn2-line); color:var(--warn2); }
.an4-chip.is-recuperacao{ background:var(--warn-bg); border-color:var(--warn-line); color:var(--warn); }
.an4-conv-grid{ align-items:start; }
.an4-conv-grid .an4-chart-card{ margin-bottom:0; }
.an4-conv-card .an4-note{ margin:8px 0 0; }
.an4-mix-panel .an4-mix-line .an4-tagrow{ display:inline-flex; vertical-align:middle; margin-left:6px; }
/* Bandeiras e países: ícone, barra de taxa e linha de apoio com N, participação e valor aprovado por moeda */
.an4-brand{ display:inline-flex; width:28px; height:18px; flex:none; border-radius:3px; line-height:0; box-shadow:0 0 0 1px var(--hairline-strong); }
.an4-brand svg{ width:28px; height:18px; display:block; }
.an4-flag{ display:inline-flex; align-items:center; justify-content:center; width:28px; height:18px; flex:none; font-size:17px; line-height:1; font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif; }
.an4-flag.is-vazio{ visibility:hidden; }
/* Tabela de cartões: uma linha por item, uma linha por célula, números à direita */
table.an4-card-table{ min-width:0; font-size:13px; }
table.an4-card-table thead th{ padding:6px 10px; height:auto; white-space:nowrap; }
table.an4-card-table tbody td{ padding:6px 10px; height:40px; white-space:nowrap; }
table.an4-card-table tbody td:first-child{ min-width:130px; }
table.an4-card-table tbody tr.is-total td,table.an4-card-table tbody tr.is-total td:first-child{ background:var(--an-surface-2); font-weight:600; }
table.an4-card-table .an4-lowN{ font-size:12px; font-style:italic; }
.an4-cnome{ display:inline-flex; align-items:center; gap:10px; min-width:0; }
.an4-cnome > span{ white-space:normal; }
.an4-cnome small{ display:block; margin:0; max-width:190px; font-size:12px; font-weight:400; color:var(--an-text-2); }
table.an4-card-table tbody td[data-col="nome"]{ white-space:normal; }

.an4-taxacel table.an4-card-table .an4-delta{ white-space:nowrap; }

/* ---- UX 07/10/2026: tabelas das abas Bandeiras e Conversão (colunas fixas, uma linha por célula, traço com dica, legenda única). Só tokens. ---- */
.an4-cols-band{ grid-template-columns:minmax(0,1fr); }
table.an4-card-table.is-fixed,table.an4-conv-table.is-fixed{ table-layout:fixed; width:100%; min-width:0; }
table.an4-card-table.is-fixed thead th,table.an4-conv-table.is-fixed thead th{ padding:10px 12px; height:auto; background:transparent; font-size:12px; font-weight:500; color:var(--an-text-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.25; vertical-align:bottom; }
table.an4-card-table.is-fixed tbody td,table.an4-conv-table.is-fixed tbody td{ padding:0 12px; height:44px; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-variant-numeric:tabular-nums; }
table.an4-card-table.is-fixed tbody td:first-child,table.an4-conv-table.is-fixed tbody td:first-child{ min-width:0; max-width:none; white-space:nowrap; }
table.an4-card-table.is-fixed tbody tr.is-total td,table.an4-conv-table.is-fixed tbody tr.is-total td{ background:var(--an-surface-2); font-weight:600; }
table.an4-card-table.is-fixed tbody tr:not(.is-total):hover td,table.an4-conv-table.is-fixed tbody tr:not(.is-total):hover td{ background:var(--an-surface-2); }
table.an4-card-table.is-fixed tbody td[data-col="nome"],table.an4-conv-table.is-fixed tbody td[data-col="nome"]{ white-space:nowrap; min-width:0; max-width:none; }
.an4-card-table .an4-c-part{ width:152px; } .an4-card-table .an4-c-taxa{ width:108px; } .an4-card-table .an4-c-var{ width:104px; } .an4-card-table .an4-c-usd{ width:136px; } .an4-card-table .an4-c-brl{ width:128px; } .an4-card-table .an4-c-outras{ width:84px; } .an4-card-table .an4-c-n{ width:88px; } .an4-card-table .an4-c-drill{ width:52px; }
.an4-conv-table.is-fixed .an4-c-n{ width:116px; } .an4-conv-table.is-fixed .an4-c-cvr{ width:140px; } .an4-conv-table.is-fixed .an4-c-fat{ width:152px; } .an4-conv-table.is-fixed .an4-c-q{ width:96px; } .an4-conv-table.is-fixed .an4-c-v{ width:116px; } .an4-conv-table.is-fixed .an4-c-t{ width:88px; }
.an4-cnome,.an4-conv-nome{ display:flex; align-items:center; gap:10px; min-width:0; }
.an4-cnome .an4-brand,.an4-cnome .an4-flag,.an4-conv-nome > :first-child{ flex:none; }
.an4-cl{ display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.an4-cl small{ display:inline; margin:0 0 0 8px; max-width:none; font-size:12px; font-weight:400; color:var(--an-text-2); }
table.an4-card-table .an4-drillbtn,table.an4-card-table td:last-child .an4-drillbtn{ min-width:28px; padding:0 4px; }
table.an4-card-table.is-fixed tbody td:last-child:has(.an4-drillbtn){ padding:0 4px; text-align:center; }
.an4-pcell{ display:inline-flex; align-items:center; justify-content:flex-end; gap:8px; }
.an4-ptxt{ min-width:46px; text-align:right; }
.an4-ptrack{ display:inline-block; width:56px; height:4px; border-radius:2px; background:var(--an-border-subtle); overflow:hidden; flex:none; }
.an4-ptrack i{ display:block; height:100%; border-radius:2px; background:var(--accent-strong); }
.an4-taxacel{ display:inline-flex; align-items:center; justify-content:flex-end; gap:6px; }
.an4-mk-slot{ display:inline-block; width:10px; height:10px; flex:none; }
.an4-mk{ position:relative; display:inline-block; width:10px; height:10px; padding:0; border:0; border-radius:50%; background:var(--warn); cursor:help; flex:none; }
.an4-mk::after{ content:""; position:absolute; inset:-8px; }
.an4-mk.is-leg{ margin:0 2px 1px 0; vertical-align:middle; cursor:default; }
.an4-mk:focus-visible,.an4-outras:focus-visible{ outline:2px solid var(--accent-strong); outline-offset:2px; }
.an4-nil{ color:var(--text-2); font-style:normal; font-size:13px; cursor:help; }
.an4-nil.is-n{ font-size:12px; letter-spacing:.01em; }
.an4-outras{ display:inline-flex; align-items:center; justify-content:center; min-width:32px; height:24px; padding:0 8px; border:0; border-radius:var(--radius-sm); background:transparent; color:var(--text-2); font:inherit; font-size:12px; font-weight:600; cursor:help; }
.an4-outras:hover{ background:var(--panel-hover); color:var(--text); }
.an4-tleg{ margin:12px 0 0; font-size:12px; line-height:1.6; color:var(--text-2); }
.an4-tleg b{ color:var(--text); font-weight:600; }
.an4-tp{ position:fixed; z-index:calc(var(--z-menu) + 2); max-width:min(340px,calc(100vw - 16px)); padding:8px 10px; background:var(--panel); color:var(--text); border:1px solid var(--hairline-strong); border-radius:var(--radius-md); box-shadow:var(--menu-shadow); font-size:12px; font-weight:400; line-height:1.5; white-space:pre-line; pointer-events:none; }
.an4-tp[hidden]{ display:none; }
/* Conversão: cartões de 7 colunas em largura total; cabeçalho agrupado alinhado */
.an4-conv-grid > .an4-card-wide{ grid-column:1 / -1; }
table.an4-conv-table.is-fixed thead th:not(:first-child){ text-align:right; }
table.an4-conv-table.is-fixed thead th.an4-conv-grp{ text-align:center; border-bottom:1px solid var(--an-border-subtle); padding-bottom:6px; color:var(--text-2); font-weight:600; }
table.an4-conv-table.is-fixed thead tr.an4-conv-sub th{ padding-top:6px; }
table.an4-conv-table.is-fixed .an4-chip{ max-width:100%; }
@media (prefers-reduced-motion:reduce){ .an4-outras{ transition:none; } }
/* Recusas, "Motivos detalhados": o nome do motivo pode quebrar linha para a tabela caber no card (variação segue em 1 linha). */
#anpanel-recusas table.an4-table{ width:100%; }
#anpanel-recusas table.an4-table td:first-child,#anpanel-recusas table.an4-table td:first-child .sub{ white-space:normal; overflow-wrap:anywhere; }

/* ---- UX3 07/10/2026: Conversão, PSPs e Bandeiras mais limpas (só tokens; claro e escuro). Texto longo vai para "Como ler" ou tooltip. ---- */
/* Conversão */
.cn-linha-topo{ margin:-4px 0 0; }
.an4-conv-grid{ gap:16px; }
table.an4-conv-table.is-fixed thead th{ padding:12px 14px; }
table.an4-conv-table.is-fixed thead tr.an4-conv-grp-row th,table.an4-conv-table.is-fixed thead th.an4-conv-grp{ border-bottom:1px solid var(--hairline-strong); color:var(--an-text-2); }
table.an4-conv-table.is-fixed tbody td{ padding:0 14px; height:52px; }
table.an4-conv-table.is-fixed tbody td[data-col="nome"]{ font-weight:500; }
.an4-zero{ color:var(--text-2); font-weight:400; }
.an4-conv-nome.is-mudo .an4-cl{ color:var(--text-2); }
.an4-conv-card .an4-how{ margin-top:12px; }
.an4-conv-card .an4-sec-head{ margin-bottom:16px; }
/* PSPs: ranking com mix e matriz */
.ps-card .ps-linha{ margin:0 0 12px; }
.ps-selos{ margin:0 0 8px; }
#anRanking table.an4-table{ min-width:0; font-size:13px; }
#anRanking table.an4-table thead th{ height:auto; padding:12px 14px; font-weight:500; white-space:normal; line-height:1.25; vertical-align:bottom; }
#anRanking table.an4-table tbody td{ height:56px; padding:10px 14px; vertical-align:middle; }
#anRanking table.an4-table tbody td b,.ps-matriz tbody td b{ font-size:14px; font-weight:600; }
#anRanking table.an4-table tbody td[data-col="psp"] .sub{ white-space:normal; font-size:12px; color:var(--text-2); }
#anRanking table.an4-table tbody td[data-col="psp"] b{ font-weight:600; }
#anRanking table.an4-table tbody td .sub,.ps-matriz tbody td .sub{ margin-top:2px; font-size:12px; font-weight:400; color:var(--text-2); }
#anRanking .an4-lowN,.ps-matriz .an4-lowN{ font-style:normal; color:var(--text-2); }
#anRanking .an4-nil,.ps-matriz .an4-nil{ font-size:13px; }
.ps-matriz .an4-nil.is-n{ display:block; font-size:12px; line-height:20px; }
table.an4-table.ps-matriz{ min-width:0; font-size:13px; }
table.an4-table.ps-matriz thead th{ height:auto; padding:12px 14px; font-weight:500; }
table.an4-table.ps-matriz tbody td{ height:56px; padding:10px 14px; vertical-align:middle; }
table.an4-table.ps-matriz tbody td:first-child{ font-weight:600; }
/* Botão Colunas igual aos botões do painel (.an4-ctl-btn) */
.an4-cols-menu > summary{ gap:8px; padding:0 12px; background:var(--an-surface); border:1px solid var(--an-ctl-border); border-radius:10px; color:var(--an-text); font-size:13px; font-weight:500; transition:background var(--motion-base) var(--ease-standard); }
.an4-cols-menu > summary::after{ content:""; width:6px; height:6px; margin-top:-3px; border-right:1.5px solid var(--an-text-2); border-bottom:1.5px solid var(--an-text-2); transform:rotate(45deg); }
.an4-cols-menu[open] > summary::after{ transform:rotate(-135deg); margin-top:3px; }
.an4-cols-menu > summary:hover{ background:var(--an-surface-2); }
.an4-cols-menu[open] > summary{ border-color:var(--an-primary); }
/* Bandeiras: a linha Total não tem trilha (o espaço fica reservado para alinhar o número) */
.an4-ptrack.is-oculta{ visibility:hidden; }
