/* Dashboard e Vendas com valores altos (pedido do dono 19/10/2026: simulacao de R$ 100.000,00 e R$ 1.250.000,00 no mes).
   Carregado no FIM do index.html para vencer as camadas antigas (varios blocos com !important).
   Somente layout: nenhuma regra de calculo.
   - Cards: colunas podem encolher (minmax(0,1fr)); 3 colunas em telas ate 1280px; valor sem quebra (a fonte diminui por
     window.sellerFitDashCards em /dash-format.js quando nao cabe) - antes o card estourava a pagina em 1024px.
   - Tabelas "Produtos vendidos" e "Vendas realizadas": largura automatica das colunas e valores sem reticencias; se a
     tela for estreita, a tabela rola na horizontal DENTRO do quadro - antes "R$ 9.56..." e cabecalhos quebrados no meio
     da palavra ("Faturame nto"). */

/* ---------- cards ---------- */
#dashboard .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#dashboard .grid .card { min-width: 0; }
#dashboard .grid .card .value { white-space: nowrap; min-width: 0; overflow: hidden; font-variant-numeric: tabular-nums; }
@media (max-width: 1280px) { #dashboard .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { #dashboard .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* KPIs do Resumo de Receitas: quebram para a linha de baixo em vez de espremer */
#dashboard .revenue-chart-kpis { flex-wrap: wrap; justify-content: flex-end; }
#dashboard .revenue-kpi strong { white-space: nowrap; }

/* ---------- Produtos vendidos ---------- */
#dashboard .table-wrap { overflow-x: auto !important; max-width: 100%; }
.top-products-table { table-layout: auto !important; }
.top-products-table { min-width: 0 !important; }
.top-products-table th,
.top-products-table td { width: auto !important; min-width: 0 !important; }
.top-products-table thead th { overflow-wrap: normal !important; word-break: normal !important; hyphens: none; }
.top-products-table tbody td { overflow: visible !important; text-overflow: clip !important; }
.top-products-table tbody td:nth-child(n+3) { white-space: nowrap !important; font-variant-numeric: tabular-nums; }
.top-products-table th:nth-child(1),
.top-products-table td:nth-child(1) { width: 60px !important; }
.top-products-table td:nth-child(2) { min-width: 150px !important; }
.top-products-table thead th,
.top-products-table tbody td { padding-left: 5px !important; padding-right: 5px !important; }
@media (min-width: 1500px) { .top-products-table td:nth-child(2) { min-width: 230px !important; } }

/* ---------- Vendas realizadas ---------- */
.sales-table-wrap { overflow-x: auto !important; }
.sales-table { table-layout: auto !important; }
.sales-table th,
.sales-table td { width: auto !important; min-width: 0 !important; }
.sales-table thead th { overflow-wrap: normal !important; word-break: normal !important; hyphens: none; }
.sales-table tbody td { overflow: visible !important; text-overflow: clip !important; }
.sales-table tbody td:nth-child(n+5) { white-space: nowrap !important; font-variant-numeric: tabular-nums; }
.sales-table tbody td:nth-child(2) { white-space: normal !important; min-width: 68px !important; }
.sales-table tbody td:nth-child(4) { min-width: 150px !important; }

/* R$ 10 mi/mes (19/10): em 1366px a tabela passava ~30px da caixa; coluna Produto e respiros um pouco menores ate 1500px */
@media (max-width: 1500px) {
    .top-products-table td:nth-child(2) { min-width: 130px !important; }
    .top-products-table thead th,
    .top-products-table tbody td { padding-left: 4px !important; padding-right: 4px !important; }
}
/* painel web aberto no celular: 2 colunas nao comportam "-R$ 1.234.567,89" nem a 13px; uma coluna */
@media (max-width: 480px) { #dashboard .grid { grid-template-columns: minmax(0, 1fr); } }
