/* Klugwerk Praxis Spital · Conta do paciente (31/10/2026). Usa os tokens de app.css e as classes de spital.css. */
.sct { min-width: 0; }
.sct-ferr { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; justify-content: space-between; }
.sct-ferr > p { flex: 1 1 200px; margin: 0; }
.sct-busca { flex: 0 1 280px; min-width: 0; }
.sct-escolha { max-width: 640px; }
.sct-escolha select { width: 100%; }
.sct-filtros { flex: 1 1 auto; }
.sct-link { background: none; border: 0; padding: 0; color: var(--px); font: inherit; font-weight: 700; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.sct-tab td small, .sct-tab th small { display: block; color: var(--aco); font-weight: 400; }
.sct-tab td.num, .sct-tab th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sct-tab tfoot td { border-top: 2px solid var(--linha); border-bottom: 0; }
.sct-tab td input { width: 100%; min-width: 0; }
.sct-tab td.num input { max-width: 110px; text-align: right; }
.sct-acao { text-align: right; }
.sct-lote { font-family: var(--f-mono); font-size: .76rem; }
.sct-neg { color: var(--mal); font-weight: 700; }
.sct-pos { color: var(--ok); font-weight: 600; }
.sct-neg small, .sct-pos small { display: block; font-weight: 400; }
.sct-linha-neg td { background: var(--mal-s); }
.sct-forte { font-weight: 700; font-size: 1.02rem; }
.sct-cab { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.sct-cab h2 { margin: 0; }
.sct-novo { background: var(--bg); }
.sct-novo .sp-linha > .campo.curto:first-child { flex: 0 1 190px; }
.sct-totais dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; max-width: 520px; }
.sct-totais dt { color: var(--aco); }
.sct-totais dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.sct-totais dt.sct-forte, .sct-totais dd.sct-forte { color: var(--tinta); border-top: 1px solid var(--linha); padding-top: 6px; }
.sct-totais input { width: 120px; text-align: right; }
.sct-acoes { flex-wrap: wrap; }
.sct-aviso { border-left: 3px solid var(--px); padding-left: 10px; }
.sct-duas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.sct-negativos ul { margin: 6px 0; padding-left: 20px; font-weight: 400; }
.sct-negativos .btn { margin-left: 6px; }
.sct-explica ol { margin: 0; padding-left: 20px; }
.sct-precos th small { text-transform: none; letter-spacing: 0; }
/* gráfico */
.sct-grafico { width: 100%; height: auto; max-height: 260px; display: block; }
.sct-b-custo { fill: var(--aco); }
.sct-b-cob { fill: var(--px); }
.sct-g-rot { fill: var(--aco); font-size: 12px; font-family: var(--f-txt, sans-serif); }
.sct-g-eixo { stroke: var(--linha); stroke-width: 1.5; }
.sct-g-grade { stroke: var(--linha); stroke-dasharray: 3 4; }
.sct-l-custo { background: var(--aco); }
.sct-l-cob { background: var(--px); }
.sct-g-tab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* extrato impresso */
.sct-ext-h { margin: 14px 0 4px; font-size: .95rem; }
.sct-ext { width: 100%; border-collapse: collapse; font-size: .86rem; }
.sct-ext th, .sct-ext td { padding: 4px 6px; border-bottom: 1px solid #ddd; text-align: left; }
.sct-ext th { font-size: .72rem; }
.sct-ext .num { text-align: right; white-space: nowrap; }
.sct-ext-sub td { font-weight: 700; border-bottom: 0; }
.sct-ext-tot { margin-top: 12px; max-width: 340px; margin-left: auto; }
.sct-ext-tot .sct-forte td { border-top: 2px solid #333; }

/* Celular: as tabelas viram cartões (rótulo de cada campo vem de data-sct-r). */
@media (max-width: 640px) {
  .sct-tab { overflow-x: visible; border: 0; background: none; }
  .sct-tab table, .sct-tab tbody, .sct-tab tfoot, .sct-tab tr, .sct-tab td { display: block; width: 100%; }
  .sct-tab thead { display: none; }
  .sct-tab tbody tr, .sct-tab tfoot tr { background: var(--sup); border: 1px solid var(--linha); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
  .sct-tab tr.sct-linha-neg { border-left: 4px solid var(--mal); }
  .sct-tab tr.sct-linha-neg td { background: none; }
  .sct-tab td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; text-align: right; }
  .sct-tab td.num { white-space: normal; }
  .sct-tab td:empty { display: none; }
  .sct-tab td[data-sct-r]::before { content: attr(data-sct-r); color: var(--aco); font-size: .78rem; text-align: left; flex: 0 0 auto; max-width: 45%; }
  .sct-tab td[data-sct-r=""]::before { display: none; }
  .sct-tab td:first-child { display: block; text-align: left; font-size: .98rem; padding-bottom: 6px; }
  .sct-tab td:first-child::before { display: block; max-width: none; margin-bottom: 2px; }
  .sct-tab td > small, .sct-tab td > span > small { text-align: right; }
  .sct-tab td:first-child > small { text-align: left; }
  .sct-tab td input { max-width: 150px; }
  .sct-tab td.num input { max-width: 130px; }
  .sct-tab tfoot td { border-top: 0; }
  .sct-acao { justify-content: flex-end; }
  /* convive com os cartões de celular.css (table.tc em duas colunas): título, lote e descrição ocupam a linha toda */
  .sct-tab tr > td:first-child, .sct-tab td[data-sct-r="Lote"], .sct-tab td[data-sct-r="Descrição"], .sct-tab td.sct-acao { grid-column: 1 / -1; }
  .sct-tab td[data-sct-r="Lote"] .sct-lote, .sct-tab td.num > small { text-align: left; white-space: normal; }
  .sct-tab td[data-sct-r="Descrição"] input { max-width: none; width: 100%; }
  .sct-busca { flex: 1 1 100%; }
  .sct-totais dl { max-width: none; }
  .sct-acoes .btn { flex: 1 1 100%; justify-content: center; }
  .sct-escolha { max-width: none; }
}
.sct-fin-praxis { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.sct-fin-praxis > div { flex: 1 1 260px; min-width: 0; }
.sct-fin-praxis p { margin: 2px 0 0; }
