/* Estilo da página de Mensagens (saiu de dentro do mensagens.html para ficar guardado no aparelho). */
:root {
  --accent: #00adee;
  --accent-strong: #0093cc;
  --accent-ink: #001a24;
  --danger: #e5484d;
  --online: #2fbf71;
  --radius: 14px;
  --msg-size: 15px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0b1014;
  --panel: #10181d;
  --panel-2: #152027;
  --hover: #1a262e;
  --active: #1f2e37;
  --line: #22313a;
  --text: #e9eef1;
  --muted: #8b9ba6;
  --chat-bg: #0b1216;
  --pattern: rgba(255, 255, 255, 0.035);
  --veu-cor: #060b0f;
  --bubble-me: #00587a;
  --bubble-me-text: #eaf8ff;
  --bubble-other: #1a262e;
  --bubble-other-text: #e9eef1;
  --quote-bg: rgba(0, 0, 0, 0.22);
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  --overlay: rgba(0, 0, 0, 0.6);
  --input: #1a262e;
  --read: #53d1ff;
}
:root[data-theme="light"] {
  --bg: #eef2f5;
  --panel: #ffffff;
  --panel-2: #f5f7f9;
  --hover: #f0f3f5;
  --active: #e6f5fc;
  --line: #e2e8ec;
  --text: #0f1b22;
  --muted: #637684;
  --chat-bg: #e9eef1;
  --pattern: rgba(0, 60, 90, 0.05);
  --veu-cor: #eef3f6;
  --bubble-me: #d3f0fd;
  --bubble-me-text: #0a2330;
  --bubble-other: #ffffff;
  --bubble-other-text: #0f1b22;
  --quote-bg: rgba(0, 40, 60, 0.06);
  --shadow: 0 1px 1px rgba(15, 27, 34, 0.12);
  --overlay: rgba(10, 20, 26, 0.45);
  --input: #ffffff;
  --read: #0093cc;
}
:root[data-fonte="pequena"] { --msg-size: 13.5px; }
:root[data-fonte="grande"] { --msg-size: 17px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; }
svg.i { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 16px; height: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); flex-shrink: 0;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
#btnSuporte { position: relative; }
.badge-suporte { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #ff3b5c; color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--panel); }
.badge-suporte[hidden] { display: none; }
/* Suporte Help Floripa no topo da lista (conta oficial) */
.faixa-suporte { display: flex; align-items: center; gap: 12px; margin: 0 8px 8px; padding: 10px 12px; border-radius: 16px; cursor: pointer; text-align: left; font: inherit; color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.faixa-suporte[hidden] { display: none; }
.faixa-suporte:hover { background: color-mix(in srgb, var(--accent) 16%, var(--panel)); }
.faixa-suporte:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faixa-suporte .fs-av { width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden; background: #fff; border: 2px solid var(--accent); }
.faixa-suporte .fs-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.faixa-suporte .fs-tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
.faixa-suporte .fs-tx strong { display: flex; align-items: center; font-size: 15px; }
.faixa-suporte .fs-tx small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.faixa-suporte .fs-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: #001a24; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.icon-btn:focus-visible, .conv-item:focus-visible, .pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, #0a4a63, #00adee); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 15px; letter-spacing: .3px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { width: 38px; height: 38px; font-size: 13px; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }

/* ---------- estrutura ---------- */
.app {
  display: grid;
  grid-template-columns: minmax(300px, 390px) 1fr;
  height: 100vh; height: 100dvh; height: var(--vv, 100dvh);
  max-width: 1600px; margin: 0 auto;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line);
}
.sidebar { position: relative; display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.chat { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--chat-bg); overflow: hidden; }

.side-top { display: flex; align-items: center; gap: 6px; padding: 12px 10px 8px 12px; padding-top: max(12px, env(safe-area-inset-top)); }
.side-top h1 { flex: 1; margin: 0 0 0 4px; font-size: 21px; font-weight: 750; letter-spacing: -.2px; }
.side-top h1 span { color: var(--accent); font-weight: 600; font-size: 12px; display: block; letter-spacing: .6px; text-transform: uppercase; }

.search { margin: 4px 12px 8px; position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 38px; border-radius: 10px; border: 1px solid transparent; background: var(--panel-2);
  color: var(--text); padding: 0 12px 0 40px; font-size: 14px; outline: none;
}
.search input:focus { border-color: var(--accent); background: var(--input); }
.search input::placeholder { color: var(--muted); }

/* faixas no topo da conversa */
.faixa-atend, .faixa-fixada { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: 13px; color: var(--text); }
.faixa-atend[hidden], .faixa-fixada[hidden] { display: none; }
/* Atendimento do negócio: uma linha só (não rouba espaço da conversa, nem com o teclado aberto).
   Tocar mostra o aviso inteiro. */
.faixa-atend { display: block; flex-shrink: 0; position: relative; padding: 7px 34px 7px 14px; color: var(--muted); font-size: 12.5px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.faixa-atend::after { content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; margin-top: -4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
#btnQuem, .chat-top, .painel-top { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.faixa-atend:hover { background: color-mix(in srgb, var(--muted) 8%, var(--panel)); }
.faixa-atend b { color: var(--text); font-weight: 700; }
.faixa-atend .ponto { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; background: #2fbf71; vertical-align: 1px; }
.faixa-atend .ponto.fechado { background: #8b9ba6; }
.faixa-atend .ponto.ausente, .faixa-atend .ponto.almoco { background: #f5a524; }
.faixa-atend .sep { margin: 0 6px; opacity: .6; }
.faixa-atend .aus { color: var(--text); }
/* gavetas do chat: atendimento e prévia do perfil (tocar e segurar no nome) */
.pv-fundo { position: fixed; inset: 0; z-index: 3000; background: rgba(2, 8, 14, .55); opacity: 0; transition: opacity .2s; }
.pv-fundo.on { opacity: 1; }
.pv-gaveta { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; display: flex; flex-direction: column; background: var(--panel); color: var(--text); border-top: 1px solid var(--line);
  border-radius: 24px 24px 0 0; box-shadow: 0 -18px 60px rgba(0, 0, 0, .4); transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom); outline: none; }
.pv-fundo.on .pv-gaveta { transform: none; }
@media (min-width: 700px) { .pv-gaveta { left: 50%; right: auto; width: 440px; bottom: 50%; transform: translate(-50%, 54%); opacity: 0; border-radius: 22px; border: 1px solid var(--line); transition: transform .2s, opacity .2s; }
  .pv-fundo.on .pv-gaveta { transform: translate(-50%, 50%); opacity: 1; } }
.pv-gaveta::before { content: ""; flex: none; width: 42px; height: 5px; margin: 8px auto 0; border-radius: 99px; background: var(--line); }
.pv-cab { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px 6px 20px; }
.pv-cab strong { flex: 1; font-size: 17px; font-weight: 800; }
.pv-x { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--muted) 14%, transparent); color: inherit; cursor: pointer; }
.pv-corpo { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 18px; display: grid; gap: 14px; align-content: start; }
.pv-sec { display: grid; gap: 8px; }
.pv-sec > h4 { margin: 4px 2px 0; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pv-status { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel-2, var(--bg)); }
.pv-status .pt { flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: #2fbf71; }
.pv-status.fechado .pt { background: #8b9ba6; } .pv-status.ausente .pt, .pv-status.almoco .pt { background: #f5a524; }
.pv-status .tx { display: grid; gap: 2px; min-width: 0; } .pv-status .tx b { font-size: 15.5px; } .pv-status .tx small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.pv-aviso { padding: 12px 14px; border-radius: 16px; border: 1px dashed color-mix(in srgb, #f5a524 60%, transparent); background: color-mix(in srgb, #f5a524 9%, transparent); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.pv-aviso small { display: block; margin-bottom: 3px; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #f5a524; }
.pv-dias { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pv-dia { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; font-size: 14px; }
.pv-dia + .pv-dia { border-top: 1px solid var(--line); }
.pv-dia span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.pv-dia.fech span:last-child { color: var(--muted); font-weight: 600; }
.pv-dia.hoje { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pv-dia.hoje span:first-child { font-weight: 800; color: var(--accent); }
.pv-dia.hoje span:first-child::after { content: " · hoje"; font-weight: 600; }
.pv-info { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); font-size: 14px; }
.pv-info svg { flex: none; color: var(--accent); }
.pv-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: none; color: inherit; font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer; }
.pv-btn.pri { border: 0; background: var(--accent); color: var(--accent-ink, #001a24); }
.pv-perfil { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 6px 0 2px; }
.pv-perfil .avatar { width: 84px; height: 84px; font-size: 28px; box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px color-mix(in srgb, var(--accent) 55%, transparent); }
.pv-perfil h3 { margin: 8px 0 0; font-size: 19px; display: inline-flex; align-items: center; gap: 6px; }
.pv-perfil h3 svg { width: 18px; height: 18px; color: #1d9bf0; }
/* cartão de localização/endereço */
.bolha.cartao-msg.local-msg { width: min(300px, 82%); padding: 4px; overflow: hidden; }
.lc { display: grid; }
.lc-abrir { display: block; color: inherit; text-decoration: none; }
.lc-mapa { position: relative; height: 150px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(90deg, transparent 47%, #fff 47%, #fff 53%, transparent 53%) 0 0 / 110px 100%, linear-gradient(0deg, transparent 44%, #fff 44%, #fff 50%, transparent 50%) 0 0 / 100% 90px, linear-gradient(28deg, transparent 49%, #f6e7b4 49%, #f6e7b4 52%, transparent 52%), #e6ece4; }
.lc-meio { position: absolute; left: 50%; top: 50%; }
.lc-meio img { position: absolute; width: 256px; height: 256px; max-width: none; user-select: none; }
.lc-sem { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, #e8eef2), color-mix(in srgb, #f59e0b 22%, #e8eef2)); }
.lc-pino { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -38px 0 0 -19px; display: grid; place-items: center; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: #e5484d; box-shadow: 0 6px 14px rgba(0,0,0,.35); color: #fff; }
.lc-pino svg.i { transform: rotate(45deg); width: 19px; height: 19px; }
.lc-sem .lc-pino { background: #f59e0b; }
.lc-cred { position: absolute; right: 4px; bottom: 3px; padding: 0 4px; border-radius: 4px; background: rgba(255,255,255,.75); color: #333; font-size: 9px; }
.lc-tx { display: flex; align-items: flex-start; gap: 9px; padding: 9px 8px 6px; }
.lc-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, #e5484d 18%, transparent); color: #e5484d; }
.local-msg .lc-ic svg.i { width: 17px; height: 17px; }
.lc-tx > div { min-width: 0; display: grid; gap: 1px; }
.lc-tx b { font-size: 14.5px; }
.lc-tx span { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.lc-tx small { font-size: 11.5px; opacity: .7; }
.lc-acoes { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.lc-acoes a, .lc-acoes button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border: 0; background: none; color: inherit; font: inherit; font-size: 13px; font-weight: 800; text-decoration: none; cursor: pointer; }
.lc-acoes > * + * { border-left: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
/* cartão de Pix */
.bolha.cartao-msg.pix-msg { width: min(310px, 86%); padding: 4px; overflow: hidden; }
.px { display: grid; gap: 8px; padding: 6px 6px 4px; }
.px-cab { display: flex; align-items: center; gap: 10px; }
.px-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #32bcad; color: #fff; }
.px-ic svg.i { width: 20px; height: 20px; }
.px-cab small { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; opacity: .75; }
.px-cab b { font-size: 21px; letter-spacing: -.01em; }
.px-dados { display: grid; gap: 4px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, currentColor 7%, transparent); }
.px-dados div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.px-dados span { opacity: .7; flex: none; }
.px-dados strong { text-align: right; overflow-wrap: anywhere; }
.px-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.px-acoes button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 6px 8px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); border-radius: 12px; background: none; color: inherit; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.px-acoes button.pri { grid-column: 1 / -1; border: 0; background: #32bcad; color: #fff; }
.px-qr { justify-self: center; width: min(220px, 70vw); padding: 8px; border-radius: 14px; background: #fff; }
.px-qr svg { display: block; width: 100%; height: auto; }
.px-aviso { margin: 0; font-size: 11.5px; line-height: 1.4; opacity: .7; }
.px-golpe { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; line-height: 1.4; font-weight: 800; color: #b91c1c; background: color-mix(in srgb, #ef4444 14%, transparent); border: 1px solid color-mix(in srgb, #ef4444 45%, transparent); }
.px-campo { display: grid; gap: 4px; margin-bottom: 10px; font-size: 13px; font-weight: 700; }
.px-campo input { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2, var(--panel)); color: var(--text); font: inherit; font-weight: 500; font-size: 15px; }
.px-campo small { font-weight: 500; color: var(--muted); font-size: 12px; }
.px-campo .px-tipo.erro { color: #e5484d; }
.pv-corpo > .pv-btn + .pv-btn { margin-top: 8px; }
.pv-btn.perigo { color: #e5484d; border-color: color-mix(in srgb, #e5484d 40%, var(--line)); }
.px-vazio { margin: 8px; font-size: 13px; color: var(--muted); }
.lc-previa { padding: 4px; border-radius: 16px; background: var(--bolha-minha, color-mix(in srgb, var(--accent) 30%, var(--panel))); color: var(--text); }
.ax-grade { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
.ax-op { display: grid; justify-items: center; align-content: start; gap: 5px; padding: 6px 2px; border: 0; border-radius: 16px; background: none; color: inherit; font: inherit; cursor: pointer; text-align: center; }
.ax-op:hover { background: color-mix(in srgb, var(--muted) 10%, transparent); }
.ax-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--ax) 80%, #fff), var(--ax)); box-shadow: 0 8px 18px -8px var(--ax); }
.ax-ic svg.i { width: 25px; height: 25px; }
.ax-op b { font-size: 12.5px; font-weight: 750; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-op small { font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.pv-fundo { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pv-id { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 2px; }
.pv-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 13%, transparent); color: var(--muted); font-size: 13px; font-weight: 650; line-height: 1; }
.pv-chip b { font-weight: 800; color: var(--accent); margin-right: -3px; }
.pv-chip svg.i { width: 13px; height: 13px; }
.pv-verif { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, #1d9bf0 14%, transparent); color: #1d9bf0; font-size: 12.5px; font-weight: 800; }
.pv-verif svg.i { width: 15px; height: 15px; }
.pv-nota-geral { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.pv-nota-geral b { color: var(--text); font-size: 14.5px; }
.pv-nota-geral svg.i, .pv-nota svg.i { width: 15px; height: 15px; color: #f5b301; fill: #f5b301; stroke: #f5b301; }
.pv-nota { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; color: var(--muted); }
.pv-nota b { color: var(--text); }
.pv-nota em { font-style: normal; font-weight: 700; color: var(--muted); }
.pv-perfil p { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--text); max-width: 34ch; overflow-wrap: anywhere; }
.pv-perfil .cid { font-size: 13px; color: var(--muted); }
.pv-negs { display: grid; gap: 10px; }
.pv-neg { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel-2, var(--bg)); color: inherit; font: inherit; text-align: left; cursor: pointer; position: relative; overflow: hidden; }
.pv-neg::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--cor); }
.pv-neg .ft { flex: none; width: 56px; height: 56px; border-radius: 14px; background: color-mix(in srgb, var(--cor) 25%, var(--panel)) center / cover no-repeat; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px; }
.pv-neg .tx { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pv-neg .tx small { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--cor); }
.pv-neg .tx b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-neg .tx span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-neg .ir { flex: none; padding: 7px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: #fff; background: var(--cor); }
.pv-neg .promo { color: #f43f5e !important; font-weight: 700; }
.pv-vazio { padding: 6px 2px; color: var(--muted); font-size: 13.5px; }
.pv-dica { margin: -2px 2px 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.chat-top, .faixa-fixada, .busca-chat { flex-shrink: 0; }
/* ligações: no celular a lupa sai do topo (fica no ⋯ → Pesquisar na conversa) para caber Vídeo e Ligar */
@media (max-width: 480px) { #btnBuscarNaConversa { display: none; } }
.lg { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.lg-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #22c55e, #0fb5a6); }
.lg-ic.perdeu { background: linear-gradient(135deg, #f87171, #e5484d); }
.lg-tx { display: grid; flex: 1; min-width: 0; } .lg-tx b { font-size: 14px; } .lg-tx small { font-size: 12px; color: var(--muted); }
.lg-bt { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.faixa-fixada { width: 100%; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.faixa-fixada > svg { color: var(--accent); flex-shrink: 0; }
.faixa-fixada .tx { flex: 1; min-width: 0; display: grid; }
.faixa-fixada .tx small { color: var(--accent); font-weight: 700; font-size: 11.5px; }
.faixa-fixada .tx span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.faixa-fixada .x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.faixa-fixada .x:hover { background: var(--hover); color: var(--text); }
/* status do pedido */
.pedido-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pedido-status .pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: color-mix(in srgb, var(--cor-st, #8b9ba6) 18%, transparent); color: var(--cor-st, #8b9ba6); }
.pedido-status button { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.pedido-trilha { display: flex; gap: 4px; margin-top: 8px; }
.pedido-trilha i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.pedido-trilha i.on { background: var(--cor-st, #2fbf71); }
.bolha.status-msg { padding: 8px 12px; }
/* cartão do pedido (delivery e lojinha) */
.bolha.cartao-msg.pedido-pro { width: min(330px, 88%); max-width: none; padding: 0; overflow: hidden; }
.pd { display: grid; color: inherit; border-top: 4px solid var(--assunto); }
.pd-cab { display: flex; align-items: center; gap: 10px; padding: 11px 12px 9px; }
.pd-logo { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--assunto) center / cover no-repeat; }
.pd-logo svg.i { width: 22px; height: 22px; }
.pd-cab-tx { min-width: 0; display: grid; gap: 1px; }
.pd-cab-tx small { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--assunto); }
.pd-cab-tx strong { font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-status { margin: 0 10px; padding: 10px 11px; border-radius: 14px; background: color-mix(in srgb, var(--cor-st) 12%, transparent); border: 1px solid color-mix(in srgb, var(--cor-st) 30%, transparent); display: grid; gap: 9px; }
.pd-st-topo { display: flex; align-items: center; gap: 10px; }
.pd-st-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--cor-st); }
.pd-st-ic svg.i { width: 19px; height: 19px; }
.pd-st-topo b { display: block; font-size: 14px; }
.pd-st-topo small { display: block; font-size: 12px; opacity: .78; line-height: 1.35; }
.pd-passos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.pd-passos li { position: relative; display: grid; justify-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; opacity: .55; text-align: center; }
.pd-passos li::before { content: ""; position: absolute; top: 8px; right: 50%; width: 100%; height: 2px; background: color-mix(in srgb, currentColor 25%, transparent); z-index: 0; }
.pd-passos li:first-child::before { display: none; }
.pd-passos li.feito::before, .pd-passos li.atual::before { background: var(--cor-st); }
.pd-passos li i { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 2px solid color-mix(in srgb, currentColor 35%, transparent); color: #fff; }
.pd-passos li i svg.i { width: 11px; height: 11px; stroke-width: 3.4; }
.pd-passos li.feito, .pd-passos li.atual { opacity: 1; }
.pd-passos li.feito i, .pd-passos li.atual i { background: var(--cor-st); border-color: var(--cor-st); }
.pd-passos li.atual span { color: var(--cor-st); font-weight: 800; }
.pd-acoes { display: flex; gap: 6px; }
.pd-acoes button { min-height: 36px; border-radius: 11px; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.pd-acoes .pri { flex: 1; border: 0; background: var(--cor-st); color: #fff; }
.pd-acoes .sec { flex: 1; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); background: none; color: inherit; }
.pd-acoes .ic { flex: none; width: 38px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); background: none; color: inherit; }
.pd-sec { margin: 11px 12px 2px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; opacity: .65; }
.pd-itens { list-style: none; margin: 0; padding: 0 12px; display: grid; }
.pd-itens li { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent); }
.pd-itens .q { flex: none; min-width: 28px; padding: 1px 0; border-radius: 6px; text-align: center; font-size: 12px; font-weight: 800; color: var(--assunto); background: color-mix(in srgb, var(--assunto) 14%, transparent); }
.pd-itens .n { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.pd-itens .n small { display: block; font-size: 11.5px; opacity: .65; }
.pd-itens .v { flex: none; font-weight: 700; white-space: nowrap; }
.pd-mais { margin: 4px 0 0; padding: 6px 0; border: 0; background: none; color: var(--assunto); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; text-align: left; }
.pd-valores { margin: 8px 12px 0; display: grid; gap: 4px; font-size: 13px; }
.pd-alerta { margin: 8px 12px 0; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; line-height: 1.4; font-weight: 700; color: #b45309; background: color-mix(in srgb, #f59e0b 16%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 45%, transparent); }
.pd-conferido { display: flex; align-items: center; gap: 6px; margin: 8px 12px 0; padding: 7px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 750; color: #15803d; background: color-mix(in srgb, #22c55e 13%, transparent); border: 1px solid color-mix(in srgb, #22c55e 35%, transparent); }
.pd-conferido svg { width: 15px; height: 15px; flex-shrink: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pd-conferido { color: #4ade80; } }
:root[data-theme="dark"] .pd-conferido { color: #4ade80; }
.pd-valores div { display: flex; justify-content: space-between; gap: 10px; }
.pd-valores div span:first-child { opacity: .75; }
.pd-valores .gratis span:last-child { color: #2fbf71; font-weight: 800; }
.pd-valores .cupom span:first-child { opacity: 1; font-weight: 800; color: var(--assunto); }
.pd-valores .cupom span:last-child { text-align: right; overflow-wrap: anywhere; }
.pd-valores .tot { margin-top: 4px; padding-top: 8px; border-top: 1px dashed color-mix(in srgb, currentColor 22%, transparent); font-size: 16px; font-weight: 900; }
.pd-valores .tot span:first-child { opacity: 1; }
.pd-valores .tot span:last-child { color: var(--assunto); }
.pd-info { margin: 10px 12px 0; display: grid; gap: 8px; }
.pd-info > div { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; }
.pd-info-ic { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, currentColor 9%, transparent); }
.pd-info-ic svg.i { width: 16px; height: 16px; }
.pd-info small { display: block; font-size: 11px; opacity: .65; font-weight: 700; }
.pd-info span { overflow-wrap: anywhere; line-height: 1.35; }
.pd-ver { display: block; margin: 10px 0 0; padding: 10px 12px; text-align: center; border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent); font-size: 13px; font-weight: 800; color: var(--assunto); text-decoration: none; }
.bolha.pedido-pro .meta, .bolha.pedido-pro .hora { padding: 0 12px 8px; }
.status-linha { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.status-linha .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--cor-st, #00adee) 20%, transparent); color: var(--cor-st, #00adee); flex-shrink: 0; }
.status-linha .ic svg.i { width: 18px; height: 18px; }
.status-linha small { display: block; color: var(--muted); font-size: 11.5px; }
.pedido-status .pill svg.i { width: 15px; height: 15px; }
.aval-dica { margin-top: 6px; font-size: 12.5px; color: #f5a524; line-height: 1.4; }
/* notas e etiquetas do cliente */
.notas-quem { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.notas-quem strong { display: block; font-size: 15px; }
.notas-quem small { color: var(--muted); }
.notas-etiquetas { display: flex; flex-wrap: wrap; gap: 6px; }
.notas-etiquetas button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.notas-etiquetas button.on { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: var(--accent); color: var(--accent); }
#notasTexto { width: 100%; min-height: 120px; resize: vertical; border: 1px solid var(--line); background: var(--input); color: var(--text); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; box-sizing: border-box; }
.notas-priv { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin: 8px 0 12px; }
#notasSalvar { width: 100%; }
.conv-etiquetas { display: flex; gap: 4px; margin-top: 4px; overflow: hidden; }
.conv-etiquetas span { flex-shrink: 0; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
/* atendimento nas configurações */
.dias { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 8px; }
.dias button { width: 40px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.dias button.on { background: var(--accent); border-color: var(--accent); color: #001a24; }
.horas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.horas input { min-width: 0; border: 1px solid var(--line); background: var(--input); color: var(--text); border-radius: 9px; padding: 7px 8px; font: inherit; }
#atendMensagem { width: 100%; min-height: 64px; resize: vertical; border: 1px solid var(--line); background: var(--input); color: var(--text); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13.5px; box-sizing: border-box; margin: 4px 0 8px; }
.atend-bloco { margin: 0 0 6px; }
.atend-semana { display: grid; gap: 6px; margin: 2px 0 8px; }
.dia-linha { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.dia-linha .dia-tog { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; padding: 4px 2px; text-align: left; }
.dia-linha .dia-tog i { width: 30px; height: 18px; border-radius: 9px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.dia-linha .dia-tog i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.dia-linha.on .dia-tog { color: var(--text); }
.dia-linha.on .dia-tog i { background: var(--accent); }
.dia-linha.on .dia-tog i::after { transform: translateX(12px); }
.dia-linha .dia-horas { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 13px; }
.dia-linha .dia-horas input { width: 0; min-width: 0; flex: 1; border: 1px solid var(--line); background: var(--input); color: var(--text); border-radius: 9px; padding: 6px 6px; font: inherit; font-size: 13.5px; }
.dia-linha:not(.on) .dia-horas { opacity: .45; }
.dia-linha .fechado { font-size: 13px; color: var(--muted); }
.atend-copiar, .atend-limpar { border: 0; background: none; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 2px 0 8px; text-align: left; }
.atend-limpar { padding: 0 4px; }
.atend-sub { padding-left: 0; }
.atend-volta label { color: var(--text); font-weight: 600; }
.atend-dica { margin: -4px 0 4px; font-size: 12px; color: var(--muted); }
.atend-previa { margin: 6px 0 10px; padding: 9px 12px; border-radius: 12px; border: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.atend-previa:empty { display: none; }
.atend-previa b { color: var(--text); }
.atend-status { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; min-height: 20px; font-size: 13px; font-weight: 600; color: var(--muted); }
.atend-status.ok { color: #2fbf71; }
.atend-status.erro { color: var(--danger); }
.atend-status.salvando::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: girarAtend .8s linear infinite; }
@keyframes girarAtend { to { transform: rotate(360deg); } }
.atend-info { color: var(--muted); font-size: 12.5px; margin: 0 0 8px; }
#secaoAtend.carregando > :not(h3):not(.atend-info) { opacity: .45; pointer-events: none; }
/* seleção de várias conversas */
.barra-selecao { display: flex; align-items: center; gap: 4px; margin: 0 8px 8px; padding: 4px 6px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.barra-selecao[hidden] { display: none; }
.barra-selecao strong { flex: 1; font-size: 15px; }
.barra-selecao .icon-btn { color: var(--text); }
.barra-selecao .icon-btn.perigo { color: var(--danger); }
.barra-selecao .icon-btn:disabled { opacity: .35; cursor: default; }
.sel-todas { border: 0; background: none; color: var(--accent); font-weight: 700; font-size: 13.5px; cursor: pointer; padding: 8px; }
body.selecionando .side-top, body.selecionando .modos { display: none; }
.conv-item .sel-marca { display: none; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--muted); place-items: center; color: #fff; }
body.selecionando .conv-item .sel-marca { display: grid; }
.conv-item.marcada { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.conv-item.marcada .sel-marca { background: var(--accent); border-color: var(--accent); }
.conv-item .sel-marca svg { width: 14px; height: 14px; stroke-width: 3; opacity: 0; }
.conv-item.marcada .sel-marca svg { opacity: 1; }
/* barra da rede no pé da lista */
.barra-rede { flex-shrink: 0; display: grid; grid-template-columns: repeat(5, 1fr); margin: 6px 10px calc(10px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 22px;
  background: var(--panel-2); border: 1px solid var(--line); }
.barra-rede a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 16px; color: var(--muted); text-decoration: none; font-size: 10.5px; font-weight: 700; }
@media (hover: hover) { .barra-rede a:hover { color: var(--text); background: var(--hover); } }
.barra-rede [aria-current="page"], .barra-rede [aria-current="page"]:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.barra-rede .mini-av { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 9px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0a4a63, #00adee); }
.barra-rede .mini-av img { width: 100%; height: 100%; object-fit: cover; }
body.selecionando .barra-rede { display: none; }
/* foto nas configurações */
.cfg-foto { position: relative; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; flex-shrink: 0; }
.cfg-foto .cam { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #001a24; border: 3px solid var(--panel); }
.cfg-perfil .tx { min-width: 0; }
.cfg-perfil-acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cfg-perfil-acoes .btn-sec { text-decoration: none; padding: 6px 10px; font-size: 12.5px; }
/* Pessoal | Negócios */
.modos { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; margin: 2px 12px 10px; padding: 4px; border-radius: 14px; background: var(--panel-2); }
.modos button { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; height: 38px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; }
.modos button svg { width: 17px; height: 17px; }
.modos button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 6px rgba(0, 0, 0, .18); }
.modos button[data-modo="negocios"][aria-selected="true"] { color: var(--accent); }
.modos .modo-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3b5c; color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.modos .modo-n[hidden] { display: none; }
.modos button[data-modo="chamadas"][aria-selected="true"] { color: #2fbf71; }
/* Aba Chamadas: registro das ligações (sem a busca e os filtros das conversas). */
body.modo-chamadas .search, body.modo-chamadas .pills, body.modo-chamadas #faixaSuporte { display: none !important; }
.rc-topo { display: flex; align-items: center; gap: 6px; padding: 0 12px 8px; }
.rc-topo .pill { flex: none; }
.rc-topo .rc-limpar { margin-left: auto; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 6px 4px; }
.rc-dia { padding: 12px 16px 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rc-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px 10px 16px; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.rc-item .avatar { flex: none; }
.rc-tx { flex: 1; min-width: 0; display: grid; gap: 3px; }
.rc-tx b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-item.perdida .rc-tx b { color: #ef4444; }
.rc-tx small { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rc-seta { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rc-seta.saiu { color: #2fbf71; } .rc-seta.entrou { color: var(--accent); } .rc-item.perdida .rc-seta { color: #ef4444; }
.rc-ligar { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); cursor: pointer; }
.rc-ligar:disabled { opacity: .35; cursor: default; }
.rc-ligar svg { width: 20px; height: 20px; }
.pills { display: flex; gap: 8px; padding: 0 12px 10px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: 0 0 auto; border: 0; border-radius: 999px; padding: 6px 14px; background: var(--panel-2); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.pill.on { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.pill.assunto { display: inline-flex; align-items: center; gap: 6px; }
.pill.assunto i { width: 8px; height: 8px; border-radius: 50%; background: var(--assunto); }
.pill.assunto.on { background: color-mix(in srgb, var(--assunto) 18%, transparent); color: var(--assunto); }
.conv-item.com-assunto::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--assunto); }
.conv-item.com-assunto .avatar { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--assunto); }
.conv-previa .conv-assunto { flex-shrink: 0; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 800; color: var(--assunto); background: color-mix(in srgb, var(--assunto) 14%, transparent); }
.quem-txt .assunto-topo { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 10.5px; font-weight: 800; vertical-align: middle; color: var(--assunto); background: color-mix(in srgb, var(--assunto) 16%, transparent); }
.bolha.cartao-msg { padding: 0; overflow: hidden; min-width: 230px; max-width: min(300px, 84%); }
.cartao-msg .cm-link { display: block; text-decoration: none; color: inherit; border-top: 4px solid var(--assunto); }
.cartao-msg .cm-ft { aspect-ratio: 16 / 9; background: var(--panel-2) center / cover; }
/* publicação enviada do Diário (como no Instagram) */
/* Resposta da caixa de perguntas (como no Instagram): a pergunta na faixa colorida e a resposta embaixo */
/* ===== Respostas e reações a flash / caixa de perguntas (02/11, modelo único, como no Instagram) =====
   Linha pequena dizendo o que foi ("Você respondeu ao flash de Ana"), a miniatura compacta (toque abre) e o texto num
   balão igual aos outros da conversa. Nada de cartão grande: a conversa fica homogênea. */
.bolha.cartao-msg:is(.flash-msg, .caixa-msg), .minha .bolha.cartao-msg:is(.flash-msg, .caixa-msg) { min-width: 0; width: auto; max-width: min(280px, 80%); padding: 0; overflow: visible; background: none; color: var(--text); border: 0; box-shadow: none; }
.rsp { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.minha .rsp { align-items: flex-end; }
.rsp-rot { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; color: var(--muted); line-height: 1.3; }
.minha .rsp-rot { text-align: right; }
.rsp-rot svg { flex: none; width: 13px; height: 13px; fill: #ff9f0a; }
.rsp-quadro { position: relative; }
.rsp-quadro:has(.rsp-emoji) { margin-bottom: 12px; }
.rsp-mini { position: relative; display: block; width: 132px; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #1c2a33, #0b1014); border: 1px solid var(--line); text-decoration: none; color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.18); -webkit-tap-highlight-color: transparent; }
.rsp-mini:active { transform: scale(.98); }
.rsp-mini > img, .rsp-mini > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.rsp-mini.carregando { animation: fc-pisca 1.2s ease-in-out infinite; }
@keyframes fc-pisca { 50% { opacity: .55; } }
.rsp-mini .fc-topo { position: absolute; z-index: 2; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 5px; padding: 8px 7px 18px; background: linear-gradient(rgba(0,0,0,.55), transparent); }
.rsp-mini .fc-topo .avatar { width: 20px; height: 20px; font-size: 9px; flex: none; box-shadow: 0 0 0 1.5px #fff; }
.rsp-mini .fc-topo b { min-width: 0; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.rsp-mini .fc-tempo { margin-left: auto; flex: none; font-size: 10px; font-weight: 800; opacity: .9; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.rsp-mini.sumiu { display: grid; place-items: center; align-content: center; gap: 4px; aspect-ratio: auto; min-height: 96px; padding: 12px; background: var(--panel-2); color: var(--muted); text-align: center; font-size: 12px; font-weight: 750; box-shadow: none; }
.rsp-mini.sumiu svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.rsp-mini.sumiu small { font-weight: 600; font-size: 10.5px; opacity: .8; }
.rsp-emoji { position: absolute; z-index: 3; bottom: -10px; left: -8px; display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 22px; line-height: 1; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.minha .rsp-emoji { left: auto; right: -8px; }
.rsp-txt { max-width: 100%; margin-top: 2px; padding: 8px 12px; border-radius: 18px; background: var(--bubble-other); color: var(--bubble-other-text); font-size: var(--msg-size); line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.minha .rsp-txt { background: var(--bubble-me); color: var(--bubble-me-text); }
.rsp-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: linear-gradient(135deg, #ff8a00, #ff3d77); color: #fff; font-size: 13px; font-weight: 800; text-decoration: none; }
.rsp-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
/* caixa de perguntas: a pergunta e a resposta num cartão compacto, na cor da caixa */
.rsp-cx { display: block; width: 210px; border-radius: 16px; overflow: hidden; background: #fff; color: #111; text-align: center; text-decoration: none; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.rsp-cx.escuro { background: #151b21; color: #fff; }
.rsp-cx .cxm-perg { display: block; padding: 10px 12px 9px; background: var(--cxm, linear-gradient(135deg, #00c2ff, #0066d6)); color: #fff; font-size: 13px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.rsp-cx .cxm-resp { display: block; padding: 10px 12px 12px; font-size: 14px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.bolha.cartao-msg:is(.flash-msg, .caixa-msg) .meta { margin: 3px 4px 0; color: var(--muted); text-align: right; }
.cartao-pend.caixa .thumb { display: grid; place-items: center; background: var(--cxm, linear-gradient(135deg, #00c2ff, #0066d6)) !important; }
.cartao-pend.caixa .thumb svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* Publicação enviada do Diário: cartão próprio (não pega a cor do balão), estilo Instagram */
.bolha.cartao-msg.pub-msg, .minha .bolha.cartao-msg.pub-msg { width: min(286px, 80vw); max-width: 86%; padding: 0; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 6px 22px rgba(0,0,0,.16); }
.pub-msg .pc { display: block; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.pub-msg .pc-cab { display: flex; align-items: center; gap: 9px; padding: 10px 12px; }
.pub-msg .pc-av { width: 34px; height: 34px; font-size: 12px; flex: none; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px color-mix(in srgb, var(--accent) 65%, transparent); }
.pub-msg .pc-quem { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.pub-msg .pc-quem strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-msg .pc-quem small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-msg .pc-selo { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); font-size: 11px; font-weight: 800; }
.pub-msg .pc-selo svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.pub-msg .pc-midia { position: relative; aspect-ratio: var(--prop, 4 / 5); background: var(--panel-2); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 13px; text-align: center; }
.pub-msg .pc-midia img, .pub-msg .pc-midia video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.pub-msg .pc:hover .pc-midia img { transform: scale(1.03); }
.pub-msg .pc-midia.carregando { animation: fc-pisca 1.2s ease-in-out infinite; }
.pub-msg .pc-midia.so-texto { --t1: #0f2a38; --t2: #10587a; aspect-ratio: 4 / 5; place-items: stretch; padding: 20px 18px; text-align: left; color: #f3f7f9; background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--t2) 85%, #fff 15%), var(--t1) 72%); }
.pub-msg .pc-midia.so-texto[data-tom="1"] { --t1: #1b1830; --t2: #4a3a8a; } .pub-msg .pc-midia.so-texto[data-tom="2"] { --t1: #102a24; --t2: #17705a; }
.pub-msg .pc-midia.so-texto[data-tom="3"] { --t1: #2c1a14; --t2: #8a4626; } .pub-msg .pc-midia.so-texto[data-tom="4"] { --t1: #171c22; --t2: #3a4a5a; }
.pub-msg .pc-citacao { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 0; }
.pub-msg .pc-citacao::before { content: "“"; font-size: 54px; line-height: .6; font-family: Georgia, serif; opacity: .45; }
.pub-msg .pc-citacao p { margin: 0; font-size: 17px; font-weight: 750; line-height: 1.38; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pub-msg .pc-citacao .pc-enq { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: 11.5px; font-weight: 800; }
.pub-msg .pc-citacao .pc-ops { display: grid; gap: 6px; }
.pub-msg .pc-citacao .pc-ops span { padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-msg .pc-n { position: absolute; top: 9px; right: 9px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; font-size: 11px; font-weight: 800; }
.pub-msg .pc-pontos { position: absolute; left: 0; right: 0; bottom: 9px; display: flex; justify-content: center; gap: 4px; }
.pub-msg .pc-pontos i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 3px rgba(0,0,0,.4); }
.pub-msg .pc-pontos i:first-child { background: #fff; }
.pub-msg .pc-play { position: absolute; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1.5px solid rgba(255,255,255,.6); }
.pub-msg .pc-play svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.pub-msg .pc-corpo { padding: 10px 12px 0; }
.pub-msg .pc-info { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; font-size: 12.5px; font-weight: 750; color: var(--muted); }
.pub-msg .pc-info:empty { display: none; }
.pub-msg .pc-info b { display: inline-flex; align-items: center; gap: 3px; color: var(--text); }
.pub-msg .pc-info svg { width: 14px; height: 14px; fill: #ffb400; }
.pub-msg .pc-leg { font-size: 13.5px; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pub-msg .pc-leg b { margin-right: 4px; }
.pub-msg .pc-leg:empty { display: none; }
.pub-msg .pc-ver { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 0; padding: 11px 12px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 800; color: var(--accent); }
.pub-msg .pc-ver svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.pub-msg .pc:hover .pc-ver svg { transform: translateX(3px); }
.pub-msg .pc.sumiu .pc-midia { aspect-ratio: auto; min-height: 96px; font-weight: 700; display: grid; gap: 6px; padding: 18px; }
.pub-msg .pc.sumiu .pc-midia svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bolha.cartao-msg.pub-msg .meta { margin: 0 12px 8px; color: var(--muted); }
.bolha.cartao-msg.pub-msg .meta .check { filter: none; }
.cartao-msg .cm-tx { padding: 9px 11px 4px; display: grid; gap: 2px; }
.cartao-msg .cm-tipo { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--assunto); }
.cartao-msg .cm-tx strong { font-size: 14.5px; line-height: 1.3; }
.cartao-msg .cm-tx small { opacity: .75; font-size: 12.5px; }
.cartao-msg .cm-preco { font-weight: 900; color: var(--assunto); font-size: 14px; }
.cartao-msg .cm-ver { display: block; margin: 6px 11px 0; padding: 7px 0; text-align: center; border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent); font-size: 13px; font-weight: 800; color: var(--assunto); }
.bolha.cartao-msg .meta { float: none; display: flex; justify-content: flex-end; top: 0; margin: 2px 10px 7px 12px; }
.bolha.cartao-msg.pedido { min-width: 250px; max-width: min(320px, 88%); }
.cartao-msg.pedido .cm-ft { aspect-ratio: 3 / 1; }
.cm-pedido { margin-top: 6px; display: grid; gap: 4px; font-size: 13.5px; }
.cm-pedido div { display: flex; justify-content: space-between; gap: 10px; }
.cm-pedido div span:last-child { white-space: nowrap; font-weight: 700; }
.cm-pedido .it span:first-child { overflow-wrap: anywhere; }
.cm-pedido .sub { opacity: .75; font-size: 12.5px; }
.cm-pedido .tot { margin-top: 3px; padding-top: 6px; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); font-weight: 900; font-size: 15px; }
.cm-pedido .tot span:last-child { color: var(--assunto); font-weight: 900; }
.aval-msg .cm-tx.aval { padding: 11px 12px 12px; border-top: 4px solid #f5b700; }
.aval-msg .cm-tipo { color: #f5b700; }
.aval-status { font-size: 13px; opacity: .85; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.aval-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.aval-acoes button, .aval-acoes a { flex: 1 1 auto; min-height: 38px; padding: 0 12px; border-radius: 10px; border: 0; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.aval-acoes .pri { background: #f5b700; color: #2b1d00; }
.aval-acoes .sec { background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; }
.aval-feito { font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; opacity: .85; }
.menu-titulo { padding: 8px 14px 4px; font-size: 12px; font-weight: 800; opacity: .7; }
.cm-pedido .info { font-size: 12.5px; }
.cm-pedido .cupom { margin-top: 2px; padding: 6px 9px; border-radius: 10px; border: 1px dashed color-mix(in srgb, var(--assunto) 60%, transparent); background: color-mix(in srgb, var(--assunto) 10%, transparent); font-size: 12.5px; }
.cm-pedido .cupom span:first-child { font-weight: 800; color: var(--assunto); }
.cm-pedido .cupom span:last-child { white-space: normal; text-align: right; overflow-wrap: anywhere; }
.cm-pedido .info span:first-child { opacity: .7; flex-shrink: 0; }
.cm-pedido .info span:last-child { text-align: right; font-weight: 700; white-space: normal !important; overflow-wrap: anywhere; }
.cm-pedido .tot + .info { margin-top: 4px; }
.cm-pedido .urgente span:last-child { color: #ff6b6b; }
.cm-orc .info { padding: 4px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent); }
.cm-pedido div.cupom, .cm-orc div.info.cupom { margin: 4px 0 2px; padding: 7px 10px; border: 1px dashed color-mix(in srgb, var(--assunto) 60%, transparent); }
.cm-pedido div.cupom span:first-child { opacity: 1; }
a.cm-ver { text-decoration: none; }
/* Orçamento/agendamento recebido: o negócio marca como concluído e o cliente recebe o pedido de avaliação */
.orc-concluir { margin: 8px 11px 4px; }
.orc-bt { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 800; color: #001a24; background: linear-gradient(135deg, #ffd166, #f59e0b); }
.orc-bt:disabled { opacity: .6; cursor: default; }
.orc-ok { display: block; text-align: center; font-size: 12.5px; font-weight: 750; color: #2fbf71; padding: 6px 0; }
.cm-pedido .obs { margin: 4px 0 0; padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, currentColor 8%, transparent); font-size: 12.5px; white-space: pre-wrap; }
.extra.cartao-pend { border-left-color: var(--assunto); }
.extra.cartao-pend .txt strong { color: var(--assunto); }

.conv-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); }
.conv-item {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 0; background: transparent;
  text-align: left; cursor: pointer; position: relative;
}
.conv-item:hover { background: var(--hover); }
.conv-item.ativa { background: var(--active); }
.conv-main { flex: 1; min-width: 0; border-bottom: 1px solid var(--line); padding: 4px 0 12px; margin-bottom: -10px; }
.conv-item:last-child .conv-main { border-bottom-color: transparent; }
.conv-linha { display: flex; align-items: center; gap: 8px; }
.conv-nome { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-hora { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.conv-item.nao-lida .conv-hora { color: var(--accent); font-weight: 600; }
.conv-previa { flex: 1; min-width: 0; margin-top: 3px; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.conv-previa span { overflow: hidden; text-overflow: ellipsis; }
.conv-previa .digitando { color: var(--accent); font-weight: 600; }
.conv-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; margin-top: 3px; }
.check { color: var(--muted); display: inline-flex; }
.check.lida { color: var(--read); }

.lista-vazia { padding: 40px 24px; text-align: center; color: var(--muted); line-height: 1.5; }
.lista-vazia strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.btn-primario { margin-top: 14px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; font-weight: 700; cursor: pointer; }
.btn-primario:hover { background: var(--accent-strong); }

/* ---------- painéis laterais (nova conversa / configurações) ---------- */
.painel {
  position: absolute; inset: 0; z-index: 20; background: var(--panel); display: flex; flex-direction: column;
  transform: translateX(-102%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); visibility: hidden;
}
.painel.aberto { transform: none; visibility: visible; }
.painel-fixo { position: fixed; inset: 0 auto 0 0; width: min(420px, 100%); z-index: 55; border-right: 1px solid var(--line); box-shadow: 12px 0 40px rgba(0, 0, 0, .3); }
.painel-top { display: flex; align-items: center; gap: 10px; padding: 12px 10px; padding-top: max(12px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.painel-top h2 { margin: 0; font-size: 18px; font-weight: 700; }
.painel-corpo { flex: 1; overflow-y: auto; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }

.cfg-perfil { display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-bottom: 1px solid var(--line); }
.cfg-perfil strong { display: block; font-size: 16px; }
.cfg-perfil small { color: var(--muted); }
.cfg-secao { padding: 16px 16px 4px; }
.cfg-secao h3 { margin: 0 0 10px; font-size: 12px; letter-spacing: .7px; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.cfg-linha { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.cfg-linha .txt { flex: 1; min-width: 0; }
.cfg-linha .txt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.35; }
.segmentado { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--panel-2); padding: 4px; border-radius: 10px; margin-bottom: 8px; }
.segmentado button { border: 0; background: transparent; border-radius: 7px; padding: 8px 6px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmentado button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.fundos { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.fundo-op { width: 52px; height: 52px; border-radius: 12px; border: 2px solid var(--line); cursor: pointer; position: relative; padding: 0; overflow: hidden; }
.fundo-op.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.fundo-op span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9.5px; font-weight: 700; padding: 2px 0; background: rgba(0, 0, 0, .45); color: #fff; }
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 13px; cursor: pointer; transition: background .2s; }
.switch span::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-sec { border: 1px solid var(--line); background: transparent; border-radius: 9px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); }
.btn-sec:hover { background: var(--hover); }
/* Sair da conta (fim das configurações) + confirmação */
.cfg-sair { padding: 4px 16px calc(26px + env(safe-area-inset-bottom)); }
.btn-sair { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 9%, transparent); color: var(--danger); font: inherit; font-size: 15px; font-weight: 750; cursor: pointer; transition: background .15s; }
.btn-sair:hover { background: color-mix(in srgb, var(--danger) 16%, transparent); }
.btn-sair:focus-visible { outline: 2px solid var(--danger); outline-offset: 2px; }
.cfg-rodape { padding: 22px 16px; color: var(--muted); font-size: 12px; text-align: center; display: grid; justify-items: center; gap: 12px; line-height: 1.45; }
.cfg-link { width: 100%; border: 0; background: none; color: var(--text); text-align: left; text-decoration: none; cursor: pointer; font: inherit; font-size: 14px; border-radius: 10px; }
.cfg-link:hover .txt { color: var(--accent); }
.cfg-link svg.seta { transform: rotate(180deg); color: var(--muted); }
.cfg-link[aria-expanded="true"] svg { transform: rotate(180deg); }
.cfg-sub { margin: 0 0 8px; padding: 6px 10px; border-radius: 12px; background: var(--panel-2); }
.cfg-sub[hidden] { display: none; }
.cfg-sub .item { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.cfg-sub .item + .item { border-top: 1px solid var(--line); }
.cfg-sub .item .tx { flex: 1; min-width: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.cfg-sub .vazio { padding: 10px 0; color: var(--muted); font-size: 13px; }
.rr-novo { display: flex; gap: 8px; padding: 8px 0 4px; }
.rr-novo input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--input); color: var(--text); border-radius: 9px; padding: 8px 10px; font: inherit; font-size: 13.5px; }
.cfg-dicas { margin: 6px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); font-size: 13.5px; }
.cfg-dicas summary { cursor: pointer; font-weight: 600; }
.cfg-dicas ul { margin: 10px 0 2px; padding-left: 18px; color: var(--muted); display: grid; gap: 6px; }

/* ---------- conversa ---------- */
.chat::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 1;
  background-image: radial-gradient(var(--pattern) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
}
:root[data-fundo="liso"] .chat::before { background-image: none; }
:root { --papel: url("ponte-help.webp"); }
:root[data-fundo="ponte"] .chat { background: url("ponte-help.webp") center / cover no-repeat, var(--chat-bg); }
:root[data-fundo="foto"] .chat { background: var(--papel) center / cover no-repeat, var(--chat-bg); }
:root[data-fundo="ponte"] .chat::before, :root[data-fundo="foto"] .chat::before { background: var(--veu-cor); opacity: var(--veu, .55); }
.fundo-op.foto { display: grid; place-items: center; color: #fff; background: #37464f center / cover no-repeat; }
.fundo-op.foto svg { margin-bottom: 12px; }
.cfg-veu { display: flex; align-items: center; gap: 12px; padding: 4px 0 10px; }
.cfg-veu[hidden] { display: none; }
.cfg-veu input { flex: 1; accent-color: var(--accent); }
.cfg-veu small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.cfg-acoes-fundo { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
:root[data-fundo="oceano"] .chat { background: linear-gradient(160deg, #04324a, #021a26); }
:root[data-theme="light"][data-fundo="oceano"] .chat { background: linear-gradient(160deg, #cdeefc, #e8f6fd); }
:root[data-fundo="grafite"] .chat { background: #16191c; }
:root[data-theme="light"][data-fundo="grafite"] .chat { background: #dfe3e6; }
:root[data-fundo="areia"] .chat { background: #1d1a14; }
:root[data-theme="light"][data-fundo="areia"] .chat { background: #efe8dc; }

.chat-vazio { position: relative; flex: 1; display: grid; place-items: center; text-align: center; padding: 30px; color: var(--muted); }
.chat-vazio img { width: 88px; height: 88px; object-fit: contain; border-radius: 20px; margin-bottom: 16px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.chat-vazio h2 { margin: 0 0 6px; color: var(--text); font-size: 22px; font-weight: 650; }
.chat-vazio p { margin: 0 auto; max-width: 360px; line-height: 1.55; }
.chat-vazio .seguro { display: inline-flex; align-items: center; gap: 6px; margin-top: 26px; font-size: 12.5px; }

.chat-pane { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-pane[hidden] { display: none; }
.chat-top {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; padding-top: max(8px, env(safe-area-inset-top));
  background: var(--panel); border-bottom: 1px solid var(--line); z-index: 3; min-height: 60px;
}
.chat-top .quem { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 4px; text-align: left; cursor: pointer; border-radius: 10px; }
.chat-top .quem:hover { background: var(--hover); }
.quem-txt { min-width: 0; }
.quem-txt strong { display: block; font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quem-txt small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 15px; }
.quem-txt small.online, .quem-txt small.digitando { color: var(--accent); }
.btn-voltar { display: none; }

.busca-chat { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--panel); border-bottom: 1px solid var(--line); z-index: 3; }
.busca-chat[hidden] { display: none; }
.busca-chat input { flex: 1; min-width: 0; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--input); color: var(--text); padding: 0 12px; outline: none; font-size: 14px; }
.busca-chat input:focus { border-color: var(--accent); }
.busca-chat .contador { font-size: 12.5px; color: var(--muted); min-width: 52px; text-align: center; }

.msgs { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 6% 10px; display: flex; flex-direction: column; }
.msgs-status { margin: auto; color: var(--muted); text-align: center; padding: 20px; }
.msgs-status.erro { color: var(--danger); }
.msgs-anteriores { align-self: center; margin: 6px auto 10px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.msgs-anteriores:disabled { opacity: .6; cursor: default; }
.dia { align-self: center; margin: 12px 0 8px; padding: 5px 12px; border-radius: 8px; background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 600; box-shadow: var(--shadow); }
/* Dia de quem está rolando: aparece por cima só enquanto rola (como no WhatsApp) e some logo depois,
   para não ficar tampando mensagens e cartões. */
.dia-flutuante { position: absolute; left: 50%; z-index: 4; transform: translate(-50%, -4px); padding: 5px 12px; border-radius: 8px; background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 600; box-shadow: var(--shadow); pointer-events: none; opacity: 0; transition: opacity .25s, transform .25s; }
.dia-flutuante.on { opacity: 1; transform: translate(-50%, 0); }
.aviso-cripto { align-self: center; max-width: 440px; margin: 4px 0 10px; padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, #f5c542 16%, var(--panel)); color: var(--text); font-size: 12.5px; text-align: center; line-height: 1.45; box-shadow: var(--shadow); }

.linha-msg { display: flex; margin-top: 2px; position: relative; }
.linha-msg.primeira { margin-top: 10px; }
.linha-msg.minha { justify-content: flex-end; }
.bolha {
  position: relative; max-width: min(72%, 560px); padding: 6px 9px 7px 10px; border-radius: 10px;
  background: var(--bubble-other); color: var(--bubble-other-text); box-shadow: var(--shadow);
  font-size: var(--msg-size); line-height: 1.4; word-wrap: break-word; overflow-wrap: anywhere;
}
.minha .bolha { background: var(--bubble-me); color: var(--bubble-me-text); }
.primeira.outra .bolha { border-top-left-radius: 3px; }
.primeira.minha .bolha { border-top-right-radius: 3px; }
.bolha .texto { white-space: pre-wrap; }
.bolha { --hf-audio-cor: var(--accent); }
/* Balão de áudio compacto: horário na mesma linha do tempo e da velocidade. */
.bolha.so-audio { padding: 6px 10px 6px 7px; }
.bolha.so-audio .meta { position: absolute; right: 10px; bottom: 7px; margin: 0; top: auto; float: none; }
.bolha.so-audio .hf-audio-rodape { justify-content: flex-start; gap: 8px; padding-right: 64px; }
.bolha .texto a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* Mensagem editada ("editada" abre o histórico) e apagada para todos (aviso no lugar). */
.bolha .meta .editada { border: 0; background: none; padding: 0 3px 0 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.bolha.apagada { background: color-mix(in srgb, var(--panel) 88%, transparent) !important; border: 1px dashed color-mix(in srgb, var(--muted) 55%, transparent); color: var(--muted); box-shadow: none; padding: 8px 12px 7px; }
.bolha.apagada .texto { display: flex; align-items: center; gap: 6px; font-style: italic; font-size: 14px; }
.bolha.apagada .texto .i { flex: none; opacity: .8; }
.bolha.apagada .ver-apagada { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.bolha.apagada .ver-apagada:hover { border-color: var(--accent); }
.bolha.apagada .meta { float: none; display: flex; justify-content: flex-end; margin: 4px 0 0; top: 0; }
.bolha .meta { float: right; display: inline-flex; align-items: center; gap: 3px; margin: 6px 0 -3px 12px; font-size: 11px; opacity: .72; white-space: nowrap; position: relative; top: 2px; }
.bolha .meta .check { color: inherit; }
.bolha .meta .check.lida { color: var(--read); opacity: 1; }
.minha .bolha .meta .check.lida { filter: saturate(1.3); }
.bolha.midia { padding: 4px; }
.bolha.midia .texto { padding: 4px 6px 2px; }
.bolha.midia .meta { margin-right: 6px; }
.bolha img.foto { display: block; max-width: 100%; width: 320px; max-height: 360px; object-fit: cover; border-radius: 7px; cursor: zoom-in; background: var(--panel-2); }
.bolha video { display: block; max-width: 100%; width: 320px; max-height: 360px; border-radius: 7px; background: #000; }
/* player de áudio próprio (mesmo visual da bolha, em vez do player branco do navegador) */
.menu button svg.i { width: 20px; height: 20px; }
.bolha.midia.so-midia .meta { position: absolute; right: 10px; bottom: 9px; margin: 0; background: rgba(0, 0, 0, .45); color: #fff; padding: 2px 6px; border-radius: 8px; opacity: 1; }
.citacao { display: block; border: 0; width: 100%; text-align: left; cursor: pointer; margin: 0 0 5px; padding: 6px 9px; border-radius: 7px; background: var(--quote-bg); border-left: 3px solid var(--accent); font-size: calc(var(--msg-size) - 1.5px); color: inherit; }
.citacao strong { display: block; color: var(--accent); font-size: 12.5px; margin-bottom: 1px; }
.citacao span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: .85; }
.btn-opcoes {
  position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; opacity: 0; transition: opacity .15s; color: inherit;
  background: inherit;
}
.bolha:hover .btn-opcoes, .btn-opcoes:focus-visible { opacity: .9; }
.bolha.achada { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.bolha.achada.atual { outline: 3px solid var(--accent); }
.bolha.destaque { animation: destaque 1.4s ease; }
@keyframes destaque { 0%, 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent); } 100% { box-shadow: var(--shadow); } }
.pendente .meta { opacity: .55; }

.ir-fim {
  position: absolute; right: 18px; bottom: 86px; z-index: 4; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--panel); color: var(--muted); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); display: grid; place-items: center;
}
.ir-fim[hidden] { display: none; }
.ir-fim b { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11px; display: grid; place-items: center; padding: 0 5px; }
.ir-fim b:empty { display: none; }

/* ---------- barra de envio ---------- */
.barra-bloqueio { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; padding-bottom: max(14px, env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; z-index: 3; }
.menu button.perigo { color: var(--danger); }
.rodape { background: var(--panel); border-top: 1px solid var(--line); padding: 8px 10px; padding-bottom: max(8px, env(safe-area-inset-bottom)); z-index: 3; }
.extra { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--panel-2); border-left: 3px solid var(--accent); }
.extra[hidden] { display: none; }
.extra .txt { flex: 1; min-width: 0; font-size: 13px; }
.extra .txt strong { display: block; color: var(--accent); font-size: 12.5px; }
.extra .txt span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.extra img, .extra .thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--hover); display: grid; place-items: center; color: var(--muted); }
.composer { display: flex; align-items: flex-end; gap: 6px; }
.caixa-texto { flex: 1; min-width: 0; display: flex; align-items: flex-end; background: var(--input); border: 1px solid var(--line); border-radius: 22px; padding: 0 6px 0 4px; }
.caixa-texto:focus-within { border-color: color-mix(in srgb, var(--accent) 70%, var(--line)); }
.caixa-texto textarea {
  flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: transparent; color: var(--text);
  font: inherit; font-size: 15px; line-height: 1.4; padding: 10px 6px; max-height: 140px; height: 42px;
}
.caixa-texto textarea::placeholder { color: var(--muted); }
.caixa-texto .icon-btn { width: 38px; height: 38px; margin-bottom: 2px; }
.btn-enviar { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: transform .12s, background .15s; }
.btn-enviar:hover { background: var(--accent-strong); }
.btn-enviar:active { transform: scale(.94); }
.btn-enviar:disabled { opacity: .55; cursor: default; }
.gravacao { flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 14px; border-radius: 23px; background: var(--input); border: 1px solid var(--line); }
.gravacao[hidden] { display: none; }
.gravacao .ponto { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulsar 1.2s infinite; }
.gravacao .tempo { font-variant-numeric: tabular-nums; font-weight: 600; }
.gravacao .grav-dica { flex: 1; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-enviar svg { width: 22px; height: 22px; }
.btn-enviar.vazio { background: color-mix(in srgb, var(--accent) 55%, var(--panel-2)); }
@keyframes pulsar { 50% { opacity: .25; } }

/* ---------- menu de mensagem, visualizador, avisos ---------- */
.menu { position: fixed; z-index: 60; min-width: 190px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 12px 34px rgba(0, 0, 0, .35); }
.menu[hidden] { display: none; }
.menu button { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; text-align: left; }
.menu button:hover { background: var(--hover); }
.menu button.perigo { color: var(--danger); }
.painel-suporte { width: min(520px, 100%); }
.painel-suporte iframe { flex: 1; width: 100%; border: 0; background: var(--bg); }
/* Dentro da gaveta de mensagens de outra página: sem "início" e sem a barra da rede */
html.embutido .side-top > a.icon-btn:first-child, html.embutido #barraRede { display: none; }
.menu hr { border: 0; height: 1px; margin: 5px 8px; background: var(--line); }
#menuMsg { min-width: 250px; overflow-y: auto; overscroll-behavior: contain; }
#menuMsg .menu-sec { padding: 8px 12px 2px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
#menuMsg hr { margin: 4px 8px; }
.visualizador { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .92); display: grid; place-items: center; padding: 50px 16px 16px; }
.visualizador[hidden] { display: none; }
.visualizador img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.visualizador .icon-btn { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 10px; color: #fff; }
.visualizador .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.visualizador a.icon-btn { right: 58px; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; max-width: calc(100% - 32px); width: max-content; background: var(--text); color: var(--panel); padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); cursor: pointer; max-width: min(calc(100% - 32px), 440px); box-sizing: border-box; text-align: center; line-height: 1.35; text-wrap: balance; overflow-wrap: break-word; }
.carregando-app { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--bg); color: var(--muted); }
.carregando-app[hidden] { display: none; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: girar .8s linear infinite; margin: 0 auto 12px; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- celular ---------- */
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; box-shadow: none; }
  .chat { display: none; }
  body.chat-aberto .sidebar { display: none; }
  body.chat-aberto .chat { display: flex; }
  .btn-voltar { display: inline-grid; }
  .msgs { padding: 10px 10px 8px; }
  .bolha { max-width: 84%; }
  .btn-opcoes { display: none; }
  .ir-fim { right: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Sem o retângulo azul que o celular pinta por cima do que é tocado (pedido do dono, 04/11/2026). */
html { -webkit-tap-highlight-color: transparent; }
