/* ===================================================================
   Orbita — identidade visual: espaço profundo + acento laranja-solar
   =================================================================== */
:root {
  --bg-0: #080a12;
  --bg-1: #0e111c;
  --bg-2: #131726;
  --bg-3: #1a1f32;
  --bg-4: #232942;
  --bg-5: #2d3452;
  --line: #242a44;
  --text: #e8ebf5;
  --text-2: #b4bbd2;
  --muted: #8089a6;
  --accent: #ff8a3d;
  --accent-h: #ffa05f;
  --accent-ink: #1b1007;
  --accent-soft: rgba(255, 138, 61, .14);
  --cyan: #38bdf8;
  --danger: #ff5d6c;
  --success: #3ddc84;
  --warn: #ffb84d;
  --online: #3ddc84;
  --idle: #ffb84d;
  --dnd: #ff5d6c;
  --offline: #5d6580;
  --radius: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  color-scheme: dark;
}
:root[data-theme="midnight"] {
  --bg-0: #000000; --bg-1: #05060b; --bg-2: #0a0c14; --bg-3: #10131f; --bg-4: #181c2e; --bg-5: #222844; --line: #1a1f33;
}
:root[data-theme="light"] {
  --bg-0: #dedad4; --bg-1: #ece9e4; --bg-2: #f8f6f3; --bg-3: #ffffff; --bg-4: #ebe8e2; --bg-5: #ddd9d1; --line: #d8d3ca;
  --text: #1b2033; --text-2: #3d4560; --muted: #6b7390; --accent: #f06a1a; --accent-h: #d95d12; --accent-ink: #fff;
  --accent-soft: rgba(240, 106, 26, .12); --cyan: #0b84c4; --shadow: 0 12px 40px rgba(40, 30, 10, .18); color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 15px/1.45 var(--font); color: var(--text); background: var(--bg-0);
  -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none;
}
#root { height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font: .9em ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--bg-3); padding: .1em .4em; border-radius: 5px; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--bg-5) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg-5); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; border: 3px solid transparent; }

.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ico svg { display: block; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.pad { padding: 8px 12px; font-size: 13px; }
.error { color: var(--danger); }
.loading { padding: 20px; text-align: center; color: var(--muted); }

.boot-splash { height: 100%; display: grid; place-items: center; }
.boot-logo { width: 56px; height: 56px; border-radius: 50%; border: 5px solid var(--bg-4); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ botões e campos */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px;
  border-radius: 8px; background: var(--bg-4); color: var(--text); font-weight: 600; font-size: 14px;
  transition: background .15s, transform .05s, box-shadow .15s; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--bg-5); text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-h); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--bg-4); }
.btn.ghost.danger { color: var(--danger); }
.btn.ghost.danger:hover { background: rgba(255, 93, 108, .12); }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.btn.big { padding: 13px 22px; font-size: 16px; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn.left { margin-right: auto; }

.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--muted); transition: background .12s, color .12s; flex: none; }
.icon-btn:hover:not(:disabled) { background: var(--bg-4); color: var(--text); }
.icon-btn.on { color: var(--accent); }
.icon-btn.off { color: var(--danger); }
.icon-btn.danger:hover { background: rgba(255, 93, 108, .15); color: var(--danger); }

input, select, textarea {
  width: 100%; background: var(--bg-0); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
:root[data-theme="light"] input, :root[data-theme="light"] select, :root[data-theme="light"] textarea { background: var(--bg-3); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="color"] { padding: 3px; height: 40px; cursor: pointer; }
input[type="checkbox"] { width: auto; accent-color: var(--accent); }
textarea { resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input[type="file"] { padding: 6px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.field-hint { font-size: 12px; color: var(--muted); }
.form { display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.row-pick { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 4px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.switch { position: relative; width: 42px; height: 24px; flex: none; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider { position: absolute; inset: 0; background: var(--bg-5); border-radius: 24px; transition: background .2s; cursor: pointer; }
.slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 2px; }

.badge { background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 6px; background: var(--bg-3); border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.chip:not(.plain)::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, #99aab5); }

.owner-badge { color: var(--warn); margin-left: 6px; display: inline-flex; vertical-align: middle; }

/* ------------------------------------------------------------------ avatares */
.avatar { position: relative; border-radius: 50%; flex: none; display: inline-grid; place-items: center; color: #fff; font-weight: 700; user-select: none; background: var(--bg-4); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar.speaking, [data-vuid].speaking > .avatar { box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 4px var(--success); }
.status-dot { position: absolute; right: -2px; bottom: -2px; width: 32%; height: 32%; min-width: 9px; min-height: 9px; border-radius: 50%; border: 3px solid var(--bg-1); background: var(--offline); box-sizing: content-box; }
.status-dot.online { background: var(--online); } .status-dot.idle { background: var(--idle); } .status-dot.dnd { background: var(--dnd); }
.server-icon { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; overflow: hidden; flex: none; }
.server-icon img { width: 100%; height: 100%; object-fit: cover; }

/* ===================================================================
   AUTENTICAÇÃO
   =================================================================== */
.auth { height: 100%; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, 1fr); background: var(--bg-0); }
.auth-hero { position: relative; overflow: hidden; padding: 56px 64px; display: flex; flex-direction: column; justify-content: center; gap: 22px;
  background: radial-gradient(900px 600px at 20% 15%, #1f2550 0%, transparent 60%), radial-gradient(700px 500px at 90% 95%, #4a2410 0%, transparent 55%), #080a12; color: #e8ebf5; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; position: relative; z-index: 1; }
.brand-logo { width: 44px; height: 44px; display: inline-block; }
.brand-logo svg { width: 100%; height: 100%; }
.auth-hero h2 { font-size: clamp(26px, 3.2vw, 42px); line-height: 1.12; letter-spacing: -.03em; max-width: 520px; margin: 0; position: relative; z-index: 1; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: #b4bbd2; position: relative; z-index: 1; }
.hero-points li { display: flex; align-items: center; gap: 10px; }
.hero-points .ico { color: var(--accent); }
.orbit-art { position: absolute; right: -140px; bottom: -140px; width: 520px; height: 520px; opacity: .9; pointer-events: none; }
.orbit-art .planet { position: absolute; inset: 170px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #ffc48f, #ff6a2b 55%, #7a2c0c); box-shadow: 0 0 80px rgba(255, 138, 61, .45); }
.orbit-art .ring { position: absolute; border: 1.5px dashed rgba(56, 189, 248, .45); border-radius: 50%; }
.orbit-art .r1 { inset: 80px; animation: spin 40s linear infinite; }
.orbit-art .r2 { inset: 10px; animation: spin 70s linear infinite reverse; border-color: rgba(255, 255, 255, .15); }
.orbit-art .moon { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 18px var(--cyan); }
.orbit-art .m1 { top: 78px; left: 250px; animation: float 6s ease-in-out infinite; }
.orbit-art .m2 { bottom: 90px; left: 60px; width: 10px; height: 10px; background: #fff; box-shadow: 0 0 14px #fff; animation: float 8s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translateY(-14px); } }
.auth-card { align-self: center; justify-self: center; width: min(440px, calc(100% - 40px)); padding: 34px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; }
.auth-sub { margin: 0 0 20px; color: var(--muted); }
.auth-error { background: rgba(255, 93, 108, .12); border: 1px solid rgba(255, 93, 108, .4); color: #ff9aa4; padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.auth-invite { background: var(--accent-soft); border: 1px solid rgba(255, 138, 61, .4); color: var(--accent); padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; display: flex; gap: 8px; align-items: center; font-size: 14px; }
.auth-switch { margin: 18px 0 0; color: var(--muted); text-align: center; }
.auth-switch a { cursor: pointer; font-weight: 600; }
.fatal { height: 100%; display: grid; place-content: center; gap: 12px; text-align: center; padding: 24px; }

/* ===================================================================
   LAYOUT PRINCIPAL
   =================================================================== */
.app { display: grid; grid-template-columns: 72px 252px minmax(0, 1fr) 244px; height: 100dvh; background: var(--bg-2); }
.app.no-members { grid-template-columns: 72px 252px minmax(0, 1fr); }

.rail { background: var(--bg-0); padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-sep { width: 32px; height: 2px; border-radius: 2px; background: var(--line); flex: none; }
.rail-item { position: relative; width: 72px; display: flex; justify-content: center; flex: none; }
.rail-btn { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--bg-3); transition: border-radius .18s, background .18s, transform .1s; }
.rail-btn:hover { border-radius: 16px; }
.rail-item.active .rail-btn { border-radius: 16px; }
.rail-btn .server-icon { width: 100% !important; height: 100% !important; border-radius: 0; }
.rail-home { width: 30px; height: 30px; }
.rail-home svg { width: 100%; height: 100%; }
.rail-item.active .rail-btn:has(.rail-home) { background: var(--bg-4); }
.rail-add { color: var(--success); display: grid; place-items: center; }
.rail-item.add .rail-btn { background: var(--bg-2); }
.rail-item.add .rail-btn:hover { background: var(--success); }
.rail-item.add .rail-btn:hover .rail-add { color: #04210f; }
.pill { position: absolute; left: 0; top: 50%; width: 4px; height: 8px; margin-top: -4px; border-radius: 0 4px 4px 0; background: var(--text); transform: scaleY(0); transition: height .18s, transform .18s, margin .18s; }
.rail-item:hover .pill { transform: scaleY(1); }
.rail-item.active .pill { transform: scaleY(1); height: 36px; margin-top: -18px; }
.pill.unread { transform: scaleY(1); }
.rail-badge { position: absolute; right: 12px; bottom: -2px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center; border: 3px solid var(--bg-0); box-sizing: content-box; }
.rail-voice { position: absolute; right: 12px; top: -3px; background: var(--success); color: #04210f; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--bg-0); box-sizing: content-box; }

.sidebar { background: var(--bg-1); display: flex; flex-direction: column; min-height: 0; border-radius: 12px 0 0 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.sidebar-head { height: 48px; flex: none; border-bottom: 1px solid var(--line); display: flex; align-items: center; box-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.server-head { width: 100%; height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-weight: 700; font-size: 15px; transition: background .12s; }
.server-head:hover { background: var(--bg-3); }
.server-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 12px 0 16px; font-weight: 700; }
.sidebar-body { flex: 1; overflow-y: auto; padding: 8px 8px 12px; min-height: 0; }
.cat-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--muted); padding: 16px 8px 6px; }
.cat { margin-bottom: 6px; }
.cat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px 4px 0; }
.cat-toggle { display: flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; color: var(--muted); }
.cat-toggle:hover { color: var(--text); }
.cat-toggle .ico { transition: transform .15s; }
.cat-toggle.closed .ico { transform: rotate(-90deg); }
.cat-add { color: var(--muted); opacity: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; }
.cat:hover .cat-add { opacity: 1; }
.cat-add:hover { color: var(--text); background: var(--bg-3); }

.chan { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px; border-radius: 7px; color: var(--muted); cursor: pointer; position: relative; }
.chan:hover { background: var(--bg-3); color: var(--text-2); }
.chan.active { background: var(--bg-4); color: var(--text); }
.chan.unread { color: var(--text); font-weight: 700; }
.chan.unread::before { content: ""; position: absolute; left: -8px; top: 50%; width: 4px; height: 8px; margin-top: -4px; border-radius: 0 4px 4px 0; background: var(--text); }
.chan.live { color: var(--success); }
.chan-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan-gear { display: none; color: var(--muted); width: 22px; height: 22px; place-items: center; border-radius: 5px; }
.chan:hover .chan-gear { display: grid; }
.chan-gear:hover { color: var(--text); background: var(--bg-5); }
.chan.dm { height: 44px; }
.dm-info { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.dm-info small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.dm-call { color: var(--success); }
.voice-user { display: flex; align-items: center; gap: 8px; height: 30px; margin-left: 24px; padding: 0 8px; border-radius: 6px; color: var(--text-2); font-size: 14px; cursor: pointer; }
.voice-user:hover { background: var(--bg-3); }
.vu-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vu-icons { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.live-badge { background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 800; padding: 1px 5px; border-radius: 4px; letter-spacing: .04em; }

.sidebar-foot { flex: none; background: var(--bg-0); border-top: 1px solid var(--line); }
.voice-panel { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; border-bottom: 1px solid var(--line); }
.vp-info { flex: 1; min-width: 0; cursor: pointer; line-height: 1.25; }
.vp-info small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-status { display: flex; align-items: center; gap: 6px; color: var(--success); font-size: 13px; }
.vp-status.connecting { color: var(--warn); }
.vp-actions { display: flex; }
.user-panel { display: flex; align-items: center; gap: 4px; padding: 8px; height: 56px; }
.up-user { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; padding: 4px 6px; border-radius: 8px; text-align: left; }
.up-user:hover { background: var(--bg-3); }
.up-names { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.up-names b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-names small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-actions { display: flex; }
.up-user .status-dot { border-color: var(--bg-0); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg-2); position: relative; border-top: 1px solid var(--line); }
.main-head { height: 48px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); box-shadow: 0 1px 0 rgba(0, 0, 0, .12); z-index: 3; }
.head-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; color: var(--muted); }
.head-left .head-title { color: var(--text); font-size: 16px; white-space: nowrap; }
.head-topic { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sep-v { width: 1px; height: 22px; background: var(--line); flex: none; }
.head-right { display: flex; align-items: center; gap: 4px; }
.head-btn { color: var(--muted); }
.nav-toggle { display: none; }
.empty-main { margin: auto; text-align: center; color: var(--muted); }

.members { background: var(--bg-1); overflow-y: auto; padding: 8px 8px 16px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.members-title { padding: 12px 8px 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.member-group { padding: 16px 8px 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; color: var(--muted); }
.member-group[style*="--gc"] { color: var(--gc); }
.member { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 7px; cursor: pointer; }
.member:hover { background: var(--bg-3); }
.member.dim { opacity: .5; }
.member.dim:hover { opacity: 1; }
.member-info { min-width: 0; line-height: 1.2; }
.member-name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-info small { color: var(--muted); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================================================================
   INÍCIO / AMIGOS
   =================================================================== */
.home-tabs { display: flex; align-items: center; gap: 6px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.home-title { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-right: 4px; white-space: nowrap; }
.home-tab { padding: 4px 12px; border-radius: 6px; color: var(--text-2); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.home-tab:hover { background: var(--bg-4); }
.home-tab.active { background: var(--bg-5); color: var(--text); }
.home-tab.add { background: var(--accent); color: var(--accent-ink); margin-left: 6px; }
.home-tab.add.active { background: var(--accent-soft); color: var(--accent); }
.home-content { flex: 1; overflow-y: auto; padding: 8px 24px 24px; }
.list-title { font-size: 12px; font-weight: 800; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; padding: 16px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.friend-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 9px; border-top: 1px solid transparent; cursor: pointer; }
.friend-row:hover { background: var(--bg-3); }
.friend-info { flex: 1; min-width: 0; line-height: 1.25; }
.friend-info small { color: var(--muted); display: block; }
.friend-actions { display: flex; gap: 8px; }
.circle-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-1); color: var(--text-2); }
.circle-btn:hover { color: var(--text); background: var(--bg-5); }
.circle-btn.ok:hover { color: var(--success); } .circle-btn.no:hover { color: var(--danger); }
.add-friend { max-width: 640px; padding-top: 20px; }
.add-friend h2 { margin: 0 0 6px; }
.add-friend > p { color: var(--muted); margin: 0 0 16px; }
.add-row { display: flex; gap: 10px; }
.add-msg { margin: 12px 0; font-size: 14px; min-height: 20px; }
.add-msg.ok { color: var(--success); } .add-msg.err { color: var(--danger); }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--bg-0); border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; color: var(--muted); }
.search-box input { border: 0; background: none; padding: 7px 0; box-shadow: none !important; width: 180px; }
.search-box.wide { margin-bottom: 12px; } .search-box.wide input { width: 100%; }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty h3 { margin: 10px 0 0; color: var(--text); }
.empty p { margin: 0; max-width: 360px; }

/* ===================================================================
   CHAT
   =================================================================== */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.chat.dragging::after { content: "Solte os arquivos para anexar"; position: absolute; inset: 8px; z-index: 20; display: grid; place-items: center; font-size: 20px; font-weight: 700; border: 3px dashed var(--accent); border-radius: 14px; background: rgba(8, 10, 18, .78); color: var(--accent); }
.msg-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: 12px; }
.msg-list { display: flex; flex-direction: column; min-height: 100%; justify-content: flex-end; }
.chat-start { padding: 28px 16px 12px 16px; }
.chat-start-ico { width: 68px; height: 68px; border-radius: 50%; background: var(--bg-4); display: grid; place-items: center; margin-bottom: 10px; color: var(--text); }
.chat-start h2 { margin: 0 0 4px; font-size: 28px; letter-spacing: -.02em; }
.chat-start p { margin: 0; color: var(--muted); }
.day-sep { display: flex; align-items: center; margin: 16px 16px 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.day-sep span { padding: 0 10px; }
.new-sep { display: flex; align-items: center; margin: 10px 16px 2px; color: var(--danger); font-size: 12px; font-weight: 800; }
.new-sep::before, .new-sep::after { content: ""; flex: 1; height: 1px; background: var(--danger); opacity: .6; }
.new-sep span { padding: 0 8px; text-transform: uppercase; letter-spacing: .04em; }

.msg { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); padding: 3px 48px 3px 16px; margin-top: 14px; }
.msg.compact { margin-top: 0; }
.msg:hover { background: rgba(255, 255, 255, .025); }
:root[data-theme="light"] .msg:hover { background: rgba(0, 0, 0, .03); }
.msg.mentioned { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.msg.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: var(--accent-soft); } }
.msg-reply { grid-column: 2; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 2px; cursor: pointer; min-width: 0; position: relative; }
.msg-reply::before { content: ""; position: absolute; left: -36px; top: 8px; width: 28px; height: 12px; border-left: 2px solid var(--bg-5); border-top: 2px solid var(--bg-5); border-top-left-radius: 8px; }
.msg-reply:hover .reply-text { color: var(--text); }
.reply-name { font-weight: 700; color: var(--text-2); white-space: nowrap; }
.reply-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-deleted { font-style: italic; display: inline-flex; gap: 6px; align-items: center; }
.msg-avatar { grid-column: 1; grid-row: 2; padding-top: 2px; cursor: pointer; }
.msg-gutter { grid-column: 1; grid-row: 2; font-size: 11px; color: var(--muted); text-align: right; padding-right: 14px; line-height: 22px; visibility: hidden; align-self: start; }
.msg:hover .msg-gutter { visibility: visible; }
.msg-body { grid-column: 2; grid-row: 2; min-width: 0; }
.msg-head { display: flex; align-items: baseline; gap: 8px; line-height: 1.25; }
.msg-author { font-weight: 700; cursor: pointer; font-size: 15.5px; }
.msg-author:hover { text-decoration: underline; }
.msg-time { color: var(--muted); font-size: 12px; }
.pin-flag { color: var(--warn); display: inline-flex; align-self: center; }
.msg-content { word-wrap: break-word; overflow-wrap: anywhere; white-space: normal; color: var(--text-2); line-height: 1.5; }
.msg-content.jumbo { font-size: 40px; line-height: 1.2; }
.msg-content blockquote { margin: 2px 0; padding: 0 10px; border-left: 4px solid var(--bg-5); color: var(--muted); }
.msg-content pre { background: var(--bg-0); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; margin: 4px 0; max-width: 640px; }
.msg-content pre code { background: none; padding: 0; white-space: pre; }
.msg-content .edited { color: var(--muted); font-size: 11px; }
.spoiler { background: var(--bg-5); color: transparent; border-radius: 4px; cursor: pointer; padding: 0 3px; user-select: none; }
.spoiler.revealed { background: var(--bg-3); color: inherit; user-select: auto; }
.mention { background: var(--accent-soft); color: var(--accent); padding: 0 3px; border-radius: 4px; font-weight: 600; cursor: pointer; }
.mention.me { background: rgba(255, 138, 61, .3); }
.mention.channel { background: rgba(56, 189, 248, .14); color: var(--cyan); }
.msg-system { display: flex; align-items: center; gap: 10px; padding: 6px 48px 6px 28px; margin-top: 8px; color: var(--muted); font-size: 14px; }
.msg-system .ico { color: var(--success); }
.msg-system.call .ico { color: var(--cyan); }
.msg-system b { color: var(--text); cursor: pointer; }
.msg-system time { font-size: 12px; }

.attachments { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; align-items: flex-start; }
.att-img { max-width: min(440px, 100%); max-height: 340px; border-radius: 10px; cursor: zoom-in; background: var(--bg-3); }
.att-video { max-width: min(480px, 100%); max-height: 340px; border-radius: 10px; background: #000; }
.att-audio { width: min(380px, 100%); }
.att-file { display: flex; align-items: center; gap: 12px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; color: var(--text); min-width: 260px; max-width: 420px; text-decoration: none !important; }
.att-file:hover { background: var(--bg-4); }
.att-file > div { flex: 1; min-width: 0; }
.att-name { font-weight: 600; color: var(--cyan); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-size { color: var(--muted); font-size: 12px; }

.reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.reaction { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 8px; background: var(--bg-3); border: 1px solid transparent; font-size: 14px; height: 26px; }
.reaction:hover { border-color: var(--bg-5); }
.reaction.mine { background: var(--accent-soft); border-color: var(--accent); }
.reaction .r-count { font-size: 13px; font-weight: 700; color: var(--text-2); }
.reaction.mine .r-count { color: var(--accent); }
.reaction.add { color: var(--muted); padding: 0 7px; opacity: 0; }
.msg:hover .reaction.add { opacity: 1; }

.msg-tools { position: absolute; right: 16px; top: -16px; display: none; background: var(--bg-3); border: 1px solid var(--line); border-radius: 9px; padding: 2px; box-shadow: var(--shadow); z-index: 4; }
.msg:hover .msg-tools, .msg:focus-within .msg-tools { display: flex; }
.tool { width: 30px; height: 28px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); font-size: 16px; }
.tool:hover { background: var(--bg-5); color: var(--text); }
.tool.danger:hover { color: var(--danger); }
.edit-box { margin: 2px 0; }
.edit-input { background: var(--bg-3); min-height: 40px; max-height: 40vh; resize: none; }
.edit-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.edit-hint a { cursor: pointer; }

.jump-latest { position: absolute; left: 50%; transform: translateX(-50%); bottom: 96px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 20px; display: flex; align-items: center; gap: 6px; box-shadow: var(--shadow); z-index: 6; }
.composer-wrap { padding: 0 16px 6px; position: relative; flex: none; }
.reply-bar { display: flex; align-items: center; justify-content: space-between; background: var(--bg-3); color: var(--text-2); padding: 6px 8px 6px 14px; border-radius: 10px 10px 0 0; font-size: 13px; }
.reply-bar + .composer { border-radius: 0 0 10px 10px; }
.attach-bar { display: flex; gap: 10px; flex-wrap: wrap; padding: 10px; background: var(--bg-3); border-radius: 10px 10px 0 0; border-bottom: 1px solid var(--line); }
.att-chip { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 6px 8px; max-width: 240px; }
.att-chip img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.att-chip-info { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.att-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.att-chip-info small { color: var(--muted); }
.attach-bar + .composer { border-radius: 0 0 10px 10px; }
.composer { display: flex; align-items: flex-end; gap: 2px; background: var(--bg-3); border-radius: 10px; padding: 4px 6px; transition: box-shadow .15s; }
.composer:focus-within { box-shadow: 0 0 0 2px var(--accent-soft); }
.composer.sending { opacity: .75; }
.composer.locked { justify-content: center; padding: 14px; color: var(--muted); }
.locked-note { display: flex; gap: 8px; align-items: center; }
.composer .icon-btn { height: 38px; width: 38px; }
.composer-input { flex: 1; border: 0; background: none; box-shadow: none !important; padding: 9px 6px; resize: none; max-height: 40vh; min-height: 38px; line-height: 1.45; }
.composer .send { color: var(--accent); }
.typing-bar { height: 22px; font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.dots { display: inline-flex; gap: 3px; } .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-2); animation: bounce 1.2s infinite; } .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.mention-box { position: absolute; left: 16px; right: 16px; bottom: 100%; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 8; margin-bottom: -2px; }
.mention-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 6px 8px; border-radius: 6px; }
.mention-opt.active, .mention-opt:hover { background: var(--bg-5); }
.mention-opt small { color: var(--muted); margin-left: auto; }
.mention-all { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }

html.compact .msg { margin-top: 6px; } html.compact .msg.compact { margin-top: 0; }
html.compact .msg-avatar .avatar { width: 28px !important; height: 28px !important; font-size: 11px !important; }
html.compact .msg { grid-template-columns: 44px minmax(0, 1fr); }

/* ===================================================================
   PALCO DE CHAMADA
   =================================================================== */
.stage { flex: 1; display: flex; flex-direction: column; min-height: 0; background: radial-gradient(900px 500px at 50% -10%, rgba(56, 189, 248, .07), transparent 60%), var(--bg-0); position: relative; }
.dm-stage { flex: none; height: 48%; min-height: 250px; max-height: 62%; display: flex; border-bottom: 1px solid var(--line); }
.dm-stage .stage { border-radius: 0; }
.stage-lobby { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px; }
.stage-lobby h2 { margin: 6px 0 0; font-size: 26px; letter-spacing: -.02em; }
.stage-lobby p { margin: 0; color: var(--muted); }
.lobby-icon { width: 84px; height: 84px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.lobby-people { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin: 10px 0; }
.lobby-person { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; }
.lobby-person.speaking .avatar { box-shadow: 0 0 0 3px var(--success); }
.stage.compact .stage-lobby { flex-direction: row; flex-wrap: wrap; gap: 16px; }
.stage.compact .stage-lobby h2 { font-size: 20px; }
.stage.compact .lobby-icon { width: 56px; height: 56px; }

.tiles { flex: 1; min-height: 0; padding: 14px; gap: 12px; overflow: auto; }
.tiles.grid { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); align-content: stretch; }
.tiles.focus { display: grid; grid-template-columns: minmax(0, 1fr) 210px; grid-template-rows: repeat(var(--n, 1), minmax(100px, 1fr)); }
.tile { position: relative; background: var(--bg-2); border-radius: 14px; overflow: hidden; display: grid; place-items: center; min-height: 0; min-width: 0; cursor: pointer; border: 1px solid var(--line); transition: box-shadow .15s, border-color .15s; }
.tile.focused { grid-column: 1; grid-row: 1 / span var(--n, 1); }
.tile.speaking { box-shadow: 0 0 0 3px var(--success); border-color: transparent; }
.tile video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.tile.camera video { object-fit: cover; }
.tile.camera.self video { transform: scaleX(-1); }
.tile.user { background: radial-gradient(circle at 50% 30%, var(--bg-4), var(--bg-2)); }
.tile.user .avatar { transition: box-shadow .12s; }
.tile.user.speaking .avatar { box-shadow: 0 0 0 4px var(--success); }
.tile-label { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, .62); color: #fff; padding: 3px 9px; border-radius: 7px; font-size: 13px; font-weight: 600; max-width: calc(100% - 20px); backdrop-filter: blur(6px); }
.tile-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-ico { display: inline-flex; color: var(--danger); }
.tile-actions { position: absolute; right: 8px; top: 8px; display: none; gap: 6px; }
.tile:hover .tile-actions { display: flex; }
.tile-btn { width: 30px; height: 30px; border-radius: 8px; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.tile-btn:hover { background: rgba(0, 0, 0, .85); }
.stage-controls { flex: none; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 12px 16px 16px; }
.ctrl { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-4); color: var(--text); transition: background .15s, transform .08s; }
.ctrl:hover { background: var(--bg-5); }
.ctrl:active { transform: scale(.94); }
.ctrl.danger { background: rgba(255, 93, 108, .2); color: var(--danger); }
.ctrl.live { background: var(--success); color: #04210f; }
.ctrl.hangup { background: var(--danger); color: #fff; width: 64px; border-radius: 26px; }
.ctrl.hangup:hover { filter: brightness(1.12); }
.ctrl.hangup .ico { transform: rotate(135deg); }
.stage.compact .tiles { padding: 8px; gap: 8px; }
.stage.compact .ctrl { width: 44px; height: 44px; } .stage.compact .ctrl.hangup { width: 56px; }
.stage.compact .stage-controls { padding: 6px 10px 10px; }

/* ===================================================================
   MODAIS, MENUS, TOASTS
   =================================================================== */
#layers { position: fixed; inset: 0; pointer-events: none; z-index: 1000; }
#layers > * { pointer-events: auto; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(2, 3, 8, .72); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .16s; backdrop-filter: blur(3px); }
.modal-backdrop.in { opacity: 1; }
.modal { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); width: 100%; max-height: min(90vh, 900px); display: flex; flex-direction: column; transform: scale(.96); transition: transform .16s; overflow: hidden; }
.modal-backdrop.in .modal { transform: none; }
.modal.sm { max-width: 400px; } .modal.md { max-width: 520px; } .modal.lg { max-width: 720px; } .modal.xl { max-width: 960px; height: min(86vh, 720px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 6px; }
.modal-head h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.modal-x { position: absolute; right: 12px; top: 12px; z-index: 5; }
.modal-head .modal-x { position: static; }
.modal-body { padding: 14px 22px 22px; overflow-y: auto; min-height: 0; flex: 1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: var(--bg-1); border-top: 1px solid var(--line); }
.modal-foot.inline { background: none; border: 0; padding: 14px 0 0; }
.modal-text { color: var(--text-2); margin: 0 0 14px; }
.modal.lightbox { max-width: 94vw; max-height: 94vh; background: transparent; border: 0; box-shadow: none; width: auto; }
.modal.lightbox .modal-body { padding: 0; overflow: visible; }
.lightbox-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox-img { max-width: 92vw; max-height: 80vh; border-radius: 10px; box-shadow: var(--shadow); }
.lightbox-bar { display: flex; align-items: center; gap: 12px; color: #fff; }
.modal.settings { padding: 0; }
.modal.settings .modal-body { padding: 0; overflow: hidden; display: flex; }
.modal.settings .modal-x { background: var(--bg-3); border: 1px solid var(--line); }

.tabbed { display: grid; grid-template-columns: 230px minmax(0, 1fr); width: 100%; min-height: 0; }
.tab-side { background: var(--bg-1); padding: 22px 12px; border-right: 1px solid var(--line); overflow-y: auto; }
.tab-title { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0 10px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-nav { display: flex; flex-direction: column; gap: 2px; }
.tab-btn { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 7px; color: var(--text-2); font-weight: 600; font-size: 14.5px; }
.tab-btn:hover { background: var(--bg-3); }
.tab-btn.active { background: var(--bg-5); color: var(--text); }
.tab-btn.danger { color: var(--danger); }
.tab-sep { height: 1px; background: var(--line); margin: 8px 6px; }
.tab-content { padding: 30px 36px; overflow-y: auto; min-height: 0; }
.tab-content h2 { margin: 0 0 18px; font-size: 22px; letter-spacing: -.01em; }
.tab-content h3 { margin: 22px 0 10px; font-size: 15px; }
.tab-content h4 { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.perm-list { display: flex; flex-direction: column; margin-bottom: 14px; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.perm-row b { display: block; font-size: 14.5px; } .perm-row small { color: var(--muted); display: block; line-height: 1.35; }
.img-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; flex: none; }
.img-pick-preview { background: var(--bg-3); border: 2px dashed var(--bg-5); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.img-pick-preview.round { border-radius: 50%; }
.img-pick-preview:not(.round) { border-radius: 16px; }
.img-pick-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-pick-actions { display: flex; gap: 6px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; border-radius: 14px; background: var(--bg-3); border: 1px solid var(--line); text-align: left; transition: transform .1s, border-color .15s, background .15s; }
.choice:hover { border-color: var(--accent); background: var(--bg-4); transform: translateY(-2px); }
.choice small { color: var(--muted); line-height: 1.35; }
.choice-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 6px; }
.choice-ico.alt { background: rgba(56, 189, 248, .14); color: var(--cyan); }
.invite-card { display: flex; align-items: center; gap: 14px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.invite-info { flex: 1; display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.invite-info small { color: var(--muted); display: flex; align-items: center; gap: 4px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--offline); } .dot.online { background: var(--online); }
.invite-result { margin-top: 14px; }
.copy-row { display: flex; gap: 8px; margin: 14px 0 6px; }
.invite-out { margin-top: 14px; }
.invite-list h4 { margin: 18px 0 6px; font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.invite-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.invite-row small { color: var(--muted); }
.type-pick { display: grid; gap: 8px; }
.type-opt { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; background: var(--bg-3); border: 1px solid transparent; text-align: left; }
.type-opt small { display: block; color: var(--muted); }
.type-opt:hover { background: var(--bg-4); } .type-opt.active { border-color: var(--accent); background: var(--accent-soft); }
.roles-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; }
.role-list { display: flex; flex-direction: column; gap: 2px; }
.role-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; text-align: left; color: var(--text-2); }
.role-item:hover { background: var(--bg-3); } .role-item.active { background: var(--bg-5); color: var(--text); }
.role-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.role-check { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.role-check:hover { background: var(--bg-4); }
.member-table { display: flex; flex-direction: column; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.member-row small { color: var(--muted); display: block; }
.danger-zone { margin-top: 30px; padding: 16px; border: 1px solid rgba(255, 93, 108, .4); border-radius: 12px; background: rgba(255, 93, 108, .05); }
.danger-zone h3 { margin-top: 0; color: var(--danger); }
.account-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; background: var(--bg-3); }
.account-card small { display: block; color: var(--muted); }
.profile-banner { height: 90px; border-radius: 10px; margin-bottom: 14px; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.theme-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; border: 2px solid var(--line); font-weight: 600; background: var(--bg-3); }
.theme-card.active { border-color: var(--accent); }
.theme-preview { display: grid; grid-template-columns: 14% 26% 1fr; gap: 4px; height: 64px; border-radius: 8px; padding: 6px; }
.theme-preview i { border-radius: 4px; display: block; }
.theme-card.dark .theme-preview { background: #131726; } .theme-card.dark i:nth-child(1) { background: #080a12; } .theme-card.dark i:nth-child(2) { background: #0e111c; } .theme-card.dark i:nth-child(3) { background: #1a1f32; }
.theme-card.midnight .theme-preview { background: #0a0c14; } .theme-card.midnight i:nth-child(1) { background: #000; } .theme-card.midnight i:nth-child(2) { background: #05060b; } .theme-card.midnight i:nth-child(3) { background: #10131f; }
.theme-card.light .theme-preview { background: #f8f6f3; } .theme-card.light i:nth-child(1) { background: #dedad4; } .theme-card.light i:nth-child(2) { background: #ece9e4; } .theme-card.light i:nth-child(3) { background: #ddd9d1; }
.mic-test { display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; }
.meter { flex: 1; height: 10px; border-radius: 5px; background: var(--bg-4); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--success), var(--warn) 70%, var(--danger)); transition: width .06s; }
.cam-preview { width: 100%; max-width: 360px; border-radius: 12px; margin-top: 10px; background: #000; transform: scaleX(-1); }

.profile-modal { padding: 0; } .profile-modal .modal-body { padding: 0; }
.profile { position: relative; }
.profile > .profile-banner { height: 100px; margin: 0; border-radius: 0; }
.profile-head { position: absolute; left: 22px; top: 56px; }
.profile-head .avatar { border: 6px solid var(--bg-2); box-sizing: content-box; }
.profile-head .status-dot { border-color: var(--bg-2); width: 22px; height: 22px; right: 2px; bottom: 2px; }
.profile-main { padding: 52px 22px 22px; }
.profile-main h2 { margin: 0; font-size: 22px; }
.custom-status { margin: 8px 0 0; color: var(--text-2); }
.profile-sec { margin-top: 14px; padding: 12px 14px; background: var(--bg-1); border-radius: 10px; }
.profile-sec h4 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.profile-sec p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 1200; pointer-events: none; }
.toast { pointer-events: auto; max-width: 380px; padding: 12px 16px; border-radius: 10px; background: var(--bg-4); border: 1px solid var(--bg-5); box-shadow: var(--shadow); transform: translateX(30px); opacity: 0; transition: .22s; cursor: pointer; border-left: 4px solid var(--cyan); }
.toast.in { transform: none; opacity: 1; }
.toast.success { border-left-color: var(--success); } .toast.error { border-left-color: var(--danger); } .toast.warn { border-left-color: var(--warn); }

.popover { position: fixed; z-index: 1100; background: var(--bg-3); border: 1px solid var(--bg-5); border-radius: 10px; box-shadow: var(--shadow); max-width: calc(100vw - 16px); }
.menu { padding: 6px; min-width: 200px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 6px; text-align: left; font-size: 14px; color: var(--text-2); }
.menu-item:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); }
.menu-item.danger { color: var(--danger); } .menu-item.danger:hover { background: var(--danger); color: #fff; }
.menu-item small { margin-left: auto; color: var(--muted); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-title { padding: 6px 10px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.menu-note { padding: 8px 10px; font-size: 12px; color: var(--muted); max-width: 260px; line-height: 1.4; }
.screen-menu { min-width: 250px; }
.role-picker { padding: 6px; min-width: 220px; max-height: 320px; overflow-y: auto; }
.pick-pop { width: 320px; padding: 10px; }
.pick-pop input { margin: 6px 0 8px; }
.pick-list { max-height: 280px; overflow-y: auto; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px; width: 100%; text-align: left; }
.pick-row:hover { background: var(--bg-5); } .pick-row small { margin-left: auto; color: var(--muted); }
.search-pop { width: min(460px, 92vw); padding: 10px; }
.search-pop .results { max-height: 50vh; margin-top: 8px; }
.results { overflow-y: auto; }
.result-msg { padding: 10px; border-radius: 8px; cursor: pointer; }
.result-msg:hover { background: var(--bg-4); }
.result-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; } .result-head time { color: var(--muted); font-size: 12px; }
.result-chan { font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.result-att { color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.emoji-picker { width: 340px; padding: 8px; }
.emoji-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.emoji-tab { width: 36px; height: 32px; border-radius: 6px; font-size: 18px; opacity: .6; } .emoji-tab:hover, .emoji-tab.active { background: var(--bg-5); opacity: 1; }
.emoji-title { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 2px 4px 6px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 232px; overflow-y: auto; }
.emoji-btn { height: 38px; border-radius: 6px; font-size: 22px; } .emoji-btn:hover { background: var(--bg-5); }

.ring-card { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 1300; display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 16px; background: var(--bg-3); border: 1px solid var(--accent); box-shadow: 0 0 0 6px var(--accent-soft), var(--shadow); animation: ringpulse 1.4s ease-in-out infinite; }
@keyframes ringpulse { 50% { box-shadow: 0 0 0 12px rgba(255, 138, 61, .05), var(--shadow); } }
.ring-info { display: flex; flex-direction: column; line-height: 1.25; } .ring-info small { color: var(--muted); }
.ring-actions { display: flex; gap: 10px; margin-left: 10px; }
.ring-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.ring-btn.accept { background: var(--success); color: #04210f; } .ring-btn.decline { background: var(--danger); } .ring-btn.decline .ico { transform: rotate(135deg); }

/* ===================================================================
   RESPONSIVO
   =================================================================== */
.scrim { display: none; }
@media (max-width: 1180px) {
  .app { grid-template-columns: 72px 220px minmax(0, 1fr) 208px; }
  .app.no-members { grid-template-columns: 72px 220px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app, .app.no-members { grid-template-columns: 72px 220px minmax(0, 1fr); }
  .members, .app.no-members .members { display: block; position: fixed; right: 0; top: 0; bottom: 0; width: 260px; z-index: 40; box-shadow: var(--shadow); transform: translateX(105%); transition: transform .2s; }
  .app.members-open .members { transform: none; }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; overflow-y: auto; }
  .auth-hero { padding: 28px 24px; min-height: 0; } .orbit-art { opacity: .35; } .hero-points { display: none; }
  .auth-card { margin: 18px 0 40px; }
  .app, .app.no-members { grid-template-columns: minmax(0, 1fr); }
  .rail, .sidebar { position: fixed; top: 0; bottom: 0; z-index: 60; transform: translateX(calc(-100% - 90px)); transition: transform .22s; visibility: hidden; }
  .rail { left: 0; width: 72px; } .sidebar { left: 72px; width: min(280px, calc(100vw - 72px)); border-radius: 0; }
  .app.nav-open .rail, .app.nav-open .sidebar { visibility: visible; }
  .app.nav-open .rail, .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 50; }
  .nav-toggle { display: inline-grid; }
  .msg { padding-right: 12px; grid-template-columns: 48px minmax(0, 1fr); } .msg-tools { right: 8px; }
  .modal.xl { height: 92vh; } .tabbed { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .tab-side { padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); } .tab-nav { flex-direction: row; overflow-x: auto; } .tab-title, .tab-sep { display: none; }
  .tab-btn { white-space: nowrap; } .tab-content { padding: 18px; } .roles-layout { grid-template-columns: 1fr; } .row2 { grid-template-columns: 1fr; }
  .tiles.focus { grid-template-columns: 1fr; grid-template-rows: 2fr repeat(var(--n), 90px); } .tile.focused { grid-row: 1; }
  .head-topic, .sep-v { display: none; } .home-content { padding: 8px 12px; } .choice-grid { grid-template-columns: 1fr; }
  .dm-stage { height: 55%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
