/* TelaJunto — interface */

:root {
  --fundo: #0b0d12;
  --fundo-2: #0f121a;
  --painel: #141824;
  --painel-2: #1b2030;
  --painel-3: #232a3d;
  --texto: #eef1f8;
  --texto-2: #9aa4bb;
  --texto-3: #6d778e;
  --borda: #252c3e;
  --borda-2: #303a52;
  --acento: #7c5cff;
  --acento-2: #22d3ee;
  --ok: #34d399;
  --aviso: #fbbf24;
  --erro: #f87171;
  --raio: 14px;
  --sombra: 0 18px 50px rgba(0, 0, 0, .45);
  --fonte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--fonte);
  color: var(--texto);
  background: var(--fundo);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(124, 92, 255, .45); }

button, input, select { font: inherit; color: inherit; }

button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--acento-2);
  outline-offset: 2px;
}

.fundo {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(124, 92, 255, .20), transparent 60%),
    radial-gradient(800px 600px at 105% 105%, rgba(34, 211, 238, .13), transparent 60%),
    linear-gradient(180deg, #0b0d12, #090b10);
}

.oculto {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------- Botões e campos ---------------- */

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--borda-2);
  background: var(--painel-2);
  color: var(--texto);
  font-weight: 600;
  font-size: 14px;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}

.botao:hover { background: var(--painel-3); }
.botao:active { transform: scale(.98); }

.botao.primario {
  border-color: transparent;
  background: linear-gradient(135deg, var(--acento), #5b8cff 55%, var(--acento-2));
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 92, 255, .28);
}

.botao.primario:hover { filter: brightness(1.07); }

.botao.perigo {
  border-color: rgba(248, 113, 113, .35);
  background: rgba(248, 113, 113, .12);
  color: #ffc9c9;
}

.botao.perigo:hover { background: rgba(248, 113, 113, .2); }

.botao.grande { padding: 14px 18px; font-size: 15px; }

.botao.icone { padding: 9px; }

.botao.icone svg { width: 20px; height: 20px; }

.botao svg { flex: none; }

input[type="text"], input:not([type]), select {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--borda-2);
  background: rgba(9, 11, 17, .7);
  color: var(--texto);
  font-size: 15px;
  min-width: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input::placeholder { color: var(--texto-3); }

input:focus, select:focus {
  outline: none;
  border-color: var(--acento);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .2);
}

/* ---------------- Início ---------------- */

.tela {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#tela-conta,
#tela-inicio {
  align-items: center;
  justify-content: center;
  padding: 24px 16px 64px;
  overflow: auto;
}

.cartao-inicio {
  width: min(430px, 100%);
  padding: 30px 30px 22px;
  border-radius: 22px;
  border: 1px solid var(--borda);
  background: linear-gradient(165deg, rgba(25, 30, 45, .92), rgba(16, 19, 28, .96));
  box-shadow: var(--sombra);
  animation: subir .35s ease both;
}

@keyframes subir {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.marca {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(124, 92, 255, .25), rgba(34, 211, 238, .18));
  border: 1px solid rgba(124, 92, 255, .35);
  color: #c9c1ff;
}

.logo svg { width: 32px; height: 32px; }

.logo.pequeno {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.logo.pequeno svg { width: 22px; height: 22px; }

.marca h1 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -.5px;
}

.marca p {
  margin: 2px 0 0;
  color: var(--texto-2);
  font-size: 13.5px;
}

.form { display: flex; flex-direction: column; gap: 8px; }

.form label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--texto-2);
}

.form.linha {
  flex-direction: row;
  gap: 8px;
}

.form.linha input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
}

.form.linha .botao { flex: none; }

/* ---------------- Conta ---------------- */

.abas-conta {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: 12px;
  border: 1px solid var(--borda);
  background: rgba(9, 11, 17, .6);
}

.aba-conta {
  flex: 1;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--texto-2);
  font-size: 13.5px;
  font-weight: 600;
}

.aba-conta:hover { color: var(--texto); }

.aba-conta.ativa {
  background: var(--painel-2);
  color: var(--texto);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.rotulo-senha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rotulo-senha label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--texto-2);
}

.ver-senha {
  padding: 0;
  border: 0;
  background: transparent;
  color: #b9b0ff;
  font-size: 12px;
  font-weight: 600;
}

.ver-senha:hover { text-decoration: underline; }

#campo-convite { margin-top: 2px; }

.dica-senha {
  margin: 2px 0 0;
  color: var(--texto-3);
  font-size: 11.5px;
  line-height: 1.45;
}

.estado-conta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 14px 0 0;
  color: var(--texto-3);
  font-size: 12px;
  text-align: center;
}

.estado-conta::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aviso);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, .12);
}

.estado-conta.ok { color: var(--texto-2); }
.estado-conta.ok::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .14); }
.estado-conta.ruim::before { background: var(--erro); box-shadow: 0 0 0 3px rgba(248, 113, 113, .14); }

.conta-barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 20px;
  border-radius: 12px;
  border: 1px solid var(--borda);
  background: rgba(9, 11, 17, .5);
}

.conta-quem {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--texto-2);
  font-size: 12.5px;
}

.conta-quem b {
  color: var(--texto);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar.pequeno {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.botao.pequeno {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.divisor {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  color: var(--texto-3);
  font-size: 12px;
}

.divisor::before, .divisor::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--borda);
}

.texto-erro {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, .3);
  background: rgba(248, 113, 113, .1);
  color: #ffc9c9;
  font-size: 13.5px;
}

.dica-convite {
  margin: 12px 0 0;
  color: #b9b0ff;
  font-size: 13.5px;
  text-align: center;
}

.dicas {
  margin: 22px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--borda);
  list-style: none;
  display: grid;
  gap: 9px;
  color: var(--texto-2);
  font-size: 13px;
}

.dicas li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.dicas li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 6px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acento), var(--acento-2));
}

.rodape {
  position: fixed;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--texto-3);
  font-size: 12px;
  pointer-events: none;
}

/* ---------------- Estrutura da sala ---------------- */

#tela-sala { animation: aparecer .25s ease both; }

@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }

.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  min-height: 58px;
  border-bottom: 1px solid var(--borda);
  background: rgba(13, 16, 24, .85);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.topo-esq, .topo-dir {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chip-codigo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--borda-2);
  background: var(--painel-2);
  color: var(--texto);
  font-size: 14px;
  transition: background .15s ease, border-color .15s ease;
}

.chip-codigo:hover { background: var(--painel-3); border-color: var(--acento); }

.chip-rotulo {
  font-size: 11px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--texto-3);
}

.chip-codigo b {
  font-size: 15px;
  letter-spacing: 2.5px;
  font-variant-numeric: tabular-nums;
}

.chip-acao {
  font-size: 11.5px;
  color: var(--texto-2);
}

.chip-codigo:hover .chip-acao { color: #c9c1ff; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--borda);
  background: rgba(20, 24, 36, .7);
  color: var(--texto-2);
  font-size: 12.5px;
  white-space: nowrap;
}

.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--texto-3);
  box-shadow: 0 0 0 3px rgba(109, 119, 142, .15);
}

.status.bom i { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .16); }
.status.medio i { background: var(--aviso); box-shadow: 0 0 0 3px rgba(251, 191, 36, .16); }
.status.ruim i { background: var(--erro); box-shadow: 0 0 0 3px rgba(248, 113, 113, .16); }

#bt-pessoas-mob { display: none; }

.corpo {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
}

.palco {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 14px;
  display: flex;
  position: relative;
}

.grade {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  grid-auto-rows: minmax(0, 1fr);
  align-content: center;
}

.grade[data-n="0"] { display: none; }

.grade[data-n="1"] {
  grid-template-columns: minmax(0, 1fr);
}

.grade[data-n="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grade[data-n="3"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.grade[data-n="3"] .tile:first-child {
  grid-row: span 2;
}

/* ---------------- Tiles ---------------- */

.tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--raio);
  border: 1px solid #1c2233;
  background: #05070b;
  animation: surgir .2s ease both;
  isolation: isolate;
}

@keyframes surgir { from { opacity: 0; transform: scale(.99); } }

.tile video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #05070b;
}

.tile.local { border-color: rgba(124, 92, 255, .5); }

.tile-topo {
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: linear-gradient(180deg, rgba(4, 6, 10, .85), transparent);
  pointer-events: none;
  z-index: 2;
}

.quem {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 62%;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(10, 13, 20, .7);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quem .ponto-ao-vivo {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--erro);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, .18);
  animation: pulsar 1.8s ease-in-out infinite;
  flex: none;
}

@keyframes pulsar {
  50% { opacity: .45; }
}

.selo {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(52, 211, 153, .14);
  border: 1px solid rgba(52, 211, 153, .3);
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.tile-acoes {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 3;
}

.tile:hover .tile-acoes,
.tile:focus-within .tile-acoes { opacity: 1; transform: none; }

.tile-acao {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 9px;
  background: rgba(10, 13, 20, .78);
  color: var(--texto);
  backdrop-filter: blur(6px);
}

.tile-acao:hover { background: rgba(35, 42, 61, .95); }

.tile-acao svg { width: 18px; height: 18px; }

.tile-vazio {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--texto-2);
  font-size: 13.5px;
  text-align: center;
  padding: 20px;
  z-index: 1;
}

.carregando {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .14);
  border-top-color: var(--acento-2);
  animation: girar .8s linear infinite;
}

@keyframes girar { to { transform: rotate(360deg); } }

.tile-vazio.oculto { display: none; }

.tile-info {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(10, 13, 20, .72);
  border: 1px solid rgba(255, 255, 255, .08);
  color: var(--texto-2);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  z-index: 2;
}

/* ---------------- Estado vazio ---------------- */

.vazio {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  animation: aparecer .25s ease both;
}

.vazio-icone {
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 28px;
  border: 1px solid rgba(124, 92, 255, .22);
  background: rgba(124, 92, 255, .08);
  color: #b7adff;
}

.vazio-icone svg { width: 54px; height: 54px; }

.vazio h2 { margin: 0; font-size: 20px; }

.vazio p {
  margin: 0 0 14px;
  max-width: 430px;
  color: var(--texto-2);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------------- Lateral ---------------- */

.lateral {
  width: 306px;
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--borda);
  background: rgba(15, 18, 26, .72);
}

.abas {
  display: flex;
  gap: 4px;
  padding: 10px;
  border-bottom: 1px solid var(--borda);
}

.aba {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--texto-2);
  font-size: 13px;
  font-weight: 600;
}

.aba:hover { background: rgba(255, 255, 255, .04); color: var(--texto); }

.aba.ativa {
  background: var(--painel-2);
  color: var(--texto);
}

.contador {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: var(--texto-2);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.contador.aviso {
  background: var(--erro);
  color: #1a0505;
}

.fechar-lateral {
  display: none;
  width: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--texto-2);
  font-size: 22px;
  line-height: 1;
}

.painel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 10px;
  overflow: auto;
}

.painel-chat { padding: 0; gap: 0; overflow: hidden; }

.dica-lateral {
  margin: auto 4px 4px;
  color: var(--texto-3);
  font-size: 11.5px;
  line-height: 1.5;
}

.lista-pessoas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.pessoa {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  transition: background .12s ease;
}

.pessoa:hover { background: rgba(255, 255, 255, .035); }

.avatar {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .3px;
  user-select: none;
}

.av-0 { background: #5865f2; }
.av-1 { background: #0f9d76; }
.av-2 { background: #c47b16; }
.av-3 { background: #d94a4a; }
.av-4 { background: #b44bc0; }
.av-5 { background: #16899c; }
.av-6 { background: #6d5bd8; }
.av-7 { background: #b05c2f; }

.pessoa-info { min-width: 0; flex: 1; }

.pessoa-nome {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pessoa-nome .voce { color: var(--texto-3); font-weight: 500; }

.pessoa-selos {
  display: flex;
  gap: 5px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.selo-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  background: rgba(255, 255, 255, .06);
  color: var(--texto-2);
}

.selo-mini.ao-vivo { background: rgba(248, 113, 113, .14); color: #fecaca; }
.selo-mini.microfone { background: rgba(52, 211, 153, .13); color: #a7f3d0; }
.selo-mini.dono { background: rgba(251, 191, 36, .13); color: #fde68a; }

.remover {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--texto-3);
  font-size: 17px;
  line-height: 1;
  opacity: 0;
}

.pessoa:hover .remover, .remover:focus-visible { opacity: 1; }

.remover:hover { background: rgba(248, 113, 113, .16); color: #fecaca; }

.mensagens {
  list-style: none;
  margin: 0;
  padding: 12px 12px 4px;
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  animation: subir .18s ease both;
}

.msg-topo {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.msg-autor { font-weight: 700; font-size: 12.5px; }

.msg-hora { color: var(--texto-3); font-size: 10.5px; }

.msg-texto { color: #d7dcea; white-space: pre-wrap; }

.msg.eu .msg-texto {
  padding: 6px 9px;
  border-radius: 4px 10px 10px 10px;
  background: rgba(124, 92, 255, .12);
}

.cor-0 { color: #a5b4fc; }
.cor-1 { color: #6ee7b7; }
.cor-2 { color: #fcd34d; }
.cor-3 { color: #fca5a5; }
.cor-4 { color: #f0abfc; }
.cor-5 { color: #67e8f9; }
.cor-6 { color: #c4b5fd; }
.cor-7 { color: #fdba74; }

.sistema {
  align-self: center;
  max-width: 92%;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: var(--texto-3);
  font-size: 11.5px;
  text-align: center;
}

.form-chat {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--borda);
}

.form-chat input { flex: 1; padding: 10px 12px; font-size: 13.5px; }

.form-chat .botao { padding: 10px 12px; }

.form-chat svg { width: 18px; height: 18px; }

.fundo-lateral { display: none; }

/* ---------------- Controles de baixo ---------------- */

.controles {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid var(--borda);
  background: rgba(13, 16, 24, .9);
  backdrop-filter: blur(10px);
  z-index: 15;
}

.controle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 11px;
  border: 1px solid var(--borda-2);
  background: var(--painel-2);
  color: var(--texto);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}

.controle:hover { background: var(--painel-3); }
.controle:active { transform: scale(.98); }
.controle:disabled { opacity: .45; cursor: not-allowed; }
.controle:disabled:hover { background: var(--painel-2); }

.controle.destaque {
  border-color: rgba(124, 92, 255, .45);
  background: rgba(124, 92, 255, .16);
  color: #ded9ff;
}

.controle.destaque:hover { background: rgba(124, 92, 255, .24); }

.controle.ativo {
  border-color: rgba(52, 211, 153, .45);
  background: rgba(52, 211, 153, .14);
  color: #d1fae5;
}

.controle.transmitindo {
  border-color: rgba(248, 113, 113, .5);
  background: rgba(248, 113, 113, .16);
  color: #ffe4e6;
}

.icone-controle { width: 19px; height: 19px; flex: none; }

#bt-microfone .risco,
#bt-som .risco { display: none; }

#bt-microfone.desligado .risco,
#bt-som.surdo .risco { display: inline; }

#bt-som.surdo { color: #fecaca; border-color: rgba(248, 113, 113, .3); }

.seletor {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 14px;
  border-radius: 11px;
  border: 1px solid var(--borda-2);
  background: var(--painel-2);
  color: var(--texto-2);
  font-size: 12px;
}

.seletor span { white-space: nowrap; }

.seletor select {
  padding: 6px 8px;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

.seletor select:focus { outline: none; box-shadow: none; }

.seletor option { background: var(--painel); color: var(--texto); }

.controles-dir {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.espectadores {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--texto-2);
  font-size: 12.5px;
  white-space: nowrap;
}

.espectadores::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--erro);
  animation: pulsar 1.6s ease-in-out infinite;
}

.audios { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------------- Avisos e diálogo ---------------- */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 80;
  pointer-events: none;
  width: min(92vw, 520px);
}

.toast {
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid var(--borda-2);
  background: rgba(23, 28, 42, .97);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  color: var(--texto);
  font-size: 13.5px;
  line-height: 1.4;
  text-align: center;
  animation: subir .2s ease both;
}

.toast.erro { border-color: rgba(248, 113, 113, .45); color: #fecaca; }
.toast.ok { border-color: rgba(52, 211, 153, .45); color: #d1fae5; }

.dialogo {
  width: min(400px, 92vw);
  padding: 22px;
  border-radius: 16px;
  border: 1px solid var(--borda-2);
  background: #151a27;
  color: var(--texto);
  box-shadow: var(--sombra);
}

.dialogo::backdrop { background: rgba(4, 6, 10, .65); backdrop-filter: blur(3px); }

.dialogo h3 { margin: 0 0 8px; font-size: 17px; }

.dialogo p { margin: 0 0 18px; color: var(--texto-2); font-size: 14px; line-height: 1.5; }

.dialogo-acoes { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------------- Rolagem ---------------- */

* { scrollbar-width: thin; scrollbar-color: #333c52 transparent; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb {
  background: #333c52;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- Telas menores ---------------- */

@media (max-width: 1080px) {
  .lateral { width: 280px; }
  .controle span:not(.espectadores) { display: none; }
  .controle { padding: 11px; }
  .seletor span { display: none; }
  .seletor { padding: 4px 6px; }
}

@media (max-width: 860px) {
  .topo { padding: 8px 10px; }
  .status span { display: none; }
  .status { padding: 7px; }
  #bt-pessoas-mob { display: inline-flex; }
  .fechar-lateral { display: block; }
  .chip-acao { display: none; }

  .corpo { padding-bottom: 0; }

  .palco { padding: 8px; }

  .grade {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: minmax(150px, auto);
    align-content: start;
    overflow: auto;
  }

  .grade[data-n="1"] .tile { aspect-ratio: 16 / 9; }
  .grade[data-n="2"] .tile { aspect-ratio: 16 / 9; }
  .grade[data-n="3"] { grid-template-columns: minmax(0, 1fr); }
  .grade[data-n="3"] .tile:first-child { grid-row: auto; }

  .lateral {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 90vw);
    z-index: 60;
    transform: translateX(102%);
    transition: transform .22s ease;
    background: #10131c;
    border-left: 1px solid var(--borda-2);
    box-shadow: -20px 0 50px rgba(0, 0, 0, .5);
  }

  body.painel-aberto .lateral { transform: none; }

  .fundo-lateral {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    border: 0;
    background: rgba(3, 5, 9, .6);
  }

  .controles {
    gap: 6px;
    padding: 8px;
    justify-content: space-between;
  }

  .controle span { display: none; }

  .controle { padding: 12px; }

  .seletor { margin-left: 0; }

  .controles-dir { margin-left: 0; }

  .espectadores { font-size: 0; gap: 0; }
  .espectadores::before { width: 8px; height: 8px; }

  .toasts { bottom: 74px; }

  .vazio p { font-size: 13.5px; }
  .vazio-icone { width: 74px; height: 74px; }
  .vazio-icone svg { width: 44px; height: 44px; }
}

@media (max-width: 420px) {
  .cartao-inicio { padding: 24px 20px 18px; border-radius: 18px; }
  .marca h1 { font-size: 22px; }
  .logo { width: 46px; height: 46px; }
  .form.linha { flex-wrap: nowrap; }
  .chip-codigo b { letter-spacing: 1.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
