/* Visual do Transcritor (aprovado em 01/12/2026; referência: docs/design/previa.html).
   CSP default-src 'self': nada de style= nem fontes de fora. Cor por falante por classe (.f1 a .f8) e barras
   de porcentagem por classe de 5 em 5% (.p0 a .p100). color-mix e backdrop-filter só dentro de @supports. */
:root {
  --fundo: #f3f6f5; --superficie: #ffffff; --superficie-2: #e9efed; --texto: #14201c; --texto-2: #52625c;
  --borda: #d3ddd9; --acento: #0b7a64; --acento-texto: #ffffff; --acento-suave: #d6efe8;
  --alerta: #a35a00; --alerta-suave: #fbecd6; --erro: #b42318; --erro-suave: #fbe4e1; --ok: #157f3b; --ok-suave: #dff3e6;
  --v1: #0b7a64; --v2: #3457d5; --v3: #b4417a; --v4: #9a6a00; --v5: #6b4fc4; --v6: #c2410c; --v7: #0f7ea3; --v8: #5f7d12;
  --sombra: 0 1px 2px rgb(20 32 28 / .06), 0 4px 16px rgb(20 32 28 / .06);
  --topo-vidro: rgb(255 255 255 / .88);
  --titulo: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --corpo: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --raio: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --fundo: #0e1513; --superficie: #151e1b; --superficie-2: #1c2723; --texto: #e6eeeb; --texto-2: #9db0a9;
  --borda: #2a3833; --acento: #41d1ae; --acento-texto: #04241c; --acento-suave: #123a31;
  --alerta: #f0b25a; --alerta-suave: #3a2a12; --erro: #ff8a7a; --erro-suave: #3d1d19; --ok: #5fd38a; --ok-suave: #14301f;
  --v1: #41d1ae; --v2: #8aa3ff; --v3: #f08bbb; --v4: #e4b44a; --v5: #b9a3ff; --v6: #ff9a6a; --v7: #5cc8ee; --v8: #b5d34a;
  --sombra: 0 1px 2px rgb(0 0 0 / .3), 0 6px 20px rgb(0 0 0 / .25);
  --topo-vidro: rgb(21 30 27 / .88);
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fundo: #0e1513; --superficie: #151e1b; --superficie-2: #1c2723; --texto: #e6eeeb; --texto-2: #9db0a9;
  --borda: #2a3833; --acento: #41d1ae; --acento-texto: #04241c; --acento-suave: #123a31;
  --alerta: #f0b25a; --alerta-suave: #3a2a12; --erro: #ff8a7a; --erro-suave: #3d1d19; --ok: #5fd38a; --ok-suave: #14301f;
  --v1: #41d1ae; --v2: #8aa3ff; --v3: #f08bbb; --v4: #e4b44a; --v5: #b9a3ff; --v6: #ff9a6a; --v7: #5cc8ee; --v8: #b5d34a;
  --sombra: 0 1px 2px rgb(0 0 0 / .3), 0 6px 20px rgb(0 0 0 / .25);
  --topo-vidro: rgb(21 30 27 / .88);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fundo); color: var(--texto); font: 15px/1.55 var(--corpo); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--titulo); line-height: 1.15; margin: 0 0 .6rem; letter-spacing: -.01em; }
h1 { font-size: 1.65rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
a { color: var(--acento); }
small { color: var(--texto-2); }
.num { font-variant-numeric: tabular-nums; }
.rotulo { display: block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--texto-2); }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* topo */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--superficie); }
.topo { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--superficie); border-bottom: 1px solid var(--borda); }
.topo-dentro { max-width: 60rem; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding-top: 8px; padding-bottom: 8px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.marca { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-right: auto; font-family: var(--titulo); font-weight: 700; font-size: 1.05rem; color: var(--texto); text-decoration: none; }
.marca svg { flex: none; }
.marca .fundo { fill: var(--acento); }
.marca .barras { fill: var(--acento-texto); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--texto-2); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--texto); }
.nav a[aria-current="page"] { background: var(--acento-suave); color: var(--texto); }
.sair { margin: 0; }
.sair button { margin: 0; }
.tema { display: inline-flex; padding: 3px; gap: 2px; background: var(--superficie-2); border-radius: 999px; border: 1px solid var(--borda); }
.tema button { appearance: none; -webkit-appearance: none; border: 0; margin: 0; padding: 0; background: transparent; color: var(--texto-2); width: 40px; min-height: 40px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; }
.tema button[aria-pressed="true"] { background: var(--superficie); color: var(--texto); box-shadow: var(--sombra); }

main { max-width: 60rem; margin: 0 auto; padding-top: 20px; padding-bottom: 48px; overflow-wrap: anywhere;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* painéis, textos de aviso */
.painel, .cartao { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); padding: 18px; margin: 0 0 16px; box-shadow: var(--sombra); }
.painel > :last-child, .cartao > :last-child { margin-bottom: 0; }
.pilha { display: grid; gap: 16px; }
.pilha > .painel { margin: 0; }
.destaque { border-color: var(--acento); }
.nota { border-color: var(--alerta); background: var(--alerta-suave); }
.erro { color: var(--erro); font-weight: 600; }
.aviso { font-weight: 600; }
p.aviso, p.erro { padding: 10px 14px; border-radius: 12px; }
p.aviso { background: var(--alerta-suave); }
p.erro { background: var(--erro-suave); }
code { font-size: 1.1rem; word-break: break-all; user-select: all; }
.dica { font-size: .82rem; color: var(--texto-2); margin: 12px 0 0; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 1rem; color: var(--texto-2); font-size: .88rem; }

/* botões e campos */
button, .botao { appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 18px; font: 600 .95rem var(--corpo); color: var(--acento-texto); background: var(--acento);
  border: 1px solid transparent; border-radius: 12px; cursor: pointer; text-decoration: none; }
button:hover, .botao:hover { filter: brightness(1.06); }
button.sec, .botao.sec { color: var(--texto); background: transparent; border-color: var(--borda); }
button.sec:hover, .botao.sec:hover { background: var(--superficie-2); filter: none; }
.perigo, button.perigo, .botao.perigo { color: var(--erro); background: transparent; border-color: var(--erro); }
button.perigo.cheio { color: var(--superficie); background: var(--erro); border-color: var(--erro); }
form .botao, form button[type=submit]:not(.sec) { margin-top: 1rem; }
label { display: block; margin: .85rem 0 .35rem; font-weight: 600; font-size: .9rem; }
input[type=text], input[type=password], input[type=search], textarea, select { width: 100%; min-height: 44px; padding: .5rem .85rem; font: inherit; color: inherit;
  background: var(--fundo); border: 1px solid var(--borda); border-radius: 12px; }
textarea { resize: vertical; display: block; margin: .5rem 0; line-height: 1.5; }
#texto-copia { min-height: 12rem; }
.botoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 1rem; }
.botoes form, .linha-form { margin: 0; }
.botoes form button[type=submit]:not(.sec), .botoes .botao, .linha-form button[type=submit], form.botoes .botao, form.botoes button { margin-top: 0; }
.linha-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 .5rem; }
.linha-form input[type=text] { flex: 1 1 12rem; width: auto; }
.linha-form select { flex: 1 1 10rem; width: auto; }
.linha-form label { margin: 0; }
.busca { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.busca { margin: 0 0 16px; }
.busca label { flex: 1 0 100%; margin: 0; }
.busca input[type=search] { flex: 1 1 12rem; width: auto; }
.busca button, .busca .botao { margin-top: 0; }
details { margin-top: .5rem; }
summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--acento); font-weight: 600; }

/* entrar, senha, confirmações e erro */
.centro { display: grid; justify-items: center; padding-top: 4vh; }
.centro .painel { width: 100%; max-width: 26rem; padding: 26px; margin: 0; }
.centro h1 { margin-top: 14px; }
.centro .sub { color: var(--texto-2); margin: 0 0 14px; }
.onda { display: flex; gap: 3px; align-items: center; height: 28px; }
.onda i { display: block; width: 4px; border-radius: 4px; background: var(--acento); opacity: .85; }
.onda i:nth-child(1) { height: 10px; } .onda i:nth-child(2) { height: 22px; } .onda i:nth-child(3) { height: 14px; }
.onda i:nth-child(4) { height: 26px; } .onda i:nth-child(5) { height: 12px; } .onda i:nth-child(6) { height: 18px; }
.onda i:nth-child(7) { height: 8px; }

/* início */
.cabeca { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.cabeca h1 { margin: 0; }
.gasto { margin: 0; text-align: right; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--texto-2); }
.gasto strong { display: block; font-family: var(--titulo); font-size: 1.5rem; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--texto); }
.zona { border: 2px dashed var(--acento); border-radius: var(--raio); padding: 22px; text-align: center; background: var(--acento-suave); display: grid; gap: 10px; justify-items: center; }
.zona.sobre { background: var(--superficie-2); border-style: solid; }
.zona p { margin: 0; color: var(--texto-2); }
.zona .icone { stroke: var(--acento); }
.zona label.botao { margin: 0; font-size: .95rem; }
#lista-envios:empty { display: none; }
.item-envio, .aberto { display: grid; gap: 8px; margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--borda); border-radius: 12px; background: var(--superficie); }
.item-envio button { justify-self: start; min-height: 44px; }
.item-envio .ok { color: var(--ok); font-weight: 600; }
progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 99px; background: var(--superficie-2); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--superficie-2); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--acento); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--acento); border-radius: 99px; }
.aberto { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.aberto span { min-width: 0; overflow-wrap: anywhere; }
.aberto form { margin: 0; flex: none; }
.aberto button { margin: 0; }
.pag { display: flex; gap: 8px; justify-content: space-between; margin: 16px 0; }
.pag form { margin: 0; }
.pag .botao, .pag button { margin-top: 0; }

/* selos de situação (também usados pelo JS: c-status status status-<situação>) */
.status { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; margin: 0 0 .75rem;
  color: var(--texto-2); background: var(--superficie-2); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status-concluido { color: var(--ok); background: var(--ok-suave); }
.status-processando { color: var(--acento); background: var(--acento-suave); }
.status-processando::before { animation: pulso 1.2s ease-in-out infinite; }
.status-na_fila { color: var(--texto-2); background: var(--superficie-2); }
.status-erro { color: var(--erro); background: var(--erro-suave); }
@keyframes pulso { 50% { opacity: .25; } }

/* lista de transcrições: tabela de verdade no computador, cartões no celular (mesma marcação) */
#transcricoes, #transcricoes thead, #transcricoes tbody { display: block; }
#transcricoes tr { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 4.5rem 6.5rem 11rem; gap: 4px 12px; align-items: start; padding: 12px 16px; margin: 0 0 10px;
  border: 1px solid var(--borda); border-radius: 12px; background: var(--superficie); }
#transcricoes tbody tr:hover { border-color: var(--acento); }
#transcricoes thead tr { padding-top: 0; padding-bottom: 0; margin-bottom: 4px; border-color: transparent; background: transparent; }
#transcricoes th { padding: 0; border: 0; text-align: left; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--texto-2); }
#transcricoes td { padding: 0; border: 0; min-height: 0; }
#transcricoes td a { font-weight: 600; text-decoration: none; color: var(--texto); }
#transcricoes td a:hover { color: var(--acento); text-decoration: underline; }
#transcricoes td.c-status { margin: 0; justify-self: start; }
.tabela-rolagem { overflow-x: auto; }

/* tabelas comuns (contas) */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--borda); vertical-align: top; }
th { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--texto-2); }
.acoes form { display: inline-block; margin: 0 .25rem .25rem 0; }
.acoes button { margin-top: 0; }

/* transcrição */
.titulo-t { display: grid; gap: 4px; margin-bottom: 16px; }
.titulo-t h1 { margin: 0; }
.titulo-t .meta { margin: 0; }
.voltar { font-size: .9rem; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.grade-t { display: grid; gap: 16px; grid-template-columns: 17.5rem minmax(0, 1fr); align-items: start; }
.lateral { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 72px); max-height: calc(100vh - 6rem); overflow-y: auto; }
.lateral .painel { margin: 0; }
.exportar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.exportar .botao, .exportar button { margin-top: 0; }
.copiado { font-size: .85rem; color: var(--ok); }
#copiar-aviso { margin: 0; min-height: 0; color: var(--ok); font-size: .85rem; }
#copiar-aviso:empty { display: none; }
.acoes-transcricao { margin: 0; }
.acoes-transcricao .botao, .acoes-transcricao button { flex: 1 1 auto; }
.falantes { display: grid; gap: 12px; margin-top: 12px; }
.falante { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; margin: 0; }
.ponto { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.falante input[type=text] { min-height: 44px; padding: 0 10px; background: transparent; border-color: transparent; font-weight: 600; }
.falante input[type=text]:hover, .falante input[type=text]:focus { border-color: var(--borda); background: var(--fundo); }
.falante .pct { font-size: .85rem; color: var(--texto-2); }
.falante .barra { grid-column: 2 / -1; height: 6px; }
.falante .salvar { grid-column: 2 / -1; justify-self: start; min-height: 44px; margin: 0; padding: 0 14px; font-size: .85rem; }
.barra { height: 8px; border-radius: 99px; background: var(--superficie-2); overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--c, var(--acento)); border-radius: 99px; }
.juntar { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--borda); }
.juntar .linha-form button { margin: 0; }
.falas { padding: 8px; display: grid; gap: 4px; }
.turno { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 2px 12px; padding: 10px 12px; border-radius: 12px; border-left: 3px solid var(--c, var(--borda)); }
.turno:hover, .turno:target { background: var(--superficie-2); }
.turno .hora { font-size: .8rem; color: var(--texto-2); padding-top: 3px; font-variant-numeric: tabular-nums; }
.turno .quem { margin: 0; font-weight: 600; color: var(--c, var(--texto)); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.turno .texto { grid-column: 2; margin: 0; }
.turno details { grid-column: 2; margin-top: 4px; }
.turno form { margin: 0 0 .5rem; }
.turno button[type=submit] { margin-top: 0; }
.confere { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--alerta-suave); color: var(--alerta); border: 1px solid var(--alerta); font-size: .72rem; font-weight: 600; }
.confirmar { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.confirmar p { flex: 1 1 14rem; margin: 0; }
.confirmar form { margin: 0; }
.confirmar button { margin: 0; }
.situacao p { margin-bottom: .5rem; }
.f1 { --c: var(--v1); }
.f2 { --c: var(--v2); }
.f3 { --c: var(--v3); }
.f4 { --c: var(--v4); }
.f5 { --c: var(--v5); }
.f6 { --c: var(--v6); }
.f7 { --c: var(--v7); }
.f8 { --c: var(--v8); }
.f0 { --c: var(--texto-2); }
.p0 { width: 0%; }
.p5 { width: 5%; }
.p10 { width: 10%; }
.p15 { width: 15%; }
.p20 { width: 20%; }
.p25 { width: 25%; }
.p30 { width: 30%; }
.p35 { width: 35%; }
.p40 { width: 40%; }
.p45 { width: 45%; }
.p50 { width: 50%; }
.p55 { width: 55%; }
.p60 { width: 60%; }
.p65 { width: 65%; }
.p70 { width: 70%; }
.p75 { width: 75%; }
.p80 { width: 80%; }
.p85 { width: 85%; }
.p90 { width: 90%; }
.p95 { width: 95%; }
.p100 { width: 100%; }

/* celular */
@media (max-width: 51.99rem) {
  .grade-t { grid-template-columns: minmax(0, 1fr); }
  .lateral { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 40rem) {
  #transcricoes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #transcricoes tr { grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "nome nome nome" "status status status" "data dur custo"; }
  #transcricoes td:nth-child(1) { grid-area: data; color: var(--texto-2); font-size: .85rem; }
  #transcricoes td:nth-child(2) { grid-area: nome; }
  #transcricoes td:nth-child(3) { grid-area: dur; color: var(--texto-2); font-size: .85rem; }
  #transcricoes td:nth-child(4) { grid-area: custo; color: var(--texto-2); font-size: .85rem; }
  #transcricoes td:nth-child(5) { grid-area: status; }
}
@media (max-width: 30rem) {
  .turno { grid-template-columns: minmax(0, 1fr); }
  .turno .hora { padding: 0; }
  .turno .texto, .turno details { grid-column: 1; }
  .gasto { text-align: left; }
  h1 { font-size: 1.45rem; }
}

/* só onde o navegador entende: sem isto, valem as cores sólidas de cima */
@supports (background: color-mix(in srgb, red, blue)) {
  .zona { border-color: color-mix(in srgb, var(--acento) 55%, var(--borda)); background: color-mix(in srgb, var(--acento-suave) 55%, transparent); }
  .perigo, button.perigo, .botao.perigo { border-color: color-mix(in srgb, var(--erro) 45%, var(--borda)); }
  button.perigo.cheio { border-color: var(--erro); }
  #transcricoes tbody tr:hover { border-color: color-mix(in srgb, var(--acento) 50%, var(--borda)); }
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .topo { background: var(--topo-vidro); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
