/* WizyApp Web: mesmas cores do app (azul-turquesa da marca, topo escuro), sem brilhos nem degradês. */
:root {
  --bg: #f2f4f6;
  --chat: var(--wall-light, #eef1f4);
  --card: #fff;
  --border: #e1e5e9;
  --text: #1a242e;
  --soft: #3e4c59;
  --muted: #6e7b87;
  --accent: #0a93ab;
  --accent-soft: #e1f3f6;
  --head: #1a2229;
  --on-head: #eef2f5;
  --mine: #dcf1f4;
  --theirs: #fff;
  --read: #0a93ab;
  --danger: #e5484d;
}
/* Escuro: o do sistema (sem escolha no Perfil) ou o escolhido no Perfil (data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark; /* campos do navegador (calendário, listas) no escuro, com o ícone claro */
    --bg: #12181d;
    --chat: var(--wall-dark, #0e1418);
    --card: #1c252c;
    --border: #2a353e;
    --text: #e8edf1;
    --soft: #b2bec7;
    --muted: #8796a2;
    --accent: #1fa9c0;
    --accent-soft: #0f2e34;
    --head: #1c252c;
    --on-head: #e8edf1;
    --mine: #16434b;
    --theirs: #1c252c;
    --read: #4cc6da;
    --danger: #f2555a;
    --pay: #1db980;
    --pay-soft: #113528;
  }
  :root:not([data-theme='light']) .brand { content: url(/web/logo-escuro.png); }
}
:root[data-theme='dark'] {
  color-scheme: dark;
    --bg: #12181d;
    --chat: var(--wall-dark, #0e1418);
    --card: #1c252c;
    --border: #2a353e;
    --text: #e8edf1;
    --soft: #b2bec7;
    --muted: #8796a2;
    --accent: #1fa9c0;
    --accent-soft: #0f2e34;
    --head: #1c252c;
    --on-head: #e8edf1;
    --mine: #16434b;
    --theirs: #1c252c;
    --read: #4cc6da;
    --danger: #f2555a;
    --pay: #1db980;
    --pay-soft: #113528;
}
:root[data-theme='dark'] .brand { content: url(/web/logo-escuro.png); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); }
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* Entrar com QR */
.pair { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 24px 16px; }
.pair-top { width: 100%; max-width: 920px; }
.brand { height: 36px; width: auto; display: block; }
.pair-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 40px; display: flex; gap: 48px; align-items: center; max-width: 920px; width: 100%; flex-wrap: wrap; }
.qr-wrap { position: relative; flex-shrink: 0; }
.qr-logo { position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; transform: translate(-50%, -50%); background: #fff; border-radius: 10px; padding: 3px; pointer-events: none; }
.remember { display: flex; align-items: center; gap: 10px; margin-top: 20px; font-size: 15px; color: var(--soft); cursor: pointer; }
.remember input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.help { margin-top: 16px; font-size: 15px; }
.help summary { color: var(--accent); cursor: pointer; font-weight: 600; }
.help ul { color: var(--soft); line-height: 1.7; padding-left: 20px; margin: 10px 0 0; }
.pair-foot { text-align: center; color: var(--soft); }
.pair-foot p { margin: 6px 0; }
.pair-foot a { color: var(--accent); font-weight: 600; text-decoration: none; }
.pair-foot a:hover { text-decoration: underline; }
.small { font-size: 13px; }
.pair-text { flex: 1; min-width: min(260px, 100%); }
.pair-text h1 { font-weight: 400; font-size: 28px; margin: 0 0 24px; }
.pair-text ol { padding-left: 20px; line-height: 2; font-size: 17px; color: var(--soft); }
.qr { width: min(264px, 72vw); height: min(264px, 72vw); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.qr svg { width: 100%; height: 100%; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn { background: var(--accent); color: #fff; border: 0; border-radius: 24px; padding: 10px 22px; font-weight: 600; }
.btn.danger { background: var(--danger); }
.link-btn { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 6px 10px; }

/* Duas colunas */
.app { display: flex; height: 100vh; max-width: 1600px; margin: 0 auto; }
.side { width: 30%; min-width: 300px; max-width: 460px; background: var(--card); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.side-head { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: var(--head); color: var(--on-head); }
.side-head .link-btn { color: var(--on-head); }
.brand { font-weight: 700; font-size: 20px; }
.search-box { padding: 8px 12px; }
.search { width: 100%; border: 0; border-radius: 8px; background: var(--bg); color: var(--text); padding: 10px 14px; font-size: 15px; outline: none; }
.list { flex: 1; overflow-y: auto; }
.row { width: 100%; display: flex; gap: 12px; align-items: center; padding: 0 12px; border: 0; background: none; color: inherit; text-align: left; }
.row:hover { background: var(--bg); }
.row.selected { background: var(--accent-soft); }
.row-body { flex: 1; min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--border); }
.row-top, .row-bottom { display: flex; align-items: center; gap: 6px; }
.row-name { flex: 1; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verified { display: inline-block; vertical-align: -2px; margin-left: 4px; flex-shrink: 0; }
.tick { display: inline-flex; vertical-align: -3px; color: var(--muted); }
.row-preview .tick { margin-right: 3px; }
.row-time { font-size: 12px; color: var(--muted); }
.row-time.unread { color: var(--accent); }
.row-preview { flex: 1; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { background: var(--accent); color: #fff; border-radius: 12px; min-width: 20px; height: 20px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.icon { font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.avatar { border-radius: 50%; overflow: hidden; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 700; font-size: 18px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Conversa */
.chat { flex: 1; display: flex; flex-direction: column; background: var(--chat); min-width: 0; }
.welcome { margin: auto; text-align: center; color: var(--muted); max-width: 420px; padding: 16px; }
.welcome h2 { color: var(--text); font-weight: 400; font-size: 30px; }
.chat-head { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--head); color: var(--on-head); }
.chat-name { font-weight: 600; font-size: 16px; }
.chat-sub { font-size: 13px; opacity: 0.8; }
.messages { flex: 1; overflow-y: auto; padding: 12px 6%; }
.day { text-align: center; margin: 10px 0; }
.day span { background: var(--card); color: var(--muted); font-size: 12.5px; padding: 5px 12px; border-radius: 8px; }
.day.notice span { display: inline-block; max-width: 520px; line-height: 1.4; }
.once { display: flex; align-items: center; gap: 10px; padding: 4px 40px 4px 0; font-weight: 600; }
.once.viewed { color: var(--muted); font-weight: 500; }
.once-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.6px dashed currentColor; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.line { display: flex; margin-top: 2px; }
.line.first { margin-top: 10px; }
.line.right { justify-content: flex-end; }
.stack { max-width: 65%; display: flex; flex-direction: column; }
.line.right .stack { align-items: flex-end; }
.bubble { padding: 6px 9px 5px; border-radius: 8px; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); word-wrap: break-word; overflow-wrap: anywhere; }
.bubble.mine { background: var(--mine); }
.bubble.theirs { background: var(--theirs); }
/* Botões de link do vendedor (Messenger/ManyChat): no pé do balão, largura toda, separados por linha. */
.bubble:has(.link-buttons) { min-width: 240px; overflow: hidden; }
.link-buttons { margin: 6px -9px -5px; }
.link-button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 12px; border-top: 1px solid var(--border); color: var(--accent); font-weight: 600; text-decoration: none; }
button.link-button { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; font-weight: 600; cursor: pointer; }
.link-button.invite { color: #1daa61; }
.link-button:hover { background: var(--accent-soft, rgba(10, 147, 171, 0.08)); }
.line.first .bubble.mine { border-top-right-radius: 2px; }
.line.first .bubble.theirs { border-top-left-radius: 2px; }
.author { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.forwarded { font-size: 12.5px; font-style: italic; color: var(--muted); margin-bottom: 3px; }
.forwarded { font-size: 12.5px; font-style: italic; color: var(--muted); margin-bottom: 3px; }
.text { font-size: 14.5px; line-height: 1.4; white-space: pre-wrap; }
.text .wa-mono { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; }
.text .wa-quote { color: var(--muted); }
.text a { color: #027eb5; }
.meta { font-size: 11px; color: var(--muted); text-align: right; margin-top: 2px; display: flex; justify-content: flex-end; gap: 4px; }
.tick.read { color: var(--read); }
.quote { background: rgba(0, 0, 0, 0.05); border-left: 4px solid var(--accent); border-radius: 6px; padding: 4px 8px; margin-bottom: 4px; font-size: 13px; display: flex; flex-direction: column; color: var(--muted); }
.quote b { color: var(--accent); }
.media .photo { max-width: 330px; max-height: 360px; border-radius: 6px; display: block; cursor: pointer; background: rgba(0, 0, 0, 0.1); }
.media audio { width: 280px; }
.video-box { position: relative; max-width: 330px; }
.video-box video { max-width: 330px; max-height: 360px; min-width: 200px; min-height: 140px; border-radius: 6px; display: block; background: #000; object-fit: contain; }
.video-box.round, .video-box.round video { width: 240px; height: 240px; min-width: 0; min-height: 0; border-radius: 50%; object-fit: cover; cursor: pointer; overflow: hidden; }
.video-play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.video-play[hidden] { display: none; }
.video-play-icon { width: 0; height: 0; margin-left: 5px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.video-status { position: absolute; left: 8px; bottom: 8px; right: 8px; color: #fff; font-size: 12px; text-shadow: 0 0 3px #000; pointer-events: none; }
.video-box.round .video-status { text-align: center; bottom: 40%; }
.doc { display: block; padding: 10px; background: rgba(0, 0, 0, 0.05); border-radius: 6px; color: var(--text); text-decoration: none; }
/* Reação: só o emoji, encostado na borda de baixo do balão (não é uma mensagem nova). */
.reactions { font-size: 16px; line-height: 1; margin: -9px 8px 0; position: relative; cursor: default; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35)); }

.composer { background: var(--bg); padding: 8px 16px; }
.composer.readonly { text-align: center; color: var(--muted); padding: 16px; font-size: 14px; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; resize: none; border: 0; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; max-height: 120px; background: var(--card); color: var(--text); outline: none; }
.icon-btn { background: none; border: 0; font-size: 20px; padding: 8px; color: var(--muted); }
.send { background: var(--accent); color: #fff; border: 0; width: 42px; height: 42px; border-radius: 50%; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.reply-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.reply-bar .quote { flex: 1; margin: 0; }

.back { display: none; color: var(--on-head); }
.poll { min-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.poll-opt { display: flex; flex-direction: column; gap: 4px; background: none; border: 0; color: inherit; text-align: left; padding: 6px 0; }
.poll-row { display: flex; justify-content: space-between; gap: 8px; }
.poll-opt.mine .poll-row span:first-child { color: var(--accent); font-weight: 600; }
.poll-bar { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.08); overflow: hidden; }
.poll-bar span { display: block; height: 100%; background: var(--accent); }
.card { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.card a { color: var(--accent); font-weight: 600; text-decoration: none; margin-top: 4px; }
.small { font-size: 12.5px; }
.center { text-align: center; }
.accent { color: var(--accent); font-weight: 600; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #111b21; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; }
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { background: var(--card); border-radius: 12px; padding: 22px; max-width: 380px; width: 100%; }
.dialog h3 { margin: 0 0 8px; }
.dialog p { color: var(--muted); margin: 0 0 18px; line-height: 1.4; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Celular / tela estreita: uma coluna de cada vez */
@media (max-width: 700px) {
  .side { width: 100%; max-width: none; min-width: 0; }
  .chat { display: none; }
  .app.chatting .side { display: none; }
  .app.chatting .chat { display: flex; }
  .pair-card { padding: 24px; gap: 24px; }
  .stack { max-width: 85%; }
  .back { display: block; }
}

/* Foto trancada: a capinha borrada até destrancar. */
.photo.sealed { filter: blur(6px); }

/* Prévia antes de mandar arquivo (colado, arrastado ou do clipe). */
.preview-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 24px; }
.preview-box { background: var(--card); border-radius: 14px; width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }
.preview-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-weight: 600; }
.preview-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 12px; }
.preview-image { max-width: 100%; max-height: 60vh; border-radius: 8px; object-fit: contain; }
.preview-file { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 16px; text-align: center; word-break: break-all; }
.preview-file-icon { font-size: 48px; }
.preview-foot { display: flex; gap: 8px; padding: 10px 12px; align-items: center; }
.preview-caption { flex: 1; border: 0; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; background: var(--bg); color: var(--text); outline: none; }

/* Setinha do balão (aparece com o mouse por cima) e o que ela abre. */
.bubble { position: relative; }
/* Como no WhatsApp Web: setinha fina no canto de cima, sobre um fundo da cor do balão que some para a esquerda (o texto
   embaixo esmaece em vez de ser cortado por um círculo). */
.bubble.mine { --bubble: var(--mine); }
.bubble.theirs { --bubble: var(--theirs); }
.chev { position: absolute; top: 0; right: 0; width: 42px; height: 26px; border: 0; padding: 0; border-top-right-radius: 8px; background: linear-gradient(to right, transparent, var(--bubble) 45%); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity 0.12s; }
.chev::after { content: ''; position: absolute; top: 7px; right: 10px; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.chev:hover { color: var(--text); }
.bubble:hover .chev, .chev:focus-visible { opacity: 1; }
.floating { position: fixed; z-index: 60; background: var(--card); border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3); }
.reactions-bar { display: flex; gap: 2px; padding: 6px 8px; border-radius: 28px; }
.reactions-bar .emoji { width: 40px; height: 40px; border: 0; border-radius: 20px; background: transparent; font-size: 24px; cursor: pointer; transition: transform 0.1s; }
.reactions-bar .emoji:hover { transform: scale(1.18); }
.reactions-bar .emoji.on { background: var(--accent-soft); }
.menu { display: flex; flex-direction: column; padding: 6px 0; min-width: 210px; }
.menu-row { display: flex; align-items: center; gap: 14px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; padding: 10px 18px; text-align: left; cursor: pointer; }
.menu-row:hover { background: var(--accent-soft); }
.menu-row.danger { color: #e5484d; }
.menu-ico { width: 18px; text-align: center; color: var(--muted); }
.menu-row.danger .menu-ico { color: #e5484d; }
.confirm-box { background: var(--card); border-radius: 14px; padding: 22px 22px 14px; width: min(380px, 100%); display: flex; flex-direction: column; gap: 6px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }
.confirm-box p { margin: 0 0 10px; font-size: 14px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn-text { background: transparent; border: 0; color: var(--accent); font: inherit; font-weight: 600; padding: 10px 14px; border-radius: 20px; cursor: pointer; }
.menu-divider { height: 1px; background: var(--border); margin: 4px 0; }
.sheet { background: var(--card); border-radius: 14px; width: min(420px, 100%); max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }
.info-rows { padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.info-row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.picker-search { padding: 0 12px 8px; display: flex; }
.picker-list { overflow-y: auto; padding-bottom: 8px; }
.picker-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; padding: 8px 16px; text-align: left; cursor: pointer; }
.picker-row:hover { background: var(--accent-soft); }
.btn-text.danger { color: #e5484d; }
.confirm-actions { flex-wrap: wrap; }

/* Logo animada na tela de boas-vindas: o balão "digitando" (logo-anim.svg) e o nome com as letras pulando uma de cada vez. */
@font-face { font-family: 'Poppins'; font-weight: 700; font-display: swap; src: url('/web/poppins-bold.ttf') format('truetype'); }
.brand-anim { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 18px; }
.bubble-anim { width: 60px; height: 49px; }
.wz-word { font-family: 'Poppins', system-ui, sans-serif; font-weight: 700; font-size: 38px; letter-spacing: -0.5px; color: var(--text); display: inline-flex; }
.wz-letter { display: inline-block; animation: hop 1.8s ease-in-out infinite; }
.wz-letter.wz-app { background: linear-gradient(135deg, #00B6FF, #00B07A); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes hop { 0%, 30%, 100% { transform: translateY(0); } 12% { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) { .wz-letter { animation: none; } }
.notify-btn { margin-top: 18px; }
.doc-status { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.doc-status:empty { display: none; }

/* Barra da esquerda com as abas (como no app: Conversas, Grupos e Perfil embaixo) */
.rail { width: 64px; flex-shrink: 0; background: var(--bg); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; }
.rail-gap { flex: 1; }
.rail-btn { position: relative; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--soft); display: flex; align-items: center; justify-content: center; }
.rail-btn:hover { background: var(--border); }
.rail-btn.on { background: var(--accent-soft); color: var(--accent); }
.rail-ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail-badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.side-title { font-weight: 700; font-size: 20px; }
.list-tools { padding: 0 12px 6px; display: flex; flex-direction: column; gap: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 0; border-radius: 16px; background: var(--bg); color: var(--soft); padding: 6px 14px; font-size: 14px; }
.chip:hover { background: var(--border); }
.chip.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.archived-row { display: flex; justify-content: space-between; align-items: center; border: 0; background: none; color: var(--text); padding: 10px 6px; font-size: 15px; border-radius: 8px; }
.archived-row:hover { background: var(--bg); }
.back-row { justify-content: flex-start; font-weight: 600; color: var(--accent); }
.row { cursor: pointer; }
.row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.badge.muted-badge, .dot.muted-badge { background: var(--muted); }
/* Setinha da conversa: aparece com o mouse por cima, como no WhatsApp Web. */
.row-chev { width: 0; height: 20px; border: 0; padding: 0; background: none; color: var(--muted); position: relative; overflow: hidden; transition: width 0.12s; }
.row:hover .row-chev, .row-chev:focus-visible { width: 20px; }
.row-chev::after { content: ''; position: absolute; top: 4px; left: 6px; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.menu-title { padding: 8px 18px 6px; font-weight: 700; font-size: 14px; color: var(--soft); }
/* Aba Perfil */
.profile { display: flex; flex-direction: column; gap: 10px; padding: 28px 24px 40px; max-width: 620px; margin: 0 auto; }
/* Perfil como as configurações do WhatsApp: uma coluna, cartões com linhas que abrem ao clicar. */
.profile-page { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; background: var(--bg); }
.profile-title { font-size: 22px; margin: 0 0 6px; }
.profile-out { align-self: center; }
.pf-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.pf-head { display: flex; align-items: center; gap: 16px; padding: 18px; overflow: visible; }
.pf-head .photo-btn { flex-shrink: 0; }
.pf-head .avatar { font-size: 30px; }
.pf-who { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.pf-name { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 600; }
.pf-edit { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 4px; border-radius: 50%; display: flex; }
.pf-edit:hover { background: var(--accent-soft); }
.pf-link { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.pf-editing { gap: 10px; }
.pf-actions { display: flex; align-items: center; gap: 12px; }
.pf-section { margin: 14px 4px 0; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.pf-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; cursor: pointer; outline: none; }
.pf-card:not(.pf-head) > * + * { border-top: 1px solid var(--border); }
.pf-row:hover, .pf-row:focus-visible { background: var(--accent-soft); }
.pf-ico { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pf-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-title { font-size: 15px; }
.pf-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-chev { color: var(--muted); display: flex; transition: transform 0.15s; }
.pf-exp.open .pf-chev { transform: rotate(180deg); }
.pf-panel { padding: 4px 16px 18px 64px; }
.pf-row.danger { color: var(--danger); }
.pf-row.danger .pf-ico { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.pf-switch { width: 40px; height: 24px; border-radius: 12px; border: 0; background: var(--border); position: relative; cursor: pointer; flex-shrink: 0; transition: background 0.15s; }
.pf-switch .knob { position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.pf-switch.on { background: var(--accent); }
.pf-switch.on .knob { left: 19px; }
.pf-note { text-align: center; margin-top: 6px; }
@media (max-width: 700px) {
  .app { flex-direction: column-reverse; }
  .rail { width: 100%; flex-direction: row; justify-content: space-around; padding: 6px 0; border-right: 0; border-top: 1px solid var(--border); }
  .rail-gap { display: none; }
  .app.chatting .rail { display: none; }
  .side { flex: 1; min-height: 0; }
}

/* Peças de venda (iguais ao app e ao Chat Vendedor): Pix em verde porque é venda. */
:root { --pay: #0e9f6e; --pay-soft: #e3f6ee; }
.pix-stack { max-width: 380px; width: 100%; }
.pix-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.pix-card.keycard { padding: 10px; }
.pix-steps { display: flex; gap: 8px; }
.pix-step { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.pix-step-bar { height: 4px; border-radius: 2px; background: var(--border); }
.pix-step.on { color: var(--pay); font-weight: 700; }
.pix-step.on .pix-step-bar, .pix-step.done .pix-step-bar { background: var(--pay); }
.pix-title { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0.3px; }
.pix-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pix-tier { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1.5px solid var(--border); background: var(--card); color: var(--text); border-radius: 10px; padding: 12px 6px 8px; }
.pix-tier b { font-size: 17px; }
.pix-tier.wide { grid-column: 1 / -1; }
.pix-tier.on { border-color: var(--pay); background: var(--pay-soft); }
.pix-tier.on b { color: var(--pay); }
.pix-tag { position: absolute; top: -9px; background: var(--pay); color: #fff; font-size: 11px; font-weight: 700; border-radius: 8px; padding: 1px 8px; }
.pix-small { font-size: 12.5px; color: var(--muted); }
.pix-chosen { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pix-chosen-value { font-size: 28px; font-weight: 800; color: var(--pay); }
.pix-row { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.pix-row.center { align-items: center; text-align: center; }
.pix-row-label { font-size: 13px; color: var(--muted); }
.pix-key { font-size: 24px; font-weight: 800; letter-spacing: 0.3px; text-align: center; color: var(--text); user-select: all; }
.pix-code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted); word-break: break-all; user-select: all; }
.pix-copy { align-self: stretch; border: 1.5px solid var(--pay); background: transparent; color: var(--pay); font-weight: 700; border-radius: 10px; padding: 10px; }
.pix-copy.strong { background: var(--pay); color: #fff; }
.pix-qr-box { display: flex; justify-content: center; }
.pix-qr { width: 180px; height: 180px; background: #fff; padding: 6px; border-radius: 6px; }
.pix-who { text-align: center; font-size: 14px; color: var(--muted); }
.pix-who b { color: var(--text); }
.pix-paid { border: 0; background: var(--pay); color: #fff; font-weight: 700; font-size: 15px; border-radius: 10px; padding: 13px; }
.pix-inline { margin-top: 6px; min-width: 240px; }
/* Botões do funil, em cima da barra de digitar */
.quick-replies { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0 8px; }
.qr-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.qr-btn { border: 1.5px solid var(--accent); background: var(--card); color: var(--accent); font-weight: 700; border-radius: 22px; padding: 9px 18px; }
.qr-btn.first { background: var(--accent); color: #fff; }
.qr-btn.pulse { animation: qr-pulse 0.9s ease-in-out infinite; }
@keyframes qr-pulse { 50% { transform: scale(1.06); } }
.qr-nudge { background: var(--theirs); border-radius: 10px; padding: 8px 12px; font-size: 14px; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); }
/* Videoaulas */
.lesson { display: block; width: 280px; max-width: 100%; margin-top: 6px; border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, 0.05); color: var(--text); text-decoration: none; }
.lesson-thumb { position: relative; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; background: #1a2229; overflow: hidden; }
.lesson-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lesson-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); }
.lesson-play { position: absolute; width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: #111; display: flex; align-items: center; justify-content: center; font-size: 20px; padding-left: 4px; }
.lesson-tag { position: absolute; left: 8px; top: 8px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
.lesson-meta { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; }
/* Carrossel "Seus materiais" */
.mat { display: flex; flex-direction: column; gap: 6px; max-width: min(560px, 90%); }
.mat-intro { align-self: flex-start; }
.mat-row { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.mat-card { flex: 0 0 250px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; border: 0; border-radius: 10px; background: var(--theirs); color: var(--text); padding: 0 0 10px; text-align: left; overflow: hidden; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); }
.mat-img { position: relative; height: 180px; display: flex; align-items: center; justify-content: center; background: #1a2229; overflow: hidden; }
.mat-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(0.6); transform: scale(1.2); }
.mat-book { position: relative; height: 86%; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); border-radius: 2px; }
.mat-pdf { color: #fff; font-weight: 800; font-size: 22px; }
.mat-tag { align-self: flex-start; margin: 6px 10px 0; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 8px; text-transform: uppercase; }
.mat-title { padding: 0 10px; font-size: 15px; }
.mat-open { padding: 4px 10px 0; color: var(--accent); font-weight: 700; font-size: 14px; }
.mat-dots { display: flex; justify-content: center; gap: 5px; }
.mat-dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--border); transition: width 0.15s; }
.mat-dots span.on { width: 16px; background: var(--accent); }
/* Prévia do link */
.link-card { display: flex; flex-direction: column; width: 300px; max-width: 100%; margin-bottom: 6px; border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, 0.05); color: var(--text); text-decoration: none; }
.link-img { width: 100%; max-height: 160px; object-fit: cover; }
.link-card.tall { width: 240px; }
.link-card.tall .link-img { max-height: none; aspect-ratio: 9 / 16; }
.link-body { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; }
.link-desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Nota de voz (como no app) */
.audio-note { width: 300px; max-width: 100%; }
.an-row { display: flex; align-items: center; gap: 8px; }
.an-left { width: 46px; display: flex; justify-content: center; }
.an-face { position: relative; }
.an-mic { position: absolute; right: -6px; bottom: -3px; display: flex; color: var(--accent); filter: drop-shadow(0 0 1px var(--bubble, var(--theirs))) drop-shadow(0 0 1px var(--bubble, var(--theirs))); }
.an-mic.played { color: #4a9fe0; }
.an-speed { width: 46px; height: 28px; border: 0; border-radius: 14px; background: rgba(0, 0, 0, 0.12); color: var(--text); font-weight: 700; font-size: 13px; }
.an-play { width: 32px; height: 32px; border: 0; background: none; padding: 0; position: relative; flex-shrink: 0; color: var(--soft); }
.an-play::before { content: ''; position: absolute; left: 9px; top: 6px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent currentColor; }
.an-play.pause::before { left: 8px; top: 7px; width: 5px; height: 18px; border: 0; border-left: 5px solid currentColor; border-right: 5px solid currentColor; box-sizing: content-box; width: 4px; }
.an-wave { flex: 1; height: 34px; display: flex; align-items: center; justify-content: space-between; position: relative; cursor: pointer; }
.an-bar { width: 2.5px; border-radius: 2px; background: var(--border); }
.an-bar.on { background: var(--soft); }
.an-thumb { position: absolute; top: 11px; left: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); pointer-events: none; }
.an-foot { padding-left: 94px; font-size: 11.5px; color: var(--muted); margin-top: -2px; }

/* Topo da conversa: no grupo, clicar abre os dados do grupo */
.chat-head { position: relative; }
.chat-who { display: flex; align-items: center; gap: 12px; border: 0; background: none; color: inherit; text-align: left; padding: 0; cursor: default; min-width: 0; }
.chat-who.clickable { cursor: pointer; }
.side-head { gap: 8px; }
.head-btn { border: 0; border-radius: 16px; background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; padding: 6px 12px; }
/* Painel da direita (dados do grupo) */
.chat { position: relative; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(400px, 100%); background: var(--card); border-left: 1px solid var(--border); display: flex; flex-direction: column; z-index: 20; box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18); }
.drawer-head { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: var(--head); color: var(--on-head); }
.drawer-head .icon-btn { color: var(--on-head); }
.drawer-body { flex: 1; overflow-y: auto; }
.drawer-top { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px; }
.drawer-top .avatar { font-size: 44px; }
.drawer-sec { border-top: 8px solid var(--bg); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.pre { white-space: pre-wrap; margin: 0; }
.member { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.member-body { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.member-who { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
button.member-who { cursor: pointer; border-radius: 8px; }
button.member-who:hover .member-body span:first-child { text-decoration: underline; }
.admin-tag { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 6px; }
.member-actions { display: flex; }
.member-actions .btn-text { padding: 6px 8px; font-size: 13px; }
.invite { display: flex; align-items: center; gap: 8px; }
.invite-link { flex: 1; font-size: 13px; color: var(--accent); word-break: break-all; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
.switch-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.row-action { text-align: left; padding: 10px 0; font-size: 15px; }
/* Campos editáveis (perfil e grupo) */
.edit-row { display: flex; flex-direction: column; gap: 6px; }
.edit-row + .edit-row { margin-top: 10px; }
.edit-label { font-size: 13px; color: var(--accent); font-weight: 600; }
.edit-view { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 2px 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.edit-value { flex: 1; min-width: 0; font-size: 15.5px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.edit-value.blank { color: var(--muted); }
.edit-pencil { color: var(--muted); display: flex; padding-top: 1px; transition: color 0.12s; }
.edit-view:hover .edit-pencil { color: var(--accent); }
.edit-box { position: relative; }
.edit-box .field-input { padding-right: 46px; border-width: 0 0 2px; border-radius: 6px 6px 0 0; border-color: var(--accent); background: rgba(127, 127, 127, 0.08); resize: none; }
.edit-count { position: absolute; right: 10px; bottom: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.edit-actions { display: flex; justify-content: flex-end; gap: 4px; }
.icon-btn.accent { color: var(--accent); }
.field-input { border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); padding: 9px 11px; font: inherit; font-size: 15px; outline: none; width: 100%; resize: vertical; }
.field-input:focus { border-color: var(--accent); }
.photo-btn { position: relative; border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; }
.photo-hint { position: absolute; inset: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.12s; }
.photo-btn:hover .photo-hint { opacity: 1; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--border); background: var(--card); color: var(--text); border-radius: 18px; padding: 6px 12px; font-size: 14px; }
.opt.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border); }
/* Criar grupo */
.new-group { max-height: 85vh; }
.ng-body { padding: 0 16px 8px; display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden; }
.ng-body .picker-list { max-height: 45vh; }
.picker-row input { width: 18px; height: 18px; accent-color: var(--accent); }

/* digitando… (topo da conversa e lista) */
.chat-sub.typing, .row-preview.typing { color: var(--accent); font-weight: 600; opacity: 1; }
.chat-head .chat-sub.typing { color: #7fdcea; }
/* Gravando nota de voz */
.rec-bar { display: flex; align-items: center; gap: 10px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: rec-blink 1s ease-in-out infinite; }
@keyframes rec-blink { 50% { opacity: 0.25; } }
.rec-time { font-variant-numeric: tabular-nums; font-size: 16px; }
.rec-hint { flex: 1; }
/* Criar enquete */
.poll-fields { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 40vh; }
.send:disabled, .btn:disabled { opacity: 0.5; cursor: default; }
.kind-ico { display: inline-flex; vertical-align: -3px; margin-right: 3px; color: var(--muted); }

/* Seus dados (Perfil) */
.aud-pills { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.aud-pill { border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.aud-pill.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.aud-place { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.aud-form { display: flex; flex-direction: column; gap: 14px; }
.aud-field { display: flex; flex-direction: column; gap: 6px; }
.aud-error { color: #d9534f; font-size: 13px; }
.aud-save { align-self: flex-start; }

/* Barras de rolagem finas e discretas (no lugar da barra grossa do navegador). */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
@media (max-width: 700px) { .profile { padding: 18px 14px 32px; } .pf-panel { padding-left: 16px; } }

/* Ligações: botões no topo da conversa a dois e a tela da chamada por cima de tudo (como no WhatsApp Web). */
.chat-calls { margin-left: auto; display: flex; gap: 2px; }
.chat-head .chat-calls .icon-btn { color: var(--on-head); display: flex; }
.call-screen { position: fixed; inset: 0; z-index: 1000; background: var(--head); color: var(--on-head); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 56px 16px 44px; overflow: hidden; }
.call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.call-local { position: absolute; right: 16px; top: 16px; width: min(220px, 30vw); aspect-ratio: 4 / 3; border-radius: 12px; object-fit: cover; transform: scaleX(-1); z-index: 3; box-shadow: 0 4px 16px #0006; background: #000; }
.call-top { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.call-who { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.call-name { font-size: 28px; font-weight: 700; }
.call-status { font-size: 16px; font-variant-numeric: tabular-nums; opacity: 0.85; }
.call-screen.with-video .call-avatar { display: none; }
.call-screen.with-video .call-name, .call-screen.with-video .call-status { text-shadow: 0 1px 6px #000a; }
.call-paused { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--head); }
.call-paused-text { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; opacity: 0.85; }
.call-buttons { position: relative; z-index: 2; display: flex; gap: 32px; }
.call-cell { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.call-round { width: 64px; height: 64px; border-radius: 50%; border: 0; background: #ffffff26; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.call-round.on { background: #fff; color: #1a2229; }
.call-round.danger { background: #e5484d; }
.call-round.accept { background: #1fa855; }
.call-round.hangup svg { transform: rotate(135deg); }
.call-label { font-size: 13px; opacity: 0.85; }
/* Chamada de vídeo antes de atender: a minha câmera na tela toda; tela compartilhada do celular inteira. */
.call-local.full { inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; z-index: 0; }
.call-remote.screen { object-fit: contain; }
.call-bottom { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.call-ask { display: flex; flex-direction: column; align-items: center; gap: 12px; background: #000a; padding: 14px 18px; border-radius: 16px; font-size: 15px; text-align: center; }
.call-ask-btns { display: flex; gap: 12px; }
.call-ask-btns button { border: 0; border-radius: 20px; padding: 9px 20px; font-weight: 600; cursor: pointer; color: #fff; }
.call-ask-no { background: #e5484d; }
.call-ask-yes { background: #1fa855; }
/* Arquivo subindo pelo WizyApp Web: nome, porcentagem e a barrinha. */
.uploads { display: flex; flex-direction: column; gap: 6px; }
.uploads:empty { display: none; }
.upload-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 12px; background: var(--card); border-radius: 10px; font-size: 13px; }
.upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.upload-pct { color: var(--muted); font-variant-numeric: tabular-nums; }
.upload-track { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--border, #0002); overflow: hidden; }
.upload-fill { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* Menção com @ no grupo: lista de participantes em cima da barra de digitar e o "@Nome" pintado na bolha */
.mention-list { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; margin-bottom: 6px; border-radius: 8px; background: var(--card); box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.25); }
.mention-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.mention-item:hover, .mention-item.on { background: var(--accent-soft); }
.mention-all-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; flex-shrink: 0; }
.mention-all small { color: var(--muted); font-size: 0.9em; }
.mention { color: var(--accent); font-weight: 600; }

/* Chamada em grupo (como no app e no WhatsApp): um quadro por pessoa, o de quem fala acende; faixa "Entrar" no grupo */
.gcall { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 28px; background: #0b141a; color: #fff; }
.gcall-head { display: flex; align-items: center; gap: 12px; }
.gcall-ico { display: flex; width: 36px; height: 36px; border-radius: 50%; align-items: center; justify-content: center; background: #ffffff1f; }
.gcall-title { font-size: 17px; font-weight: 700; }
.gcall-status { font-size: 13.5px; opacity: 0.8; font-variant-numeric: tabular-nums; }
.gcall-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 8px; }
.gcall-tile { position: relative; min-height: 0; border-radius: 14px; overflow: hidden; background: #1f2c34; display: flex; align-items: center; justify-content: center; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color 0.15s; }
.gcall-tile.speaking { outline-color: var(--accent); }
.gcall-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; background: #000; }
.gcall-tile.with-video video { display: block; }
.gcall-tile.with-video .gcall-face { visibility: hidden; }
.gcall-tile.mirror video { transform: scaleX(-1); }
.gcall-tile.screen video { object-fit: contain; }
.gcall-tile.calling .gcall-face { opacity: 0.55; }
.gcall-name { position: absolute; left: 10px; bottom: 8px; max-width: calc(100% - 20px); display: flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 12px; background: #0009; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcall-calling { font-weight: 400; opacity: 0.8; }
.gcall-mic { display: flex; color: #ff6b6b; }
.gcall-ringing { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.gcall-bottom { display: flex; justify-content: center; }
.gcall-bar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--card); border-bottom: 1px solid var(--border); font-size: 14px; }
.gcall-bar-ico { display: flex; color: var(--accent); }
.gcall-bar-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcall-bar-btn { border: 0; border-radius: 16px; padding: 6px 16px; background: #1fa855; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 640px) { .gcall-grid { grid-template-columns: repeat(min(var(--cols, 1), 2), minmax(0, 1fr)); } }
/* Destaque (como no Meet): quem compartilha a tela ou a pessoa fixada ocupa a área grande; os outros, uma faixa embaixo. */
.gcall-grid.spot { grid-template-columns: repeat(var(--strip, 1), minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr) clamp(84px, 18vh, 150px); grid-auto-rows: 0; }
.gcall-grid.spot .gcall-tile.featured { grid-column: 1 / -1; }
.gcall-grid.spot .gcall-tile:not(.featured) .gcall-face .avatar { width: 52px !important; height: 52px !important; font-size: 20px; }
.gcall-grid.spot .gcall-tile:not(.featured) .gcall-name { font-size: 12px; padding: 2px 7px; left: 6px; bottom: 5px; max-width: calc(100% - 12px); }
.gcall-tile { cursor: pointer; }
.gcall-tile.calling { cursor: default; }
.gcall-more { position: absolute; top: 6px; right: 6px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #0008; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.gcall-tile:hover .gcall-more, .gcall-more:focus-visible { opacity: 1; }
@media (hover: none) { .gcall-more { opacity: 1; } }
.gcall-menu { position: absolute; top: 44px; right: 6px; z-index: 3; min-width: 190px; display: flex; flex-direction: column; padding: 6px; border-radius: 12px; background: #1f2c34; box-shadow: 0 8px 24px #000a; cursor: default; }
.gcall-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: #fff; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.gcall-menu button:hover { background: #ffffff14; }
.gcall-menu button.danger { color: #ff6b6b; }
.gcall-host { margin-left: 4px; padding: 1px 6px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.gcall-pin { display: flex; color: #ffd166; }
.gcall-hostline { font-size: 12.5px; opacity: 0.75; }
.gcall-toast { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); z-index: 5; max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 10px; background: #111b21ee; box-shadow: 0 4px 16px #0008; font-size: 14px; }
.gcall .call-buttons { flex-wrap: wrap; justify-content: center; gap: 18px 24px; }
.overlay.over-call { z-index: 1300; }
/* Ligação a dois: aviso de que estou mostrando a minha tela. */
.call-sharing { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 16px; background: #000a; font-size: 14px; }
/* Leitor de PDF em tela cheia (como o do app): barra com Fechar, nome e Baixar; o PDF no leitor do navegador. */
.pdf-viewer { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #0d1216; }
.pdf-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid rgba(127, 127, 127, 0.18); color: var(--text); }
.pdf-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pdf-download { border: 0; border-radius: 999px; padding: 8px 18px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.pdf-download:hover { filter: brightness(1.08); }
.pdf-body { position: relative; flex: 1; min-height: 0; }
.pdf-pages { position: absolute; inset: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px; background: #525659; }
.pdf-page { background: #fff; box-shadow: 0 2px 10px #0006; flex-shrink: 0; max-width: 100%; height: auto !important; }
.pdf-status { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; color: #cfd8de; font-size: 15px; }

/* Ligação minimizada (como no WhatsApp Web): a barra verde no topo traz de volta; e o aviso da ligação em espera */
.call-min, .gcall-min { position: absolute; left: 16px; top: 16px; z-index: 4; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #0006; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.call-min:hover, .gcall-min:hover { background: #000a; }
.gcall-min { position: static; margin-left: auto; background: #ffffff1f; }
.gcall-head-text { min-width: 0; }
.call-pill { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 1001; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 6px 6px 6px 14px; border-radius: 22px; background: #1fa855; color: #fff; box-shadow: 0 4px 16px #0005; cursor: pointer; font-size: 14px; }
.call-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: call-pill-blink 1.2s ease-in-out infinite; flex-shrink: 0; }
@keyframes call-pill-blink { 50% { opacity: 0.3; } }
.call-pill-text { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.call-pill-back { opacity: 0.9; white-space: nowrap; }
.call-pill-end { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #e5484d; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.call-pill-end svg { transform: rotate(135deg); }
.call-waiting { position: fixed; top: 60px; right: 16px; z-index: 1200; width: min(380px, calc(100vw - 32px)); display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; padding: 14px; border-radius: 16px; background: #1f2c34; color: #fff; box-shadow: 0 8px 28px #0008; }
.call-waiting-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.call-waiting-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-waiting-text span { font-size: 13px; opacity: 0.8; }
.call-waiting-btns { grid-column: 1 / -1; display: flex; gap: 8px; }
.call-waiting-btns button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 20px; padding: 9px 12px; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.call-waiting-no { background: #e5484d; }
.call-waiting-no svg { transform: rotate(135deg); }
.call-waiting-yes { background: #1fa855; }
