/* ===================== Reuniões / chamadas ===================== */
.meeting { position: fixed; inset: 0; z-index: 800; display: flex; flex-direction: column; background: radial-gradient(1200px 600px at 80% -10%, #18397f 0%, transparent 60%), linear-gradient(160deg, #0b1f4a 0%, #071433 100%); color: #fff; }
.meeting h1, .meeting h2, .meeting h3, .meeting h4 { color: #fff; }
.mt-top { display: flex; align-items: center; gap: 12px; padding: 12px 18px; min-height: 60px; }
.mt-top .mt-title { flex: 1; min-width: 0; }
.mt-top .mt-title h3 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-top .mt-title span { font-size: 12px; color: rgba(255,255,255,.65); }
.mt-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.1); }
.mt-pill.rec { background: var(--vermelho); } .mt-pill.live { background: #ff0033; } .mt-pill.room { background: var(--ouro); color: var(--azul-esc); }
.mt-icon { width: 38px; height: 38px; border-radius: 10px; border: 0; background: rgba(255,255,255,.08); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.mt-icon:hover { background: rgba(255,255,255,.16); }
.mt-icon.on { background: var(--ouro); color: var(--azul-esc); }
.mt-icon .count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--vermelho); color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

.mt-body { flex: 1; display: flex; min-height: 0; padding: 0 12px 0 18px; gap: 12px; }
.mt-stage { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; position: relative; }
.mt-grid { flex: 1; min-height: 0; display: grid; gap: 10px; align-content: center; justify-content: center; }
.mt-stage.has-focus { flex-direction: row; }
.mt-focus { flex: 1; min-width: 0; min-height: 0; display: flex; position: relative; }
.mt-stage.has-focus .mt-grid { flex: none; width: 220px; grid-template-columns: 1fr !important; grid-auto-rows: 124px; align-content: start; overflow-y: auto; }

.tile { position: relative; background: #13295a; border-radius: 14px; overflow: hidden; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; min-width: 0; min-height: 0; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: box-shadow .15s; }
.mt-focus .tile { width: 100%; height: 100%; aspect-ratio: auto; }
.mt-stage.has-focus .mt-grid .tile { aspect-ratio: auto; height: 124px; }
.tile video { width: 100%; height: 100%; object-fit: cover; background: #0b1f4a; }
.tile.screen video, .mt-focus .tile video { object-fit: contain; background: #050f27; }
.tile.mirror video { transform: scaleX(-1); }
.tile .tile-av { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #1b3a7a, #0b1f4a); }
.tile.cam-on .tile-av { display: none; }
.mt-stage.calling .tile-av > * { visibility: hidden; }
.tile .tile-name { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 20px); height: 26px; padding: 0 10px; border-radius: 8px; background: rgba(7, 20, 51, .72); font-size: 12.5px; font-weight: 600; }
.tile .tile-name .icon { width: 14px; height: 14px; }
.tile .tile-badges { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.tile .tile-badges span { height: 26px; min-width: 26px; padding: 0 6px; border-radius: 8px; background: rgba(7, 20, 51, .72); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.tile .tile-badges .hand { background: var(--ouro); color: var(--azul-esc); }
.tile.speaking { box-shadow: 0 0 0 3px var(--ouro), 0 8px 24px rgba(0,0,0,.25); }
.tile .tile-menu { position: absolute; top: 10px; left: 10px; opacity: 0; transition: opacity .15s; }
.tile:hover .tile-menu { opacity: 1; }
.tile .tile-menu button { width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(7, 20, 51, .72); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tile .conn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(7,20,51,.5); font-size: 12px; }

.yt-wrap { flex: 1; display: flex; flex-direction: column; background: #000; border-radius: 14px; overflow: hidden; position: relative; }
.yt-wrap .yt-player { flex: 1; } .yt-wrap iframe { width: 100%; height: 100%; border: 0; }
.yt-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(7, 20, 51, .9); font-size: 12.5px; }

.mt-side { width: 340px; flex: none; display: flex; flex-direction: column; background: #fff; color: var(--text); border-radius: 14px; overflow: hidden; margin-bottom: 4px; }
[data-theme="dark"] .mt-side { background: var(--surface); }
.mt-side h3 { color: var(--heading) !important; }
.mt-side-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.mt-side-head h3 { flex: 1; font-size: 15px; }
.mt-side-body { flex: 1; overflow: auto; padding: 10px 12px; }
.mt-side-foot { padding: 10px 12px; border-top: 1px solid var(--line); }
.mt-chat-msg { margin-bottom: 10px; }
.mt-chat-msg .who { font-size: 12px; font-weight: 700; color: var(--heading); }
.mt-chat-msg .who time { font-weight: 400; color: var(--faint); margin-left: 6px; }
.mt-chat-msg .txt { background: var(--surface-2); border-radius: 0 10px 10px 10px; padding: 7px 10px; margin-top: 2px; word-wrap: break-word; overflow-wrap: anywhere; }
.mt-chat-msg.mine .txt { background: var(--mine); }
.part-row { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; }
.part-row:hover { background: var(--hover); }
.part-row .icons { display: flex; gap: 4px; color: var(--muted); }
.part-row .icons .off { color: var(--vermelho); }
.br-room { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.br-room h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

.mt-controls { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px 18px; flex-wrap: wrap; }
.ctl { min-width: 60px; height: 58px; padding: 6px 8px 4px; border-radius: 12px; border: 0; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; position: relative; }
.ctl:hover { background: rgba(255,255,255,.16); }
.ctl .icon { width: 22px; height: 22px; }
.ctl.off { background: rgba(217, 45, 32, .22); color: #ffb4ab; }
.ctl.on { background: var(--ouro); color: var(--azul-esc); }
.ctl.rec-on { background: var(--vermelho); color: #fff; }
.ctl.leave { background: var(--vermelho); padding: 0 18px; flex-direction: row; gap: 8px; font-size: 13.5px; min-width: 0; height: 46px; border-radius: 23px; margin-left: 10px; }
.ctl.leave:hover { background: #b42318; }
.ctl-sep { width: 1px; height: 34px; background: rgba(255,255,255,.15); margin: 0 4px; }
.ctl .caret { position: absolute; right: 2px; top: 2px; width: 18px; height: 18px; border-radius: 5px; display: flex; align-items: center; justify-content: center; }
.ctl .caret:hover { background: rgba(255,255,255,.18); }

.reaction-float { position: absolute; bottom: 90px; font-size: 38px; pointer-events: none; animation: floatUp 3.2s ease-out forwards; z-index: 5; text-align: center; }
.reaction-float small { display: block; font-size: 11px; background: rgba(7,20,51,.8); color: #fff; border-radius: 6px; padding: 1px 6px; }
@keyframes floatUp { 0% { transform: translateY(0) scale(.6); opacity: 0; } 10% { opacity: 1; transform: translateY(-20px) scale(1); } 100% { transform: translateY(-360px); opacity: 0; } }
.mt-notice { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 6; background: var(--ouro); color: var(--azul-esc); padding: 10px 16px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; max-width: 80%; }

/* pré-entrada */
.prejoin { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding: 24px 48px; max-width: 1200px; margin: 0 auto; width: 100%; position: relative; z-index: 1; }
.prejoin .preview { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #13295a; box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.prejoin .preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.prejoin .preview .tile-av { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.prejoin .preview .pv-ctl { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 10px; }
.prejoin .side { background: rgba(11, 31, 74, .88); border-left: 4px solid var(--ouro); border-radius: 16px; padding: 28px; }
.prejoin .side h1 { font-size: 28px; margin: 10px 0 6px; }
.prejoin .side p { color: rgba(255,255,255,.75); margin: 0 0 18px; }
.prejoin .side .field > label { color: rgba(255,255,255,.85); }
.prejoin .side .input, .prejoin .side .select { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.prejoin .side .select option { color: #000; }
.level { height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.level i { display: block; height: 100%; width: 0; background: var(--verde); transition: width .1s; }
.stripes-deco { position: absolute; right: -6%; top: 0; bottom: 0; width: 22%; transform: skewX(-14deg); background: linear-gradient(90deg, var(--verde) 0 18%, var(--ouro) 18%); opacity: .14; pointer-events: none; }

/* minimizado */
.meeting.mini { inset: auto 20px 20px auto; width: 340px; height: 230px; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.45); overflow: hidden; z-index: 950; }
.meeting.mini .mt-top, .meeting.mini .mt-side, .meeting.mini .mt-controls .ctl:not(.keep), .meeting.mini .ctl-sep { display: none !important; }
.meeting.mini .mt-body { padding: 0; }
.meeting.mini .mt-stage.has-focus .mt-grid { display: none; }
.meeting.mini .mt-grid { grid-template-columns: 1fr !important; }
.meeting.mini .mt-grid .tile:not(:first-child) { display: none; }
.meeting.mini .tile { border-radius: 0; aspect-ratio: auto; height: 100%; }
.meeting.mini .mt-controls { position: absolute; bottom: 0; left: 0; right: 0; padding: 8px; background: linear-gradient(transparent, rgba(7,20,51,.9)); gap: 6px; }
.meeting.mini .ctl { height: 40px; min-width: 40px; } .meeting.mini .ctl span { display: none; }
.meeting.mini .ctl.leave { height: 40px; margin-left: 0; padding: 0 12px; }

@media (max-width: 900px) {
  .prejoin { grid-template-columns: 1fr; padding: 16px; align-items: start; gap: 16px; }
  .prejoin .side { padding: 20px; } .prejoin .side h1 { font-size: 22px; }
  .mt-side { position: absolute; right: 8px; top: 64px; bottom: 90px; width: min(340px, calc(100% - 16px)); z-index: 7; }
  .ctl span { display: none; } .ctl { min-width: 46px; height: 46px; }
}
