/* Meu Chat - tema escuro proprio */
:root {
  --bg: #111b21;
  --rail: #1d282f;
  --panel: #202c33;
  --input: #2a3942;
  --hover: #202c33;
  --active: #2a3942;
  --chat-bg: #0b141a;
  --in: #202c33;
  --out: #005c4b;
  --text: #e9edef;
  --muted: #8696a0;
  --border: #222d34;
  --accent: #00a884;
  --accent-2: #06cf9c;
  --accent-soft: #0a332c;
  --danger: #f15c6d;
  --link: #53bdeb;
  --radius: 8px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14.5px/1.4 "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#app { height: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
* { scrollbar-width: thin; scrollbar-color: #374248 transparent; }

/* Carregando */
.boot { height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.boot p { margin: 0; }
.bar { width: 240px; height: 4px; background: var(--panel); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 40%; background: var(--accent); animation: load 1.2s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* Botoes */
.btn { border: 1px solid #3b4a54; background: transparent; padding: 9px 18px; border-radius: 24px; font-weight: 500; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #111b21; }
.btn.primary:hover { background: var(--accent-2); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.small { padding: 5px 14px; font-size: 13.5px; }
.icon-btn { background: none; border: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #aebac1; }
.icon-btn:hover { background: rgba(255,255,255,.06); }
.icon-btn:disabled { opacity: .45; cursor: default; }
.link { background: none; border: 0; color: var(--accent); margin-top: 14px; }
.error { background: rgba(241, 92, 109, .12); color: #ffb3bd; border-radius: var(--radius); padding: 9px 12px; font-size: 13.5px; }

/* Login */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; position: relative;
  background: var(--chat-bg) url("img/bg.svg") repeat; }
.auth-top { position: fixed; inset: 0 0 auto; height: 200px; background: linear-gradient(#0a332c, transparent); pointer-events: none; }
.auth-card { position: relative; width: 100%; max-width: 420px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 18px; padding: 32px 28px; box-shadow: 0 20px 50px rgba(0,0,0,.35); text-align: center; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 22px; font-weight: 700; margin-bottom: 22px; }
.auth-card h1 { font-size: 20px; font-weight: 600; }
.auth-card > p { margin: 8px 0 22px; }
.auth form { display: grid; gap: 14px; text-align: left; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
label input { background: var(--input); border: 1px solid transparent; border-radius: var(--radius); padding: 11px 12px; outline: none; font-size: 15px; }
label input:focus { border-color: var(--accent); }
.auth .btn.primary { margin-top: 4px; padding: 11px; }

/* Layout principal */
.layout { height: 100%; display: grid; grid-template-columns: 64px minmax(320px, 30%) 1fr; }
.rail { background: var(--rail); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; padding: 10px 0; gap: 6px; }
.rail-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: #aebac1; display: grid; place-items: center; position: relative; }
.rail-btn:hover { background: rgba(255,255,255,.06); }
.rail-btn.on { background: rgba(255,255,255,.1); color: var(--text); }
.rail-spacer { flex: 1; }
.rail-me { margin-top: 6px; }

.panel { background: var(--bg); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 8px 20px; min-height: 62px; }
.panel-head h1 { font-size: 22px; font-weight: 700; }
.head-actions { display: flex; gap: 4px; }
.panel-hint { color: var(--muted); padding: 0 20px 12px; margin: 0; font-size: 13.5px; }

.search { margin: 4px 12px 8px; position: relative; }
.search input { width: 100%; background: var(--panel); border: 0; border-radius: var(--radius); padding: 9px 12px 9px 44px; outline: none; }
.search input::placeholder { color: var(--muted); }
.search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }

.chips { display: flex; gap: 8px; padding: 4px 12px 10px; overflow-x: auto; }
.chip { background: var(--panel); border: 0; color: var(--muted); padding: 6px 13px; border-radius: 999px; white-space: nowrap; font-size: 14px; }
.chip:hover { background: var(--input); }
.chip.on { background: var(--accent-soft); color: #d9fdd3; }

.list { overflow-y: auto; flex: 1; padding: 0 0 12px; }
.list .empty { color: var(--muted); text-align: center; padding: 40px 20px; }
.list-label { color: var(--accent); padding: 16px 20px 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.row { display: flex; align-items: center; gap: 13px; padding: 0 14px; margin: 0 6px; height: 72px; border-radius: var(--radius); cursor: pointer; }
.row:hover { background: var(--hover); }
.row.active { background: var(--active); }
.row.sub { height: 60px; padding-left: 34px; }
.row-main { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; border-bottom: 1px solid var(--border); }
.row:hover .row-main, .row.active .row-main { border-bottom-color: transparent; }
.row-top, .row-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row-name { font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-time { font-size: 12px; color: var(--muted); flex: none; }
.row-time.unread { color: var(--accent); }
.row-preview { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; margin-top: 2px; }
.badge { background: var(--accent); color: #111b21; font-size: 12px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tag { color: var(--muted); font-size: 12.5px; flex: none; }

.avatar { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; flex: none; user-select: none; }
.square-av .avatar { border-radius: 14px; }
.square-av.big .avatar { border-radius: 22px; }
.avatar.ann { background: var(--accent-soft); color: var(--accent); }

/* Area principal */
.main { min-width: 0; min-height: 0; background: var(--panel); display: flex; }
.welcome { margin: auto; text-align: center; max-width: 460px; padding: 24px; color: var(--muted); }
.welcome h2 { color: var(--text); font-weight: 400; font-size: 30px; margin: 22px 0 10px; }
.welcome p { margin: 0; line-height: 1.6; }

/* Conversa */
.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--chat-bg); }
.chat-head { background: var(--panel); display: flex; align-items: center; gap: 12px; padding: 0 12px 0 16px; height: 60px; flex: none; }
.chat-head .back { display: none; }
.chat-title { flex: 1; min-width: 0; }
.chat-name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.messages { flex: 1; overflow-y: auto; background: var(--chat-bg) url("img/bg.svg") repeat; background-size: 240px; }
.msg-inner { padding: 14px 6% 10px; display: flex; flex-direction: column; min-height: 100%; justify-content: flex-end; }
.sys { display: flex; justify-content: center; margin: 6px 0; }
.sys span { background: var(--panel); color: var(--muted); font-size: 12.5px; padding: 5px 12px; border-radius: 7.5px; box-shadow: 0 1px .5px rgba(0,0,0,.13); text-align: center; display: inline-flex; gap: 6px; align-items: center; }
.sys.day { margin: 12px 0 8px; }
.sys.day span { text-transform: none; }
.sys.notice span { background: #182229; color: #ffd279; max-width: 520px; }

.bubble-row { display: flex; margin-top: 2px; }
.bubble-row.first { margin-top: 10px; }
.bubble-row.mine { justify-content: flex-end; }
.bubble { max-width: min(65%, 560px); background: var(--in); border-radius: 7.5px; padding: 6px 8px 8px 9px; position: relative;
  box-shadow: 0 1px .5px rgba(0,0,0,.13); word-wrap: break-word; white-space: pre-wrap; }
.mine .bubble { background: var(--out); }
.first .bubble { border-top-left-radius: 0; }
.mine.first .bubble { border-top-left-radius: 7.5px; border-top-right-radius: 0; }
.first .bubble::before { content: ""; position: absolute; top: 0; left: -8px; border: 8px solid transparent; border-top-color: var(--in); border-right-color: var(--in); border-width: 0 8px 10px 0; }
.mine.first .bubble::before { left: auto; right: -8px; border-color: transparent; border-top-color: var(--out); border-left-color: var(--out); border-width: 0 0 10px 8px; }
.sender { font-size: 12.8px; font-weight: 500; margin-bottom: 2px; }
.text { font-size: 14.2px; }
.meta { float: right; margin: 8px 0 -4px 10px; font-size: 11px; color: rgba(233,237,239,.6); display: inline-flex; align-items: center; gap: 3px; position: relative; top: 2px; }
.bubble.deleted .text { color: var(--muted); font-style: italic; }
.tick { color: rgba(233,237,239,.6); }
.tick.read { color: var(--link); }

.composer { background: var(--panel); display: flex; align-items: center; gap: 8px; padding: 8px 14px; min-height: 62px; flex: none; }
.composer-input { flex: 1; background: var(--input); border: 0; border-radius: var(--radius); padding: 11px 14px; outline: none; font-size: 15px; }
.composer-input::placeholder { color: var(--muted); }
.composer .send { color: var(--muted); }
.composer .send:not(:disabled) { color: var(--accent); }
.composer.readonly { justify-content: center; color: var(--muted); }
.composer.readonly b { color: var(--accent); font-weight: 500; }
.composer.invite { justify-content: center; gap: 14px; color: var(--muted); }

/* Comunidade */
.community { background: var(--bg); overflow-y: auto; }
.community-hero { text-align: center; padding: 34px 20px 22px; background: var(--panel); }
.community-hero .square-av { display: inline-block; margin-bottom: 14px; }
.community-hero h2 { font-size: 24px; font-weight: 500; }
.community-hero p { margin: 6px 0 0; }
.community-hero .topic { color: var(--text); max-width: 520px; margin: 12px auto 0; }
.community-body { padding: 10px 0 30px; max-width: 760px; width: 100%; margin: 0 auto; }
.community-body h3 { color: var(--accent); font-size: 14px; font-weight: 500; padding: 18px 20px 8px; }
.community-body .error { margin: 12px 20px; }
.cards { overflow: visible; }

/* Janela */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal { background: var(--panel); border-radius: 14px; padding: 24px; width: 100%; max-width: 400px; display: grid; gap: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.modal h2 { font-size: 19px; font-weight: 500; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Admin */
.owner-pill { background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; align-self: center; letter-spacing: .03em; }
.rail-me { position: relative; }
.owner-dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--rail); }
a.rail-btn { text-decoration: none; }
.rail-btn.admin { color: var(--accent); }

/* Menu "Novo" */
.menu-anchor { position: relative; align-items: center; }
.menu-bg { position: fixed; inset: 0; z-index: 5; }
.menu { position: absolute; right: 0; top: 44px; z-index: 6; background: #233138; border-radius: 10px; padding: 6px 0; min-width: 210px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.menu button { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; padding: 10px 18px; text-align: left; font-size: 14.5px; }
.menu button:hover { background: rgba(255,255,255,.06); }
.menu svg { color: var(--muted); }

/* Cabecalho clicavel da conversa */
.chat-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; text-align: left; padding: 0; }

/* Formularios das janelas */
.modal.wide { max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal .small, .small { font-size: 13.5px; margin: -6px 0 0; }
select { background: var(--input); color: var(--text); border: 1px solid transparent; border-radius: var(--radius); padding: 10px 12px; font: inherit; font-size: 15px; }
.field { display: grid; gap: 6px; }
.field-label { font-size: 13px; color: var(--muted); }
.field-error { color: #ffb3bd; font-size: 13px; }
.picker { display: grid; gap: 8px; }
.picker-row { display: flex; gap: 8px; }
.picker-row input { flex: 1; min-width: 0; background: var(--input); border: 1px solid transparent; border-radius: var(--radius); padding: 10px 12px; outline: none; }
.picker-row input:focus { border-color: var(--accent); }
.picker-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; background: var(--input); border-radius: 999px; padding: 3px 4px 3px 3px; font-size: 13.5px; }
.pchip button { background: none; border: 0; color: var(--muted); font-size: 17px; line-height: 1; padding: 0 6px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--text); font-size: 14.5px; cursor: pointer; }
.switch-row span { display: grid; gap: 2px; }
.switch-row b { font-weight: 500; }
.switch-row small { color: var(--muted); font-size: 12.5px; }
.switch { appearance: none; width: 38px; height: 22px; border-radius: 11px; background: #3b4a54; position: relative; flex: none; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #e9edef; transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(16px); }
.btn.danger { border-color: rgba(241,92,109,.5); color: var(--danger); }

/* Painel "Dados do grupo" */
.main.with-drawer { display: grid; grid-template-columns: 1fr minmax(320px, 38%); }
.drawer { background: var(--bg); border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.drawer-head { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 12px; background: var(--panel); flex: none; }
.drawer-head h2 { font-size: 16px; font-weight: 500; }
.drawer-body { overflow-y: auto; flex: 1; padding-bottom: 20px; }
.info-hero { display: grid; justify-items: center; gap: 6px; padding: 26px 20px 20px; background: var(--bg); text-align: center; }
.info-hero .avatar { margin-bottom: 8px; }
.info-hero p { margin: 0; }
.info-card { background: var(--bg); border-top: 8px solid #0c1317; padding: 14px 20px; display: grid; gap: 8px; }
.info-label { color: var(--muted); font-size: 13.5px; }
.editable { display: flex; align-items: center; gap: 8px; border-radius: 6px; }
.editable.name { font-size: 22px; justify-content: center; }
.editable.can { cursor: pointer; }
.editable .pen { color: var(--muted); font-size: 14px; opacity: 0; }
.editable.can:hover .pen { opacity: 1; }
.edit-row { display: flex; gap: 8px; width: 100%; }
.edit-row input { flex: 1; min-width: 0; background: var(--input); border: 1px solid var(--accent); border-radius: var(--radius); padding: 8px 10px; outline: none; }
.members { padding: 14px 8px; }
.members .info-label { padding: 0 12px; }
.member { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; text-align: left; padding: 8px 12px; border-radius: var(--radius); }
.member:hover { background: var(--hover); }
.member.add { color: var(--accent); }
.member-main { flex: 1; min-width: 0; display: grid; }
.member-name { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-sub { color: var(--muted); font-size: 13px; }
.admin-tag { background: var(--accent-soft); color: var(--accent); font-size: 11.5px; padding: 2px 8px; border-radius: 6px; flex: none; }
.member-actions { display: flex; gap: 8px; padding: 2px 12px 10px 64px; flex-wrap: wrap; }
.danger-row { background: none; border: 0; color: var(--danger); text-align: left; padding: 6px 0; font-size: 15px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

/* Lista de transmissao */
.bc-status { clear: both; font-size: 11.5px; color: rgba(233,237,239,.7); border-top: 1px solid rgba(255,255,255,.12); margin-top: 6px; padding-top: 4px; }
.bc-status.warn { color: #ffd279; }
.composer-input:disabled { opacity: .6; }

/* Loja */
.rail-badge { position: absolute; top: 2px; right: 0; background: var(--accent); color: #111b21; font-size: 10.5px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.row.nav { height: 60px; }
.shop-warn { margin: 0 14px 10px; padding: 10px 12px; border-radius: var(--radius); background: rgba(255,210,121,.1); color: #ffd279; font-size: 13px; line-height: 1.45; }
.shop-warn.info { background: rgba(83,189,235,.1); color: var(--link); }
.chat.shop { background: var(--bg); }
.chat-head .btn.small { display: inline-flex; align-items: center; gap: 6px; }
.shop-body { flex: 1; overflow-y: auto; padding: 20px 24px 40px; }
.shop-body.narrow { max-width: 720px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.shop-search { margin: 0 0 16px; max-width: 420px; }
.shop-cat { color: var(--accent); font-size: 14px; font-weight: 500; margin: 18px 0 10px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.pcard { background: var(--panel); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.pimg { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--input); border-radius: inherit; flex: none; }
.pcard .pimg { border-radius: 0; }
.pimg.ph { display: grid; place-items: center; color: var(--muted); }
.pinfo { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pname { font-size: 15px; font-weight: 500; }
.pdesc { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pfoot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 600; font-size: 16px; }
.cart, .manage { display: flex; flex-direction: column; gap: 8px; }
.cart li, .manage li { display: flex; align-items: center; gap: 12px; background: var(--panel); border-radius: 10px; padding: 10px 12px; }
.manage li { cursor: pointer; }
.manage li:hover { background: var(--input); }
.cart .pimg, .manage .pimg { border-radius: 8px; }
.cart-main { flex: 1; min-width: 0; }
.qty { display: flex; align-items: center; gap: 2px; background: var(--input); border-radius: 20px; }
.qty .icon-btn { width: 32px; height: 32px; font-size: 18px; }
.qty span { min-width: 22px; text-align: center; }
.cart-sub { min-width: 86px; text-align: right; font-weight: 500; }
.note input { background: var(--input); border: 1px solid transparent; border-radius: var(--radius); padding: 10px 12px; outline: none; }
.cart-total { display: flex; justify-content: space-between; font-size: 18px; padding: 6px 2px; }
.btn.mp { padding: 13px; font-size: 15.5px; }
.order { background: var(--panel); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; border: 1px solid transparent; }
.order.focus { border-color: var(--accent); }
.order-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.st { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; }
.st.wait { background: rgba(255,210,121,.12); color: #ffd279; }
.st.ok { background: var(--accent-soft); color: var(--accent); }
.st.done { background: rgba(83,189,235,.12); color: var(--link); }
.st.bad { background: rgba(241,92,109,.12); color: var(--danger); }
.order-items li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 2px 0; }
.order-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pupload { display: flex; align-items: center; gap: 12px; }
.pupload img, .pupload .pimg { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }
.pupload label.btn { display: inline-block; color: var(--text); font-size: 13.5px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Usuarios, perfil e convites */
.avatar.photo { object-fit: cover; padding: 0; }
.rail-me { cursor: pointer; }
.ok-msg { background: var(--accent-soft); color: #9ff0d9; border-radius: var(--radius); padding: 9px 12px; font-size: 13.5px; }
.me-card { display: flex; align-items: center; gap: 14px; margin: 0 6px 8px; padding: 12px 14px; background: none; border: 0; border-radius: var(--radius); text-align: left; }
.me-card:hover { background: var(--hover); }
.me-card span { display: grid; gap: 3px; min-width: 0; }
.me-card b { font-weight: 500; font-size: 17px; }
.me-card small { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-form { display: grid; gap: 14px; max-width: 460px; width: 100%; margin: 0 auto; }
.settings-form input:disabled { opacity: .6; }
.photo-edit { display: grid; justify-items: center; gap: 12px; margin-bottom: 6px; }
.photo-actions { display: flex; gap: 8px; }
.photo-actions label.btn { color: var(--text); font-size: 13.5px; }
.cred { background: var(--bg); border-radius: var(--radius); padding: 12px 14px; font: 13.5px/1.6 ui-monospace, Consolas, monospace; white-space: pre-wrap; margin: 0; user-select: all; }
.users-top { display: flex; gap: 10px; align-items: center; }
.search.grow { flex: 1; margin: 0; }
.user-row { flex-direction: column; align-items: stretch !important; }
.user-line { display: flex; align-items: center; gap: 12px; }
.user-row .member-actions { padding: 8px 0 2px 56px; }
.user-row.locked .pname { color: var(--muted); }
.invite-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; background: var(--panel); padding: 14px; border-radius: 12px; }
.invite-form label { flex: 1; min-width: 150px; }
.invite-row { flex-wrap: wrap; cursor: default !important; }
.invite-row:hover { background: var(--panel) !important; }
.invite-link { font: 13px ui-monospace, Consolas, monospace; word-break: break-all; }

/* Fotos, videos e arquivos */
.chat { position: relative; }
.drop-zone { position: absolute; inset: 60px 0 0; z-index: 4; background: rgba(11,20,26,.88); border: 3px dashed var(--accent); display: grid; place-items: center; pointer-events: none; }
.drop-zone span { font-size: 22px; color: var(--accent); }
.bubble.media { padding: 4px 4px 6px; }
.bubble.media .sender { padding: 2px 6px 0; }
.bubble.media .meta { margin-right: 4px; }
.bubble.image .meta, .bubble.video .meta { position: absolute; right: 8px; bottom: 8px; top: auto; float: none; margin: 0; background: rgba(0,0,0,.45); padding: 1px 6px; border-radius: 8px; color: #fff; }
.bubble.image .meta .tick, .bubble.video .meta .tick { color: #fff; }
.bubble.image .meta .tick.read, .bubble.video .meta .tick.read { color: var(--link); }
.media-img { display: block; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: rgba(0,0,0,.25); cursor: zoom-in; max-width: 100%; }
.media-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-loading { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.09), rgba(255,255,255,.03)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.media-video { display: block; border-radius: 6px; max-width: 100%; background: #000; }
.media-video.poster { position: relative; border: 0; color: #fff; display: grid; place-items: center; cursor: pointer; }
.media-video .play { width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; font-size: 22px; }
.media-cap { position: absolute; left: 8px; bottom: 8px; font-size: 12px; background: rgba(0,0,0,.45); padding: 1px 6px; border-radius: 8px; }
.media-err { position: absolute; top: 8px; left: 8px; right: 8px; font-size: 12px; color: #ffb3bd; }
.media-audio { display: block; width: 280px; max-width: 100%; margin: 4px 2px 0; }
.file-card { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.18); border: 0; border-radius: 6px; padding: 10px 12px; min-width: 240px; max-width: 100%; text-align: left; color: inherit; }
.file-card:hover { background: rgba(0,0,0,.26); }
.file-card .cart-main { display: grid; gap: 2px; min-width: 0; }
.file-card .pname { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-ico { width: 40px; height: 46px; flex: none; border-radius: 6px; background: #e9edef; color: #111b21; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; }
.file-ico.audio { border-radius: 50%; width: 42px; height: 42px; background: var(--accent); font-size: 16px; }
.attach-list { display: grid; gap: 8px; max-height: 46vh; overflow-y: auto; }
.attach-list li { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 10px; padding: 8px; }
.attach-list img, .attach-list video { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex: none; background: #000; }
.attach-list .pname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress { height: 4px; background: var(--input); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.attach-send { display: flex; gap: 8px; align-items: center; }
.icon-btn.send.big { background: var(--accent); color: #111b21; width: 46px; height: 46px; }
.icon-btn.send.big:disabled { background: var(--input); color: var(--muted); }
.lightbox { position: fixed; inset: 0; z-index: 20; background: rgba(11,20,26,.96); display: grid; grid-template-rows: auto 1fr; place-items: center; }
.lightbox-bar { justify-self: stretch; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); }
.lightbox-bar span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox img { max-width: 94vw; max-height: calc(100vh - 90px); object-fit: contain; }

/* Mensagem de voz */
.composer .mic { color: var(--muted); }
.composer .mic:hover { color: var(--accent); }
.composer { position: relative; }
.rec-note { position: absolute; left: 50%; top: -34px; transform: translateX(-50%); background: var(--panel); color: #ffd279; padding: 5px 12px; border-radius: 8px; font-size: 13px; }
.composer.recording { gap: 12px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; flex: none; }
@keyframes blink { 50% { opacity: .25; } }
.rec-time { font-variant-numeric: tabular-nums; min-width: 40px; }
.rec-level { flex: 1; display: flex; align-items: center; gap: 2px; height: 30px; overflow: hidden; justify-content: flex-end; }
.rec-level i { width: 3px; border-radius: 2px; background: var(--accent); flex: none; }
.rec-error { flex: 1; color: #ffb3bd; font-size: 13.5px; }
.bubble.voice-b { padding: 6px 8px 6px; min-width: 280px; }
.voice { display: flex; align-items: center; gap: 10px; }
.voice-play { width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; color: #aebac1; display: grid; place-items: center; flex: none; }
.mine .voice-play { color: #d1d7db; }
.voice-play:hover { background: rgba(255,255,255,.08); }
.voice-main { flex: 1; min-width: 150px; display: grid; gap: 4px; }
.voice-wave { display: flex; align-items: center; gap: 2px; height: 28px; cursor: pointer; }
.voice-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: rgba(233,237,239,.38); }
.voice-wave i.on { background: var(--link); }
.voice-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: rgba(233,237,239,.65); font-variant-numeric: tabular-nums; }
.voice-speed { background: rgba(0,0,0,.25); border: 0; border-radius: 9px; padding: 0 7px; font-size: 11px; color: inherit; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: currentColor; animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* Status */
.rail-dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--rail); }
.st-ring { padding: 3px; border-radius: 50%; display: inline-grid; flex: none;
  background: conic-gradient(var(--accent) 0 100%); }
.st-ring.seen { background: #3b4a54; }
.st-ring .avatar { border: 2px solid var(--bg); }
.st-add { position: relative; display: inline-grid; flex: none; padding: 3px; }
.st-add b { position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #111b21; display: grid; place-items: center; font-size: 15px; border: 2px solid var(--bg); }
.icon-btn.light { color: #fff; }
.icon-btn.light:hover { background: rgba(255,255,255,.12); }

.st-compose { position: fixed; inset: 0; z-index: 15; display: flex; flex-direction: column; align-items: center; color: #fff; transition: background .2s; }
.st-compose.dark { background: #0b141a; }
.st-compose-bar { align-self: stretch; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 12px; }
.st-colors { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.st-color { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); padding: 0; }
.st-color.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.25); transform: scale(1.12); }
.st-text-input { flex: 1; width: min(720px, 92vw); background: transparent; border: 0; outline: none; resize: none; color: #fff; text-align: center;
  font: 500 clamp(24px, 4vw, 40px)/1.35 inherit; padding: 12vh 0 0; }
.st-text-input::placeholder { color: rgba(255,255,255,.65); }
.st-send { position: fixed; right: 28px; bottom: 28px; }
.st-err { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: 90vw; }
.st-preview { flex: 1; min-height: 0; display: grid; place-items: center; width: 100%; padding: 0 16px; }
.st-preview img, .st-preview video { max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; border-radius: 6px; }
.st-caption { width: min(720px, 94vw); padding: 14px 0 22px; }
.st-progress { width: min(720px, 94vw); margin: -12px 0 18px; }

.st-viewer { flex: 1; display: flex; flex-direction: column; background: #0b141a; color: #fff; position: relative; min-width: 0; overflow: hidden; }
.st-bars { display: flex; gap: 4px; padding: 10px 14px 0; }
.st-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
.st-bar i { display: block; height: 100%; width: 0; background: #fff; }
.st-bar i.done { width: 100%; }
.st-bar i.run { animation: stfill linear forwards; }
@keyframes stfill { from { width: 0; } to { width: 100%; } }
.st-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.st-who { flex: 1; display: grid; min-width: 0; }
.st-who small { color: rgba(255,255,255,.75); font-size: 12.5px; }
.st-head .btn { color: #fff; border-color: rgba(255,255,255,.4); }
.st-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; padding: 0 16px; user-select: none; }
.st-stage img, .st-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.st-big-text { max-width: 720px; text-align: center; font-size: clamp(24px, 3.4vw, 38px); line-height: 1.35; font-weight: 500; white-space: pre-wrap; word-break: break-word; padding: 0 12px; }
.st-nav { position: absolute; top: 0; bottom: 0; width: 35%; background: none; border: 0; cursor: pointer; }
.st-nav.left { left: 0; }
.st-nav.right { right: 0; }
.st-cap { text-align: center; padding: 12px 20px; background: rgba(0,0,0,.35); font-size: 15px; }
.st-foot { display: grid; justify-items: center; padding: 10px 14px 16px; gap: 8px; }
.st-views { background: rgba(0,0,0,.35); border: 0; color: #fff; padding: 7px 16px; border-radius: 999px; }
.st-viewers { width: min(420px, 100%); background: var(--panel); border-radius: 12px; padding: 8px; max-height: 40vh; overflow-y: auto; }
.st-viewers li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; color: var(--text); }

/* Celular: uma coluna por vez */
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .rail { grid-row: 2; flex-direction: row; justify-content: space-around; padding: 4px 8px; border-right: 0; border-top: 1px solid var(--border); }
  .rail-spacer, .rail-me, .rail .rail-btn[title="Configurações"] { display: none; }
  .panel { grid-row: 1; border-right: 0; }
  .main { display: none; grid-row: 1; }
  .layout.has-main .panel, .layout.has-main .rail { display: none; }
  .layout.has-main .main { display: flex; grid-row: 1 / span 2; }
  .chat-head .back { display: grid; }
  .msg-inner { padding: 10px 12px; }
  .bubble { max-width: 85%; }
  .main.with-drawer { display: flex; }
  .main.with-drawer .chat { display: none; }
  .drawer { flex: 1; border-left: 0; }
}
