/* Canal EmperiaStudio: tudo em preto e cinza. */
:root {
  color-scheme: dark;
  --bg: #000;
  --bg-1: #070707;
  --bg-2: #0d0d0d;
  --bg-3: #151515;
  --bg-4: #1e1e1e;
  --bg-5: #2a2a2a;
  --line: #1c1c1c;
  --line-2: #2a2a2a;
  --text: #f2f2f2;
  --text-2: #a3a3a3;
  --text-3: #8c8c8c; /* contraste AA (4,5:1) sobre o preto */
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.4 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
svg { flex-shrink: 0; display: block; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--bg-5); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.boot { height: 100vh; display: grid; place-items: center; color: var(--text-3); }

/* ---------- Estrutura ---------- */
.app {
  display: grid;
  grid-template-columns: 72px 300px 1fr;
  grid-template-rows: 32px 1fr;
  height: 100vh;
}
.titlebar {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #d6d6d6;
}
.tb-center { display: flex; align-items: center; gap: 8px; }
.tb-mark svg { width: 14px; height: 14px; }
.tb-ping {
  position: absolute;
  right: 12px;
  font-size: 11px;
  color: var(--text-3);
  padding: 3px 8px;
  border-radius: 6px;
}
.tb-ping:hover { background: var(--bg-3); color: var(--text); }

/* ---------- Trilho de servidores ---------- */
.rail { display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.rail-item { position: relative; width: 100%; display: flex; justify-content: center; }
.rail-pill {
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: 40px;
  background: #fff;
  border-radius: 0 4px 4px 0;
}
.rail-btn {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--bg-4);
  color: #fff;
  display: grid;
  place-items: center;
}
.rail-btn svg { width: 26px; height: 26px; }

/* ---------- Coluna do canal ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 12px;
}
.sb-header {
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  border-top-left-radius: 12px;
}
.sb-header:hover { background: var(--bg-3); }
.sb-scroll { flex: 1; overflow-y: auto; padding-bottom: 12px; }
.sb-label { font-size: 12px; color: var(--text-2); padding: 18px 16px 6px; }
.channel {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 16px);
  height: 34px;
  margin: 0 8px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 15px;
  text-align: left;
}
.channel svg { width: 18px; height: 18px; }
.channel:hover { background: var(--bg-3); color: var(--text); }
.channel.is-selected { background: var(--bg-4); color: var(--text); }
.voice-users { padding: 2px 8px 0 32px; }
.vu {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 13px;
  text-align: left;
}
.vu:hover { background: var(--bg-3); color: var(--text); }
.vu-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vu-icons { display: flex; align-items: center; gap: 4px; color: var(--text-3); }
.vu-icons svg { width: 15px; height: 15px; }
.badge {
  font-size: 10px;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 4px;
  background: #fff;
  color: #000;
}

/* ---------- Avatares ---------- */
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--bg-5);
  color: #e8e8e8;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: box-shadow 120ms ease;
}
.avatar-sm { width: 22px; height: 22px; font-size: 9px; }
.avatar-md { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 48px; height: 48px; font-size: 16px; }
.avatar-xl { width: 88px; height: 88px; font-size: 28px; }
.avatar.is-speaking { box-shadow: 0 0 0 2px #fff; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-xxl { width: 96px; height: 96px; font-size: 32px; }
.avatar-wrap { position: relative; display: inline-flex; flex: none; }
.status-dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #9a9a9a; border: 3px solid var(--bg-2); }
.status-dot.is-voice { background: #fff; }

/* ---------- Painel de voz conectada ---------- */
.voice-panel { border-top: 1px solid var(--line); padding: 10px 10px 8px; flex: none; }
.vp-top { display: flex; align-items: center; gap: 6px; }
.vp-status { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; padding: 4px; border-radius: 6px; }
.vp-status:hover { background: var(--bg-3); }
.vp-status svg { width: 18px; height: 18px; }
.vp-text { min-width: 0; display: flex; flex-direction: column; }
.vp-text strong { font-size: 13px; font-weight: 500; }
.vp-text small { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-status em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.vp-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.vp-btn { height: 32px; display: grid; place-items: center; border-radius: 6px; background: var(--bg-3); color: var(--text); }
.vp-btn svg { width: 18px; height: 18px; }
.vp-btn:hover { background: var(--bg-4); }
.vp-btn.is-on { background: #fff; color: #000; }

/* ---------- Painel do usuário ---------- */
.user-panel {
  flex: none;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 8px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.up-user { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px; margin-left: -4px; border-radius: 6px; text-align: left; }
.up-user:hover { background: var(--bg-3); }
.up-text { display: flex; flex-direction: column; min-width: 0; }
.up-text strong { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-text small { font-size: 11px; color: var(--text-2); }
.up-controls { display: flex; align-items: center; gap: 2px; }
.split { display: flex; align-items: center; border-radius: 6px; }
.split:hover { background: var(--bg-3); }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; color: var(--text-2); }
.icon-btn:hover { background: var(--bg-3); color: var(--text); }
.icon-btn.is-alert { background: #e8e8e8; color: #000; }
.chev { width: 16px; height: 32px; display: grid; place-items: center; color: var(--text-3); border-radius: 6px; }
.chev:hover { color: var(--text); }

/* ---------- Área principal ---------- */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.main-header {
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
}
.main-header svg { width: 18px; height: 18px; }
.mh-title { color: var(--text); font-size: 15px; font-weight: 500; }
.mh-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: 13px; }
.mh-status:not(:empty)::before { content: ''; display: inline-block; width: 1px; height: 14px; margin: 0 10px -2px 2px; background: var(--line-2); }
.mh-count { margin-left: auto; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.mh-btn { position: relative; flex: none; width: 34px; height: 34px; display: grid; place-items: center; margin-left: 8px; border-radius: 8px; color: var(--text-2); }
.mh-btn:hover, .mh-btn.is-on { background: var(--bg-3); color: var(--text); }
.mh-badge { position: absolute; top: 1px; right: -1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #fff; color: #000; font-size: 10px; font-weight: 500; line-height: 16px; text-align: center; }
.banner {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.main-body { flex: 1; min-height: 0; position: relative; display: flex; }

/* Sala de espera */
.lobby {
  flex: 1;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 90% at 50% 115%, #1b1b1b 0%, #000 62%);
}
.lobby-inner { text-align: center; padding: 24px; }
.lobby h1 { margin: 0; font-size: 32px; font-weight: 500; letter-spacing: -0.01em; }
.lobby-sub { margin: 8px 0 22px; color: var(--text-2); font-size: 14px; }
.lobby-avatars { display: flex; justify-content: center; margin: -6px 0 24px; }
.lobby-avatars .avatar { margin: 0 -5px; box-shadow: 0 0 0 3px #000; }
.lobby-error { margin: 16px auto 0; max-width: 360px; color: var(--text-2); font-size: 13px; }

/* Botões */
.btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover { background: var(--bg-4); }
.btn-primary { height: 40px; padding: 0 20px; background: #fff; color: #000; border-color: #fff; font-size: 14px; font-weight: 500; }
.btn-primary:hover { background: #e4e4e4; }
.btn-primary:disabled { opacity: 0.45; }
.btn-small { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* ---------- Chamada ---------- */
.call { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 16px 16px 0; }
.tiles { flex: 1; min-height: 0; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 10px; }
.stage.has-focus .tiles { gap: 0; }
.strip { flex: none; display: flex; gap: 10px; justify-content: safe center; padding-top: 12px; overflow-x: auto; }

.tile {
  position: relative;
  flex: none;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
  cursor: pointer;
}
.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: box-shadow 120ms ease;
}
.tile.is-speaking::after { box-shadow: inset 0 0 0 2px #fff; }
.tile.is-speaking .avatar { box-shadow: 0 0 0 3px #fff; }
.tile-waiting { cursor: default; background: #0a0a0a; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile-screen video { object-fit: contain; }
video.mirror { transform: scaleX(-1); }
.tile-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12px; }
.waiting strong { display: block; font-size: 15px; font-weight: 500; }
.waiting span { display: block; margin-top: 4px; font-size: 13px; color: var(--text-2); }
.sharing { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-2); }
.sharing svg { width: 32px; height: 32px; }
.sharing strong { color: var(--text); font-weight: 500; font-size: 14px; }
.tile-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.66);
  font-size: 12px;
}
.tl-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-icons { display: flex; gap: 3px; }
.tl-icons:empty { display: none; }
.tl-icons svg { width: 14px; height: 14px; }
.tile-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.66);
  font-size: 11px;
  color: var(--text-2);
  opacity: 0;
  transition: opacity 120ms ease;
}
.tile-badge:empty { display: none; }
.tile-actions { position: absolute; right: 8px; top: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity 120ms ease; }
.tile-actions button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; background: rgba(0, 0, 0, 0.66); color: #fff; }
.tile-actions button:hover { background: rgba(0, 0, 0, 0.9); }
.tile-actions svg { width: 16px; height: 16px; }
.tile:hover .tile-actions, .tile:hover .tile-badge { opacity: 1; }
.strip .tile .tile-label { font-size: 11px; padding: 2px 6px; left: 6px; bottom: 6px; }
.strip .tile .avatar-xl { width: 44px; height: 44px; font-size: 15px; }
.strip .tile-actions, .strip .tile-badge { display: none; }
.tile:fullscreen { border-radius: 0; cursor: default; }
.tile:fullscreen video { object-fit: contain; }

.controls { flex: none; display: flex; justify-content: center; gap: 10px; padding: 14px 0 18px; }
.ctl { width: 52px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-3); color: #e8e8e8; }
.ctl:hover { background: var(--bg-4); }
.ctl.is-on { background: #fff; color: #000; }
.ctl.is-alert { background: #e8e8e8; color: #000; }
.ctl-leave { width: 68px; border: 1px solid #3a3a3a; background: #000; color: #fff; }
.ctl-leave:hover { background: #fff; color: #000; }

/* ---------- Painel lateral (chat e conexão) ---------- */
.side {
  flex: none;
  width: 400px;
  max-width: 100%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-1);
  border-left: 1px solid var(--line);
}
.side-chat { width: 360px; }
.side-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.side-head strong { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.side-head strong svg { width: 18px; height: 18px; color: var(--text-2); }
.side-head span { display: flex; gap: 2px; }
.side-body { flex: 1; overflow-y: auto; padding: 4px 16px 24px; }
.side-body h4 { margin: 18px 0 8px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.side-body dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.side-body dt { color: var(--text-2); }
.side-body dd { margin: 0; text-align: right; }
.side-body ul { margin: 0; padding-left: 16px; font-size: 13px; color: var(--text); }
.side-body li + li { margin-top: 6px; }
.srow { padding: 8px 0; border-bottom: 1px solid var(--bg-3); }
.srow-h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 500; }
.srow-h > span { font-weight: 400; color: var(--text-2); white-space: nowrap; }
.srow-l { margin-top: 3px; font-size: 12px; color: var(--text-2); }
.tag { display: inline-block; margin-left: 4px; padding: 0 5px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 11px; color: var(--text); }
.tag:empty { display: none; }
.muted { color: var(--text-3); font-size: 13px; }

/* ---------- Avisos ---------- */
#toasts { position: fixed; left: 50%; top: 44px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: none; }
.toast { background: #fff; color: #000; padding: 10px 14px; border-radius: 8px; font-size: 13px; max-width: 440px; transition: opacity 400ms ease; }
.toast.out { opacity: 0; }

/* ---------- Menus rápidos ---------- */
.popover {
  position: fixed;
  z-index: 50;
  width: 280px;
  padding: 10px;
  background: #0f0f0f;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.pop-title { font-size: 12px; color: var(--text-2); margin: 2px 2px 8px; }
.pop-link { margin-top: 10px; font-size: 13px; color: var(--text-2); padding: 2px; }
.pop-link:hover { color: var(--text); }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 6px; text-align: left; }
.pop-item svg { width: 18px; height: 18px; color: var(--text-2); }
.pop-item:hover { background: var(--bg-4); }
.pop-sep { height: 1px; background: var(--line-2); margin: 6px 0; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; }
.check input { accent-color: #fff; }

select, input[type='text'], input[type='password'], input[type='email'], .login input:not([type='file']) {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  color: var(--text);
}
select:focus, input:focus { outline: none; border-color: #fff; }
select:disabled { opacity: 0.5; }
input[type='range'] { width: 100%; accent-color: #fff; margin: 6px 0 0; }
.slider { display: block; margin-top: 12px; }
.slider > span { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.slider b { font-weight: 400; color: var(--text); }

/* ---------- Configurações ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.72); display: grid; place-items: center; }
.modal {
  position: relative;
  width: min(940px, calc(100vw - 48px));
  height: min(700px, calc(100vh - 48px));
  display: grid;
  grid-template-columns: 230px 1fr;
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 14px;
}
.modal-nav { background: var(--bg); border-right: 1px solid var(--line); padding: 22px 12px; }
.mn-label { font-size: 12px; color: var(--text-3); padding: 0 10px 8px; }
.modal-nav button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--text-2); }
.modal-nav button:hover { background: var(--bg-3); color: var(--text); }
.modal-nav button.is-active { background: var(--bg-4); color: var(--text); }
.mn-sep { height: 1px; background: var(--line); margin: 8px 10px; }
.modal-body { overflow-y: auto; padding: 28px 64px 32px 32px; }
.modal-content h2 { margin: 0 0 20px; font-size: 20px; font-weight: 500; }
.modal-content h3 { margin: 28px 0 6px; font-size: 14px; font-weight: 500; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text-2); }
.modal-close:hover { color: #000; background: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field small { display: block; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.grid2 .slider { margin-top: 0; margin-bottom: 16px; }
.meter { height: 8px; background: var(--bg-4); border-radius: 4px; overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: #fff; transition: width 60ms linear; }
.note { font-size: 12px; color: var(--text-3); margin: 10px 0; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--bg-3); cursor: pointer; }
.toggle-row strong { display: block; font-weight: 400; font-size: 14px; }
.toggle-row small { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); }
.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 38px; height: 22px; margin: 0; border-radius: 11px; background: var(--bg-5); cursor: pointer; transition: background 120ms ease; }
.switch::before { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #8a8a8a; transition: transform 120ms ease, background 120ms ease; }
.switch:checked { background: #fff; }
.switch:checked::before { transform: translateX(16px); background: #000; }
.preview { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.preview video { width: 100%; height: 100%; object-fit: contain; display: block; }
.preview-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.account { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.account strong { display: block; font-weight: 500; }
.account small { color: var(--text-2); font-size: 12px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(120% 90% at 50% 115%, #1b1b1b 0%, #000 62%); overflow: auto; }
.login-card { width: min(380px, 100%); padding: 36px 32px 28px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 16px; }
.login-mark { width: 48px; height: 48px; border-radius: 14px; background: var(--bg-4); display: grid; place-items: center; margin-bottom: 20px; }
.login-mark svg { width: 26px; height: 26px; }
.login h1 { margin: 0; font-size: 22px; font-weight: 500; }
.login-card > p { margin: 6px 0 24px; color: var(--text-2); }
.login .btn-primary { margin-top: 6px; }
.login-error { min-height: 18px; margin: 12px 0 0; font-size: 13px; color: var(--text); }
.login-foot { margin-top: 18px; font-size: 12px; color: var(--text-3); }

/* ---------- Status do canal ---------- */
.ch-status {
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 16px);
  margin: 2px 8px 0;
  padding: 4px 8px 4px 34px;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 12px;
  text-align: left;
}
.ch-status span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-status.is-empty { color: var(--text-3); }
.ch-status:hover:not(:disabled) { background: var(--bg-3); color: var(--text); }
.ch-status:disabled { cursor: default; }
.ch-status svg { opacity: 0.7; }
.lobby-status { margin: 6px 0 0; color: var(--text); font-size: 14px; }

/* ---------- Chat do canal ---------- */
.chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; }
.chat-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; color: var(--text-3); font-size: 13px; }
.chat-empty strong { color: var(--text); font-weight: 500; font-size: 15px; }
.msg { display: flex; gap: 10px; margin-top: 16px; }
.msg:first-child { margin-top: 0; }
.msg > div { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: baseline; gap: 8px; }
.msg-head strong { font-size: 14px; font-weight: 500; }
.msg-head time { font-size: 11px; color: var(--text-3); }
.msg p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: #dcdcdc; overflow-wrap: anywhere; }
.msg-cont { margin-top: 3px; padding-left: 42px; }
.msg a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.chat-form { flex: none; display: flex; align-items: flex-end; gap: 6px; margin: 0 12px 12px; padding: 4px 4px 4px 12px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 10px; }
.chat-form:focus-within { border-color: #5a5a5a; }
.chat-form textarea { flex: 1; max-height: 160px; padding: 7px 0; resize: none; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; line-height: 1.4; }

/* ---------- Cartão de perfil e menus ---------- */
.popover-profile { width: 260px; }
.profile-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 12px; text-align: center; }
.profile-card .avatar { margin-bottom: 10px; }
.profile-card strong { font-size: 16px; font-weight: 500; }
.profile-card small { color: var(--text-2); font-size: 12px; }
.pop-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.btn-light { background: #fff; color: #000; border-color: #fff; }
.btn-light:hover { background: #e4e4e4; }
.btn svg { width: 16px; height: 16px; }
.btn.is-danger { background: #fff; color: #000; }
.link-btn { font-size: inherit; color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.waiting .btn { margin-top: 14px; }

/* ---------- Minha conta e equipe ---------- */
.account { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.account-actions .btn { cursor: pointer; }
.account-actions small { flex-basis: 100%; color: var(--text-3); font-size: 12px; }
.inline-form { display: flex; align-items: flex-end; gap: 12px; }
.inline-form .field { flex: 1; margin-bottom: 0; }
.facts { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 24px 0 0; font-size: 13px; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; }
.invite { display: flex; gap: 8px; }
.invite input { flex: 1; }
.members { list-style: none; margin: 0; padding: 0; }
.member { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bg-3); }
.member-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.member strong { font-size: 14px; font-weight: 500; }
.member small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: 12px; }
.member em { color: var(--text-3); font-size: 12px; font-style: normal; }
.member-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
@media (max-width: 640px) { .member { flex-wrap: wrap; } .member-actions { width: 100%; justify-content: flex-start; } }
.login-card form { margin: 0; }
.login-forgot { display: block; margin: 10px 0 0; font-size: 13px; color: var(--text-2); text-align: right; }
.login-forgot:hover { color: var(--text); }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); }
.seg label { position: relative; padding: 7px 14px; border-radius: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: #fff; color: #000; }
.seg label:has(input:focus-visible) { outline: 2px solid #fff; outline-offset: 2px; }
.ptt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.ptt-row small { flex-basis: 100%; color: var(--text-3); font-size: 12px; }

/* ---------- Login e cadastro ---------- */
.login-symbol { display: block; width: 34px; height: 40px; margin-bottom: 22px; }
.login-logo { display: block; width: auto; height: 26px; margin-bottom: 10px; }
.login-card h1 { margin: 18px 0 0; font-size: 20px; font-weight: 500; }
.or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-3); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.btn-google { height: 40px; background: #fff; color: #1f1f1f; border-color: #fff; font-size: 14px; font-weight: 500; text-decoration: none; }
.btn-google:hover { background: #ececec; }
.login-alt { margin: 14px 0 0; font-size: 13px; color: var(--text-2); }
.login-alt a { color: var(--text); }
.photo-pick { display: flex; align-items: center; gap: 16px; margin: 4px 0 18px; }
.photo-pick > span:last-child { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.photo-pick .btn { cursor: pointer; }
.photo-pick small { color: var(--text-3); font-size: 12px; }
.google-pending { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 13px; color: var(--text-2); }
.google-pending b { color: var(--text); font-weight: 500; }

/* ---------- Telas menores ---------- */
@media (max-width: 1080px) {
  .app { grid-template-columns: 72px 260px 1fr; }
  .side { position: absolute; top: 0; right: 0; bottom: 0; width: 340px; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 0 240px 1fr; }
  .rail { visibility: hidden; }
  .sidebar { border-top-left-radius: 0; }
  .sb-header { border-top-left-radius: 0; }
  .modal { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .modal-nav { display: flex; gap: 4px; overflow-x: auto; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .modal-nav button { width: auto; white-space: nowrap; }
  .mn-label, .mn-sep { display: none; }
  .modal-body { padding: 20px; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .app { grid-template-columns: 0 0 1fr; }
  .sidebar { visibility: hidden; }
  .controls { gap: 6px; }
  .ctl { width: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
