/*
 * V148: Painel de controle do admin (rota /admin). Arquivo estático, fora do
 * build do Vite: o PanelChrome::acabamentoHead o carrega só no painel admin,
 * com a data do arquivo como versão.
 *
 * Toda classe começa com "vd-" (estados com "is-"), escopada em .vd: nada
 * aqui alcança outra tela. Grade de 4 px (4, 8, 12, 16, 20, 24). Só
 * transform, opacity e clip-path animam, com cubic-bezier(0.16, 1, 0.3, 1);
 * prefers-reduced-motion desliga tudo. Sem posição absoluta em cima de
 * conteúdo: cartões em grade com minmax(0, 1fr) e min-width: 0, para nada
 * sobrepor do celular de 320 px ao monitor largo.
 */

.vd {
    --vd-texto: #f1ebff;
    --vd-texto-2: #cdbcf2;
    --vd-mudo: #9a8bbf;
    --vd-fraco: #8f81b5;
    --vd-linha: rgba(150, 110, 255, 0.15);
    --vd-linha-forte: rgba(150, 110, 255, 0.28);
    --vd-linha-suave: rgba(150, 110, 255, 0.08);
    --vd-sup: linear-gradient(180deg, rgba(28, 17, 48, 0.8) 0%, rgba(15, 9, 28, 0.8) 100%);
    --vd-sup-2: rgba(38, 24, 64, 0.62);
    --vd-controle: rgba(10, 6, 20, 0.62);
    --vd-campo: rgba(8, 5, 16, 0.72);
    --vd-roxo: #8a48f5;
    --vd-roxo-claro: #b98bff;
    --vd-roxo-fundo: rgba(138, 72, 245, 0.14);
    --vd-ouro: #dcb874;
    --vd-sobe: #5ee0a6;
    --vd-desce: #ff8e80;
    --vd-ambar: #f3c25a;
    --vd-pix: #3fd1bd;
    --vd-cartao: #9d6bff;
    --vd-paypal: #5aa2ff;
    --vd-raio: 18px;
    --vd-gap: 12px;
    --vd-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --vd-ease-2: cubic-bezier(0.6, 0.01, 0.05, 0.95);
    --vd-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --vd-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --vd-titulo: 'KnightWish', 'Cinzel', Georgia, serif;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    /* As faixas abaixo medem a largura do próprio painel (sem a barra
       lateral), não a da janela: @container vd. */
    container: vd / inline-size;
    color: var(--vd-texto);
    font-family: var(--vd-sans);
    -webkit-font-smoothing: antialiased;
}
.vd * { box-sizing: border-box; }
/* Zeragem com :where() (peso zero): as classes abaixo sempre vencem. */
.vd :where(p, h1, h2, h3, ol, ul, dl, dd, figure) { margin: 0; padding: 0; }
.vd :where(ol, ul) { list-style: none; }
.vd :where(button) { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.vd :where(a) { color: inherit; text-decoration: none; }
.vd :where(button, a, select, input, summary, [tabindex]):focus-visible { outline: 2px solid var(--vd-roxo-claro); outline-offset: 2px; border-radius: 10px; }
.vd [x-cloak] { display: none !important; }
.vd svg { flex: none; }

/* ------------------------------------------------------------------ comuns */
.vd-rotulo { font-family: var(--vd-mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--vd-mudo); }
.vd-mini { font-size: 0.76rem; line-height: 1.45; color: var(--vd-mudo); }
.vd-h2 { font-size: 0.98rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; color: var(--vd-texto); }
.vd-h3 { font-size: 0.92rem; font-weight: 650; line-height: 1.3; }
.vd-secao { font-family: var(--vd-titulo); font-weight: 400; font-size: 1.5rem; line-height: 1.15; letter-spacing: 0.01em; color: #fff; }
.vd-secao--vendas { margin-top: 4px; }
.vd-espaco { margin-top: 16px; }
.vd-num { text-align: right; font-family: var(--vd-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vd-forte { color: var(--vd-texto); font-weight: 650; }
.vd-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.vd-chip {
    display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px;
    font-family: var(--vd-mono); font-size: 0.7rem; font-variant-numeric: tabular-nums; color: var(--vd-texto-2);
    background: rgba(91, 47, 203, 0.18); border: 1px solid rgba(150, 110, 255, 0.24); white-space: nowrap;
}
.vd-tag {
    display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border-radius: 999px; vertical-align: 1px;
    font-family: var(--vd-mono); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
    color: var(--vd-texto-2); background: var(--vd-roxo-fundo); box-shadow: inset 0 0 0 1px rgba(150, 110, 255, 0.24);
}
.vd-tag--alerta { color: #ffb4aa; background: rgba(255, 142, 128, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 142, 128, 0.3); }
.vd-tag--apagada { color: var(--vd-mudo); background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.vd-tag--pix { color: #8ff0e2; background: rgba(63, 209, 189, 0.12); box-shadow: inset 0 0 0 1px rgba(63, 209, 189, 0.3); }
.vd-tag--cartao { color: #d6c2ff; }
.vd-tag--paypal { color: #a9cdff; background: rgba(90, 162, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(90, 162, 255, 0.3); }

.vd-var {
    flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 22px;
    padding: 0 8px; border-radius: 999px; font-family: var(--vd-mono); font-size: 0.68rem; font-weight: 650; line-height: 1;
    background: rgba(255, 255, 255, 0.05); color: var(--vd-texto-2); white-space: nowrap; width: fit-content;
}
.vd-var.is-sobe { color: var(--vd-sobe); background: rgba(94, 224, 166, 0.11); }
.vd-var.is-desce { color: var(--vd-desce); background: rgba(255, 142, 128, 0.11); }
.vd-var.is-sem-base { padding: 0; background: none; font-family: var(--vd-sans); font-weight: 500; font-size: 0.72rem; color: var(--vd-mudo); white-space: normal; }

.vd-pilha { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.3; }
.vd-pilha strong { font-weight: 600; font-size: 0.86rem; color: var(--vd-texto); overflow-wrap: anywhere; }
.vd-pilha strong em { font-style: normal; font-weight: 500; color: var(--vd-mudo); }
.vd-pilha small { font-family: var(--vd-mono); font-size: 0.68rem; color: var(--vd-mudo); font-variant-numeric: tabular-nums; }
.vd-pilha--num { align-items: flex-end; text-align: right; }
.vd-pilha--num strong { font-family: var(--vd-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; overflow-wrap: normal; }
.vd-pilha--num small { white-space: nowrap; }
.vd-pilha small.is-desce { color: var(--vd-desce); }

.vd-bandeira { display: inline-flex; align-items: center; justify-content: center; width: 28px; flex: none; }
.vd-bandeira img { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); }

.vd-link {
    display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-top: 12px; padding: 0 2px;
    font-size: 0.78rem; font-weight: 600; color: var(--vd-roxo-claro); border-radius: 8px;
    transition: color 200ms var(--vd-ease), transform 240ms var(--vd-ease);
}
.vd-link:hover { color: #fff; }
.vd-link svg { transition: transform 240ms var(--vd-ease); }
.vd-link:hover svg { transform: translateX(3px); }
.vd-link-texto { color: var(--vd-roxo-claro); text-decoration: underline; text-decoration-color: rgba(185, 139, 255, 0.4); text-underline-offset: 3px; }

/* ------------------------------------------------------------------ abertura */
.vd-abertura {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: center;
    padding: 24px 20px; border-radius: 24px; background: #0c0717;
    border: 1px solid rgba(150, 110, 255, 0.22);
    box-shadow: 0 30px 60px -40px rgba(91, 47, 203, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: vd-entra 800ms var(--vd-ease) both;
}
.vd-abertura::before {
    content: ''; position: absolute; top: 0; left: 20%; right: 20%; height: 1px; z-index: 1; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(192, 160, 255, 0.75), transparent);
}
.vd-abertura__fundo {
    position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(ellipse 800px 500px at 85% -10%, rgba(91, 47, 203, 0.42) 0%, transparent 60%),
        radial-gradient(ellipse 600px 400px at 0% 110%, rgba(138, 72, 245, 0.24) 0%, transparent 60%),
        linear-gradient(180deg, rgba(15, 8, 31, 0.94) 0%, rgba(6, 3, 13, 0.97) 100%);
}
.vd-abertura__grao {
    position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.045; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.85'/%3E%3C/svg%3E");
}
.vd-abertura__marca {
    position: absolute; right: -36px; top: -36px; z-index: -1; width: 176px; height: auto; pointer-events: none;
    opacity: 0.08; filter: saturate(1.4);
    animation: vd-flutua 18s var(--vd-ease-2) infinite;
}
.vd-abertura__texto { min-width: 0; }
.vd-abertura__data { font-family: var(--vd-mono); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(205, 180, 255, 0.72); }
.vd-abertura__titulo { margin-top: 12px; font-family: var(--vd-titulo); font-weight: 400; font-size: clamp(1.9rem, 6vw, 3.1rem); line-height: 1.06; color: #fff; }
.vd-abertura__saudacao { display: block; animation: vd-sobe-texto 900ms var(--vd-ease) both; animation-delay: 80ms; }
/* V145: o nome na fonte de título em itálico com o degradê roxo; o padding à
   direita impede o corte da última letra inclinada, e o degradê se repete em
   cada linha quando o nome quebra. */
.vd-abertura__nome {
    display: inline; font-style: italic; padding-right: 0.14em; margin-right: -0.14em;
    background: linear-gradient(90deg, #d8c2ff 0%, #f3edff 45%, #ac76ff 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    -webkit-box-decoration-break: clone; box-decoration-break: clone; overflow-wrap: anywhere;
    animation: vd-sobe-texto 900ms var(--vd-ease) both; animation-delay: 160ms;
}
.vd-selo {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; min-height: 26px; padding: 0 12px; border-radius: 999px;
    font-family: var(--vd-mono); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: #d4bfff;
    background: rgba(76, 29, 149, 0.22); border: 1px solid rgba(124, 58, 237, 0.4);
}
.vd-selo i { width: 6px; height: 6px; border-radius: 50%; background: var(--vd-roxo-claro); box-shadow: 0 0 10px rgba(185, 139, 255, 0.9); }
.vd-abertura__frase { margin-top: 12px; max-width: 46ch; font-size: 0.88rem; line-height: 1.55; color: #b9b2c9; }

.vd-abertura__numero { min-width: 0; display: flex; flex-direction: column; gap: 8px; container-type: inline-size; }
.vd-abertura__valor {
    font-family: var(--vd-mono); font-variant-numeric: tabular-nums; font-weight: 640; letter-spacing: -0.035em; line-height: 1.05;
    white-space: nowrap; color: #fff; text-shadow: 0 0 40px rgba(91, 47, 203, 0.55);
    font-size: min(3.25rem, calc(100cqi / (var(--n, 12) * 0.62)));
    animation: vd-sobe-texto 900ms var(--vd-ease) both; animation-delay: 220ms;
}
.vd-abertura__rodape { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vd-abertura__comp { font-size: 0.74rem; color: var(--vd-mudo); }
.vd-ao-vivo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--vd-mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--vd-mudo); }
.vd-ao-vivo i { width: 6px; height: 6px; border-radius: 50%; background: var(--vd-sobe); box-shadow: 0 0 0 3px rgba(94, 224, 166, 0.14); animation: vd-pulsa 2400ms var(--vd-ease-2) infinite; }

/* ------------------------------------------------------------------ filtros */
.vd-filtros {
    position: relative; z-index: 5; display: flex; flex-direction: column; gap: 12px;
    padding: 12px; border-radius: var(--vd-raio); background: var(--vd-sup); border: 1px solid var(--vd-linha);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
    animation: vd-entra 700ms var(--vd-ease) both; animation-delay: 60ms;
}
.vd-filtros__linha { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vd-periodos, .vd-metodos-filtro {
    display: flex; gap: 4px; padding: 4px; min-width: 0; border-radius: 14px;
    background: var(--vd-controle); border: 1px solid var(--vd-linha);
}
.vd-periodos { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
/* celular: a faixa de períodos rola; o esmaecido à direita avisa que há mais */
@container vd (max-width: 719px) {
    .vd-periodos { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); padding-right: 32px; }
}
.vd-periodos::-webkit-scrollbar { display: none; }
.vd-metodos-filtro { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vd-periodo, .vd-metodo-btn {
    flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px;
    border: 0; border-radius: 10px; background: transparent; white-space: nowrap;
    font-size: 0.8rem; font-weight: 600; color: var(--vd-mudo);
    transition: color 220ms var(--vd-ease), background-color 220ms var(--vd-ease), box-shadow 220ms var(--vd-ease), transform 200ms var(--vd-ease);
}
.vd-periodo:active, .vd-metodo-btn:active { transform: scale(0.96); }
.vd-periodo:not(.is-ativo):hover, .vd-metodo-btn:not(.is-ativo):hover { color: var(--vd-texto-2); }
.vd-periodo.is-ativo, .vd-metodo-btn.is-ativo {
    color: #fff; background: linear-gradient(180deg, rgba(150, 100, 255, 0.34), rgba(110, 60, 230, 0.26));
    box-shadow: inset 0 0 0 1px rgba(185, 139, 255, 0.45), 0 8px 22px -12px rgba(138, 72, 245, 0.9);
}
.vd-periodo svg { opacity: 0.9; }
.vd-metodo-btn { padding: 0 8px; }

.vd-datas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 12px; padding: 12px; border-radius: 14px; background: var(--vd-controle); border: 1px solid var(--vd-linha); }
.vd-datas .vd-botao { grid-column: 1 / -1; }
.vd-datas__nota, .vd-datas__erro { grid-column: 1 / -1; font-size: 0.74rem; color: var(--vd-mudo); }
.vd-datas__erro { color: var(--vd-desce); }

.vd-filtros__campos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: end; }
.vd-campo { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vd-campo__rotulo { font-family: var(--vd-mono); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--vd-mudo); }

.vd .vd-entrada {
    width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 0 12px; border-radius: 12px;
    border: 1px solid var(--vd-linha-forte); background: var(--vd-campo); background-image: none; box-shadow: none;
    color: var(--vd-texto); font: 500 16px/1.2 var(--vd-sans); color-scheme: dark;
    transition: border-color 200ms var(--vd-ease), box-shadow 200ms var(--vd-ease);
}
.vd .vd-entrada:focus { outline: none; border-color: var(--vd-roxo); box-shadow: 0 0 0 3px rgba(138, 72, 245, 0.25); }

.vd-select {
    position: relative; display: flex; align-items: center; width: 100%; min-width: 0; min-height: 44px; padding: 0 40px 0 12px;
    border-radius: 12px; border: 1px solid var(--vd-linha-forte); background: var(--vd-campo); color: var(--vd-texto);
    font-size: 0.86rem; font-weight: 500; text-align: left;
    transition: border-color 200ms var(--vd-ease), box-shadow 200ms var(--vd-ease);
}
.vd-select:hover { border-color: rgba(185, 139, 255, 0.45); }
.vd-select.is-ativo { border-color: rgba(185, 139, 255, 0.6); box-shadow: 0 0 0 3px rgba(138, 72, 245, 0.16); }
.vd-select:focus-within { border-color: var(--vd-roxo); }
.vd-select__valor { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-select__seta { position: absolute; right: 12px; top: 50%; display: inline-flex; color: var(--vd-mudo); pointer-events: none; transform: translateY(-50%) rotate(90deg); }
.vd-select--nativo { padding: 0; }
.vd .vd-select__nativo {
    -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; min-height: 42px; margin: 0; padding: 0 40px 0 12px;
    border: 0; border-radius: 12px; background: transparent; background-image: none; box-shadow: none;
    color: inherit; font: inherit; cursor: pointer; color-scheme: dark; text-overflow: ellipsis;
}
.vd .vd-select__nativo:focus { outline: none; box-shadow: none; }
.vd .vd-select__nativo option { background: #140c26; color: #f1ebff; }

.vd-combo {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; width: max(100%, 280px); max-width: calc(100vw - 32px);
    padding: 8px; border-radius: 14px; background: #100a1e; border: 1px solid rgba(185, 139, 255, 0.32);
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.95);
    animation: vd-abre 220ms var(--vd-ease) both;
}
.vd-combo__lista { max-height: 288px; margin-top: 8px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; }
.vd-combo__item {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 8px 10px;
    border: 0; border-radius: 10px; background: transparent; text-align: left; font-size: 0.84rem; color: var(--vd-texto-2);
    transition: background-color 160ms var(--vd-ease), color 160ms var(--vd-ease);
}
.vd-combo__item span { min-width: 0; overflow-wrap: anywhere; }
.vd-combo__item:hover, .vd-combo__item:focus-visible { background: var(--vd-roxo-fundo); color: #fff; outline-offset: -2px; }
.vd-combo__item.is-ativo { color: #fff; background: rgba(138, 72, 245, 0.22); box-shadow: inset 0 0 0 1px rgba(185, 139, 255, 0.35); }
.vd-combo__vazio { padding: 10px; font-size: 0.8rem; color: var(--vd-mudo); }

.vd-botao {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
    border-radius: 12px; font-size: 0.84rem; font-weight: 650; white-space: nowrap;
    transition: transform 200ms var(--vd-ease), filter 200ms var(--vd-ease), border-color 200ms var(--vd-ease), color 200ms var(--vd-ease);
}
.vd-botao:active { transform: scale(0.97); }
.vd-botao--primario { border: 1px solid rgba(185, 139, 255, 0.5); background: linear-gradient(135deg, #7444ec, #5b2fcb); color: #fff; box-shadow: 0 12px 26px -14px rgba(124, 58, 237, 0.85); }
.vd-botao--primario:hover { filter: brightness(1.07); }
.vd-botao--limpar { border: 1px solid var(--vd-linha-forte); background: transparent; color: var(--vd-texto-2); }
.vd-botao--limpar:hover { color: #fff; border-color: rgba(185, 139, 255, 0.5); }

.vd-filtros__resumo { display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: var(--vd-mono); font-size: 0.68rem; letter-spacing: 0.02em; color: var(--vd-texto-2); }
.vd-filtros__comp { color: var(--vd-mudo); }
.vd-filtros__escopo { color: var(--vd-ouro); }

/* ------------------------------------------------------------------ corpo */
.vd-corpo { position: relative; display: flex; flex-direction: column; gap: var(--vd-gap); min-width: 0; transition: opacity 240ms var(--vd-ease); }
.vd-corpo.is-carregando { opacity: 0.55; }
.vd-carga { position: absolute; top: -8px; left: 0; right: 0; height: 2px; border-radius: 2px; overflow: hidden; opacity: 0; transition: opacity 200ms var(--vd-ease); pointer-events: none; }
.vd-corpo.is-carregando .vd-carga { opacity: 1; }
.vd-carga::after { content: ''; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--vd-roxo-claro), transparent); animation: vd-varre 1.1s var(--vd-ease-2) infinite; }

.vd-cartao, .vd-kpi {
    position: relative; min-width: 0; overflow: hidden; border-radius: var(--vd-raio);
    background: var(--vd-sup); border: 1px solid var(--vd-linha);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 18px 40px -30px rgba(0, 0, 0, 0.9);
    animation: vd-entra 620ms var(--vd-ease) both; animation-delay: calc(var(--i, 0) * 60ms + 120ms);
}
.vd-cartao::before, .vd-kpi::before {
    content: ''; position: absolute; top: 0; left: 14%; right: 14%; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(190, 150, 255, 0.45), transparent);
}
.vd-cartao { padding: 16px; }
.vd-cartao__topo { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.vd-cartao__topo .vd-link { margin-top: 0; }
.vd-cartao__cab { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vd-cartao__sub { font-size: 0.74rem; line-height: 1.4; color: var(--vd-mudo); }
.vd-vazio-texto { margin-top: 12px; }

/* ------------------------------------------------------------------ números */
.vd-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--vd-gap); }
.vd-kpi { display: flex; flex-direction: column; min-height: 132px; padding: 16px; container-type: inline-size; }
.vd-kpi--destaque { background: radial-gradient(130% 90% at 100% 0%, rgba(138, 72, 245, 0.26), transparent 62%), var(--vd-sup); border-color: rgba(150, 110, 255, 0.3); }
.vd-kpi__valor {
    margin-top: 8px; font-family: var(--vd-mono); font-variant-numeric: tabular-nums; font-weight: 640; letter-spacing: -0.03em; line-height: 1.1;
    white-space: nowrap; color: var(--vd-texto);
    font-size: min(1.6rem, calc(100cqi / (var(--n, 12) * 0.62)));
}
.vd-kpi__rodape { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: auto; padding-top: 12px; min-width: 0; }
/* quebra linha em vez de cortar com reticências: no celular o dado inteiro
   continua à vista (o valor em reais tem espaço fixo e não se parte) */
.vd-kpi__antes { min-width: 0; max-width: 100%; overflow-wrap: break-word; font-family: var(--vd-mono); font-size: 0.66rem; line-height: 1.35; color: var(--vd-fraco); font-variant-numeric: tabular-nums; }
@container (max-width: 150px) {
    .vd-kpi > .vd-rotulo { letter-spacing: 0.08em; line-height: 1.3; min-height: 2.6em; }
}

/* ------------------------------------------------------------------ grade */
.vd-grade { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--vd-gap); align-items: stretch; }

/* ------------------------------------------------------------------ gráfico */
.vd-grafico { padding-bottom: 12px; }
.vd-legenda { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; }
.vd-legenda__item { display: inline-flex; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--vd-mudo); }
.vd-legenda__cor { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.vd-legenda__cor--atual { background: linear-gradient(180deg, #c9a8ff, #6d3be0); }
.vd-legenda__cor--antes { width: 16px; height: 0; border-radius: 0; border-top: 2px dashed rgba(220, 184, 116, 0.85); }
.vd-alternar { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--vd-controle); border: 1px solid var(--vd-linha); }
.vd-alternar__btn { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font-size: 0.76rem; font-weight: 600; color: var(--vd-mudo); transition: color 200ms var(--vd-ease), background-color 200ms var(--vd-ease); }
.vd-alternar__btn:not(.is-ativo):hover { color: var(--vd-texto-2); }
.vd-alternar__btn.is-ativo { color: var(--vd-texto); background: var(--vd-roxo-fundo); box-shadow: inset 0 0 0 1px rgba(150, 110, 255, 0.36); }

/* troca de métrica: sem atributo vale o faturamento */
.vd-grafico:not([data-metrica="vendas"]) .vd-so-vendas,
.vd-grafico[data-metrica="vendas"] .vd-so-bruto { display: none; }

.vd-grafico__corpo { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; height: 220px; margin-top: 16px; }
.vd-grafico__eixo { position: relative; }
.vd-grafico__eixo span { position: absolute; right: 0; transform: translateY(50%); font-family: var(--vd-mono); font-size: 0.6rem; color: var(--vd-fraco); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vd-grafico__area { position: relative; min-width: 0; }
.vd-grafico__grade { position: absolute; inset: 0; pointer-events: none; }
.vd-grafico__grade i { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid rgba(150, 110, 255, 0.09); }
.vd-grafico__grade i.is-base { border-top-color: rgba(150, 110, 255, 0.24); }
.vd-barras { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); align-items: end; column-gap: clamp(1px, 0.5vw, 6px); }
.vd-barra { position: static; display: flex; align-items: flex-end; justify-content: center; height: 100%; min-width: 0; border-radius: 6px; }
.vd-barra:focus-visible { outline-offset: 0; }
.vd-barra__col {
    display: block; width: 100%; max-width: 30px; height: max(var(--h, 0%), 2px); border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, rgba(201, 168, 255, 0.95) 0%, rgba(124, 74, 236, 0.75) 60%, rgba(91, 47, 203, 0.55) 100%);
    box-shadow: 0 0 0 rgba(185, 139, 255, 0);
    transform-origin: bottom;
    animation: vd-cresce-y 820ms var(--vd-ease) both; animation-delay: calc(min(var(--i, 0), 30) * 22ms + 260ms);
    transition: filter 200ms var(--vd-ease), box-shadow 200ms var(--vd-ease);
}
.vd-barra__col.vd-so-vendas { background: linear-gradient(180deg, rgba(241, 215, 158, 0.95) 0%, rgba(220, 184, 116, 0.7) 60%, rgba(184, 145, 63, 0.5) 100%); }
.vd-barra__col.is-zero { opacity: 0.28; }
.vd-barra:hover .vd-barra__col, .vd-barra:focus-visible .vd-barra__col, .vd-barra:focus .vd-barra__col { filter: brightness(1.22); box-shadow: 0 0 18px -4px rgba(185, 139, 255, 0.85); }

/* Dica ancorada pela posição da barra: com p = (i + 0.5) / n, a borda
   esquerda fica em p * (área - dica). Na primeira barra encosta à esquerda,
   na última à direita, no meio centraliza, e nunca sai da área do gráfico
   (o cartão corta o que passa dele). A largura nunca passa da área: no
   celular as linhas quebram em vez de estourar. */
.vd-dica {
    --p: calc((var(--i, 0) + 0.5) / var(--n, 1));
    position: absolute; top: 0; left: calc(var(--p) * 100%); z-index: 4; display: flex; flex-direction: column; gap: 4px;
    width: max-content; max-width: min(240px, 100%); padding: 10px 12px; border-radius: 12px; pointer-events: none; overflow-wrap: break-word;
    background: rgba(16, 10, 30, 0.96); border: 1px solid rgba(185, 139, 255, 0.32); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9);
    opacity: 0; visibility: hidden; transform: translate(calc(var(--p) * -100%), 6px);
    transition: opacity 180ms var(--vd-ease), transform 180ms var(--vd-ease);
}
.vd-barra:hover .vd-dica, .vd-barra:focus .vd-dica { opacity: 1; visibility: visible; transform: translate(calc(var(--p) * -100%), 0); }
.vd-dica__data { font-family: var(--vd-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vd-mudo); }
.vd-dica__valor { font-family: var(--vd-mono); font-size: 0.96rem; font-weight: 680; letter-spacing: -0.02em; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vd-dica__linha { font-family: var(--vd-mono); font-size: 0.7rem; color: var(--vd-texto-2); }
.vd-dica__antes { display: flex; align-items: baseline; gap: 6px; font-size: 0.68rem; line-height: 1.4; color: var(--vd-mudo); }
.vd-dica__antes i { flex: none; width: 12px; border-top: 2px dashed rgba(220, 184, 116, 0.85); transform: translateY(-3px); }

.vd-grafico__antes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.vd-grafico__antes path { fill: none; stroke: rgba(220, 184, 116, 0.85); stroke-width: 1.6; stroke-dasharray: 4 5; stroke-linejoin: round; stroke-linecap: round; animation: vd-revela 1.2s var(--vd-ease-2) both; animation-delay: 420ms; }

.vd-grafico__x { position: relative; height: 16px; margin: 8px 0 0 60px; }
.vd-grafico__x span { position: absolute; top: 0; transform: translateX(-50%); font-family: var(--vd-mono); font-size: 0.6rem; color: var(--vd-fraco); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vd-grafico__x span:not(.is-m) { display: none; }

.vd-vazio { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0 16px; text-align: center; }
.vd-vazio__icone { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 8px; border-radius: 14px; color: var(--vd-roxo-claro); background: var(--vd-roxo-fundo); }
.vd-vazio__titulo { font-size: 0.9rem; font-weight: 650; }

/* ------------------------------------------------------------------ métodos */
.vd-metodos__barra { display: flex; gap: 2px; height: 8px; margin-top: 16px; overflow: hidden; border-radius: 999px; background: rgba(150, 110, 255, 0.1); }
.vd-metodos__seg { height: 100%; transform-origin: left; animation: vd-cresce-x 900ms var(--vd-ease) both; animation-delay: 300ms; }
.vd-metodos__seg--pix { background: linear-gradient(90deg, #2bb6a4, var(--vd-pix)); }
.vd-metodos__seg--cartao { background: linear-gradient(90deg, #7a48ef, var(--vd-cartao)); }
.vd-metodos__seg--paypal { background: linear-gradient(90deg, #3f86f0, var(--vd-paypal)); }
.vd-metodos__lista { display: flex; flex-direction: column; margin-top: 8px; }
.vd-metodos__item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0; }
.vd-metodos__item + .vd-metodos__item { border-top: 1px solid var(--vd-linha-suave); }
.vd-metodos__icone { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; }
.vd-metodos__icone--pix { color: var(--vd-pix); background: rgba(63, 209, 189, 0.12); }
.vd-metodos__icone--cartao { color: var(--vd-cartao); background: rgba(157, 107, 255, 0.14); }
.vd-metodos__icone--paypal { color: var(--vd-paypal); background: rgba(90, 162, 255, 0.12); }

.vd-anel-linha { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--vd-linha-suave); }
.vd-anel-linha .vd-mini { margin-top: 2px; }
.vd-anel { position: relative; width: 64px; height: 64px; flex: none; }
.vd-anel svg { transform: rotate(-90deg); }
.vd-anel__trilho { fill: none; stroke: rgba(150, 110, 255, 0.14); stroke-width: 6; }
.vd-anel__valor { fill: none; stroke: var(--vd-roxo-claro); stroke-width: 6; stroke-linecap: round; }
.vd-anel__valor.is-otimo { stroke: var(--vd-sobe); }
.vd-anel__valor.is-bom { stroke: var(--vd-roxo-claro); }
.vd-anel__valor.is-medio { stroke: var(--vd-ambar); }
.vd-anel__valor.is-baixo { stroke: var(--vd-desce); }
.vd-anel__pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--vd-mono); font-size: 0.86rem; font-weight: 680; letter-spacing: -0.04em; }
.vd-anel__pct small { margin-left: 1px; font-size: 0.58rem; color: var(--vd-mudo); }

/* ------------------------------------------------------------------ tabela de moedas
   Celular: nome e valor em reais na primeira linha; vendas, valor na moeda
   e participação embaixo, cada um com o próprio rótulo, quebrando linha em
   vez de encostar. A partir de 600 px de painel: cinco colunas alinhadas. */
.vd-linhas { display: flex; flex-direction: column; margin-top: 12px; }
.vd-linha {
    position: relative; display: grid; gap: 6px 12px; align-items: center; padding: 12px 0 18px;
    grid-template-columns: minmax(0, 1fr) auto;
}
.vd-linha + .vd-linha { border-top: 1px solid var(--vd-linha-suave); }
.vd-linha--cab { display: none; }
.vd-linha__nome { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.vd-linha__real { grid-column: 2; grid-row: 1; }
.vd-linha__extra { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 4px 16px; padding-left: 40px; }
.vd-linha__extra .vd-num { text-align: left; }
.vd-linha .vd-num { font-size: 0.8rem; color: var(--vd-texto-2); }
.vd-linha .vd-num.vd-forte { font-size: 0.88rem; color: var(--vd-texto); }
.vd-rot { font-family: var(--vd-sans); font-size: 0.66rem; color: var(--vd-mudo); }
.vd-linha__real .vd-rot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.vd-linha__barra { position: absolute; left: 40px; right: 0; bottom: 6px; height: 3px; border-radius: 3px; background: rgba(150, 110, 255, 0.1); pointer-events: none; overflow: hidden; }
.vd-linha__barra::after { content: ''; position: absolute; inset: 0 auto 0 0; width: calc(var(--b, 0) * 1%); border-radius: 3px; background: linear-gradient(90deg, #6d3be0, var(--vd-roxo-claro)); transform-origin: left; animation: vd-cresce-x 900ms var(--vd-ease) both; animation-delay: 360ms; }

/* ------------------------------------------------------------------ rankings */
.vd-ranking, .vd-sellers, .vd-adqs { display: flex; flex-direction: column; margin-top: 12px; }
.vd-ranking__item { position: relative; display: grid; grid-template-columns: 18px 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0 16px; }
.vd-ranking__item + .vd-ranking__item, .vd-seller + .vd-seller, .vd-adq + .vd-adq { border-top: 1px solid var(--vd-linha-suave); }
.vd-ranking__item::before, .vd-seller::before {
    content: ''; position: absolute; left: 70px; right: 0; bottom: 6px; height: 3px; border-radius: 3px; pointer-events: none; background: rgba(150, 110, 255, 0.1);
}
.vd-ranking__item::after, .vd-seller::after {
    content: ''; position: absolute; left: 70px; bottom: 6px; height: 3px; width: calc((100% - 70px) * var(--b, 0) / 100); border-radius: 3px; pointer-events: none;
    background: linear-gradient(90deg, #6d3be0, var(--vd-roxo-claro)); transform-origin: left; animation: vd-cresce-x 900ms var(--vd-ease) both; animation-delay: 360ms;
}
.vd-ranking__item.is-primeiro::after, .vd-seller.is-primeiro::after { background: linear-gradient(90deg, #b8913f, var(--vd-ouro)); }
.vd-ranking__pos { font-family: var(--vd-mono); font-size: 0.72rem; font-weight: 650; color: var(--vd-fraco); text-align: center; }
.vd-ranking__item.is-primeiro > .vd-ranking__pos, .vd-seller.is-primeiro > .vd-ranking__pos { color: var(--vd-ouro); }

.vd-seller {
    position: relative; display: grid; gap: 6px 12px; align-items: center; padding: 10px 0 18px;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    grid-template-areas: "pos nome valor" "pos adq adq";
}
.vd-seller::before, .vd-seller::after { left: 30px; }
.vd-seller::after { width: calc((100% - 30px) * var(--b, 0) / 100); }
.vd-seller > .vd-ranking__pos { grid-area: pos; align-self: start; padding-top: 2px; }
.vd-seller__nome { grid-area: nome; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.vd-seller__nome strong { font-size: 0.86rem; font-weight: 600; overflow-wrap: anywhere; }
.vd-seller__nome small { font-family: var(--vd-mono); font-size: 0.66rem; color: var(--vd-mudo); }
.vd-seller__adq { grid-area: adq; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.vd-seller > .vd-pilha--num { grid-area: valor; }
.vd-sellers__outros { margin-top: 8px; }

.vd-adq { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0 16px; }
.vd-adq .vd-pilha strong { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.vd-adq__barra { position: absolute; left: 0; right: 0; bottom: 6px; height: 3px; border-radius: 3px; background: rgba(150, 110, 255, 0.1); overflow: hidden; pointer-events: none; }
.vd-adq__barra::after { content: ''; position: absolute; inset: 0 auto 0 0; width: calc(var(--b, 0) * 1%); background: linear-gradient(90deg, #6d3be0, var(--vd-roxo-claro)); transform-origin: left; animation: vd-cresce-x 900ms var(--vd-ease) both; animation-delay: 360ms; }

/* ------------------------------------------------------------------ últimas vendas */
.vd-ultimas { display: flex; flex-direction: column; margin-top: 12px; }
.vd-ultimas > li + li { border-top: 1px solid var(--vd-linha-suave); }
.vd-ultima {
    display: grid; gap: 4px 12px; align-items: center; padding: 10px 8px; margin: 0 -8px; border-radius: 12px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas: "quando seller valor" "quando pais valor";
    transition: background-color 180ms var(--vd-ease);
}
a.vd-ultima:hover { background: rgba(138, 72, 245, 0.08); }
.vd-ultima__quando { grid-area: quando; display: flex; flex-direction: column; gap: 2px; font-family: var(--vd-mono); font-variant-numeric: tabular-nums; }
.vd-ultima__quando strong { font-size: 0.84rem; font-weight: 650; }
.vd-ultima__quando small { font-size: 0.64rem; color: var(--vd-mudo); }
.vd-ultima__seller { grid-area: seller; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vd-ultima__seller strong { font-size: 0.86rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-ultima__seller small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.7rem; color: var(--vd-mudo); }
.vd-ultima__pais { grid-area: pais; display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.72rem; color: var(--vd-mudo); }
.vd-ultima__pais span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-ultima > .vd-pilha--num { grid-area: valor; }

/* ------------------------------------------------------------------ visão interna */
.vd-interno { display: flex; flex-direction: column; gap: var(--vd-gap); margin-top: 8px; padding-top: 20px; border-top: 1px dashed rgba(150, 110, 255, 0.22); }
.vd-interno__cab { display: flex; align-items: flex-start; gap: 12px; }
.vd-interno__cab .vd-mini { margin-top: 4px; max-width: 72ch; }
.vd-interno__selo { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; color: var(--vd-ouro); background: radial-gradient(120% 120% at 30% 0%, rgba(220, 184, 116, 0.22), rgba(220, 184, 116, 0.05) 60%), var(--vd-sup-2); border: 1px solid rgba(220, 184, 116, 0.32); }
.vd-trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--vd-gap); align-items: stretch; }
.vd-grande { margin-top: 4px; font-family: var(--vd-mono); font-variant-numeric: tabular-nums; font-weight: 650; font-size: 1.6rem; letter-spacing: -0.03em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-grande.is-desce { color: var(--vd-desce); }
.vd-grande.is-ambar { color: var(--vd-ambar); }
.vd-interno__cartao > .vd-var { margin-top: 8px; }
.vd-dl { display: flex; flex-direction: column; margin-top: 12px; }
.vd-dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--vd-linha-suave); font-size: 0.8rem; }
.vd-dl dt { min-width: 0; color: var(--vd-mudo); }
.vd-dl dd { font-family: var(--vd-mono); font-variant-numeric: tabular-nums; color: var(--vd-texto); white-space: nowrap; }
.vd-dl > .is-alerta dd { color: var(--vd-desce); }
.vd-dl > .is-atencao dd { color: var(--vd-ambar); }

.vd-pendencias { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.vd-pendencia {
    display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px; padding: 8px 10px;
    border-radius: 12px; border: 1px solid transparent; transition: background-color 180ms var(--vd-ease), border-color 180ms var(--vd-ease);
}
a.vd-pendencia:hover { background: rgba(138, 72, 245, 0.08); border-color: var(--vd-linha); }
.vd-pendencia__icone { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: var(--vd-mudo); background: rgba(255, 255, 255, 0.04); }
.vd-pendencia__rotulo { font-size: 0.84rem; color: var(--vd-texto-2); }
.vd-pendencia__n { font-family: var(--vd-mono); font-size: 1.1rem; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--vd-mudo); }
.vd-pendencia.is-ativa .vd-pendencia__n { color: var(--vd-ambar); }
.vd-pendencia.is-ativa .vd-pendencia__icone { color: var(--vd-ambar); background: rgba(243, 194, 90, 0.12); }

.vd-saude { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 12px; }
.vd-saude__bloco { min-width: 0; }
.vd-ativas { display: flex; flex-direction: column; margin-top: 8px; }
.vd-ativas li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--vd-linha-suave); }
.vd-ativas li.is-parada .vd-pilha small { color: var(--vd-ambar); }

.vd-detalhes { padding: 0; }
.vd-detalhes__resumo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; cursor: pointer; list-style: none; border-radius: var(--vd-raio); }
.vd-detalhes__resumo::-webkit-details-marker { display: none; }
.vd-detalhes__resumo::marker { content: ''; }
.vd-detalhes__seta { display: inline-flex; color: var(--vd-mudo); transition: transform 260ms var(--vd-ease); }
.vd-detalhes[open] .vd-detalhes__seta { transform: rotate(90deg); }
.vd-detalhes__corpo { padding: 0 16px 16px; }

.vd-erro, .vd-aviso { display: flex; align-items: center; gap: 16px; }
.vd-erro__icone, .vd-aviso__icone { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; color: var(--vd-desce); background: rgba(255, 142, 128, 0.11); }
.vd-aviso__icone { color: var(--vd-roxo-claro); background: var(--vd-roxo-fundo); }
.vd-erro .vd-mini, .vd-aviso .vd-mini { margin-top: 4px; }

/* ------------------------------------------------------------------ larguras maiores (do painel) */
@container vd (min-width: 600px) {
    .vd-abertura { padding: 28px; }
    .vd-filtros__campos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vd-datas { grid-template-columns: minmax(0, 200px) minmax(0, 200px) auto; }
    .vd-datas .vd-botao { grid-column: auto; }
    .vd-linha { grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.6fr); }
    .vd-linha--cab { display: grid; margin-top: 12px; padding: 0 0 8px; }
    .vd-linha--cab > * { grid-row: 1; font-family: var(--vd-mono); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--vd-mudo); }
    .vd-linhas { margin-top: 0; }
    .vd-linha__extra { display: contents; }
    .vd-linha__nome, .vd-linha__real, .vd-linha__vendas, .vd-linha__moeda, .vd-linha__parte { grid-row: 1; }
    .vd-linha__vendas { grid-column: 2; }
    .vd-linha__moeda { grid-column: 3; }
    .vd-linha__real { grid-column: 4; }
    .vd-linha__parte { grid-column: 5; }
    .vd-linha__extra .vd-num { text-align: right; }
    .vd-linha .vd-rot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
    .vd-ultima { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 160px) auto; grid-template-areas: "quando seller pais valor"; }
}
@container vd (min-width: 720px) {
    .vd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .vd-grafico__corpo { height: 280px; }
    .vd-grafico__x span:not(.is-m) { display: inline; }
    .vd-grafico__x span:not(.is-d) { display: none; }
    .vd-seller { grid-template-columns: 18px minmax(0, 1fr) minmax(0, auto) auto; grid-template-areas: "pos nome adq valor"; }
    .vd-seller__adq { justify-content: flex-end; }
    .vd-saude { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
    .vd-saude--duas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container vd (min-width: 900px) {
    .vd-abertura { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); padding: 36px 40px; }
    .vd-abertura__numero { align-items: flex-end; text-align: right; }
    .vd-abertura__rodape { justify-content: flex-end; }
    .vd-abertura__marca { width: 220px; right: -44px; top: -44px; }
    .vd-filtros__linha { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
    .vd-periodos { flex: 0 1 auto; }
    .vd-metodos-filtro { flex: none; display: inline-grid; grid-template-columns: repeat(4, auto); }
    .vd-metodo-btn { padding: 0 14px; }
    .vd-filtros__campos { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
}
/* grade de 12 colunas: a partir de 960 px de painel (1366 px de janela com a
   barra lateral aberta) */
@container vd (min-width: 960px) {
    .vd-grade { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .vd-span-12 { grid-column: span 12; }
    .vd-span-8 { grid-column: span 8; }
    .vd-span-7 { grid-column: span 7; }
    .vd-span-5 { grid-column: span 5; }
    .vd-span-4 { grid-column: span 4; }
}
@container vd (min-width: 1100px) {
    .vd-cartao { padding: 20px; }
    .vd-kpi { padding: 20px; min-height: 148px; }
    .vd-kpi__valor { font-size: min(1.85rem, calc(100cqi / (var(--n, 12) * 0.62))); }
    .vd-grafico__corpo { height: 300px; }
    .vd-detalhes { padding: 0; }
    .vd-detalhes__resumo { padding: 20px; }
    .vd-detalhes__corpo { padding: 0 20px 20px; }
}
@container vd (min-width: 1400px) {
    .vd-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@container vd (max-width: 340px) {
    .vd-abertura { padding: 20px 16px; }
    .vd-filtros { padding: 8px; }
    .vd-cartao, .vd-kpi { padding: 12px; }
    .vd-grafico__corpo { grid-template-columns: 44px minmax(0, 1fr); }
    .vd-grafico__x { margin-left: 52px; }
}

/* ------------------------------------------------------------------ movimento */
@keyframes vd-entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes vd-sobe-texto { from { opacity: 0; transform: translateY(14px) skewY(-2deg); } to { opacity: 1; transform: none; } }
@keyframes vd-cresce-y { from { transform: scaleY(0); } to { transform: none; } }
@keyframes vd-cresce-x { from { transform: scaleX(0); } to { transform: none; } }
@keyframes vd-revela { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes vd-abre { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes vd-varre { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes vd-pulsa { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes vd-flutua { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(-6px, 8px) rotate(6deg); } }

@media (prefers-reduced-motion: reduce) {
    .vd *, .vd *::before, .vd *::after, .vd { animation: none !important; transition: none !important; }
}
