/* =========================================================
   Tela Relatórios
   =========================================================

   Mesma gramática da tela Início: uma faixa de indicadores em bloco único
   (papel dividido por fios, não cartões flutuando) e um painel de detalhe
   abaixo. As classes levam prefixo `rep-` de propósito — copiar a FORMA da
   faixa da Início sem herdar as classes `home-*` deixa as duas telas livres
   para evoluir separadamente.

   Cor aqui só aparece na variação percentual, onde ela é informação:
   verde melhorou, vermelho piorou, tinta estável. O resto é tinta sobre papel.
   ========================================================= */

/* ---------------------------------------------------------
   Seletor de período
   --------------------------------------------------------- */
.rep-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.rep-shortcuts { margin-bottom: 0; }
.rep-custom-period { flex:1;max-width:640px; }
.rep-custom-period>summary { cursor:pointer;min-height:48px;padding:12px 16px;color:var(--ink-mute); }
.rep-custom-period .rep-range { padding:8px 16px;display:grid;grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr); }
.rep-custom-period .rep-date { min-width:0;width:100%;font-size:16px; }

.rep-range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rep-range-lab {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-mute);
}
.rep-date {
  width: auto;
  padding: 6px 9px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
/* O seletor nativo de data segue o color-scheme; sem isto o calendário abre
   branco sobre a interface escura. */
:root[data-theme="dark"] .rep-date { color-scheme: dark; }
:root[data-theme="light"] .rep-date { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rep-date { color-scheme: dark; }
}

/* ---------------------------------------------------------
   Faixa de indicadores
   --------------------------------------------------------- */
.rep-stack { display: flex; flex-direction: column; gap: 20px; }

.rep-band {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.rep-hero,
.rep-cell {
  background: var(--surface);
  padding: 15px 17px 16px;
  min-width: 0;
}
.rep-hero {
  padding: 20px 20px 18px;
}
.rep-hero .rep-v {
  font-size: clamp(36px, 5vw, 52px);
}
.rep-extra {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.rep-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
}
.rep-cell.is-loading,
.rep-hero.is-loading { min-height: 104px; }
.rep-hero.is-loading { min-height: 128px; }

.rep-k {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--ink-mute);
}
.rep-v {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.rep-cur { font-size: 16px; color: var(--ink-mute); margin-right: 3px; }
.rep-n {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 6px;
  line-height: 1.35;
}
.rep-delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.rep-delta.is-up { color: var(--ok); }
.rep-delta.is-down { color: var(--bad); }
.rep-delta.is-flat { color: var(--ink-2); }

.rep-band-error {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  padding: 18px 17px;
  font-size: 13px;
  color: var(--ink-mute);
}

/* ---------------------------------------------------------
   Detalhamento
   --------------------------------------------------------- */
.rep-tabs { margin-bottom: 0; }

/* Linha explicativa acima (ou abaixo) da tabela: contexto que evita
   interpretação errada do número — não é enfeite, é ressalva. */
.rep-note {
  padding: 11px 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-mute);
  background: var(--surface-2);
  border-bottom: 1px solid var(--rule-soft);
}
.rep-note-act {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 0;
  border-top: 1px solid var(--rule-soft);
}

.rep-table td.rep-num,
.rep-table th.rep-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rep-table td:first-child { min-width: 160px; }
.rep-table tbody tr:last-child td { border-bottom: 0; }

/* Quem não produziu no período continua na lista — a ausência é informação —,
   mas em tom mais baixo para não competir com quem produziu. */
.rep-idle-row td { color: var(--ink-mute); }
.rep-idle-row strong { font-weight: 500; }

.rep-hint {
  margin-left: 6px;
  font-size: 13px;
  color: var(--ink-mute);
}

.rep-table tfoot td {
  border-top: 1px solid var(--rule);
  border-bottom: 0;
  background: var(--surface-2);
  font-weight: 600;
}

/* Linha clicável: só quem produziu no período tem o que detalhar. */
.rep-clickable-row { cursor: pointer; }
.rep-clickable-row:hover td,
.rep-clickable-row:focus-visible td { background: var(--surface-2); }
.rep-clickable-row:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* Modal "Comandas do período": cada item é o registro que soma a linha do
   relatório — abrir um leva à comanda de verdade, com preço e comissão
   congelados no momento em que ela fechou. */
.rep-detail-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.rep-detail-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; text-align: left;
  color: inherit; background: var(--surface-2);
  border: 1px solid var(--rule-soft); border-radius: var(--radius-sm);
  font: inherit; cursor: pointer;
}
.rep-detail-item:disabled { color: var(--ink-mute); cursor: default; opacity: .75; }
.rep-detail-item:not(:disabled):hover { border-color: var(--rule); background: var(--surface); }
.rep-detail-item > div:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rep-detail-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-detail-item small { color: var(--ink-mute); font-size: 13px; }
.rep-detail-values { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rep-detail-values strong { font-variant-numeric: tabular-nums; }
.rep-detail-values small { color: var(--ink-mute); font-size: 13px; white-space: nowrap; }
.rep-detail-total {
  display: flex; align-items: baseline; gap: 8px; justify-content: flex-end;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule-soft);
}
.rep-detail-total span { color: var(--ink-mute); font-size: 13px; margin-right: auto; }
.rep-detail-total strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.rep-detail-total small { color: var(--ink-mute); font-size: 13px; }

/* Participação: barra fina + número, lidos juntos numa passada de olho. */
.rep-share { display: flex; align-items: center; gap: 9px; }
.rep-bar {
  display: block;
  width: 64px;
  height: 4px;
  flex: none;
  border-radius: 3px;
  background: var(--rule-soft);
  overflow: hidden;
}
.rep-bar > span { display: block; height: 100%; background: var(--ink-2); }
.rep-share-n {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------
   Telas estreitas — a tabela rola dentro do painel, nunca o corpo da página
   --------------------------------------------------------- */
@media (max-width: 760px) {
  .rep-controls { align-items: flex-start; flex-direction: column; }
  .rep-range { width: 100%; flex-wrap: wrap; }
  .rep-shortcuts {
    overflow-x: auto;
    max-width: 100%;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .rep-rail { grid-template-columns: 1fr; }
  .rep-hero .rep-v { font-size: 40px; }
  .panel-head:has(.rep-tabs) { flex-wrap: wrap; }
}
@media (max-width: 375px) {
  .rep-hero { padding: 16px 14px 14px; }
  .rep-cell { padding: 12px 14px 13px; }
  .rep-hero .rep-v { font-size: 36px; }
}
/* Resultados pelo método: o que voltou, o que já está agendado, quem saiu com o próximo. */
.rep-rail { grid-template-columns: repeat(4, 1fr); }
.rep-extra.rep-method { color: var(--brand-text, var(--cat-accent)); }
.rep-extra strong { font-weight: 700; }
@media (max-width: 1100px) { .rep-rail { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .rep-rail { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------
   Exportar e Comissões do mês (E2-14)
   --------------------------------------------------------- */
.rep-export { display:flex; gap:8px; flex-wrap:wrap; }
.com-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:16px 24px 8px; }
.com-month-lab { font-size:13px; text-transform:uppercase; letter-spacing:.08em; color:var(--ink-mute); }
.com-month { width:auto; min-width:200px; font-size:16px; }
.com-actions { margin-left:auto; display:flex; gap:8px; flex-wrap:wrap; }
.com-status, .com-alert { display:flex; align-items:flex-start; gap:8px; margin:8px 24px 12px; font-size:13px; line-height:1.45; color:var(--ink-2); }
.com-status svg, .com-alert svg { flex:none; margin-top:1px; }
.com-status.is-closed { color:var(--ok); }
.com-alert { padding:11px 14px; border-radius:var(--radius-sm); background:var(--wait-bg); color:var(--wait); }
.com-alert strong { color:inherit; }
.com-table .com-now { display:block; margin-left:0; color:var(--wait); }
.com-table tr.com-diverges td:first-child strong::after { content:" •"; color:var(--wait); }
.com-paid { display:inline-flex; align-items:center; gap:4px; color:var(--ok); font-size:13px; }
.com-undo { min-height:32px; padding:4px 8px; font-size:13px; }
.com-history { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:12px 24px 20px; border-top:1px solid var(--rule-soft); }
.com-history-k { font-size:13px; text-transform:uppercase; letter-spacing:.08em; color:var(--ink-mute); margin-right:4px; }
.com-chip { min-height:36px; padding:6px 12px; border:1px solid var(--rule); border-radius:999px; background:var(--surface); color:var(--ink-2); font:inherit; font-size:13px; cursor:pointer; }
.com-chip.is-active { border-color:var(--brand); color:var(--brand-text); background:var(--brand-soft); }
@media (max-width: 640px) {
  .com-bar, .com-history { padding-left:16px; padding-right:16px; }
  .com-status, .com-alert { margin-left:16px; margin-right:16px; }
  .com-actions { margin-left:0; width:100%; }
  .com-month { flex:1; min-width:0; }
}

/* Impressão: só o bloco #print-root vai para o papel (web/lib/print-report.js). */
#print-root { display:none; }
@media print {
  body.is-printing > *:not(#print-root) { display:none !important; }
  body.is-printing { background:#fff !important; overflow:visible !important; }
  body.is-printing #print-root { display:block; color:#111; font-family:var(--font-ui); font-size:11pt; }
  @page { margin:16mm 14mm; }
  .print-page { break-after:page; }
  .print-page:last-child { break-after:auto; }
  .print-head { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; padding-bottom:8px; border-bottom:1.5px solid #111; margin-bottom:14px; }
  .print-head strong { display:block; font-size:13pt; }
  .print-head span, .print-meta { font-size:9.5pt; color:#444; }
  .print-doc h1 { font-size:16pt; margin:0 0 10px; }
  .print-doc h2 { font-size:12pt; margin:18px 0 6px; }
  .print-doc table { width:100%; border-collapse:collapse; font-size:9.5pt; }
  .print-doc th { text-align:left; font-weight:600; border-bottom:1px solid #111; padding:5px 4px; }
  .print-doc td { border-bottom:1px solid #ccc; padding:4px; vertical-align:top; }
  .print-doc tfoot td { border-top:1.5px solid #111; border-bottom:0; font-weight:600; }
  .print-doc .num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
  .print-doc tr { break-inside:avoid; }
  .print-kpis { display:grid; grid-template-columns:repeat(3,1fr); gap:10px 18px; margin-bottom:8px; }
  .print-kpis span { display:block; font-size:9pt; color:#444; }
  .print-kpis strong { font-size:14pt; font-variant-numeric:tabular-nums; }
  .print-total { margin-top:14px; font-size:11pt; }
  .print-sign { margin-top:56px; width:60%; font-size:9.5pt; color:#444; }
  .print-sign span { display:block; border-top:1px solid #111; margin-bottom:4px; }
  .print-foot { margin-top:16px; font-size:8.5pt; color:#555; }
}
.com-team { display: flex; align-items: flex-start; gap: 10px; padding: 14px 24px 20px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.com-team input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
@media (max-width: 640px) { .com-team { padding-left: 16px; padding-right: 16px; } }

/* ---------------------------------------------------------
   Onda 8 · Resultados com números com nome, comissões em Equipe
   --------------------------------------------------------- */
.rep-ahead-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule-soft); border-top: 1px solid var(--rule-soft); }
.rep-ahead-cell { background: var(--surface); padding: 16px 20px 18px; min-width: 0; }
.rep-ahead-cell .rep-v { font-size: 28px; }
.rep-v-text small { font-family: var(--font-body, inherit); font-size: 14px; letter-spacing: 0; color: var(--ink-mute); }
.rep-ahead-cell .rep-n strong { color: var(--ink); font-weight: 700; }
@media (max-width: 900px) { .rep-ahead-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .rep-ahead-cell { padding: 14px 16px 16px; } }

.rep-com-link { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 16px; font-size: 14px; color: var(--ink-2); border: 1px dashed var(--rule); border-radius: var(--radius); }
.rep-com-link svg { flex: none; color: var(--ink-mute); }
.rep-com-link a { color: var(--brand-text); font-weight: 600; }

/* Barra de participação na cor da marca: lida de longe. */
.rep-bar { width: 88px; height: 6px; }
.rep-bar > span { background: var(--brand); }

/* Placar: "N serviços sem a volta combinada" abre a lista daquela pessoa. */
.msb-pending { display: block; margin-top: 2px; padding: 4px 0; min-height: 32px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--brand-text); text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: normal; }
.msb-pending:hover { color: var(--ink); }
.msb-head-tag { display: block; font-size: 13px; font-weight: 500; color: var(--ink-mute); white-space: normal; }
.msb-pending-lede { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.msb-pending-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.msb-pending-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--rule-soft); border-radius: var(--radius-sm); background: var(--surface-2); }
.msb-pending-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msb-pending-list small { font-size: 13px; color: var(--ink-mute); }
@media (max-width: 480px) { .msb-pending-list li { flex-wrap: wrap; } .msb-pending-list .btn { width: 100%; } }

/* "De onde veio" no celular: cada linha vira um cartão com o nome em cima e
   rótulo · valor alinhados (o número e o detalhe ficam juntos à direita). */
@media (max-width: 768px) {
  .reports-page .rep-table :is(tbody,tfoot) tr td { display: grid; grid-auto-flow: column; grid-template-columns: 1fr; grid-auto-columns: auto; justify-content: stretch; align-items: baseline; column-gap: 8px; }
  .reports-page .rep-table :is(tbody,tfoot) tr td:first-child { display: block; text-align: left; font-size: 16px; padding-bottom: 4px; }
  .reports-page .rep-table :is(tbody,tfoot) tr td:first-child::before { display: none; }
  .reports-page .rep-table tfoot td { background: none; }
  .reports-page .rep-table .rep-hint { margin-left: 0; }
  .reports-page .rep-table .rep-share { justify-content: flex-end; }
  .rep-com-link { align-items: flex-start; }
}

/* Onda 8 · rodada 2 */
.rep-row-go { display: inline-flex; vertical-align: middle; margin-left: 6px; color: var(--ink-mute); }
.rep-row-go svg { transform: rotate(-90deg); }
.rep-share-n { font-family: inherit; }
.msb-legend { margin: 0; padding: 8px 16px 12px; font-size: 13px; color: var(--ink-mute); }
.msb-table thead th.msb-running { color: var(--ink-mute); font-weight: 500; }
@media (max-width: 768px) {
  .reports-page .rep-table-svc :is(tbody,tfoot) tr td:nth-child(4) { display: none; }
  .rep-row-go { float: right; }
}

/* ---------------------------------------------------------
   Ajuste de acabamento (01/11/2026): vazio e erro do placar, rolagem sinalizada,
   erro em um só aviso, datas como controle, esqueleto com formas, modal estreito.
   --------------------------------------------------------- */

/* Vazio e erro do placar: mesmo recuo e corpo de texto dos outros cartões (antes colavam na borda). */
/* Tudo escopado a .reports-page: o modal "Sem a volta combinada" (também aberto pela ficha do profissional) usa .msb-empty e já tem o próprio recuo. */
.reports-page .msb-empty { padding: 20px 24px; font-size: 14px; line-height: 1.5; color: var(--ink-mute); }
.reports-page .msb-empty p { margin: 0; }
.reports-page .msb-empty .btn { margin-top: 12px; }
.reports-page .msb-empty-error { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.reports-page .msb-empty-error .btn { margin-top: 0; }
/* Erro do topo já tem o "Tentar de novo": o do placar some quando é a mesma falha. */
.reports-page.has-main-error .msb-empty-error .btn { display: none; }
@media (max-width: 768px) { .reports-page .msb-empty { padding-left: 16px; padding-right: 16px; } }
.rep-band-error { flex-wrap: wrap; }
.rep-band-error span { flex: 1 1 220px; }
.rep-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }

/* Tabela larga: rola dentro do painel e a borda com mais conteúdo ganha sombra. */
.rep-fade { position: relative; }
.rep-fade::before, .rep-fade::after { content: ''; position: absolute; top: 0; bottom: 0; width: 28px; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 1; }
.rep-fade::before { left: 0; background: linear-gradient(to right, color-mix(in srgb, var(--ink) 20%, transparent), transparent); }
.rep-fade::after { right: 0; background: linear-gradient(to left, color-mix(in srgb, var(--ink) 20%, transparent), transparent); }
.rep-fade.has-more-l::before, .rep-fade.has-more-r::after { opacity: 1; }
.rep-fade > :is(.table-container, .msb-scroll):focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.reports-page .rep-table th, .reports-page .rep-table td { padding-left: 10px; padding-right: 10px; }
.reports-page .rep-table th { letter-spacing: .04em; }

/* Escolher datas: controle com contorno e ícone, não um texto cinza solto. */
.rep-custom-period { flex: 0 0 auto; width: fit-content; max-width: 100%; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--surface); }
.rep-custom-period[open] { width: min(640px, 100%); }
@media (max-width: 760px) { .rep-custom-period, .rep-custom-period[open] { width: 100%; } }
.rep-custom-period > summary { display: flex; align-items: center; gap: 8px; list-style: none; color: var(--ink); font-weight: 600; font-size: 14px; min-height: 44px; padding: 10px 16px; border-radius: var(--radius-sm); }
.rep-custom-period > summary::-webkit-details-marker { display: none; }
.rep-custom-period > summary svg { flex: none; color: var(--ink-2); }
.rep-custom-period > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rep-custom-period[open] > summary { border-bottom: 1px solid var(--rule-soft); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.reports-page .rep-controls { margin-bottom: 16px; }
.reports-page .admin-explanation { margin-top: 0; }

/* 1º dia do mês: diz o que fazer em vez de deixar um R$ 0,00 mudo. */
.rep-first-day { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule-soft); font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.rep-first-day span { flex: 1 1 260px; }

/* "Daqui para frente": as colunas seguem quantos cartões existem (1, 2 ou 3), sem bloco cinza vazio. */
.rep-ahead-grid { grid-template-columns: repeat(var(--rep-ahead-n, 3), minmax(0, 1fr)); }
@media (max-width: 900px) { .rep-ahead-grid { grid-template-columns: 1fr; } }
.rep-ahead-grid .rep-n { max-width: 70ch; }

/* Botões desativados por falta de dado: continuam legíveis (AA) e dizem o motivo ao serem tocados. */
/* Escopo .reports-page: .catalog-scope .btn-ghost (catalog.css, carregado depois) ganharia de um seletor mais fraco. */
.reports-page .rep-export .btn[aria-disabled="true"] { opacity: .55; color: var(--ink-mute); border-style: dashed; border-color: var(--rule-strong); background: transparent; cursor: not-allowed; box-shadow: none; }
.reports-page .rep-export .btn[aria-disabled="true"]:hover { background: transparent; }
.reports-page .rep-band-neutral { grid-column: 1 / -1; padding: 24px; background: var(--surface); color: var(--ink-2); font-size: 15px; }
.reports-page .rep-range-error { grid-column: 1 / -1; margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--bad); }
.reports-page .rep-date[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.reports-page .msb-name { white-space: normal; min-width: 9em; }
@media (min-width: 1024px) { .reports-page .msb-name { min-width: 15em; } }
/* Nome fixo à esquerda quando a grade de períodos rola. */
.reports-page .msb-table thead th:first-child, .reports-page .msb-table tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); }

/* Carregando com forma: faixas que imitam o conteúdo, com brilho leve. */
/* Forma a 20% de tinta sobre o fundo (brilho a 28%): razão de contraste de 1,5 ou mais no claro e no escuro (testado em resultadosTela.test.js). */
.rep-sk { display: block; border-radius: 6px; background: linear-gradient(100deg, color-mix(in srgb, var(--ink) 20%, var(--surface)) 30%, color-mix(in srgb, var(--ink) 28%, var(--surface)) 50%, color-mix(in srgb, var(--ink) 20%, var(--surface)) 70%) 0 0 / 200% 100%; animation: method-shimmer 1.4s linear infinite; }
.rep-hero.is-loading, .rep-cell.is-loading { display: flex; flex-direction: column; gap: 12px; }
.rep-sk-list, .reports-page .msb-skeleton { display: flex; flex-direction: column; gap: 12px; padding: 20px 24px; }
@media (max-width: 768px) { .rep-sk-list, .reports-page .msb-skeleton { padding-left: 16px; padding-right: 16px; } }
.rep-sk-row, .reports-page .msb-skeleton .rep-sk { height: 44px; width: 100%; }
@media (prefers-reduced-motion: reduce) { .rep-sk { animation: none; } }

/* Modal de comandas em tela estreita: nome inteiro numa linha, serviço embaixo, valores em linha própria. */
@media (max-width: 480px) {
  .rep-detail-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px 8px; }
  .rep-detail-item > div:first-child { grid-column: 1; }
  .rep-detail-item > svg { grid-column: 2; grid-row: 1; margin-top: 3px; }
  .rep-detail-item strong { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .rep-detail-item .rep-detail-values { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-top: 6px; border-top: 1px solid var(--rule-soft); }
  .rep-detail-values small { white-space: normal; }
}

/* ---------------------------------------------------------
   Blocos recolhíveis no celular (<details> nativo). No computador tudo fica aberto e o título não é botão.
   --------------------------------------------------------- */
.reports-page .rep-fold-sum { display: flex; align-items: center; gap: 6px; list-style: none; padding: 24px 24px 4px; cursor: default; pointer-events: none; }
.reports-page .rep-fold-sum::-webkit-details-marker { display: none; }
.reports-page .rep-fold-sum h2 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 400; }
.reports-page .rep-fold-count { display: none; font-size: 14px; color: var(--ink-mute); }
.reports-page .rep-fold > .panel-head { padding-top: 0; }
.reports-page .rep-fold > .panel-head .sub { font-size: 13px; }
@media (max-width: 767px) {
  .reports-page .rep-fold-sum { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; row-gap: 2px; min-height: 44px; padding: 10px 16px; cursor: pointer; pointer-events: auto; }
  .reports-page .rep-fold-count { display: block; grid-column: 1; }
  .reports-page .rep-fold-sum::after { content: ''; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); margin: 0 4px 4px 8px; transition: transform .15s; }
  .reports-page .rep-fold[open] > .rep-fold-sum::after { transform: rotate(-135deg); margin-bottom: 0; }
  .reports-page .rep-fold-sum:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: var(--radius); }
  .reports-page .rep-fold[open] > .rep-fold-sum { padding-bottom: 4px; }
  .reports-page .rep-fold-sum h2 { grid-column: 1; min-width: 0; }
  .reports-page .rep-fold-count { text-align: left; line-height: 1.35; }
  .reports-page .rep-fold-count:empty { display: none; }
  .reports-page .rep-fold-sum::after { grid-column: 2; grid-row: 1 / span 2; }
}
@media (prefers-reduced-motion: reduce) { .reports-page .rep-fold-sum::after { transition: none; } }

/* Computador: "No período" também fica fixo ao lado do nome; o período em curso (última coluna) e o total ficam à vista. */
@media (min-width: 1024px) {
  .reports-page .msb-table thead th:nth-child(2), .reports-page .msb-table tbody td:nth-child(2) { position: sticky; left: calc(var(--msb-name-w, 15em) + 4px); z-index: 1; }
  .reports-page .msb-table thead th:nth-child(2) { background: var(--surface); }
}
@media (min-width: 1024px) { .reports-page .msb-table td.is-low:nth-child(2) { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); } }
@media (max-width: 767px) { .reports-page .rep-fold .rep-note { padding-left: 16px; padding-right: 16px; } }
/* O vão de 4 px entre o nome fixo e o "No período" fixo não deixa passar a coluna que rola por baixo. */
@media (min-width: 1024px) { .reports-page .msb-table thead th:first-child, .reports-page .msb-table tbody th { box-shadow: 4px 0 0 var(--surface); } }
.reports-page .rep-com-link a { white-space: nowrap; }

/* Carregando de "Daqui para frente": mesma grade do conteúdo e altura próxima da final. */
.rep-sk-cell { display: flex; flex-direction: column; gap: 10px; min-height: 150px; }
/* Sombra à esquerda do placar só atrapalhava: o nome fixo já mostra que há mais à esquerda. */
.reports-page .msb-wrap.rep-fade::before { display: none; }
/* Nome do profissional não estica a coluna quando há poucas colunas (1280 em "Mês"). */
@media (min-width: 1024px) { .reports-page .msb-name { width: 15em; max-width: 15em; } }
/* Aberto, o bloco já mostra o conteúdo: o resumo (inclusive "Não carregou") sai. */
@media (max-width: 767px) { .reports-page .rep-fold[open] > .rep-fold-sum .rep-fold-count { display: none; } }

/* "Como interpretar estes números": mesmo chevron dos blocos recolhidos, no lugar do triângulo do navegador. */
.reports-page .admin-explanation > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; min-height: 44px; }
.reports-page .admin-explanation > summary::-webkit-details-marker { display: none; }
.reports-page .admin-explanation > summary::after { content: ''; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); margin: 0 4px 4px 8px; transition: transform .15s; }
.reports-page .admin-explanation[open] > summary::after { transform: rotate(-135deg); margin-bottom: 0; }
.reports-page .admin-explanation > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .reports-page .admin-explanation > summary::after { transition: none; } }

/* "Daqui para frente" vazio ou com erro: uma linha curta e a ação, sem a grade de números. */
.rep-ahead-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; min-height: 0; }
.rep-ahead-note .rep-n { margin: 0; font-size: 14px; color: var(--ink-2); }
/* Lugar reservado para o aviso do 1º dia do mês enquanto carrega (altura próxima da final: 2 linhas + botão no celular, 1 linha no computador). */
.rep-sk-first { width: 100%; height: 112px; margin-top: 14px; }
@media (min-width: 768px) { .rep-sk-first { height: 52px; } }

/* Meu dia (placar do profissional) com erro de rede: mensagem curta e o botão, sem depender de .reports-page. */
.msb-mine-box .msb-empty-error { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--ink-mute); }
.msb-mine-box .msb-empty-error p { margin: 0; }
.msb-mine-box .msb-empty-error .btn { min-height: 44px; }
