/* TOTH Reunião — mesma família da Sede: escuro, Inter, cor só quando significa algo
   (verde = está tudo certo / ligado, âmbar = alguém esperando, vermelho = sair, gravando). */
@font-face { font-family: Inter; src: url(/app/fontes/inter-latin.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Inter; src: url(/app/fontes/inter-latin-ext.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --fundo: #0b0b0c; --palco: #151516; --cartao: #1d1d1f; --cartao2: #262628; --campo: #1e1e20;
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --t1: #ececec; --t2: #b4b4b4; --t3: #8f8f8f;
  --go: #34c79f; --wait: #f3b45a; --late: #f87171; --info: #8fb1f6;
  --raio: 18px;
  --sa-b: env(safe-area-inset-bottom, 0px); --sa-t: env(safe-area-inset-top, 0px);
  --mola: cubic-bezier(.2, .9, .25, 1.05); --suave: cubic-bezier(.25, .8, .25, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--fundo); }
body { font-family: Inter, system-ui, -apple-system, sans-serif; color: var(--t1); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
[hidden] { display: none !important; }
.ic { width: 22px; height: 22px; flex: none; }

/* ---------- telas de entrada (pré-entrada, espera, avisos) ---------- */
.tela { height: 100dvh; display: grid; place-items: center; padding: 24px; overflow-y: auto; }
.pre { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr); gap: 56px; align-items: center; width: min(1120px, 100%); }
.previa { position: relative; aspect-ratio: 16 / 10; background: var(--cartao); border-radius: 24px; overflow: hidden; }
.previa video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.previa .sem-camera { position: absolute; inset: 0; display: grid; place-items: center; color: var(--t3); font-size: 14px; text-align: center; padding: 20px; }
.previa .pre-ctrl { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 14px; }
.previa .medidor { position: absolute; left: 18px; top: 18px; display: flex; gap: 3px; align-items: end; height: 18px; }
.previa .medidor i { width: 4px; border-radius: 2px; background: var(--go); height: 4px; transition: height .08s linear; }
.form h1 { font-size: 32px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.form .marca { width: 44px; height: auto; margin-bottom: 26px; display: block; }
.form .sub { color: var(--t2); margin: 10px 0 28px; }
.form label { display: block; font-size: 13px; color: var(--t2); margin-bottom: 8px; }
.form input { width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--line2); background: var(--campo); padding: 0 16px; font-size: 16px; outline: 0; }
.form input:focus { border-color: var(--info); }
.principal { margin-top: 16px; width: 100%; height: 54px; border-radius: 999px; background: var(--t1); color: #111; font-weight: 600; font-size: 16px; transition: transform .2s var(--mola), opacity .2s; }
.principal:active { transform: scale(.97); }
.principal:disabled { opacity: .5; }
.secundario { height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line2); color: var(--t1); }
.nota { color: var(--t3); font-size: 13px; margin-top: 14px; }
.selo-toth { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--go); background: rgba(52,199,159,.1); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }

.centro { text-align: center; max-width: 440px; display: grid; justify-items: center; gap: 14px; }
.centro h1 { font-size: 28px; letter-spacing: -.03em; font-weight: 600; }
.centro p { color: var(--t2); }
.centro .marca { width: 56px; margin-bottom: 8px; }
.pulso { width: 64px; height: 64px; border-radius: 50%; background: rgba(243,180,90,.16); display: grid; place-items: center; animation: pulso 1.8s var(--suave) infinite; }
.pulso i { width: 18px; height: 18px; border-radius: 50%; background: var(--wait); }
@keyframes pulso { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* ---------- sala ---------- */
.sala { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); }
.topo { display: flex; align-items: center; gap: 14px; padding: calc(12px + var(--sa-t)) 20px 10px; min-height: 56px; }
.topo .marca { width: 26px; }
.topo .titulo { font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topo .relogio { color: var(--t3); font-variant-numeric: tabular-nums; font-size: 14px; }
.selos { display: flex; gap: 8px; margin-left: auto; justify-content: flex-end; min-width: 0; flex: none; }
.selo { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 6px 11px; border-radius: 999px; background: var(--cartao); color: var(--t2); white-space: nowrap; }
.selo::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.selo.trancada { color: var(--t2); }
.selo.aberta { color: var(--wait); }
.selo.transcrevendo { color: var(--info); }
.selo.gravando { color: var(--late); }
.selo.gravando::before { animation: pisca 1.4s infinite; }
@keyframes pisca { 50% { opacity: .25; } }

.meio { display: flex; min-height: 0; gap: 12px; padding: 0 12px; }
.palco { flex: 1; min-width: 0; display: flex; gap: 12px; }
.destaque { flex: 1; min-width: 0; background: #000; border-radius: var(--raio); overflow: hidden; position: relative; }
.destaque video { width: 100%; height: 100%; object-fit: contain; }
.destaque .rotulo { left: 14px; bottom: 14px; }
.apresentando { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; background: var(--palco); color: var(--t2); text-align: center; padding: 20px; }
.apresentando .ic { width: 40px; height: 40px; color: var(--info); }
.apresentando p { font-size: 18px; color: var(--t1); }
.grade { flex: 1; min-width: 0; min-height: 0; display: grid; gap: 12px; align-content: center; justify-content: center; grid-template-columns: repeat(var(--cols, 1), var(--largura, minmax(0, 1fr))); grid-auto-rows: var(--altura, auto); }
.palco.com-tela .grade { flex: 0 0 240px; grid-template-columns: 1fr; grid-auto-rows: 150px; align-content: start; overflow-y: auto; }
.bloco { position: relative; background: var(--cartao); border-radius: var(--raio); overflow: hidden; min-height: 0; transition: box-shadow .2s; }
.bloco video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bloco.eu video { transform: scaleX(-1); }
.bloco.falando { box-shadow: inset 0 0 0 3px var(--go); }
.avatar { position: absolute; inset: 0; display: grid; place-items: center; }
.avatar span { width: clamp(56px, 22%, 112px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(20px, 3vw, 40px); font-weight: 600; background: var(--cor, #3a3a3e); color: #fff; }
.rotulo { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 20px); background: rgba(0,0,0,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 5px 10px; border-radius: 999px; font-size: 13px; }
.rotulo b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rotulo .mudo { color: var(--late); width: 16px; height: 16px; flex: none; }
.rotulo .tag { font-size: 10.5px; color: var(--go); letter-spacing: .04em; }
.bloco .tirar { position: absolute; right: 8px; top: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: rgba(0,0,0,.55); font-size: 12.5px; opacity: 0; transition: opacity .15s; }
.bloco:hover .tirar, .bloco:focus-within .tirar { opacity: 1; }

.painel { width: 360px; flex: none; background: var(--palco); border-radius: var(--raio); display: flex; flex-direction: column; min-height: 0; }
.painel header { display: flex; align-items: center; gap: 4px; padding: 10px 10px 0; }
.aba { height: 40px; padding: 0 14px; border-radius: 999px; color: var(--t2); font-size: 14px; }
.aba[aria-selected=true] { background: var(--cartao2); color: var(--t1); }
.painel .fechar-painel { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--t2); }
.painel .corpo { padding: 14px 16px 18px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 18px; }
.grupo h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--t3); font-weight: 600; margin-bottom: 8px; }
.linha { display: flex; align-items: center; gap: 10px; padding: 8px 0; min-height: 48px; }
.linha .nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linha .nome small { display: block; color: var(--t3); font-size: 12px; }
.mini { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--cor, #3a3a3e); flex: none; }
.btn-p { height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; }
.btn-p.sim { background: var(--go); color: #06261d; }
.btn-p.nao { color: var(--t2); border: 1px solid var(--line2); }
.btn-p.perigo { color: var(--late); border: 1px solid rgba(248,113,113,.35); }
.chave { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--cartao); min-height: 56px; text-align: left; width: 100%; }
.chave small { display: block; color: var(--t3); font-size: 12.5px; }
.chave .trilho { width: 44px; height: 26px; border-radius: 999px; background: #3a3a3e; position: relative; flex: none; transition: background .2s; }
.chave .trilho::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s var(--mola); }
.chave[aria-checked=true] .trilho { background: var(--go); }
.chave[aria-checked=true] .trilho::after { transform: translateX(18px); }
.vazio { color: var(--t3); font-size: 13.5px; }
.ata { white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; color: var(--t2); }
.ata b { color: var(--t1); display: block; margin-top: 12px; font-size: 12.5px; }
.ata-topo { display: flex; gap: 8px; flex-wrap: wrap; }

.controles { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 12px 20px calc(14px + var(--sa-b)); }
.controles .esq { display: flex; align-items: center; gap: 10px; color: var(--t2); font-size: 14px; min-width: 0; }
.controles .esq .codigo { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.controles .meio-c { display: flex; gap: 10px; }
.controles .dir { display: flex; justify-content: flex-end; gap: 10px; }
.redondo { width: 52px; height: 52px; border-radius: 50%; background: var(--cartao2); display: grid; place-items: center; position: relative; transition: background .15s, transform .2s var(--mola); }
.redondo:active { transform: scale(.94); }
.redondo:hover { background: #303033; }
.redondo.desligado { background: var(--late); color: #2b0808; }
.redondo.ligado { background: var(--info); color: #0b1a33; }
.redondo.gravando { background: var(--late); color: #2b0808; }
.redondo .conta { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; border-radius: 999px; background: var(--wait); color: #2a1a00; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.sair { height: 52px; padding: 0 22px; border-radius: 999px; background: var(--late); color: #2b0808; font-weight: 600; margin-left: 14px; display: flex; align-items: center; gap: 8px; }
.copiar { height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); font-size: 13.5px; white-space: nowrap; }

/* ---------- avisos (toast) ---------- */
.avisos { position: fixed; left: 50%; top: calc(16px + var(--sa-t)); transform: translateX(-50%); display: grid; gap: 10px; z-index: 50; width: min(440px, calc(100% - 24px)); }
.toast { background: #2a2a2d; border: 1px solid var(--line2); border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.45); animation: entra .35s var(--mola); }
.toast p { flex: 1; font-size: 14px; }
.toast.espera { border-color: rgba(243,180,90,.45); }
@keyframes entra { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.audios { display: none; }

/* ---------- celular ---------- */
@media (max-width: 820px) {
  .pre { grid-template-columns: 1fr; gap: 24px; }
  .previa { aspect-ratio: 4 / 3; }
  .form .marca { display: none; }
  .form h1 { font-size: 26px; }
  .topo { padding: calc(10px + var(--sa-t)) 14px 8px; }
  .topo .titulo { font-size: 14px; }
  .selos .selo { font-size: 11.5px; padding: 5px 9px; }
  .selo .quem { display: none; }
  .topo .relogio { display: none; }
  .meio { padding: 0 8px; }
  .palco { flex-direction: column; }
  .palco.com-tela .grade { flex: 0 0 110px; grid-auto-flow: column; grid-auto-columns: 150px; grid-template-columns: none; grid-auto-rows: 100%; overflow-x: auto; overflow-y: hidden; }
  .painel { position: fixed; inset: auto 0 0 0; width: auto; height: 78dvh; border-radius: 22px 22px 0 0; z-index: 40; box-shadow: 0 -20px 60px rgba(0,0,0,.6); padding-bottom: var(--sa-b); }
  .controles { grid-template-columns: 1fr; padding: 10px 10px calc(10px + var(--sa-b)); }
  .controles .esq { display: none; }
  .controles .meio-c { justify-content: space-between; gap: 6px; }
  .controles .dir { display: none; }
  .redondo { width: 48px; height: 48px; }
  .sair { height: 48px; padding: 0 16px; margin-left: 4px; }
  .sair span { display: none; }
  .so-largo { display: none !important; }
}
@media (min-width: 821px) { .so-celular { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
