/* Cochichos Web — o desenho do WhatsApp Web, com as cores do Cochichos:
   laranja #ee7838 de destaque, fundo creme; escuro pelo sistema ou pela
   escolha em Você › Tema. */

:root {
  --acento: #ee7838;
  --acento-forte: #d65f20;
  --acento-suave: #fde7d6;
  --acento-texto: #b4501a;
  --fundo-app: #e9e2d8;
  --painel: #ffffff;
  --painel-2: #f8f4ee;
  --painel-3: #f1ebe3;
  --chat-fundo: #f5ede2;
  --chat-desenho: rgba(160, 120, 80, .07);
  --bolha-minha: #fde2cb;
  --bolha-dela: #ffffff;
  --texto: #1f1a16;
  --texto-2: #6d635a;
  --texto-3: #978c82;
  --linha: #ebe3d9;
  --hover: #f5efe7;
  --selecionado: #f0e7dc;
  --lido: #2d8fd5;
  --perigo: #d43c3c;
  --online: #2fb36b;
  --sombra: 0 1px .5px rgba(70, 40, 10, .13);
  --sombra-alta: 0 10px 30px rgba(50, 30, 10, .18), 0 2px 6px rgba(50, 30, 10, .08);
  --sistema: #fff6e8;
  --raio: 8px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --acento: #f08a4f;
    --acento-forte: #ee7838;
    --acento-suave: #3b2517;
    --acento-texto: #f5a374;
    --fundo-app: #0c0a09;
    --painel: #171412;
    --painel-2: #1e1a17;
    --painel-3: #26211d;
    --chat-fundo: #110e0c;
    --chat-desenho: rgba(240, 160, 100, .035);
    --bolha-minha: #5a2f16;
    --bolha-dela: #24201d;
    --texto: #f1ebe5;
    --texto-2: #a89d93;
    --texto-3: #82776e;
    --linha: #2c2622;
    --hover: #221d1a;
    --selecionado: #2b2420;
    --lido: #5bb8f5;
    --perigo: #f06363;
    --sombra: 0 1px .5px rgba(0, 0, 0, .4);
    --sombra-alta: 0 10px 30px rgba(0, 0, 0, .55);
    --sistema: #2a221c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --acento: #f08a4f;
  --acento-forte: #ee7838;
  --acento-suave: #3b2517;
  --acento-texto: #f5a374;
  --fundo-app: #0c0a09;
  --painel: #171412;
  --painel-2: #1e1a17;
  --painel-3: #26211d;
  --chat-fundo: #110e0c;
  --chat-desenho: rgba(240, 160, 100, .035);
  --bolha-minha: #5a2f16;
  --bolha-dela: #24201d;
  --texto: #f1ebe5;
  --texto-2: #a89d93;
  --texto-3: #82776e;
  --linha: #2c2622;
  --hover: #221d1a;
  --selecionado: #2b2420;
  --lido: #5bb8f5;
  --perigo: #f06363;
  --sombra: 0 1px .5px rgba(0, 0, 0, .4);
  --sombra-alta: 0 10px 30px rgba(0, 0, 0, .55);
  --sistema: #2a221c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 14.5px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  background: var(--fundo-app);
  color: var(--texto);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
a { color: var(--acento-texto); }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
.sub { color: var(--texto-2); }
.centro { text-align: center; }
.sem-js { padding: 40px; text-align: center; }

.ic { display: inline-flex; width: 22px; height: 22px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.logo { display: inline-flex; color: var(--acento); }
.logo svg { width: 100%; height: 100%; }

/* ─── peças ─────────────────────────────────────────────────────────────── */

.bt-ic {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 0; border-radius: 50%; background: transparent; color: var(--texto-2);
  transition: background .15s, color .15s;
}
.bt-ic:hover { background: var(--hover); color: var(--texto); }
.bt-ic:focus-visible, button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
.bt-ic.pequeno { width: 32px; height: 32px; }
.bt-ic.pequeno .ic { width: 18px; height: 18px; }

.bt-texto {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent;
  padding: 9px 14px; border-radius: 20px; font-weight: 600; color: var(--acento-texto);
}
.bt-texto:hover { background: var(--acento-suave); }
.bt-texto.forte { background: var(--acento); color: #fff; }
.bt-texto.forte:hover { background: var(--acento-forte); }
.bt-texto.forte:disabled { opacity: .45; cursor: default; }
.bt-texto.perigo { color: var(--perigo); }
.bt-texto.perigo:hover { background: color-mix(in srgb, var(--perigo) 12%, transparent); }
.bt-texto .ic { width: 18px; height: 18px; }

.bt-primario {
  width: 100%; border: 0; border-radius: 24px; padding: 13px; font-weight: 600; font-size: 15px;
  background: var(--acento); color: #fff; transition: background .15s;
}
.bt-primario:hover { background: var(--acento-forte); }
.bt-primario:disabled { opacity: .6; }

.bt-link {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 6px 0;
  color: var(--acento-texto); font-weight: 600;
}
.bt-link:hover { text-decoration: underline; }
.bt-link .ic { width: 18px; height: 18px; }

.bt-redondo {
  position: absolute; right: 24px; bottom: 24px; width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--acento); color: #fff; display: grid; place-items: center; box-shadow: var(--sombra-alta);
}
.bt-redondo:hover { background: var(--acento-forte); }
.bt-redondo .ic { width: 26px; height: 26px; }

.campo {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1.5px solid var(--linha);
  background: var(--painel); outline: none; transition: border-color .15s;
}
.campo:focus { border-color: var(--acento); }
.campo.linha { border-width: 0 0 2px; border-radius: 0; background: transparent; padding: 10px 2px; font-size: 16px; }

.rodinha {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--acento) 25%, transparent); border-top-color: var(--acento);
  animation: gira .8s linear infinite;
}
.rodinha.pequena { width: 16px; height: 16px; border-width: 2px; display: inline-block; vertical-align: middle; }
@keyframes gira { to { transform: rotate(360deg); } }
.abrindo { height: 100vh; display: grid; place-items: center; }

/* avatar */
.avatar {
  --tam: 49px; width: var(--tam); height: var(--tam); border-radius: 50%; overflow: hidden; flex: none;
  display: inline-grid; place-items: center; background: var(--painel-3);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-vazio {
  width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 600;
  font-size: calc(var(--tam) * .38); letter-spacing: .02em; text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}
.avatar-vazio.grupo { background: #d9cfc4; color: #fff; }
.avatar-vazio.grupo .ic { width: 55%; height: 55%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar-vazio.grupo { background: #4a4038; } }
:root[data-theme="dark"] .avatar-vazio.grupo { background: #4a4038; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; pointer-events: none; }
.toast {
  background: #2a2420; color: #fff; padding: 11px 18px; border-radius: 10px; box-shadow: var(--sombra-alta);
  font-size: 14px; animation: sobe .2s ease-out; max-width: 80vw;
}
.toast.erro { background: #8f2424; }
.toast.saindo { opacity: 0; transition: opacity .3s; }
@keyframes sobe { from { transform: translateY(8px); opacity: 0; } }

/* diálogos */
.dialogo {
  border: 0; border-radius: 14px; padding: 0; width: min(420px, calc(100vw - 32px));
  background: var(--painel); color: var(--texto); box-shadow: var(--sombra-alta);
}
.dialogo.largo { width: min(480px, calc(100vw - 32px)); }
.dialogo::backdrop { background: rgba(20, 12, 5, .45); }
.dialogo form { padding: 22px 24px 16px; display: grid; gap: 12px; max-height: 80vh; overflow: auto; }
.dialogo h2 { font-size: 18px; font-weight: 600; }
.dialogo h3 { font-size: 13px; color: var(--acento-texto); font-weight: 600; margin: 6px 0 2px; }
.dialogo p { color: var(--texto-2); }
.dialogo .citada { background: var(--painel-2); padding: 8px 12px; border-radius: 8px; border-left: 3px solid var(--acento); color: var(--texto); }
.dialogo-botoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.escolha-lista { max-height: 50vh; overflow: auto; margin: 0 -8px; }

/* menus */
.menu {
  position: fixed; z-index: 60; min-width: 210px; padding: 6px 0; border-radius: 10px;
  background: var(--painel); box-shadow: var(--sombra-alta); animation: abre .12s ease-out;
}
@keyframes abre { from { opacity: 0; transform: scale(.97); } }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none;
  padding: 10px 18px; text-align: left; color: var(--texto);
}
.menu-item:hover { background: var(--hover); }
.menu-item .ic { width: 19px; height: 19px; color: var(--texto-2); }
.menu-item.perigo, .menu-item.perigo .ic { color: var(--perigo); }

.popover {
  position: fixed; z-index: 60; background: var(--painel); border-radius: 14px; box-shadow: var(--sombra-alta);
  animation: abre .12s ease-out;
}
.popover.emojis { width: 340px; max-height: 320px; overflow: auto; padding: 8px 10px 10px; }
.popover.emojis h3 { font-size: 12px; font-weight: 600; color: var(--texto-2); padding: 8px 4px 4px; position: sticky; top: -8px; background: var(--painel); }
.emoji-grade { display: grid; grid-template-columns: repeat(8, 1fr); }
.emoji { border: 0; background: none; font-size: 24px; line-height: 1; padding: 6px 0; border-radius: 8px; }
.emoji:hover { background: var(--hover); transform: scale(1.12); }
.reacoes-rapidas { display: flex; gap: 2px; padding: 6px 8px; border-radius: 30px; }
.reacoes-rapidas .emoji { width: 40px; height: 40px; font-size: 25px; padding: 0; border-radius: 50%; transition: transform .1s; }
.reacoes-rapidas .emoji.escolhido { background: var(--acento-suave); }
.reacoes-rapidas .emoji.mais { display: grid; place-items: center; color: var(--texto-2); background: var(--painel-3); }
.reacoes-rapidas .emoji.mais .ic { width: 20px; height: 20px; }

/* ─── login ─────────────────────────────────────────────────────────────── */

.login { min-height: 100vh; position: relative; overflow: auto; height: 100vh; background: var(--fundo-app); }
.login-faixa { position: absolute; inset: 0 0 auto; height: 222px; background: linear-gradient(135deg, #ee7838, #e8655a); }
.login-topo {
  position: relative; display: flex; align-items: center; gap: 12px; max-width: 1000px; margin: 0 auto;
  padding: 28px 24px 0; color: #fff; font-weight: 600; font-size: 15px; letter-spacing: .02em; text-transform: uppercase;
}
.login-topo .logo { width: 38px; height: 38px; color: #fff; }
.login-topo .logo svg path:last-child { fill: #ee7838; }
.login-cartao {
  position: relative; max-width: 1000px; margin: 36px auto 0; background: var(--painel); border-radius: 6px;
  box-shadow: 0 17px 50px rgba(60, 30, 10, .14), 0 12px 15px rgba(60, 30, 10, .08);
}
.login-modo { display: flex; gap: 48px; justify-content: space-between; align-items: flex-start; padding: 56px 60px 60px; }
.login-passos h1 { font-size: 28px; font-weight: 300; margin-bottom: 36px; color: var(--texto); }
.login-passos ol { margin: 0 0 32px; padding-left: 24px; display: grid; gap: 18px; font-size: 18px; color: var(--texto-2); line-height: 1.5; }
.login-passos ol b { color: var(--texto); font-weight: 600; }
.login-passos li::marker { color: var(--texto-3); }
.login-lembrar { display: flex; align-items: center; gap: 10px; color: var(--texto-2); font-size: 14px; margin-bottom: 28px; max-width: 440px; }
.ic-ok .ic { width: 20px; height: 20px; color: var(--acento); }
.qr-caixa {
  position: relative; width: 264px; height: 264px; flex: none; display: grid; place-items: center;
  border-radius: 6px; background: #fff;
}
.qr-caixa svg { width: 264px; height: 264px; display: block; }
.qr-caixa.vencido svg { filter: blur(3px); opacity: .25; }
.qr-caixa.vencido .bt-recarregar, .qr-caixa.falhou .bt-recarregar { position: absolute; }
.qr-caixa.falhou { background: var(--painel-2); text-align: center; padding: 24px; gap: 12px; align-content: center; }
.qr-caixa.falhou p { color: var(--texto-2); }
.qr-caixa.falhou .bt-recarregar { position: static; }
.bt-recarregar {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px; border: 0; padding: 18px 16px;
  width: 150px; border-radius: 50%; aspect-ratio: 1; justify-content: center;
  background: var(--acento); color: #fff; font-weight: 600; font-size: 13px; box-shadow: var(--sombra-alta);
}
.qr-caixa.falhou .bt-recarregar { aspect-ratio: auto; border-radius: 20px; width: auto; padding: 10px 18px; }
.bt-recarregar .ic { width: 28px; height: 28px; }
.login-modo.senha { justify-content: center; }
.login-form { width: min(380px, 100%); display: grid; gap: 8px; }
.login-form h1 { font-size: 26px; font-weight: 300; }
.login-form .sub { margin-bottom: 18px; color: var(--texto-2); }
.login-form .rotulo { font-size: 13px; font-weight: 600; color: var(--texto-2); margin-top: 6px; }
.login-form .bt-primario { margin-top: 14px; }
.login-form .bt-link { justify-self: center; margin-top: 10px; }
.campo-arroba { display: flex; align-items: center; border: 1.5px solid var(--linha); border-radius: 10px; background: var(--painel); }
.campo-arroba:focus-within { border-color: var(--acento); }
.campo-arroba span { padding-left: 13px; color: var(--texto-3); font-weight: 600; }
.campo-arroba .campo { border: 0; padding-left: 3px; }
.login-erro { color: var(--perigo); min-height: 20px; font-size: 14px; }
.login-rodape {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  max-width: 1000px; margin: 28px auto 40px; color: var(--texto-2); font-size: 13.5px;
}
.login-rodape .ic { width: 16px; height: 16px; }

/* ─── casca ─────────────────────────────────────────────────────────────── */

.app {
  height: 100vh; height: 100dvh; display: grid;
  grid-template-columns: 64px minmax(340px, 31%) 1fr;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  background: var(--painel);
}
.app > * { min-height: 0; }
.app.com-lateral { grid-template-columns: 64px minmax(320px, 27%) 1fr minmax(320px, 26%); }

.trilho {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0 14px;
  background: var(--painel-2); border-right: 1px solid var(--linha);
}
.trilho-bt {
  position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent;
  color: var(--texto-2); display: grid; place-items: center; transition: background .15s;
}
.trilho-bt:hover { background: var(--hover); }
.trilho-bt.ativo { background: var(--selecionado); color: var(--texto); }
.trilho-bt .ic { width: 23px; height: 23px; }
.trilho-ponto {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--acento); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--painel-2);
}
.trilho-ponto.so-ponto { min-width: 12px; height: 12px; padding: 0; top: 4px; right: 4px; }
.trilho-espaco { flex: 1; }
.trilho-eu { border: 0; background: none; padding: 0; border-radius: 50%; margin-top: 6px; }
.trilho-eu:hover { filter: brightness(.95); }

.coluna {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--painel); border-right: 1px solid var(--linha);
}
.coluna-topo { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 8px 20px; min-height: 64px; }
.coluna-topo h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.coluna-acoes { display: flex; gap: 2px; }

.conexao-aviso {
  display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 10px 14px; border-radius: 8px;
  background: #fff3c4; color: #6b5200; font-size: 13.5px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .conexao-aviso { background: #3a3110; color: #f0d98a; } }
:root[data-theme="dark"] .conexao-aviso { background: #3a3110; color: #f0d98a; }

.busca {
  display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 0 12px; height: 38px;
  border-radius: 9px; background: var(--painel-3); color: var(--texto-2);
}
.busca .ic { width: 18px; height: 18px; }
.busca:focus-within { background: var(--painel); box-shadow: inset 0 0 0 1.5px var(--acento); }
.busca-campo { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; height: 100%; }
.busca-campo::-webkit-search-cancel-button { filter: grayscale(1); }

.filtros { display: flex; gap: 8px; padding: 2px 14px 10px; }
.chip {
  border: 0; border-radius: 18px; padding: 6px 13px; background: var(--painel-3); color: var(--texto-2);
  font-size: 14px; transition: background .15s;
}
.chip:hover { background: var(--selecionado); }
.chip.ativo { background: var(--acento-suave); color: var(--acento-texto); font-weight: 600; }

.lista { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.lista::-webkit-scrollbar, .conversa-corpo::-webkit-scrollbar, .lateral-corpo::-webkit-scrollbar, .gaveta-corpo::-webkit-scrollbar { width: 6px; }
.lista::-webkit-scrollbar-thumb, .conversa-corpo::-webkit-scrollbar-thumb, .lateral-corpo::-webkit-scrollbar-thumb, .gaveta-corpo::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--texto) 18%, transparent); border-radius: 3px; }

.item-arquivadas {
  display: flex; align-items: center; gap: 22px; width: 100%; border: 0; background: none;
  padding: 12px 22px 12px 26px; text-align: left; color: var(--texto); font-weight: 600;
}
.item-arquivadas:hover { background: var(--hover); }
.item-arquivadas .ic { color: var(--acento); }
.item-arquivadas span:nth-child(2) { flex: 1; }
.item-arquivadas .n { color: var(--acento-texto); font-size: 12.5px; }

.item-conversa {
  display: flex; align-items: center; gap: 14px; padding: 0 14px 0 13px; height: 72px; cursor: pointer;
  position: relative; outline-offset: -2px;
}
.item-conversa:hover { background: var(--hover); }
.item-conversa.aberta { background: var(--selecionado); }
.item-avatar { position: relative; flex: none; }
.ponto-online {
  position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--online); border: 2.5px solid var(--painel);
}
.item-texto {
  flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  border-bottom: 1px solid var(--linha);
}
.item-conversa:last-child .item-texto { border-bottom-color: transparent; }
.linha1, .linha2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nome { flex: 1; font-size: 16.5px; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quando { font-size: 12px; color: var(--texto-3); flex: none; }
.nao-lida .quando { color: var(--acento-texto); font-weight: 600; }
.resumo { flex: 1; font-size: 14px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; min-width: 0; }
.resumo.vazio { color: var(--texto-3); }
.resumo .recibo { display: inline-flex; color: var(--texto-3); flex: none; }
.resumo .recibo .ic { width: 17px; height: 12px; }
.resumo .recibo.lida { color: var(--lido); }
.digitando { color: var(--acento-texto) !important; font-weight: 500; }
.marcas { display: flex; align-items: center; gap: 4px; flex: none; }
.mudo .ic { width: 16px; height: 16px; color: var(--texto-3); }
.contador {
  min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: var(--acento); color: #fff;
  font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.item-menu { width: 0; height: 24px; overflow: hidden; opacity: 0; transition: width .12s, opacity .12s; border-radius: 6px; }
.item-menu .ic { width: 20px; height: 20px; }
.item-conversa:hover .item-menu, .item-menu:focus-visible { width: 24px; opacity: 1; }
.item-menu:hover { background: transparent; }

.lista-vazia { text-align: center; padding: 48px 28px; color: var(--texto-2); display: grid; gap: 12px; justify-items: center; }
.lista-vazia p { font-size: 15px; }
.lista-vazia small { color: var(--texto-3); }

/* gaveta */
.gaveta {
  position: absolute; inset: 0; z-index: 5; background: var(--painel); display: flex; flex-direction: column;
  transform: translateX(-102%); transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.gaveta.aberta { transform: none; }
.gaveta-topo {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px 12px 10px; min-height: 64px;
}
.gaveta-topo h2 { font-size: 19px; font-weight: 600; }
.gaveta-corpo { flex: 1; overflow-y: auto; position: relative; }
.secao { font-size: 13px; font-weight: 600; color: var(--acento-texto); padding: 22px 24px 10px; text-transform: none; }
.secao-carregando { display: flex; gap: 10px; align-items: center; padding: 16px 24px; color: var(--texto-2); }
.dica { color: var(--texto-2); padding: 14px 24px; font-size: 14px; line-height: 1.5; }

.pessoa-linha {
  display: flex; align-items: center; gap: 14px; padding: 9px 16px; width: 100%; border: 0; background: none; text-align: left;
}
.pessoa-linha.clicavel:hover, .pessoa-linha.escolha:hover { background: var(--hover); cursor: pointer; }
.pessoa-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pessoa-txt b { font-weight: 500; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.pessoa-txt small { color: var(--texto-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.escolha input { width: 18px; height: 18px; accent-color: var(--acento); }

.acao {
  display: flex; align-items: center; gap: 16px; width: 100%; border: 0; background: none; padding: 12px 18px;
  text-align: left; font-size: 15.5px; color: var(--texto);
}
.acao:hover { background: var(--hover); }
.acao .ic { color: var(--texto-2); }
.acao.perigo, .acao.perigo .ic { color: var(--perigo); }
.acao-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--acento-suave); color: var(--acento-texto) !important; }
.acao-ic.cheio { background: var(--acento); }
.acao-ic.cheio .ic, .acao-ic .ic { color: inherit; }
.acao-ic.cheio .ic { color: #fff; }
.acao.grande { padding: 10px 16px; }

.marcador { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--texto-3); display: grid; place-items: center; flex: none; }
.marcador.marcado { border-color: var(--acento); background: var(--acento); color: #fff; }
.marcador .ic { width: 14px; height: 14px; }
.chips-escolhidos { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 10px; }
.chips-escolhidos:empty { display: none; }
.chip-pessoa {
  display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 3px 8px 3px 3px; border-radius: 16px;
  background: var(--painel-3); font-size: 13.5px;
}
.chip-pessoa .ic { width: 14px; height: 14px; color: var(--texto-2); }
.novo-grupo { padding-bottom: 100px; min-height: 100%; }
.novo-grupo.passo2 { display: grid; justify-items: center; gap: 18px; padding: 28px 28px 100px; }
.foto-grupo {
  width: 180px; height: 180px; border-radius: 50%; border: 0; background: var(--painel-3); color: var(--texto-2);
  display: grid; place-items: center; align-content: center; gap: 8px; overflow: hidden; font-size: 13px;
}
.foto-grupo img { width: 100%; height: 100%; object-fit: cover; }
.foto-grupo .ic { width: 34px; height: 34px; }

/* ─── painel / conversa ─────────────────────────────────────────────────── */

.painel { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--chat-fundo); }
.painel-vazio {
  flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 12px;
  padding: 40px; background: var(--painel-2); border-bottom: 6px solid var(--acento); position: relative;
}
.painel-vazio .logo.grande { width: 96px; height: 96px; margin-bottom: 10px; }
.painel-vazio h2 { font-size: 30px; font-weight: 300; color: var(--texto); }
.painel-vazio p { max-width: 460px; color: var(--texto-2); font-size: 15px; line-height: 1.55; }
.painel-vazio .sub { font-size: 14px; color: var(--texto-3); }
.painel-vazio-rodape { position: absolute; bottom: 36px; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--texto-3); font-size: 13.5px; }
.painel-vazio-rodape .ic { width: 15px; height: 15px; }
.vazio-painel { flex: 1; display: grid; place-content: center; gap: 14px; justify-items: center; color: var(--texto-2); }

.conversa { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.conversa-topo {
  display: flex; align-items: center; gap: 8px; padding: 0 12px 0 14px; height: 62px; flex: none;
  background: var(--painel-2); border-bottom: 1px solid var(--linha); z-index: 2;
}
.topo-quem { flex: 1; min-width: 0; display: flex; align-items: center; gap: 13px; border: 0; background: none; text-align: left; padding: 6px 0; }
.topo-textos { min-width: 0; }
.topo-nome { font-size: 16.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo-sub { font-size: 13px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo-acoes { display: flex; }
.so-celular { display: none; }

.conversa-corpo {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 0 8px;
  background-color: var(--chat-fundo);
  background-image:
    radial-gradient(circle at 20px 20px, var(--chat-desenho) 3px, transparent 3.5px),
    radial-gradient(circle at 60px 50px, var(--chat-desenho) 2px, transparent 2.5px),
    radial-gradient(circle at 40px 80px, var(--chat-desenho) 4px, transparent 4.5px);
  background-size: 90px 100px;
}
.mensagens { display: flex; flex-direction: column; padding: 0 6%; max-width: 1100px; margin: 0 auto; }
.carregando-msgs { height: 100%; display: grid; place-items: center; }
.carregando-antigas { display: grid; place-items: center; padding: 10px; }
.inicio-conversa {
  align-self: center; display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; padding: 8px 14px;
  border-radius: 8px; background: var(--sistema); color: var(--texto-2); font-size: 12.5px; box-shadow: var(--sombra);
}
.inicio-conversa .ic { width: 14px; height: 14px; }

.dia { position: sticky; top: 0; z-index: 1; align-self: center; margin: 10px 0 8px; pointer-events: none; }
.dia span {
  display: inline-block; padding: 5px 12px; border-radius: 8px; background: var(--painel); color: var(--texto-2);
  font-size: 12.5px; box-shadow: var(--sombra); text-transform: uppercase; letter-spacing: .02em;
}
.marca-nao-lidas { align-self: stretch; text-align: center; margin: 10px -6%; padding: 6px 0; background: color-mix(in srgb, var(--painel) 75%, transparent); }
.marca-nao-lidas span { display: inline-block; padding: 4px 14px; border-radius: 8px; background: var(--painel); color: var(--acento-texto); font-size: 12.5px; font-weight: 600; box-shadow: var(--sombra); text-transform: uppercase; }

.linha { display: flex; flex-direction: column; margin-top: 2px; position: relative; }
.linha.primeira { margin-top: 10px; }
.linha.minha { align-items: flex-end; }
.linha.dela { align-items: flex-start; }
.linha.sistema { align-items: center; margin: 8px 0; }
.sistema-texto {
  max-width: 80%; text-align: center; padding: 6px 12px; border-radius: 8px; font-size: 12.5px;
  background: var(--sistema); color: var(--texto-2); box-shadow: var(--sombra);
}
.bolha-e-acoes { display: flex; align-items: center; gap: 6px; max-width: min(65%, 620px); }
.linha.minha .bolha-e-acoes { flex-direction: row-reverse; }

.bolha {
  position: relative; min-width: 72px; padding: 6px 8px 8px 9px; border-radius: var(--raio);
  background: var(--bolha-dela); box-shadow: var(--sombra); word-wrap: break-word; overflow-wrap: anywhere;
}
.linha.minha .bolha { background: var(--bolha-minha); }
.linha.primeira.dela .bolha { border-top-left-radius: 0; }
.linha.primeira.minha .bolha { border-top-right-radius: 0; }
.linha.primeira .bolha::before {
  content: ""; position: absolute; top: 0; width: 8px; height: 13px; background: inherit;
}
.linha.primeira.dela .bolha::before { left: -8px; clip-path: polygon(100% 0, 0 0, 100% 100%); }
.linha.primeira.minha .bolha::before { right: -8px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.linha.piscando .bolha { animation: pisca 1.4s ease-out; }
@keyframes pisca { 0%, 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 45%, transparent); } }
.linha.pendente .bolha { opacity: .92; }
.linha.falhou .bolha { box-shadow: 0 0 0 1.5px var(--perigo); }

.autor { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.texto { white-space: pre-wrap; font-size: 14.5px; line-height: 1.42; }
/* espaço no fim da última linha para a hora não ficar por cima do texto */
.texto::after { content: ""; display: inline-block; width: var(--meta-l, 58px); }
.linha.minha .texto::after { --meta-l: 76px; }
.texto.apagada { display: flex; align-items: center; gap: 6px; font-style: italic; color: var(--texto-2); }
.texto.apagada .ic { width: 16px; height: 16px; }
.texto.legenda { padding: 6px 2px 0; }
.texto.toque { font-size: 15px; }
.bolha.so-emoji { background: transparent !important; box-shadow: none; padding: 0 0 18px; }
.bolha.so-emoji::before { display: none; }
.bolha.so-emoji .texto { font-size: 46px; line-height: 1.15; }
.bolha.so-emoji .texto::after { display: none; }
.bolha.so-emoji .meta { background: var(--painel); padding: 1px 6px; border-radius: 8px; box-shadow: var(--sombra); }

.meta {
  position: absolute; right: 8px; bottom: 4px; display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--texto-3); white-space: nowrap; line-height: 1;
}
.meta.sobre {
  right: 10px; bottom: 9px; color: #fff; padding: 3px 5px; border-radius: 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .25)); text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.meta .editada { font-style: italic; }
.tag-urgente { color: #fff; background: var(--perigo); padding: 2px 5px; border-radius: 4px; font-weight: 700; text-transform: uppercase; font-size: 9.5px; }
.agendada { color: var(--acento-texto); }
.recibo { display: inline-flex; }
.recibo .ic { width: 16px; height: 11px; }
.meta .recibo .ic svg { display: block; }
.recibo.lida { color: var(--lido); }
.recibo.falhou { color: var(--perigo); }
.recibo.falhou .ic, .meta .recibo .ic:has(circle) { width: 13px; height: 13px; }
.meta.sobre .recibo.lida { color: #9fd8ff; }

.bolha-menu {
  position: absolute; top: 3px; right: 3px; width: 26px; height: 22px; border: 0; border-radius: 0 6px 0 12px;
  display: grid; place-items: center; color: var(--texto-2); opacity: 0; transition: opacity .12s;
  background: radial-gradient(at top right, var(--bolha-dela) 55%, transparent 75%);
}
.linha.minha .bolha-menu { background: radial-gradient(at top right, var(--bolha-minha) 55%, transparent 75%); }
.bolha.midia .bolha-menu { color: #fff; background: radial-gradient(at top right, rgba(0, 0, 0, .35), transparent 70%); }
.bolha-menu .ic { width: 20px; height: 20px; }
.bolha:hover .bolha-menu, .bolha-menu:focus-visible { opacity: 1; }
.reagir-rapido {
  width: 28px; height: 28px; border-radius: 50%; border: 0; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--painel) 80%, transparent); color: var(--texto-2); opacity: 0; transition: opacity .12s;
}
.reagir-rapido .ic { width: 18px; height: 18px; }
.bolha-e-acoes:hover .reagir-rapido, .reagir-rapido:focus-visible { opacity: 1; }

.citacao {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; min-width: 180px; text-align: left;
  border: 0; border-left: 4px solid var(--cor); border-radius: 6px; padding: 6px 10px; margin-bottom: 5px;
  background: color-mix(in srgb, var(--texto) 6%, transparent); font-size: 13px;
}
.citacao b { color: var(--cor); font-weight: 600; }
.citacao span { color: var(--texto-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.bolha.midia { padding: 3px; }
.bolha.midia .autor { padding: 3px 6px 2px; }
.foto { margin: 0; position: relative; border-radius: 6px; overflow: hidden; background: color-mix(in srgb, var(--texto) 8%, transparent); }
.foto-bt { display: block; border: 0; padding: 0; background: none; cursor: zoom-in; }
.foto img, .foto video { display: block; width: 330px; max-width: 100%; height: auto; max-height: 420px; object-fit: cover; }
.foto img:not([height]) { min-height: 140px; }
.foto video { width: 360px; background: #000; }
.bolha.midia .texto.legenda { padding: 6px 6px 4px; }

.progresso { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .3); }
.progresso-anel {
  --p: 0; width: 52px; height: 52px; border-radius: 50%;
  background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .25) 0);
  -webkit-mask: radial-gradient(circle, transparent 20px, #000 21px); mask: radial-gradient(circle, transparent 20px, #000 21px);
}
.arquivo .progresso { position: static; background: none; }
.arquivo .progresso-anel { width: 30px; height: 30px; background: conic-gradient(var(--acento) calc(var(--p) * 1%), var(--linha) 0);
  -webkit-mask: radial-gradient(circle, transparent 11px, #000 12px); mask: radial-gradient(circle, transparent 11px, #000 12px); }

.audio { display: grid; gap: 4px; padding-bottom: 14px; }
.audio audio { width: 290px; max-width: 100%; height: 40px; }
.transcricao { font-size: 13.5px; color: var(--texto-2); font-style: italic; padding: 0 4px; }

.arquivo {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 16px; border-radius: 6px; min-width: 260px;
  background: color-mix(in srgb, var(--texto) 5%, transparent); color: var(--texto); text-decoration: none;
}
.arquivo:hover { background: color-mix(in srgb, var(--texto) 9%, transparent); }
.arquivo-ic { position: relative; width: 36px; height: 44px; flex: none; color: var(--acento); }
.arquivo-ic .ic { width: 36px; height: 44px; }
.arquivo-ic b { position: absolute; left: 0; right: 0; bottom: 8px; font-size: 8.5px; text-align: center; color: var(--acento-texto); font-weight: 800; }
.arquivo-txt { flex: 1; min-width: 0; display: grid; }
.arquivo-nome { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arquivo-txt small { color: var(--texto-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arquivo-baixar { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--texto-3); display: grid; place-items: center; color: var(--texto-2); }
.arquivo-baixar .ic { width: 17px; height: 17px; }

.local { display: flex; gap: 10px; align-items: center; padding: 6px 4px 16px; text-decoration: none; color: var(--texto); }
.local-pino { font-size: 28px; }
.local span:last-child { display: grid; }
.local small { color: var(--texto-2); }

.bolha.aviso { padding: 8px 10px 20px; }
.aviso-celular { display: flex; align-items: center; gap: 12px; padding: 4px 2px 0; min-width: 240px; }
.aviso-celular > .ic {
  width: 38px; height: 38px; padding: 8px; border-radius: 50%; flex: none;
  background: var(--acento-suave); color: var(--acento-texto);
}
.aviso-celular small { display: block; color: var(--texto-2); font-size: 12.5px; }

.reacoes { display: flex; margin-top: -6px; padding: 0 10px; z-index: 1; position: relative; }
.reacoes:empty { display: none; }
.reacoes-pilula {
  display: inline-flex; align-items: center; gap: 1px; padding: 2px 6px; border-radius: 14px;
  background: var(--painel); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); border: 1px solid var(--linha);
}
.reacao { border: 0; background: none; font-size: 15px; padding: 1px 2px; border-radius: 8px; line-height: 1.1; }
.reacao:hover { transform: scale(1.18); }
.reacao.minha { background: var(--acento-suave); }
.reacoes-n { font-size: 12px; color: var(--texto-2); padding: 0 2px 0 3px; }
.linha:has(.reacoes:not(:empty)) + .linha.segue { margin-top: 6px; }

.ir-fim {
  position: absolute; right: 22px; bottom: 82px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: var(--painel); color: var(--texto-2); box-shadow: var(--sombra-alta); display: grid; place-items: center;
}
.ir-fim-n:empty { display: none; }
.ir-fim-n {
  position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--acento); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

/* compositor */
.compositor { flex: none; background: var(--painel-2); border-top: 1px solid var(--linha); position: relative; z-index: 2; }
.compositor:empty { min-height: 62px; }
.compositor-faixa { display: flex; align-items: center; gap: 8px; padding: 8px 14px 0 64px; }
.faixa-citacao {
  flex: 1; min-width: 0; display: grid; gap: 1px; padding: 8px 12px; border-radius: 8px;
  border-left: 4px solid var(--cor); background: var(--painel-3); font-size: 13.5px;
}
.faixa-citacao b { color: var(--cor); }
.faixa-citacao span { color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compositor-linha { display: flex; align-items: flex-end; gap: 4px; padding: 10px 14px 10px 10px; }
.compositor-caixa { flex: 1; min-width: 0; background: var(--painel); border-radius: 22px; padding: 10px 16px; margin: 0 6px; box-shadow: var(--sombra); }
.compositor-campo {
  display: block; width: 100%; border: 0; outline: none; resize: none; background: transparent;
  font-size: 15px; line-height: 1.4; max-height: 168px; height: 21px; padding: 0;
}
.compositor-campo::placeholder { color: var(--texto-3); }
.compositor-linha > .bt-ic { margin-bottom: 1px; }
.bt-enviar {
  width: 42px; height: 42px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center;
  background: var(--painel-3); color: var(--texto-3); transition: background .15s, color .15s, transform .1s;
}
.bt-enviar .ic { width: 21px; height: 21px; margin-left: 2px; }
.com-texto .bt-enviar, .bt-enviar.grande { background: var(--acento); color: #fff; }
.com-texto .bt-enviar:hover, .bt-enviar.grande:hover { background: var(--acento-forte); }
.bt-enviar:active { transform: scale(.94); }
.bt-enviar.grande { width: 56px; height: 56px; box-shadow: var(--sombra-alta); }
.bt-enviar.grande:disabled { opacity: .5; }
.bt-enviar.grande .ic { width: 25px; height: 25px; }
.compositor-aviso {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 20px; color: var(--texto-2); font-size: 14px;
}
.compositor-aviso .ic { width: 18px; height: 18px; }

.conversa.soltando::after {
  content: "Solte para enviar"; position: absolute; inset: 62px 0 0; z-index: 10; display: grid; place-items: center;
  background: color-mix(in srgb, var(--painel-2) 88%, transparent); border: 3px dashed var(--acento);
  color: var(--acento-texto); font-size: 22px; font-weight: 600;
}

/* prévia de envio */
.previa-envio { position: absolute; inset: 0; z-index: 20; background: var(--painel-2); display: flex; flex-direction: column; }
.previa-envio header { display: flex; align-items: center; gap: 12px; padding: 10px 14px; font-weight: 500; }
.previa-grande { flex: 1; min-height: 0; display: grid; place-items: center; padding: 18px; }
.previa-grande img, .previa-grande video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: var(--sombra-alta); }
.previa-arquivo { display: grid; justify-items: center; gap: 10px; color: var(--texto-2); }
.previa-arquivo .ic { width: 90px; height: 90px; color: var(--acento); }
.previa-arquivo b { color: var(--texto); font-size: 17px; }
.previa-rodape { padding: 0 24px 20px; display: grid; gap: 14px; }
.previa-legenda {
  justify-self: center; width: min(640px, 100%); padding: 12px 16px; border-radius: 10px; border: 0; outline: none;
  background: var(--painel); box-shadow: var(--sombra);
}
.previa-linha { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--linha); padding-top: 14px; }
.previa-mini { flex: 1; display: flex; gap: 8px; justify-content: center; overflow-x: auto; }
.mini { width: 52px; height: 52px; border-radius: 8px; border: 2px solid transparent; padding: 0; overflow: hidden; background: var(--painel-3); display: grid; place-items: center; flex: none; }
.mini.atual { border-color: var(--acento); }
.mini img { width: 100%; height: 100%; object-fit: cover; }

/* visor de mídia */
.visor { position: fixed; inset: 0; z-index: 70; background: rgba(15, 10, 6, .94); display: flex; flex-direction: column; color: #fff; animation: abre .15s; }
.visor-topo { display: flex; align-items: center; gap: 6px; padding: 10px 16px; }
.visor-topo .bt-ic { color: #ddd; }
.visor-topo .bt-ic:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.visor-de { flex: 1; font-weight: 500; }
.visor-midia { flex: 1; min-height: 0; display: grid; place-items: center; padding: 10px 40px 30px; }
.visor-midia img, .visor-midia video { max-width: 100%; max-height: 100%; object-fit: contain; }
.visor-legenda { text-align: center; padding: 0 20px 28px; font-size: 15px; }

/* ─── lateral ───────────────────────────────────────────────────────────── */

.lateral { display: flex; flex-direction: column; min-width: 0; background: var(--painel-2); border-left: 1px solid var(--linha); }
.lateral-topo { display: flex; align-items: center; gap: 14px; padding: 0 16px 0 10px; height: 62px; background: var(--painel-2); flex: none; }
.lateral-topo h2 { font-size: 16.5px; font-weight: 500; }
.lateral-corpo { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 10px; padding-bottom: 30px; }
.lateral-capa, .lateral-bloco { background: var(--painel); box-shadow: var(--sombra); }
.lateral-capa { display: grid; justify-items: center; gap: 4px; padding: 28px 24px 22px; text-align: center; }
.lateral-capa h3 { font-size: 21px; font-weight: 500; margin-top: 12px; display: flex; align-items: center; gap: 4px; }
.lateral-capa .arroba { color: var(--texto-2); font-size: 15px; }
.lateral-capa .humor { margin-top: 6px; color: var(--texto-2); }
.lateral-foto { position: relative; display: grid; justify-items: center; gap: 8px; }
.lateral-bloco { padding: 14px 0 10px; }
.lateral-bloco > h4 { font-size: 13.5px; font-weight: 500; color: var(--texto-2); padding: 0 24px 8px; display: flex; align-items: center; justify-content: space-between; }
.lateral-bloco > p { padding: 0 24px 6px; white-space: pre-wrap; }
.lateral-bloco > small { padding: 0 24px; display: block; font-size: 12.5px; }
.lateral-bloco.acoes { padding: 4px 0; }
.lateral-bloco .pessoa-linha { padding: 9px 20px; }
.selo-admin { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--acento-suave); color: var(--acento-texto); font-weight: 600; flex: none; }
.selo-atual { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--acento-suave); color: var(--acento-texto); font-weight: 600; }
.chave { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 24px; cursor: pointer; }
.chave:hover { background: var(--hover); }
.chave input { appearance: none; width: 38px; height: 22px; border-radius: 11px; background: var(--texto-3); position: relative; flex: none; cursor: pointer; transition: background .15s; }
.chave input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.chave input:checked { background: var(--acento); }
.chave input:checked::after { transform: translateX(16px); }
.link-convite { margin: 0 24px; padding: 10px 12px; border-radius: 8px; background: var(--painel-3); font-size: 13px; word-break: break-all; color: var(--acento-texto); }
.link-acoes { display: flex; gap: 6px; padding: 8px 16px 0; }
.trocar-foto {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--painel-3); color: var(--texto-2);
  padding: 6px 12px; border-radius: 16px; font-size: 13px;
}
.trocar-foto:hover { background: var(--selecionado); color: var(--texto); }
.trocar-foto .ic { width: 16px; height: 16px; }
.pedidos { display: grid; }

/* ─── status ────────────────────────────────────────────────────────────── */

.status-linha {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 16px; border: 0; background: none; text-align: left;
}
button.status-linha:hover { background: var(--hover); }
.status-linha.meu { padding: 10px 12px 10px 16px; border-bottom: 8px solid var(--painel-2); }
.status-meu-bt { flex: 1; display: flex; align-items: center; gap: 14px; border: 0; background: none; padding: 0; text-align: left; min-width: 0; }
.status-meu-acoes { display: flex; gap: 2px; }
.com-anel { --tam: 54px; position: relative; width: var(--tam); height: var(--tam); display: grid; place-items: center; flex: none; }
.com-anel .anel { position: absolute; inset: 0; transform: none; }
.anel .novo { stroke: var(--acento); }
.anel .visto { stroke: var(--texto-3); opacity: .55; }
.com-anel.sem .avatar { --tam: 46px; }
.mais-status {
  position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--acento); color: #fff; border: 2px solid var(--painel);
}
.mais-status .ic { width: 12px; height: 12px; }

.status-visor { position: fixed; inset: 0; z-index: 70; background: #120d0a; display: grid; place-items: center; animation: abre .15s; }
.sv-caixa { position: relative; width: min(440px, 100vw); height: min(92vh, 800px); border-radius: 10px; overflow: hidden; background: #000; display: flex; flex-direction: column; }
.sv-barras { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3; display: flex; gap: 4px; }
.sv-barra { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.sv-cheio { display: block; height: 100%; width: 0; background: #fff; }
.sv-cabeca { position: absolute; top: 22px; left: 12px; right: 8px; z-index: 3; display: flex; align-items: center; gap: 10px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.sv-cabeca .pessoa-txt small { color: rgba(255, 255, 255, .8); }
.sv-cabeca .bt-ic { color: #fff; }
.sv-cabeca .bt-ic:hover { background: rgba(255, 255, 255, .15); }
.sv-palco { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; user-select: none; }
.sv-palco img, .sv-palco video { max-width: 100%; max-height: 100%; object-fit: contain; }
.sv-texto { position: absolute; inset: 0; display: grid; place-items: center; padding: 70px 34px; }
.sv-texto p { color: #fff; font-size: 30px; line-height: 1.3; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 500; }
.sv-texto p.longo { font-size: 21px; }
.sv-legenda { position: absolute; left: 0; right: 0; bottom: 70px; text-align: center; color: #fff; padding: 10px 20px; background: rgba(0, 0, 0, .4); }
.sv-lado { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .18); color: #fff; display: grid; place-items: center; }
.sv-lado:hover { background: rgba(255, 255, 255, .3); }
.sv-lado.esq { left: 8px; }
.sv-lado.dir { right: 8px; }
.sv-rodape { display: flex; align-items: center; gap: 8px; padding: 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; }
.sv-rodape .bt-ic { color: #fff; }
.sv-rodape .bt-ic:hover { background: rgba(255, 255, 255, .15); }
.sv-resposta { flex: 1; padding: 11px 16px; border-radius: 22px; border: 0; outline: none; background: rgba(255, 255, 255, .92); color: #1b1b1b; }
.sv-vistos { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; color: #fff; font-weight: 500; }
.sv-fechar { position: absolute; top: 16px; right: 16px; color: #fff !important; }
.sv-fechar:hover { background: rgba(255, 255, 255, .12) !important; }

.status-compor { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; color: #fff; transition: background .25s; }
.status-compor header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.status-compor header .bt-ic { color: #fff; }
.status-compor header .bt-ic:hover { background: rgba(255, 255, 255, .15); }
.st-dica { flex: 1; text-align: center; font-size: 13.5px; opacity: .85; }
.st-meio { flex: 1; display: grid; place-items: center; padding: 20px; }
.st-campo {
  width: min(760px, 100%); border: 0; outline: none; background: transparent; resize: none; color: #fff;
  font-size: 42px; line-height: 1.25; text-align: center; font-weight: 500;
  field-sizing: content; min-height: 1.3em; max-height: 62vh;
}
.st-campo.longo { font-size: 28px; }
.st-campo::placeholder { color: rgba(255, 255, 255, .6); }
.status-compor footer { display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding: 18px 28px 28px; }
.st-conta { opacity: .8; font-size: 13px; }
.status-compor .bt-enviar.grande { background: #fff; color: #1b1b1b; }

/* ─── configurações ─────────────────────────────────────────────────────── */

.config-perfil { display: flex; align-items: center; gap: 16px; width: 100%; border: 0; background: none; padding: 14px 18px 18px; text-align: left; border-bottom: 8px solid var(--painel-2); }
.config-perfil:hover { background: var(--hover); }
.config-perfil .pessoa-txt b { font-size: 18px; }
.config-item { display: flex; align-items: center; gap: 18px; width: 100%; border: 0; background: none; padding: 0 18px; text-align: left; }
.config-item .pessoa-txt { padding: 15px 0; border-bottom: 1px solid var(--linha); }
.config-item:hover { background: var(--hover); }
.config-ic { width: 40px; display: grid; place-items: center; color: var(--texto-2); flex: none; }
.config-item.perigo, .config-item.perigo .config-ic { color: var(--perigo); }
.rodape-config { padding: 22px 26px; color: var(--texto-3); font-size: 12.5px; line-height: 1.5; }

.perfil { padding-bottom: 30px; }
.perfil-foto { display: grid; justify-items: center; gap: 12px; padding: 28px 0 24px; }
.perfil-campo { padding: 14px 28px 4px; }
.perfil-campo label { color: var(--acento-texto); font-size: 13.5px; font-weight: 500; }
.perfil-valor { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--linha); font-size: 16px; }
.perfil-valor span { flex: 1; }
.perfil-campo .dica { padding: 8px 0 6px; font-size: 13px; }

.aparelhos-capa { display: grid; justify-items: center; gap: 12px; padding: 28px 24px 20px; color: var(--texto-2); text-align: center; border-bottom: 8px solid var(--painel-2); }
.aparelhos-capa .ic { width: 64px; height: 64px; color: var(--acento); }
.aparelho { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--linha); }
.aparelho .pessoa-txt small { white-space: normal; }

/* ─── chamadas ──────────────────────────────────────────────────────────── */

/* A tela da chamada é escura nos dois temas, como a do celular. */
.chamada {
  --ch-fundo: #1c130d;
  --ch-texto: #f7efe8;
  --ch-texto-2: rgba(247, 239, 232, .72);
  --ch-verde: #23a35a;
  --ch-vermelho: #e0433f;
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(16, 9, 4, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--ch-texto); animation: abre .18s ease-out;
}
.ch-tela {
  width: min(400px, 100vw); height: min(620px, 100dvh); border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column; padding: 14px 16px 30px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(238, 120, 56, .38), transparent 62%),
    linear-gradient(180deg, #2a1a10, var(--ch-fundo) 70%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.ch-topo { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.ch-rotulo { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ch-texto-2); letter-spacing: .02em; }
.ch-rotulo .ic { width: 14px; height: 14px; }
.ch-topo .bt-ic { color: var(--ch-texto-2); }
.ch-topo .bt-ic:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.ch-centro { flex: 1; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; }
.ch-nome { font-size: 26px; font-weight: 500; margin-top: 18px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-estado { font-size: 15px; color: var(--ch-texto-2); font-variant-numeric: tabular-nums; min-height: 1.4em; }
.chamada.acabou .ch-estado { color: #ffb38a; }
.ch-avatar { position: relative; display: inline-grid; border-radius: 50%; }
.ch-avatar .avatar { position: relative; z-index: 1; box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); }
.ch-avatar.pulsando::before, .ch-avatar.pulsando::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(238, 120, 56, .35);
  animation: onda 2.2s ease-out infinite;
}
.ch-avatar.pulsando::after { animation-delay: 1.1s; }
@keyframes onda { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
.ch-botoes { display: flex; justify-content: center; gap: 40px; }
.ch-bt {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none;
  color: var(--ch-texto); font-size: 12.5px; padding: 0;
}
.ch-bt .ic {
  width: 62px; height: 62px; padding: 17px; border-radius: 50%; background: rgba(255, 255, 255, .14);
  transition: background .15s, transform .1s;
}
.ch-bt:hover .ic { background: rgba(255, 255, 255, .22); }
.ch-bt:active .ic { transform: scale(.94); }
.ch-bt.verde .ic { background: var(--ch-verde); }
.ch-bt.verde:hover .ic { background: #1d8c4c; }
.ch-bt.vermelho .ic { background: var(--ch-vermelho); padding: 15px; }
.ch-bt.vermelho:hover .ic { background: #c43431; }
.ch-bt.cinza.ligado .ic { background: #f7efe8; color: #1c130d; }
.ch-bt:disabled { opacity: .45; cursor: default; }
.ch-bt:focus-visible { outline: none; }
.ch-bt:focus-visible .ic { outline: 3px solid #ffb38a; outline-offset: 3px; }
.ch-bt.pequeno .ic { width: 38px; height: 38px; padding: 9px; }
.ch-bt.vermelho.pequeno .ic { padding: 8px; }

/* chegando: cartão no canto, não bloqueia o resto da tela */
.chamada.entrando { inset: 16px 16px auto auto; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; display: block; }
.ch-cartao {
  width: 340px; padding: 16px 18px 20px; border-radius: 18px; display: grid; gap: 16px;
  background: linear-gradient(160deg, #3a2112, var(--ch-fundo) 75%); box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  animation: chega .35s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes chega { from { transform: translateY(-14px) scale(.96); opacity: 0; } }
.ch-quem { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ch-quem > div { min-width: 0; display: grid; }
.ch-quem .ch-nome { margin: 0; font-size: 19px; }
.ch-quem small { color: var(--ch-texto-2); }
.ch-cartao .ch-botoes { gap: 56px; }
.ch-cartao .ch-bt .ic { width: 54px; height: 54px; padding: 14px; }
.ch-cartao .ch-bt.verde .ic { animation: balanca 1.3s ease-in-out infinite; }
@keyframes balanca { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-14deg); } 80% { transform: rotate(12deg); } 90% { transform: rotate(-8deg); } }

/* minimizada: pílula no topo, a conversa continua usável */
.chamada.mini {
  /* logo abaixo do cabeçalho da conversa (62 px), sem cobrir o nome */
  inset: 72px auto auto 50%; transform: translateX(-50%); background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border-radius: 30px;
  background-color: var(--ch-fundo); box-shadow: 0 8px 26px rgba(0, 0, 0, .35); animation: none;
  width: max-content; max-width: calc(100vw - 24px);
}
.chamada.mini > * { flex: none; }
.chamada.mini > .ch-mini-abre { flex: 0 1 auto; }
.ch-mini-abre { display: flex; align-items: center; gap: 10px; border: 0; background: none; color: inherit; padding: 2px 8px 2px 2px; min-width: 0; text-align: left; border-radius: 24px; }
.ch-mini-abre:hover { background: rgba(255, 255, 255, .08); }
.ch-mini-onda { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ch-verde); flex: none; }
.ch-mini-onda .ic { width: 18px; height: 18px; }
.ch-mini-txt { display: grid; min-width: 0; line-height: 1.2; }
.ch-mini-txt b { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.ch-mini-txt .ch-estado { font-size: 12px; }

/* bolha da chamada na conversa */
.bolha.de-chamada { padding: 6px 8px 18px; }
.chamada-bolha {
  display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 4px 30px 0 2px; text-align: left; min-width: 220px;
  border-radius: 6px;
}
.chamada-bolha:hover .chamada-bolha-ic { filter: brightness(.95); }
.chamada-bolha-ic {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--online) 16%, transparent); color: var(--online);
}
.chamada-bolha-ic .ic { width: 20px; height: 20px; }
.chamada-bolha.perdida .chamada-bolha-ic { background: color-mix(in srgb, var(--perigo) 14%, transparent); color: var(--perigo); }
.chamada-bolha-txt { display: grid; }
.chamada-bolha-txt b { font-weight: 500; font-size: 14.5px; }
.chamada-bolha-txt small { color: var(--texto-2); font-size: 12.5px; }

/* aba Chamadas */
.item-chamada .linha1 .nome { font-size: 16px; }
.item-chamada.perdida .nome { color: var(--perigo); }
.seta-chamada { display: inline-flex; flex: none; }
.seta-chamada .ic { width: 16px; height: 16px; }
.seta-chamada.chamadaSaida, .seta-chamada.chamadaEntrada { color: var(--online); }
.seta-chamada.chamadaPerdida { color: var(--perigo); }
.ligar-de-novo { color: var(--acento-texto); }
.ligar-de-novo:hover { background: var(--acento-suave); color: var(--acento-texto); }
.lista .secao { padding: 14px 20px 6px; }
.vazio-ic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--acento-suave); color: var(--acento-texto); margin-bottom: 4px; }
.vazio-ic .ic { width: 32px; height: 32px; }
.bt-ligar[aria-disabled="true"] { opacity: .4; }

/* ─── carregando, busca, rascunho, atalhos ──────────────────────────────── */

.item-esqueleto { display: flex; align-items: center; gap: 14px; height: 72px; padding: 0 14px 0 13px; }
.esq-avatar { width: 49px; height: 49px; border-radius: 50%; flex: none; }
.esq-linhas { flex: 1; display: grid; gap: 9px; }
.esq-linhas span { height: 11px; border-radius: 6px; width: 62%; }
.esq-linhas span + span { width: 86%; height: 9px; }
.esq-avatar, .esq-linhas span {
  background: linear-gradient(90deg, var(--painel-3) 25%, var(--hover) 50%, var(--painel-3) 75%);
  background-size: 300% 100%; animation: brilho 1.4s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 80ms);
}
@keyframes brilho { from { background-position: 100% 0; } to { background-position: 0 0; } }

.busca-conversa {
  display: flex; align-items: center; gap: 4px; padding: 8px 10px 8px 14px; flex: none; z-index: 2;
  background: var(--painel-2); border-bottom: 1px solid var(--linha); animation: abre .12s ease-out;
}
.busca-conversa .busca { flex: 1; margin: 0 6px 0 0; }
.busca-conta { font-size: 12.5px; color: var(--texto-2); white-space: nowrap; padding: 0 6px; font-variant-numeric: tabular-nums; }
.busca-mais { font-size: 13px; padding: 6px 10px; white-space: nowrap; }
.busca-conversa .bt-ic { width: 34px; height: 34px; }
.busca-conversa .bt-ic .ic { width: 20px; height: 20px; }
mark { background: #ffd54a; color: #1f1a16; border-radius: 3px; padding: 0 1px; }
.linha.achada-atual .bolha { box-shadow: 0 0 0 2.5px var(--acento), var(--sombra); }

.rascunho { color: var(--online); font-weight: 600; flex: none; }

kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 6px; border-radius: 5px; text-align: center;
  font: 600 11.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--painel); color: var(--texto-2); border: 1px solid var(--linha); box-shadow: 0 1px 0 var(--linha);
}
.atalhos-dica { margin-top: 18px; font-size: 13px !important; color: var(--texto-3) !important; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; }
.atalhos-dica .bt-link { font-weight: 500; color: var(--texto-3); padding: 0; gap: 4px; }
.atalhos-dica .bt-link:hover { color: var(--acento-texto); text-decoration: none; }
.kbd-mais { color: var(--texto-3); font-size: 11px; padding: 0 2px; }
.lista-atalhos { display: grid; grid-template-columns: 1fr auto; gap: 10px 18px; margin: 6px 0 0; align-items: center; }
.lista-atalhos dt { color: var(--texto); }
.lista-atalhos dd { margin: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 2px; }

/* ─── telas pequenas ────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .app.com-lateral { grid-template-columns: 64px minmax(300px, 34%) 1fr; }
  .app.com-lateral .lateral { position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 100vw); z-index: 30; box-shadow: var(--sombra-alta); }
}
@media (max-width: 760px) {
  .app, .app.com-lateral { grid-template-columns: 56px 1fr; }
  .painel { display: none; }
  .app.com-conversa { grid-template-columns: 1fr; }
  .app.com-conversa .trilho, .app.com-conversa .coluna { display: none; }
  .app.com-conversa .painel { display: flex; }
  .so-celular { display: inline-grid; }
  .mensagens { padding: 0 10px; }
  .bolha-e-acoes { max-width: 85%; }
  .login-modo { flex-direction: column-reverse; align-items: center; padding: 32px 22px; gap: 28px; }
  .login-passos h1 { font-size: 22px; margin-bottom: 20px; }
  .login-passos ol { font-size: 16px; }
  .login-cartao { margin: 24px 12px 0; }
  .compositor-faixa { padding-left: 14px; }
  .ch-tela { border-radius: 0; height: 100dvh; width: 100vw; padding-bottom: max(30px, env(safe-area-inset-bottom)); }
  .chamada.entrando { inset: 8px 8px auto 8px; }
  .ch-cartao { width: auto; }
  .busca-mais { display: none; }
  .trilho { padding-top: 8px; }
}

/* nomes coloridos legíveis no escuro */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.autor, .citacao b, .faixa-citacao b) { filter: brightness(1.7) saturate(.85); } }
:root[data-theme="dark"] :is(.autor, .citacao b, .faixa-citacao b) { filter: brightness(1.7) saturate(.85); }

/* tela de toque: sem hover, o menu da bolha fica sempre à mão */
@media (hover: none) {
  .reagir-rapido { display: none; }
  .atalhos-dica { display: none !important; }
  .bolha-menu { opacity: .7; }
  .item-menu { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ─── apagar e selecionar ───────────────────────────────────────────────── */

.dialogo-botoes.empilhados { flex-direction: column; align-items: flex-end; gap: 2px; }
.conversa.selecionando .linha:not(.sistema) { padding-left: 40px; cursor: pointer; border-radius: 8px; }
.conversa.selecionando .linha:not(.sistema):hover { background: color-mix(in srgb, var(--acento) 6%, transparent); }
.conversa.selecionando .linha:not(.sistema)::before {
  content: ""; position: absolute; left: 8px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 4px;
  border: 2px solid var(--texto-3); background: var(--painel); box-sizing: border-box;
}
.conversa.selecionando .linha.selecionada { background: color-mix(in srgb, var(--acento) 12%, transparent); }
.conversa.selecionando .linha.selecionada::before {
  border-color: var(--acento); background: var(--acento)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.conversa.selecionando .bolha-menu, .conversa.selecionando .reagir-rapido { display: none; }
.barra-selecao { display: flex; align-items: center; gap: 8px; padding: 10px 16px; min-height: 62px; }
.barra-selecao-n { flex: 1; font-size: 15px; }
.barra-selecao .bt-ic.perigo { color: var(--perigo); }
.barra-selecao .bt-ic:disabled { opacity: .4; cursor: default; }
