@font-face { font-family: "Plus Jakarta Sans"; src: url("assets/plus-jakarta-sans-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --ink: #0A0E27; --ink-deep: #0D1024; --ink-elevated: #141935; --ink-raised: #1B2145;
  --primary: #2B3AFF; --primary-soft: #3B4CFF; --accent: #4D9FFF; --accent-light: #7FD1FF;
  --text: #fff; --muted: #B8C0D4; --faint: #7C86A6;
  --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.16);
  --danger: #ff5470; --ok: #2ecc8f; --live: #ff3b5c;
  --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body { font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--ink); color: var(--text); display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.bg-glow { position: fixed; inset: 0; z-index: -1; background:
  radial-gradient(900px 500px at 85% -10%, rgba(43,58,255,.35), transparent 60%),
  radial-gradient(700px 500px at -10% 110%, rgba(77,159,255,.18), transparent 60%), var(--ink); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }

/* topo */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; padding-top: max(14px, env(safe-area-inset-top)); border-bottom: 1px solid var(--border); background: rgba(10,14,39,.7); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge { width: 44px; height: 36px; border-radius: 10px; background: #F7F7FA; display: grid; place-items: center; padding: 4px 6px; }
.brand-badge img { width: 100%; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16px; letter-spacing: .2px; }
.brand-text small { font-size: 11px; color: var(--faint); }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; background: var(--ink-elevated); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.pill.on .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.pill.err .dot { background: var(--danger); }

/* login */
.center { flex: 1; display: grid; place-items: center; padding: 24px 16px; }
.login { width: 100%; max-width: 440px; border-radius: 22px; overflow: hidden; background: var(--ink-elevated); border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.login-logo { background: #F7F7FA; padding: 22px 40px 14px; display: grid; place-items: center; }
.login-logo img { width: 190px; max-width: 70%; height: auto; }
.login-body { padding: 26px 26px 28px; display: grid; gap: 14px; }
.login h1 { font-size: 22px; font-weight: 800; }
.sub { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 4px; }

/* campos */
label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
input, select { font: inherit; font-size: 15px; color: var(--text); background: var(--ink-deep); border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 14px; outline: none; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(77,159,255,.2); }
select option { background: var(--ink-elevated); }
input[type=range] { padding: 0; accent-color: var(--accent); background: none; border: 0; }
.adv summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--faint); padding: 4px 0; user-select: none; }
.adv[open] summary { margin-bottom: 8px; }

/* botoes */
.btn { font: inherit; font-size: 14px; font-weight: 700; color: var(--text); background: var(--ink-raised); border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 18px; cursor: pointer; transition: transform .1s, background .15s, filter .15s; }
.btn:hover { background: #242c5a; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--accent)); border: 0; box-shadow: 0 8px 24px rgba(43,58,255,.35); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { background: rgba(255,84,112,.14); border-color: rgba(255,84,112,.4); color: #ff8ea1; }
.btn.ghost { background: transparent; }
.btn.small { padding: 8px 12px; font-size: 12px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }

/* sala */
.room { flex: 1; display: grid; grid-template-columns: 270px 1fr; gap: 18px; padding: 20px 22px; max-width: 1400px; width: 100%; margin: 0 auto; align-items: start; }
.card { background: var(--ink-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card h2 { font-size: 15px; font-weight: 800; }
.card-head, .side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.count { font-size: 12px; font-weight: 700; color: var(--accent-light); background: rgba(77,159,255,.12); padding: 3px 10px; border-radius: 999px; }
.count:empty { display: none; }
.main { display: grid; gap: 18px; min-width: 0; }

#people { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
#people li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px; border-radius: 12px; min-width: 0; background: var(--ink-deep); border: 1px solid var(--border); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: linear-gradient(135deg, var(--primary), var(--accent)); flex: none; }
.pname { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pname small { display: block; font-size: 11px; color: var(--faint); font-weight: 500; }
#people li .btn { flex-basis: 100%; }
.live { font-size: 10px; font-weight: 800; letter-spacing: .5px; color: #fff; background: var(--live); padding: 3px 7px; border-radius: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* palco */
.stage { padding: 0; overflow: hidden; }
.empty { text-align: center; padding: 56px 24px; display: grid; gap: 10px; justify-items: center; }
.empty img { width: 120px; opacity: .85; background: #F7F7FA; padding: 10px 14px; border-radius: 16px; }
.empty h3 { font-size: 17px; margin-top: 8px; }
.empty p { color: var(--muted); font-size: 14px; max-width: 360px; line-height: 1.5; }
.video-wrap { position: relative; background: #000; }
video { display: block; width: 100%; background: #000; }
#remote { aspect-ratio: 16/9; max-height: 74vh; object-fit: contain; }
#preview { max-width: 280px; border-radius: 12px; margin-top: 14px; border: 1px solid var(--border); }
.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: var(--ink-elevated); border-top: 1px solid var(--border); }
.video-wrap:fullscreen { display: flex; flex-direction: column; justify-content: center; }
.video-wrap:fullscreen #remote { max-height: none; height: 100%; }
.video-wrap:fullscreen .controls { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.75)); border: 0; opacity: 0; transition: opacity .2s; }
.video-wrap:fullscreen:hover .controls { opacity: 1; }
.who { font-weight: 700; font-size: 14px; }
.stats { font-size: 11px; color: var(--faint); }
.spacer { flex: 1; }
.vol { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: 14px; }
.vol input { width: 90px; }
.sound { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); }

/* transmitir */
.label { font-size: 12px; font-weight: 700; color: var(--muted); margin: 6px 0 8px; text-transform: uppercase; letter-spacing: .6px; }
.sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 8px; max-height: 260px; overflow: auto; padding: 2px; }
.src { border: 2px solid transparent; border-radius: 12px; padding: 6px; background: var(--ink-deep); cursor: pointer; font-size: 12px; transition: border-color .15s; }
.src:hover { border-color: var(--border-strong); }
.src.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(77,159,255,.18); }
.src img { width: 100%; border-radius: 8px; display: block; }
.src span { display: block; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip { font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--ink-deep); border: 1px solid var(--border-strong); border-radius: 999px; padding: 9px 16px; cursor: pointer; }
.chip.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.note { background: rgba(77,159,255,.1); border: 1px solid rgba(77,159,255,.3); color: var(--accent-light); padding: 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
#diag { margin-top: 12px; }

.foot { text-align: center; font-size: 11px; color: var(--faint); padding: 18px 16px; padding-bottom: max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }

/* celular */
@media (max-width: 860px) {
  .room { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 12px; }
  .room > *, .main > * { min-width: 0; }
  .topbar { padding: 10px 14px; }
  .brand-text small { display: none; }
  #people { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  #people li { flex: none; min-width: 190px; }
  .side .btn { margin-top: 4px; }
  .stage { margin: 0 -12px; border-radius: 0; border-left: 0; border-right: 0; }
  .vol { display: none; }
  .grid3 { grid-template-columns: 1fr; }
  .actions .btn { flex: 1; }
  .card { padding: 16px; }
}

.dl { display: block; text-align: center; font-size: 13px; font-weight: 700; color: var(--accent-light); text-decoration: none; padding: 10px; border: 1px dashed rgba(127,209,255,.4); border-radius: 12px; }
.dl:hover { background: rgba(77,159,255,.1); }
.dls { display: grid; gap: 8px; }
