/* ---------- botões (DESIGN_SYSTEM.md §8): principal preenchido, secundário com contorno, texto ---------- */
form .btn { font-size: .875rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--raio-p); cursor: pointer;
  font-size: .875rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  background: var(--primaria); color: var(--sobre-primaria);
  transition: background-color var(--rapido) ease, border-color var(--rapido) ease, color var(--rapido) ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { background: var(--primaria-hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sec { background: transparent; color: var(--destaque); border-color: color-mix(in srgb, var(--destaque) 50%, transparent); }
.btn.sec:hover { background: color-mix(in srgb, var(--destaque) 8%, transparent); border-color: var(--destaque); }
.btn.texto { background: transparent; color: var(--destaque); padding: 0 8px; }
.btn.texto:hover { background: color-mix(in srgb, var(--destaque) 8%, transparent); }
.btn.claro { background: rgba(255, 255, 255, .14); color: var(--sobre-cor); border-color: rgba(255, 255, 255, .4); }
.btn.claro:hover { background: rgba(255, 255, 255, .22); }
.btn.perigo { background: transparent; color: var(--perigo); border-color: color-mix(in srgb, var(--perigo) 55%, transparent); }
.btn.perigo:hover { background: color-mix(in srgb, var(--perigo) 8%, transparent); border-color: var(--perigo); }
.btn.peq { min-height: 36px; padding: 0 12px; font-size: .8125rem; border-radius: var(--raio-p); }
.btn.peq svg { width: 18px; height: 18px; }
.btn.bloco { width: 100%; }
.link { background: none; border: 0; padding: 4px 0; color: var(--destaque); font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acoes.fim { justify-content: flex-end; }

/* ---------- formulários (§9): rótulo fixo acima do campo; borda fina, foco realçado em âmbar ---------- */
.campo { display: block; margin-bottom: 16px; }
.campo > span { display: block; font-size: .75rem; font-weight: 500; color: var(--texto-2); margin-bottom: 4px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--raio-p); font-size: .875rem;
  border: 1px solid var(--borda-campo); background: var(--superficie); color: var(--texto);
  transition: border-color var(--rapido) ease, box-shadow var(--rapido) ease;
}
input:not([type=checkbox]):not([type=radio]):not([type=file]):hover, select:hover, textarea:hover { border-color: var(--texto-2); }
textarea { min-height: 104px; resize: vertical; }
/* foco realçado (§9): o campo em foco recebe fundo, borda de 2 px e anel; vale para mouse e teclado (é onde se digita) */
input:not([type=checkbox]):not([type=radio]):not([type=file]):focus, select:focus, textarea:focus {
  outline: 2px solid transparent; /* continua visível no modo de alto contraste do Windows */
  background: var(--foco-fundo); border-color: var(--foco-borda);
  box-shadow: inset 0 0 0 1px var(--foco-borda), 0 0 0 3px var(--foco-anel);
  transition: background-color var(--rapido) ease, border-color var(--rapido) ease, box-shadow var(--rapido) ease;
}
.campo:focus-within > span, .marcar:focus-within { color: var(--foco-rotulo); }
/* caixa de marcar, escolha e arquivo não têm fundo próprio: contorno com a cor da borda de foco */
:is(input[type=checkbox], input[type=radio], input[type=file]):focus-visible { outline: 2px solid var(--foco-borda); outline-offset: 2px; }
/* campo com erro mantém a borda de erro mesmo em foco */
/* (seletores com a mesma especificidade da regra geral de foco, para valerem sobre ela) */
input:not([type=checkbox]):not([type=radio]):not([type=file])[aria-invalid="true"]:focus, select[aria-invalid="true"]:focus, textarea[aria-invalid="true"]:focus {
  border-color: var(--perigo); box-shadow: inset 0 0 0 1px var(--perigo), 0 0 0 3px var(--foco-anel);
}
/* campo somente leitura/calculado não "acende" como editável */
input:not([type=checkbox]):not([type=radio]):not([type=file])[readonly]:focus { background: var(--superficie-2); border-color: var(--borda-campo); box-shadow: 0 0 0 3px var(--foco-anel); }
@media (prefers-reduced-motion: reduce) { input, select, textarea { transition: none; } }
.ajuda { font-size: .75rem; color: var(--texto-2); margin-top: 4px; }
.duplo { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .duplo { grid-template-columns: 1fr; } }
.marcar { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; font-weight: 400; }
.marcar input { width: 18px; height: 18px; accent-color: var(--primaria); }
.segmentado { display: inline-flex; padding: 0; gap: 0; background: var(--superficie); border: 1px solid var(--borda-campo); border-radius: var(--raio-p); overflow: hidden; }
.segmentado button { min-width: 56px; min-height: 36px; border: 0; border-radius: 0; background: transparent; cursor: pointer; font-weight: 500; color: var(--texto-2); transition: background-color var(--rapido) ease, color var(--rapido) ease; }
.segmentado button + button { border-left: 1px solid var(--borda-campo); }
.segmentado button:hover { background: color-mix(in srgb, var(--destaque) 6%, transparent); }
.segmentado button[aria-pressed="true"] { background: color-mix(in srgb, var(--destaque) 14%, transparent); color: var(--destaque); }
.erro-form { color: var(--perigo); font-size: .8125rem; min-height: 1.3em; margin: 4px 0 8px; }

/* ---------- superfícies (§10): cartão em papel, borda fina, raio 12, sem sombra forte ---------- */
.painel { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); padding: 20px 24px; box-shadow: none; }
.painel + .painel { margin-top: 16px; }
.grade > .painel + .painel { margin-top: 0; }
.painel > h2 { margin-bottom: 16px; font-size: 1rem; }
.vidro {
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--raio);
}
.grade { display: grid; gap: 16px; }
.grade.g2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grade.g4 { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.vazio { text-align: center; padding: 32px 16px; color: var(--texto-2); }
.vazio svg { width: 40px; height: 40px; margin: 0 auto 8px; opacity: .55; }

/* ---------- abas e chips ---------- */
.abas { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--linha); }
.abas button { border: 0; background: none; padding: 8px 16px; min-height: 44px; cursor: pointer; font-weight: 500; color: var(--texto-2); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--rapido) ease, border-color var(--rapido) ease; }
.abas button:hover { color: var(--texto); }
.abas button[aria-selected="true"] { color: var(--destaque); border-bottom-color: var(--destaque); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--borda-campo); background: var(--superficie); border-radius: 999px; padding: 0 12px; min-height: 32px; cursor: pointer; font-weight: 500; font-size: .8125rem; transition: background-color var(--rapido) ease; }
.chip:hover { background: var(--superficie-2); }
.chip[aria-pressed="true"] { background: var(--primaria); border-color: var(--primaria); color: var(--sobre-primaria); }
.selo { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--perigo); color: var(--sobre-erro); font-size: .75rem; font-weight: 500; }
.etiqueta { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 500; background: var(--superficie-2); border: 1px solid var(--linha); color: var(--texto-2); }
.etiqueta.ouro { background: color-mix(in srgb, var(--atencao) 12%, transparent); border-color: color-mix(in srgb, var(--atencao) 40%, transparent); color: var(--atencao-texto); }
.etiqueta.agua { background: color-mix(in srgb, var(--destaque) 10%, transparent); border-color: color-mix(in srgb, var(--destaque) 35%, transparent); color: var(--destaque); }
.etiqueta.alerta { background: color-mix(in srgb, var(--perigo) 10%, transparent); border-color: color-mix(in srgb, var(--perigo) 40%, transparent); color: var(--perigo); }

/* ---------- listas e tabelas (§11): cabeçalho distinto, linhas de ~48 px, números à direita ---------- */
.lista { list-style: none; margin: 0; padding: 0; }
.lista > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linha); }
.lista > li:first-child { border-top: 0; }
.lista .principal { flex: 1; min-width: 0; }
.lista .principal strong { display: block; font-weight: 500; }
.tabela-rolagem { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--linha); font-size: .875rem; vertical-align: top; }
th { color: var(--texto-2); font-weight: 500; font-size: .8125rem; background: var(--superficie-2); }
tbody tr { transition: background-color var(--rapido) ease; }
tbody tr:hover td { background: color-mix(in srgb, var(--destaque) 5%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 500; border-bottom: 0; }

/* ---------- data em bloco ---------- */
.data-bloco { width: 56px; flex: none; text-align: center; border-radius: var(--raio-p); padding: 6px 0; color: var(--sobre-primaria); background: var(--primaria); }
.data-bloco b { display: block; font-size: 1.375rem; font-weight: 500; line-height: 1.1; }
.data-bloco span { font-size: .75rem; font-weight: 500; }

/* ---------- números em destaque (§5: indicadores de 28 a 36 px, peso 500) ---------- */
.numero { padding: 16px 20px; border-radius: var(--raio); background: var(--superficie); border: 1px solid var(--linha); }
.numero span { display: block; color: var(--texto-2); font-size: .8125rem; font-weight: 500; }
.numero b { display: block; font-size: 1.75rem; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 4px; }
.numero.positivo b { color: var(--ok); }
.numero.negativo b { color: var(--perigo); }
.numero.ouro { border-color: color-mix(in srgb, var(--atencao) 45%, transparent); }

/* ---------- toast e diálogo ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--texto); color: var(--superficie); padding: 12px 16px; border-radius: var(--raio-p); max-width: calc(100vw - 32px);
  box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 6px 10px rgba(0, 0, 0, .14); font-weight: 400; font-size: .875rem;
  transition: opacity 200ms ease, transform 200ms ease;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.erro { background: #d32f2f; color: #fff; }
@media (max-width: 860px) { .toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); } }
dialog {
  border: 0; padding: 0; border-radius: var(--raio); width: calc(100vw - 32px); max-width: 520px; max-height: calc(100vh - 48px);
  background: var(--superficie); color: var(--texto); box-shadow: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14);
}
dialog[open] { animation: abrir-dialogo 200ms ease-out; }
@keyframes abrir-dialogo { from { opacity: 0; transform: translateY(8px); } }
dialog::backdrop { background: rgba(0, 0, 0, .5); }
dialog .corpo { padding: 24px; }
dialog h2 { margin-bottom: 16px; }
dialog .acoes { margin-top: 24px; justify-content: flex-end; }

/* ---------- calendário de reservas ---------- */
.cal-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .sem { text-align: center; font-size: .78rem; font-weight: 700; color: var(--texto-2); padding-bottom: 4px; }
.dia {
  position: relative; min-height: 66px; padding: 7px 6px; border-radius: 12px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--linha); background: var(--superficie); display: flex; flex-direction: column; justify-content: space-between;
  transition: border-color .15s ease, transform .15s ease;
}
.dia:hover:not(:disabled) { border-color: var(--agua); }
.dia:disabled { opacity: .38; cursor: default; }
.dia.hoje { box-shadow: inset 0 0 0 2px var(--agua); }
.dia .n { font-weight: 700; font-size: .92rem; }
.dia .saloes { display: flex; gap: 4px; }
.dia .s { flex: 1; height: 7px; border-radius: 4px; background: var(--agua); }
.dia .s.ocupado { background: var(--ocupado); }
.dia .s.meu { background: var(--ouro); }
.legenda { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: .84rem; color: var(--texto-2); }
.legenda i { display: inline-block; width: 18px; height: 7px; border-radius: 4px; margin-right: 6px; vertical-align: middle; background: var(--agua); }
.legenda i.ocupado { background: var(--ocupado); }
.legenda i.meu { background: var(--ouro); }
@media (max-width: 560px) { .dia { min-height: 52px; padding: 5px 4px; } .dia .n { font-size: .82rem; } .cal { gap: 4px; } }
.opcao-salao { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--linha); border-radius: 14px; margin-bottom: 10px; cursor: pointer; }
.opcao-salao:has(input:checked) { border-color: var(--agua); background: rgba(var(--agua-rgb), .07); }
.opcao-salao input { width: 20px; height: 20px; accent-color: var(--agua); }
.opcao-salao .principal { flex: 1; }
.opcao-salao.indisp { opacity: .5; cursor: not-allowed; }
.total-reserva { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; padding: 10px 2px; }

/* ---------- avisos ---------- */
.aviso { padding: 20px 22px; border-radius: var(--raio-g); background: var(--superficie); border: 1px solid var(--linha); }
.aviso.fixado { border-color: rgba(var(--ouro-rgb), .6); background: linear-gradient(180deg, rgba(var(--ouro-rgb), .09), transparent 60%), var(--superficie); }
.aviso + .aviso { margin-top: 14px; }
.aviso .topo { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.aviso .texto { white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- classificados ---------- */
.anuncios { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 16px; }
.anuncio { display: flex; flex-direction: column; border-radius: var(--raio-g); background: var(--superficie); border: 1px solid var(--linha); overflow: hidden; }
.anuncio .foto { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--superficie-2), var(--linha)); display: grid; place-items: center; color: var(--texto-2); }
.anuncio .foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.anuncio .foto svg { width: 40px; height: 40px; opacity: .5; }
.anuncio .info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.anuncio .preco { font-weight: 700; font-size: 1.1rem; }
.anuncio .desc { color: var(--texto-2); font-size: .9rem; overflow-wrap: anywhere; white-space: pre-line; }
.anuncio .info > .acoes:last-child { margin-top: auto; padding-top: 6px; }

/* ---------- portaria ---------- */
.convidado { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 12px; border-radius: 12px; cursor: pointer; border: 1.5px solid transparent; }
.convidado:hover { border-color: var(--linha); }
.convidado input { width: 26px; height: 26px; accent-color: var(--ok); flex: none; }
.convidado.chegou { background: rgba(21, 128, 61, .08); }
.convidado .hora { margin-left: auto; color: var(--ok); font-weight: 700; font-size: .85rem; }
.espaco-topo { margin-top: 14px; }
section > h2 { margin-bottom: 4px; }
.grade.g4.duas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grade.g4.duas .numero { box-shadow: none; padding: 14px 16px; }
.grade.g4.duas .numero b { font-size: 1.2rem; }
@media (max-width: 400px) { .grade.g4.duas { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .lista > li { flex-wrap: wrap; }
  .lista .acoes.fim { width: 100%; justify-content: flex-start; padding-left: 72px; }
}
.grafico { position: relative; height: 260px; }
.texto-ok { color: var(--ok); }
.texto-perigo { color: var(--perigo); }
.icone-doc { color: var(--destaque); flex: none; }
.cabecalho-tela .campo { margin: 0; min-width: 210px; }
.filtros { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.filtros input[type=search] { max-width: 320px; }
.anuncio h3 { overflow-wrap: anywhere; }
input[type=file] { width: 100%; padding: 10px 0; }
.espaco-baixo { margin-bottom: 16px; }
.campo-curto { width: auto; min-width: 90px; max-width: 120px; }
.form-salao + .form-salao { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--linha); }
.topo-reserva { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.selo-presenca { flex: none; padding: 6px 12px; border-radius: 999px; background: rgba(21, 128, 61, .1); color: var(--ok); font-weight: 600; font-size: .9rem; }
.selo-presenca b { font-size: 1.1rem; }
.painel .cabecalho-tela { margin-bottom: 14px; }
/* item de lista em cor forte (Trabalhos executados, Documentos da Administração): a barra lateral e a faixa do
   conteúdo principal no tom forte da cor do item (--cat-forte), texto branco com contraste ≥ 4,5:1 */
.lista > li.item-cor.item-forte::before { background: var(--cat-forte, var(--cat)); }
.item-forte .faixa-cor { display: block; overflow-wrap: anywhere; margin: 6px 0; padding: 8px 12px; border-radius: var(--raio-p);
  background: var(--cat-forte, var(--destaque)); color: #fff; }
.trabalho .descricao { white-space: pre-line; }
/* faixa leve: a mesma ideia em tons claros (fundo e borda suaves da cor do item, texto normal), ex.: Ocorrências */
.faixa-leve { display: block; overflow-wrap: anywhere; padding: 8px 12px; border-radius: var(--raio-p);
  background: var(--cat-fundo, var(--superficie-2)); border: 1px solid var(--cat-linha, var(--linha)); color: var(--texto); }

/* formulário colorido: os campos com o fundo e a borda da cor do painel (.cor-N) e o foco realçado padrão (--foco-*) */
.form-colorido input:not([type=checkbox]):not([type=radio]):not([type=file]), .form-colorido select, .form-colorido textarea,
.form-colorido input[type=file] { background: var(--cat-fundo, var(--superficie-2)); border: 1px solid var(--cat-linha, var(--borda-campo)); }
.form-colorido input[type=file] { padding: 8px 12px; border-radius: var(--raio-p); color: var(--texto); }
.form-colorido :is(input, select, textarea):hover { border-color: var(--cat, var(--texto-2)); }
.form-colorido input:not([type=checkbox]):not([type=radio]):not([type=file]):focus, .form-colorido select:focus, .form-colorido textarea:focus,
.form-colorido input[type=file]:focus-visible {
  outline: 2px solid transparent; background: var(--foco-fundo); border-color: var(--foco-borda);
  box-shadow: inset 0 0 0 1px var(--foco-borda), 0 0 0 3px var(--foco-anel);
}

/* zebrado em duas cores (tabelas e listas): uma linha no tom da cor principal, a seguinte em dourado, para separar
   bem um registro do outro (ex.: um mês do outro nos balancetes); vale nos temas claro e escuro */
.zebrado { --zebra-a: color-mix(in srgb, var(--destaque) 10%, var(--superficie)); --zebra-b: color-mix(in srgb, var(--ouro) 16%, var(--superficie)); }
table.zebrado tbody tr:nth-child(odd) td { background: var(--zebra-a); }
table.zebrado tbody tr:nth-child(even) td { background: var(--zebra-b); }
table.zebrado tbody tr:hover td { background: color-mix(in srgb, var(--destaque) 18%, var(--superficie)); }
table.zebrado td { border-bottom-color: var(--superficie); }
.lista.zebrado > li { border-top: 0; padding-right: 12px; border-radius: var(--raio-p); }
.lista.zebrado > li + li { margin-top: 4px; }
.lista.zebrado > li:not(.item-cor) { padding-left: 12px; }
.lista.zebrado > li:nth-child(odd) { background: var(--zebra-a); }
.lista.zebrado > li:nth-child(even) { background: var(--zebra-b); }

/* ---------- telas de digitação (DESIGN_SYSTEM.md §11) ---------- */
/* largura toda no computador e no tablet; é também o contêiner das grades internas (@container) */
.tela-larga { container-type: inline-size; }
.conteudo:has(.tela-larga) { max-width: none; }
.tela-larga .ajuda, .tela-larga p.mudo { max-width: 70ch; }
/* topo da tela: período, estado do salvamento e ações gerais */
.barra-periodo {
  position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: 12px 16px; margin-bottom: 16px; background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio);
}
.barra-periodo .campo { margin-bottom: 0; }
.barra-periodo .espacador { flex: 1; }
/* indicador de salvamento: ícone e texto, nunca só cor */
.estado-salvo { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--texto-2); }
.estado-salvo[data-estado="salvando"] { color: var(--texto-2); }
.estado-salvo[data-estado="ok"] { color: var(--ok); }
.estado-salvo[data-estado="erro"] { color: var(--perigo); font-weight: 500; }
/* tabela editável: linhas de 44 px, números à direita, campo sem moldura até o mouse ou o foco */
.tabela-edicao td, .tabela-edicao th { height: 44px; padding: 4px 12px; vertical-align: middle; }
.tabela-edicao td.num, .tabela-edicao th.num { font-variant-numeric: tabular-nums; }
.tabela-edicao td input:not([type=checkbox]):not([type=radio]) { min-height: 36px; border-color: transparent; background: transparent; }
.tabela-edicao td input:not([type=checkbox]):not([type=radio]):not(:focus):hover { border-color: var(--borda-campo); }
.tabela-edicao td input.num { text-align: right; font-variant-numeric: tabular-nums; }
/* a linha inteira acompanha o foco, e o rótulo da linha também */
.tabela-edicao tr:focus-within td, .tabela-edicao tr:focus-within th { background: var(--foco-linha); }
.tabela-edicao tr:focus-within th[scope=row], .linha-orcamento:focus-within > span { color: var(--foco-rotulo); }
/* celular: cada linha vira um cartão, com o rótulo de cada célula (data-rotulo) */
@media (max-width: 600px) {
  .tabela-edicao, .tabela-edicao tbody, .tabela-edicao tr, .tabela-edicao td, .tabela-edicao th { display: block; width: 100%; }
  .tabela-edicao thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabela-edicao tr { margin-bottom: 8px; padding: 4px 0; border: 1px solid var(--linha); border-radius: var(--raio-p); background: var(--superficie); }
  .tabela-edicao td, .tabela-edicao th { height: auto; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 0; }
  .tabela-edicao td[data-rotulo]::before { content: attr(data-rotulo); flex: none; font-size: .75rem; font-weight: 500; color: var(--texto-2); }
  .tabela-edicao td input { max-width: 60%; }
  .barra-periodo { position: static; }
}
