/* ============================================================
   Chat VIP — design system (mobile-first, claro/escuro)
   ============================================================ */

/* ---- tokens ---- */
:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #eef0f5;
  --text: #14161c;
  --text-muted: #626878;
  --border: #e2e5ec;
  --primary: #00B4D8;
  --primary-2: #0094B8;
  --primary-ink: #ffffff;
  --danger: #e5484d;
  --online: #22c55e;
  --bubble-own: linear-gradient(135deg, #0094B8, #00B4D8);
  --bubble-own-ink: #ffffff;
  --bubble-other: #ffffff;
  --bubble-other-ink: #14161c;
  --shadow: 0 6px 20px rgba(20, 22, 28, .08);
  --radius: 16px;
  --nav-h: 62px;
  --top-h: 56px;
}
:root[data-theme="dark"],
:root:not([data-theme="light"]) {
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f1a;
    --surface: #141926;
    --surface-2: #1c2333;
    --text: #eef1f7;
    --text-muted: #9aa3b8;
    --border: #232a3b;
    --bubble-other: #1c2333;
    --bubble-other-ink: #eef1f7;
    --shadow: 0 8px 24px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f1a;
  --surface: #141926;
  --surface-2: #1c2333;
  --text: #eef1f7;
  --text-muted: #9aa3b8;
  --border: #232a3b;
  --bubble-other: #1c2333;
  --bubble-other-ink: #eef1f7;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* Protecao leve contra copia/arrastar (nao afeta campos de formulario) */
html { -webkit-touch-callout: none; }
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}
/* Painel admin: liberado para copiar (o dono precisa) */
.admin, .admin * { -webkit-user-select: text; user-select: text; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

/* ---- layout chrome ---- */
.app-main { min-height: 100dvh; }
body.has-chrome .app-main {
  padding-top: var(--top-h);
  max-width: 640px;
  margin: 0 auto;
}
body.has-nav .app-main {
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}

.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--top-h);
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 14px; background: var(--surface);
  border-bottom: 1px solid var(--border); z-index: 40;
}
.brand { font-weight: 800; letter-spacing: -.02em; font-size: 1.05rem; }
.badge-18 {
  font-size: .62rem; font-weight: 700; color: var(--primary-ink);
  background: var(--primary); padding: 2px 6px; border-radius: 999px; vertical-align: middle;
}
.topbar-brand {
  margin-right: auto;
  font-size: 1.3rem; font-weight: 900; letter-spacing: -.045em;
  background: linear-gradient(120deg, #1D9BF0 0%, #0D74CC 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  user-select: none; pointer-events: none; line-height: 1;
}
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px; border: none;
  background: transparent; color: var(--text); font-size: 1.1rem;
}
.icon-btn:hover { background: var(--surface-2); }
.ico-moon { display: none; }
:root[data-theme="dark"] .ico-sun,
:root:not([data-theme="light"]) .ico-sun { display: none; }
:root[data-theme="dark"] .ico-moon,
:root:not([data-theme="light"]) .ico-moon { display: inline; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .ico-sun { display: inline; }
  :root:not([data-theme="dark"]) .ico-moon { display: none; }
}

.lang-menu {
  position: fixed; top: calc(var(--top-h) - 4px); right: 10px; z-index: 50;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); padding: 6px; min-width: 190px;
}
.lang-item {
  display: block; width: 100%; text-align: left; border: none; background: transparent;
  color: var(--text); padding: 9px 12px; border-radius: 10px; font-size: .92rem;
}
.lang-item:hover { background: var(--surface-2); }
.lang-item.active { color: var(--primary); font-weight: 700; }

.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: var(--surface); border-top: 1px solid var(--border); z-index: 40;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; border: none; background: transparent; color: var(--text-muted);
  font-size: .68rem; font-weight: 600; text-decoration: none;
}
.nav-item.active { color: var(--primary); }
.nav-ico { display: flex; align-items: center; justify-content: center; }
.nav-ico svg { width: 22px; height: 22px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px; padding: 12px 18px;
  font-weight: 700; font-size: .95rem; transition: transform .05s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .85rem; border-radius: 10px; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-2); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }

/* ---- hero / home ---- */
.hero { padding: 40px 20px 10px; }
.hero-inner { text-align: center; }
.hero-badge {
  display: inline-block; font-size: .72rem; font-weight: 700; color: var(--primary);
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.hero-title { font-size: 2rem; font-weight: 900; letter-spacing: -.03em; margin: 0 0 8px; }
.hero-sub { color: var(--text-muted); margin: 0 auto 22px; max-width: 30ch; }
.hero-cta { display: grid; gap: 10px; max-width: 340px; margin: 0 auto; }
.features { display: flex; gap: 12px; padding: 20px; }
.feature { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 10px; text-align: center; box-shadow: var(--shadow); }
.feature-ico { font-size: 1.6rem; }
.feature h3 { font-size: .85rem; margin: 8px 0 0; }

/* ---- landing ---- */
.lp { padding: 8px 20px 20px; }
.lp-hero { text-align: center; padding: 30px 6px 22px; }
.lp-badge { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .01em; color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, transparent); padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.lp-title { font-size: 2.1rem; line-height: 1.1; font-weight: 900; letter-spacing: -.03em; margin: 0 0 12px; }
.lp-tagline { color: var(--text-muted); font-size: 1.02rem; max-width: 34ch; margin: 0 auto 22px; }
.lp-cta { display: grid; gap: 10px; max-width: 360px; margin: 0 auto 18px; }
.btn-lg { padding: 16px 20px; font-size: 1.05rem; }
.lp-warning { display: inline-block; background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); font-weight: 800; font-size: .9rem; padding: 10px 16px; border-radius: 12px; }
.lp-features { display: grid; grid-template-columns: 1fr; gap: 10px; max-width: 420px; margin: 8px auto 24px; }
.lp-feature { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 15px 18px; font-weight: 700; box-shadow: var(--shadow); font-size: .95rem; transition: border-color .15s; }
.lp-feature:hover { border-color: var(--primary); }
.lp-feature-ico { display: flex; align-items: center; flex-shrink: 0; color: var(--primary); }
.lp-vip { text-align: center; background: linear-gradient(135deg, #1a1030, #2a1a4a); color: #fff; border-radius: 20px; padding: 28px 22px; max-width: 420px; margin: 0 auto; box-shadow: var(--shadow); }
.lp-vip-crown { font-size: 2.6rem; }
.lp-vip h2 { margin: 4px 0 6px; font-size: 1.4rem; }
.lp-vip p { color: rgba(255,255,255,.75); margin: 0 0 16px; }
.btn-vip { background: linear-gradient(135deg, #f59e0b, #f5b942); color: #3a2a00; }

/* ---- landing estilo Facebook ---- */
.lp.fb { display: grid; gap: 22px; width: 100%; margin: 0 auto; padding: 20px max(20px, 5vw) 60px; }
/* tablet: 2 colunas, demo oculto */
@media (min-width: 740px) {
  .lp.fb { grid-template-columns: 1fr minmax(0, 400px); align-items: center; gap: max(40px, 5vw); padding-top: 64px; padding-bottom: 80px; }
  .lp-demo { display: none; }
}
/* desktop: 3 colunas fixas centradas como bloco */
@media (min-width: 1100px) {
  .lp.fb {
    max-width: none;
    grid-template-columns: 380px 285px 330px;
    justify-content: center;
    gap: 44px;
    padding: 72px 40px 100px;
  }
  .lp-demo { display: flex !important; }
  .lp.fb .lp-h1 { font-size: 2.2rem !important; }
}
@media (min-width: 1440px) {
  .lp.fb {
    grid-template-columns: 440px 300px 360px;
    gap: 56px;
  }
  .lp.fb .lp-h1 { font-size: 2.7rem !important; }
}
@media (min-width: 1200px) {
  .lp-h1 { font-size: 3rem; }
  .lp-wordmark { font-size: 2rem; }
}
.lp-wordmark { font-size: 1.7rem; font-weight: 900; letter-spacing: -.03em; color: var(--primary); margin-bottom: 10px; }
.lp-wordmark span { color: var(--text-muted); font-weight: 700; }
.lp-h1 { font-size: 1.9rem; line-height: 1.12; font-weight: 900; margin: 0 0 10px; letter-spacing: -.02em; }
@media (min-width: 900px) { .lp-h1 { font-size: 2.5rem; } }
.lp-tag { color: var(--text-muted); font-size: 1.02rem; max-width: 42ch; margin: 0 0 4px; }

.lp-trust { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.lp-trust-item { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 600; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px; }
.lp-trust-item svg { flex-shrink: 0; }

.lp-art { position: relative; height: 210px; margin-top: 12px; overflow: hidden; }
.art-card { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.art-chat { top: 20px; left: 0; display: flex; gap: 10px; padding: 12px 14px; max-width: 260px; }
.art-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); flex-shrink: 0; }
.art-body { display: grid; gap: 2px; }
.art-body b { font-size: .9rem; }
.art-body span { font-size: .88rem; color: var(--text-muted); }
.art-pv { font-size: .6rem; font-weight: 800; color: var(--primary); background: color-mix(in srgb, var(--primary) 15%, transparent); padding: 3px 8px; border-radius: 999px; width: fit-content; margin-top: 4px; font-style: normal; letter-spacing: .04em; display: flex; align-items: center; gap: 4px; }
.art-story { top: 118px; left: 70px; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; }
.art-ring { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.art-story span { font-size: .8rem; font-weight: 700; color: var(--text-muted); }
.art-ico { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 9px; box-shadow: 0 4px 16px rgba(0,0,0,.18); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.art-ico.e1 { top: 2px; right: 38px; }
.art-ico.e2 { top: 116px; right: 2px; color: #f59e0b; }
.art-ico.e3 { top: 58px; right: 108px; }
.art-chip { position: absolute; bottom: 6px; right: 20px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: .72rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 6px; }
.art-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; box-shadow: 0 0 6px #22c55e; }

.lp-right { display: grid; gap: 12px; align-content: start; }
.lp-login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; display: grid; gap: 12px; }
.lp-card-title { font-size: 1.2rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.lp-card-sub { font-size: .84rem; color: var(--text-muted); margin: 0; }
.lp-login-form { display: grid; gap: 12px; }
.lp-login-form input { width: 100%; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 1.05rem; }
.lp-login-form input:focus { outline: 2px solid var(--primary); border-color: transparent; }
.lp-login-form .pw-wrap input { padding-right: 46px; }
.lp-forgot { display: block; text-align: center; color: var(--primary); font-size: .86rem; font-weight: 600; }
.lp-divider { height: 1px; background: var(--border); margin: 4px 0; }
.btn-create { background: transparent; color: var(--primary); border: 2px solid var(--primary); font-weight: 700; }
.btn-create:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.lp-warn { text-align: center; font-size: .8rem; color: var(--text-muted); font-weight: 700; margin: 4px 0 0; }

/* ---- demo section / phone hero ---- */
.lp-demo { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lp-demo-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; background: color-mix(in srgb, var(--primary) 13%, transparent); padding: 4px 14px; border-radius: 999px; align-self: flex-start; }
.demo-stage { position: relative; width: 100%; max-width: 320px; margin: 0 auto; }
.demo-phone { width: 100%; max-width: 320px; height: 540px; background: var(--surface); border: 1px solid var(--border); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.18), 0 0 0 1.5px var(--border); position: relative; }
.demo-pbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
.demo-pav { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex-shrink: 0; }
.demo-pinfo { flex: 1; min-width: 0; }
.demo-pname { font-weight: 700; font-size: .88rem; }
.demo-pstat { font-size: .7rem; color: var(--primary); font-weight: 600; }
.demo-picons { display: flex; gap: 10px; color: var(--text-muted); flex-shrink: 0; }
.demo-msgs { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 5px; scrollbar-width: none; }
.demo-msgs::-webkit-scrollbar { display: none; }
.dm { max-width: 75%; padding: 7px 11px; border-radius: 14px; font-size: .83rem; line-height: 1.4; animation: dm-pop .22s cubic-bezier(.16,1,.3,1) both; word-break: break-word; }
.dm-them { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.dm-me { align-self: flex-end; background: var(--bubble-own); color: #fff; border-bottom-right-radius: 4px; }
.dm-audio { display: flex; align-items: center; gap: 7px; font-size: .78rem; }
.dm-audio-wave { display: flex; align-items: center; gap: 2px; height: 18px; }
.dm-audio-wave span { width: 3px; border-radius: 2px; background: currentColor; opacity: .75; animation: wave-bar .85s ease-in-out infinite alternate; }
.dm-me .dm-audio-wave span { background: rgba(255,255,255,.85); }
.dm-audio-wave span:nth-child(1){height:5px;animation-delay:0s}.dm-audio-wave span:nth-child(2){height:13px;animation-delay:.1s}.dm-audio-wave span:nth-child(3){height:9px;animation-delay:.2s}.dm-audio-wave span:nth-child(4){height:17px;animation-delay:.15s}.dm-audio-wave span:nth-child(5){height:7px;animation-delay:.05s}.dm-audio-wave span:nth-child(6){height:11px;animation-delay:.25s}.dm-audio-wave span:nth-child(7){height:5px;animation-delay:.12s}
@keyframes wave-bar { from{transform:scaleY(.45)} to{transform:scaleY(1)} }
.demo-ind { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; border-bottom-left-radius: 4px; padding: 7px 11px; display: flex; gap: 4px; align-items: center; }
.demo-ind.me { align-self: flex-end; background: var(--bubble-own); border: none; border-bottom-right-radius: 4px; border-bottom-left-radius: 14px; }
.demo-ind span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: typing-dot 1.2s ease-in-out infinite; }
.demo-ind.me span { background: rgba(255,255,255,.8); }
.demo-ind span:nth-child(2){animation-delay:.2s}.demo-ind span:nth-child(3){animation-delay:.4s}
@keyframes typing-dot { 0%,80%,100%{transform:scale(.6);opacity:.4} 40%{transform:scale(1);opacity:1} }
.demo-mic-bar { display: flex; align-items: center; gap: 7px; padding: 8px 13px; font-size: .78rem; font-weight: 600; color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface)); border-top: 1px solid var(--border); flex-shrink: 0; }
.demo-mic-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; animation: lp-pulse-dot 1s ease-in-out infinite; }
.demo-comp { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
.demo-comp-pill { flex: 1; height: 32px; background: var(--surface-2); border-radius: 999px; display: flex; align-items: center; padding: 0 12px; color: var(--text-muted); }
.demo-comp-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.demo-call-ov { position: absolute; inset: 0; background: #0e0e18; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; z-index: 10; border-radius: 28px; padding: 20px; }
.demo-call-ov[hidden] { display: none; }
.demo-call-ov.video { background: linear-gradient(160deg, #0a1a2e, #0d2244); }
.demo-call-av { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 1.7rem; font-weight: 800; box-shadow: 0 0 0 10px color-mix(in srgb, var(--primary) 18%, transparent), 0 0 0 20px color-mix(in srgb, var(--primary) 8%, transparent); animation: call-pulse 2.2s ease-in-out infinite; }
@keyframes call-pulse { 0%,100%{box-shadow:0 0 0 10px color-mix(in srgb,var(--primary) 18%,transparent),0 0 0 20px color-mix(in srgb,var(--primary) 8%,transparent)} 50%{box-shadow:0 0 0 14px color-mix(in srgb,var(--primary) 13%,transparent),0 0 0 26px color-mix(in srgb,var(--primary) 5%,transparent)} }
.demo-call-name { color: #fff; font-size: 1.1rem; font-weight: 700; margin-top: 4px; }
.demo-call-stat { color: rgba(255,255,255,.55); font-size: .8rem; }
.demo-call-row { display: flex; gap: 28px; margin-top: 18px; }
.demo-cbtn { width: 48px; height: 48px; border-radius: 50%; border: none; font-size: 1.2rem; cursor: default; display: grid; place-items: center; }
.demo-cbtn.red { background: #EF4444; }
.demo-cbtn.green { background: #22C55E; }
.demo-vid-bg { position: absolute; inset: 0; border-radius: 28px; background: radial-gradient(ellipse at 60% 40%, #162a44 0%, #0a1628 100%); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: rgba(255,255,255,.08); }
.demo-vid-self { position: absolute; top: 12px; right: 12px; width: 60px; height: 80px; border-radius: 10px; background: #1a2a3a; border: 1.5px solid rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; z-index: 2; }
@keyframes dm-pop { from{opacity:0;transform:scale(.84) translateY(6px)} to{opacity:1;transform:scale(1) translateY(0)} }

/* ---- landing page animations ---- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes lp-rise {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes lp-slide-right {
    from { opacity: 0; transform: translateX(32px); }
    to   { opacity: 1; transform: translateX(0); }
  }
  @keyframes lp-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
  }
  @keyframes lp-float-alt {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%       { transform: translateY(-6px) rotate(-3deg); }
  }
  @keyframes lp-pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.35); opacity: .7; }
  }

  .lp-wordmark { animation: lp-rise .55s cubic-bezier(0.16,1,.3,1) both; }
  .lp-h1       { animation: lp-rise .6s  .08s cubic-bezier(0.16,1,.3,1) both; }
  .lp-tag      { animation: lp-rise .6s  .16s cubic-bezier(0.16,1,.3,1) both; }
  .lp-trust    { animation: lp-rise .6s  .24s cubic-bezier(0.16,1,.3,1) both; }
  .lp-demo     { animation: lp-rise .75s .1s  cubic-bezier(0.16,1,.3,1) both; }
  .lp-features { animation: lp-rise .6s  .32s cubic-bezier(0.16,1,.3,1) both; }
  .lp-right    { animation: lp-slide-right .7s .2s cubic-bezier(0.16,1,.3,1) both; }
}

/* ---- banner instalar app ---- */
.install-banner { position: fixed; top: calc(var(--top-h) + 8px); left: 8px; right: 8px; z-index: 60; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 12px; max-width: 620px; margin: 0 auto; }
.install-banner[hidden] { display: none; }
.ib-ico { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: color-mix(in srgb, var(--primary) 15%, transparent); border-radius: 10px; color: var(--primary); flex-shrink: 0; }
.ib-text { flex: 1; display: grid; gap: 1px; min-width: 0; }
.ib-text b { font-size: .9rem; }
.ib-desc { font-size: .76rem; color: var(--text-muted); }
.ib-btn { border: none; background: var(--primary); color: #fff; font-weight: 700; padding: 8px 14px; border-radius: 10px; font-size: .85rem; }
.ib-close { border: none; background: var(--surface-2); color: var(--text-muted); width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; cursor: pointer; }

.soon, .legal, .gate-panel { padding: 30px 20px; }
.gate-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 20px; box-shadow: var(--shadow); text-align: center; display: grid; gap: 10px; max-width: 360px; margin: 30px auto; }

/* ---- modal (auth) ---- */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(6, 8, 14, .6); }
.modal-card {
  position: relative; background: var(--surface); width: 100%; max-width: 460px;
  border-radius: 22px 22px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow); animation: sheet .22s ease;
}
@keyframes sheet { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (min-width: 560px) {
  .modal { align-items: center; }
  .modal-card { border-radius: 22px; }
}
.modal-x { position: absolute; top: 12px; right: 12px; border: none; background: var(--surface-2); width: 34px; height: 34px; border-radius: 50%; color: var(--text); }
.auth-head { text-align: center; margin-bottom: 14px; }
.auth-head h2 { margin: 0 0 4px; font-size: 1.35rem; }
.auth-head p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.auth-form { display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--text-muted); }
.auth-form input[type="text"], .auth-form input[type="email"], .auth-form input[type="password"], .auth-form input[type="date"] {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 1rem;
}
.auth-form input:focus { outline: 2px solid var(--primary); border-color: transparent; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: none; background: transparent; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--text-muted); }
.pw-eye:hover { color: var(--text); }
.eye-ico { display: block; }
.check { flex-direction: row !important; display: flex !important; align-items: flex-start; gap: 8px; font-weight: 500 !important; }
.check input { margin-top: 3px; }
.reg-step { display: grid; gap: 12px; }
.reg-hint { text-align: center; font-size: .88rem; color: var(--text-muted); margin: 0 0 2px; }
.reg-hint strong { color: var(--text); font-size: 1rem; }
.onb-steps { display: grid; gap: 10px; margin: 6px 0 16px; }
.onb-step { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.onb-step b { display: block; font-size: .95rem; margin-bottom: 2px; }
.onb-step span { font-size: .84rem; color: var(--text-muted); }
.auth-swap { text-align: center; font-size: .85rem; color: var(--text-muted); margin: 4px 0 0; }
.auth-swap button { border: none; background: none; color: var(--primary); font-weight: 700; }
.auth-err { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); border-radius: 10px; padding: 10px 12px; font-size: .85rem; }

/* ---- chat ---- */
.chat { display: flex; flex-direction: column; height: calc(100dvh - var(--top-h) - var(--nav-h) - env(safe-area-inset-bottom)); }
.chat-head { padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.chat-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 3px color-mix(in srgb, var(--online) 25%, transparent); }
.online-count { margin-left: auto; font-size: .78rem; color: var(--text-muted); font-weight: 600; border: none; background: transparent; cursor: pointer; }
.online-count:hover { color: var(--primary); text-decoration: underline; }
.online-list { display: grid; gap: 0; max-height: 62vh; overflow-y: auto; margin-top: 6px; }
.ol-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.ol-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; font-weight: 700; }
.ol-av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--surface-2); }
.ol-av img { width: 100%; height: 100%; object-fit: cover; }
.ol-fb { width: 100%; height: 100%; display: grid; place-items: center; color: var(--primary); font-weight: 800; }
.ol-pv { background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary); font-size: .72rem; font-weight: 800; padding: 6px 11px; border-radius: 999px; flex-shrink: 0; letter-spacing: .03em; }
.ol-empty { text-align: center; color: var(--text-muted); padding: 30px; }
.messages { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; gap: 8px; max-width: 85%; }
.msg-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; background: var(--surface-2); overflow: hidden; display: block; }
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-avatar-fb { width: 100%; height: 100%; display: grid; place-items: center; font-weight: 800; color: var(--primary); font-size: .85rem; }
.msg-avatar.has-story { overflow: visible; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.msg-avatar.has-story img, .msg-avatar.has-story .msg-avatar-fb { border-radius: 50%; }
.msg-pv { font-size: .6rem; font-weight: 800; color: var(--primary); background: color-mix(in srgb, var(--primary) 15%, transparent); padding: 2px 7px; border-radius: 999px; margin-left: auto; letter-spacing: .04em; }
.msg.own .msg-pv { display: none; }
.pa-img { display: block; }
.profile-avatar.has-story img, .profile-avatar.has-story .avatar-fallback { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--primary); }
.pv-avatar.has-story { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.msg-body { background: var(--bubble-other); color: var(--bubble-other-ink); padding: 8px 12px; border-radius: 4px 16px 16px 16px; box-shadow: var(--shadow); }
.msg-name { font-size: .74rem; font-weight: 700; color: var(--primary); margin-bottom: 2px; display: flex; align-items: center; gap: 5px; }
.msg-name .vip { font-size: .62rem; background: linear-gradient(135deg,#f59e0b,#f5b942); color:#3a2a00; padding:1px 5px; border-radius:999px; }
.msg-text { font-size: .95rem; word-break: break-word; white-space: pre-wrap; }
.msg-img { margin-top: 6px; border-radius: 12px; max-height: 320px; width: auto; max-width: 100%; }

/* ── emoji animado (estilo MSN) ── */
@keyframes emoji-pop {
  0%   { transform: scale(14); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.msg-text.emoji-only {
  font-size: 2.4rem; line-height: 1.25;
  display: block;
}
.msg-text.emoji-only.emoji-burst {
  animation: emoji-pop .75s cubic-bezier(0.19, 1, 0.22, 1) both;
  position: relative; z-index: 10;
}
.msg-time { font-size: .66rem; color: var(--text-muted); }
.msg-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.pv-seen { font-size: .68rem; color: rgba(255,255,255,.9); font-weight: 700; }
.msg.own .msg-foot { flex-direction: row-reverse; }
.msg-report { border: none; background: transparent; font-size: .72rem; cursor: pointer; opacity: .55; padding: 0; line-height: 1; }
.msg-report:hover { opacity: 1; }
.msg.own .msg-time { color: rgba(255,255,255,.7); }
.auth-select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 1rem; }
#reportModal { z-index: 130; }
.story-report { position: absolute; bottom: 20px; left: 20px; z-index: 4; border: none; background: rgba(0,0,0,.5); color: #fff; width: 42px; height: 42px; border-radius: 50%; font-size: 1.1rem; }
.msg.own { margin-left: auto; flex-direction: row-reverse; }
.msg.own .msg-body { background: var(--bubble-own); color: var(--bubble-own-ink); border-radius: 16px 4px 16px 16px; }
.msg.own .msg-name { color: rgba(255,255,255,.85); }
.msg.own .msg-time { color: rgba(255,255,255,.7); }
.typing-bar { min-height: 18px; padding: 0 16px; font-size: .78rem; color: var(--text-muted); font-style: italic; }
.composer { display: flex; align-items: center; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
.composer-media { border: none; background: var(--surface-2); width: 42px; height: 42px; border-radius: 50%; font-size: 1.2rem; display: grid; place-items: center; flex-shrink: 0; }
.composer-input { flex: 1; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 1rem; min-height: 44px; max-height: 120px; overflow-y: auto; word-break: break-word; white-space: pre-wrap; cursor: text; line-height: 1.4; display: flex; align-items: center; }
.composer-input:focus, .composer-input:focus-visible { outline: 2px solid var(--primary); border-color: transparent; }
.composer-input[contenteditable]:empty::before { content: attr(data-placeholder); color: var(--text-muted); pointer-events: none; }
.composer-send { border: none; background: var(--primary); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 1.1rem; flex-shrink: 0; }
.composer-send:disabled { opacity: .5; }

/* ---- profile ---- */
.profile-cover { height: 150px; background-size: cover; background-position: center; position: relative; }
.profile-cover.grad { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.cover-edit, .avatar-edit { position: absolute; border: none; background: rgba(0,0,0,.5); color: #fff; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.cover-edit { right: 12px; bottom: 12px; }
.profile-head { padding: 0 20px 20px; text-align: center; margin-top: -46px; }
.profile-avatar { width: 92px; height: 92px; margin: 0 auto 10px; position: relative; }
.profile-avatar img, .avatar-fallback { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); background: var(--surface-2); }
.avatar-fallback { display: grid; place-items: center; font-size: 2rem; font-weight: 800; color: var(--primary); }
.avatar-edit { right: 0; bottom: 4px; width: 30px; height: 30px; }
.profile-name { font-size: 1.3rem; margin: 0 0 4px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.vip-badge { font-size: .68rem; background: linear-gradient(135deg,#f59e0b,#f5b942); color:#3a2a00; padding: 3px 8px; border-radius: 999px; font-weight: 800; }
.verified-badge { display: inline-flex; align-items: center; vertical-align: middle; }
.verified-badge svg { filter: drop-shadow(0 1px 3px rgba(0,0,0,.25)); }
.pv-verified-ico { display: inline-block; vertical-align: middle; margin-left: 4px; flex-shrink: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); }
.pv-item-name { display: flex; align-items: center; gap: 0; }
.pv-head-name { display: inline-flex; align-items: center; gap: 5px; }
.profile-status { margin: 0 0 8px; font-size: .82rem; }
.profile-status .on { color: var(--online); font-weight: 600; }
.profile-status .off { color: var(--text-muted); }
.profile-bio { color: var(--text-muted); max-width: 40ch; margin: 0 auto 12px; font-size: .92rem; }
.profile-bio-add { border: 1px dashed var(--border); background: transparent; color: var(--text-muted); padding: 8px 14px; border-radius: 12px; font-size: .85rem; font-weight: 600; margin: 0 auto 14px; display: block; cursor: pointer; }
.profile-bio-add:hover { color: var(--primary); border-color: var(--primary); }
.pv-summary { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin: 0 20px 14px; box-shadow: var(--shadow); text-align: left; }
.pv-summary.locked { border-color: #f5b942; background: linear-gradient(135deg, color-mix(in srgb, #f5b942 9%, var(--surface)), var(--surface)); flex-wrap: wrap; }
.pv-sum-ico { flex-shrink: 0; display: flex; align-items: center; color: var(--primary); }
.pv-sum-main { flex: 1; display: grid; gap: 1px; min-width: 0; }
.pv-sum-main b { font-size: .95rem; }
.pv-sum-main span { font-size: .82rem; color: var(--text-muted); }
.pv-sum-badge { background: var(--primary); color: #fff; font-size: .78rem; font-weight: 800; min-width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; padding: 0 7px; flex-shrink: 0; }
.pv-sum-badge.alert { background: var(--danger); }
.pv-sum-arrow { color: var(--text-muted); font-size: 1.4rem; }
.pv-sum-cta { width: 100%; text-align: center; background: linear-gradient(135deg, #f59e0b, #f5b942); color: #3a2a00; font-weight: 800; font-size: .82rem; padding: 9px; border-radius: 10px; margin-top: 6px; }
.profile-tools { display: grid; gap: 10px; margin: 0 20px 14px; }
.ptool { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); color: var(--text); cursor: pointer; }
.ptool-ico { flex-shrink: 0; display: flex; align-items: center; color: var(--primary); }
.ptool-main { flex: 1; display: grid; gap: 1px; min-width: 0; }
.ptool-main b { font-size: .95rem; }
.ptool-main span { font-size: .82rem; color: var(--text-muted); }
.ptool-reward { display: block; font-size: .76rem; color: var(--primary); font-weight: 700; margin-top: 3px; }
.ptool-arrow { color: var(--text-muted); font-size: 1.3rem; }
.ptool-switch { width: 44px; height: 26px; border-radius: 999px; background: var(--surface-2); position: relative; flex-shrink: 0; transition: background .15s; }
.ptool-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ptool.on .ptool-switch { background: var(--online); }
.ptool.on .ptool-switch::after { transform: translateX(18px); }
.profile-actions { display: flex; gap: 8px; justify-content: center; }
.auth-form textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: inherit; font-size: 1rem; resize: vertical; }

/* ---- PV (privado) ---- */
.pv-list { padding: 8px 0; }
.pv-list .empty { text-align: center; color: var(--text-muted); padding: 40px 20px; }
.pv-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); user-select: none; -webkit-user-select: none; }
.pv-item:active { background: var(--surface-2); }
.pv-item-pinned { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.pv-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.pv-pin-ico { display: flex; align-items: center; opacity: .55; }
.pv-pin-svg { display: block; }

/* ── Action sheet (long-press) ── */
.pv-sheet-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.45); animation: pvFadeIn .18s ease; }
.pv-sheet { position: fixed; bottom: 0; left: 0; right: 0; z-index: 201; background: var(--surface); border-radius: 20px 20px 0 0; padding: 12px 0 calc(env(safe-area-inset-bottom,0px) + 12px); animation: pvSlideUp .22s cubic-bezier(.25,.46,.45,.94); }
.pv-sheet-handle { width: 36px; height: 4px; border-radius: 99px; background: var(--border); margin: 0 auto 14px; }
.pv-sheet-name { font-weight: 700; font-size: .95rem; padding: 0 20px 12px; color: var(--text-muted); border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.pv-sheet-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 20px; background: none; border: none; font-size: .97rem; color: var(--text); cursor: pointer; text-align: left; }
.pv-sheet-btn:active { background: var(--surface-2); }
.pv-sheet-btn-ico { display: flex; align-items: center; justify-content: center; width: 24px; flex-shrink: 0; opacity: .8; }
.pv-sheet-btn.danger { color: #ef4444; }
@keyframes pvFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pvSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.pv-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--surface-2); }
.pv-avatar.sm { width: 34px; height: 34px; }
.pv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pv-avatar-fb { width: 100%; height: 100%; display: grid; place-items: center; font-weight: 800; color: var(--primary); background: var(--surface-2); }
.pv-item-main { flex: 1; min-width: 0; }
.pv-item-name { font-weight: 700; font-size: .95rem; }
.pv-item-preview { color: var(--text-muted); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.pv-prev-ico { flex-shrink: 0; opacity: .75; }
.pv-unread { background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 6px; }
.pv-list-check { display: block; flex-shrink: 0; }
.pv-list-check-sent { color: var(--text-muted); opacity: .65; }
.pv-list-check-read { color: #ef4444; }
.pv-item-preview.is-typing { color: var(--online) !important; font-style: italic; }
.pv-head-status.is-typing { color: var(--online); font-style: italic; }
@keyframes pvTypingDot { 0%,80%,100%{opacity:.2} 40%{opacity:1} }
.pv-typing-dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; margin: 0 1px; vertical-align: middle; animation: pvTypingDot 1.2s ease infinite; }
.pv-typing-dot:nth-child(2) { animation-delay: .2s; }
.pv-typing-dot:nth-child(3) { animation-delay: .4s; }
.pv-chat { height: 100dvh; }
.pv-head { display: flex; align-items: center; gap: 10px; }
.pv-back { display: flex; align-items: center; justify-content: center; color: var(--text); padding: 4px 8px 4px 2px; flex-shrink: 0; opacity: .8; transition: opacity .15s; }
.pv-back:active, .pv-back:hover { opacity: 1; }
.pv-back-ico { display: block; }
.pv-head-user { display: flex; align-items: center; gap: 10px; font-weight: 700; }

/* ---- stories ---- */
.stories { padding: 14px 0; }
.stories .empty { text-align: center; color: var(--text-muted); padding: 40px 20px; }
.stories-bar { display: flex; gap: 14px; overflow-x: auto; padding: 6px 16px 12px; -webkit-overflow-scrolling: touch; }
.story-ring { flex-shrink: 0; width: 72px; border: none; background: none; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.story-ring-inner { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); }
.story-ring.has-story .story-ring-inner { padding: 3px; background: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.story-ring.has-story.is-own .story-ring-inner { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--online); }
.story-ring-inner img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.story-fb { font-weight: 800; color: var(--primary); font-size: 1.5rem; }
.add-inner { font-size: 1.8rem; color: var(--primary); background: var(--surface-2); }
.story-label { font-size: .7rem; color: var(--text-muted); max-width: 72px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.story-viewer { position: fixed; inset: 0; z-index: 110; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.story-viewer[hidden] { display: none; }
.story-progress { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.story-progress .seg { flex: 1; height: 3px; background: rgba(255,255,255,.3); border-radius: 2px; overflow: hidden; }
.story-progress .seg > i { display: block; height: 100%; width: 0; background: #fff; }
@keyframes storyfill { from { width: 0; } to { width: 100%; } }
.story-close { position: absolute; top: 20px; right: 14px; z-index: 4; border: none; background: rgba(0,0,0,.4); color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 1.1rem; }
.story-user { position: absolute; top: 22px; left: 16px; z-index: 4; color: #fff; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.story-media { max-width: 100%; max-height: 100dvh; object-fit: contain; }
.story-caption { position: absolute; bottom: 40px; left: 20px; right: 20px; z-index: 4; color: #fff; text-align: center; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.story-delete { position: absolute; bottom: 20px; right: 20px; z-index: 4; border: none; background: rgba(0,0,0,.5); color: #fff; width: 42px; height: 42px; border-radius: 50%; font-size: 1.1rem; }
.story-nav { position: absolute; top: 0; bottom: 0; width: 40%; z-index: 2; }
.story-nav.prev { left: 0; }
.story-nav.next { right: 0; }

/* ---- VIP ---- */
.vip-page { padding: 30px 20px; }
.vip-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px 22px; box-shadow: var(--shadow); text-align: center; max-width: 420px; margin: 0 auto; }
.vip-card.active { border-color: #f5b942; }
.vip-crown { font-size: 3rem; }
.vip-card h1 { font-size: 1.5rem; margin: 6px 0; }
.vip-sub { color: var(--text-muted); margin: 0 0 14px; }
.vip-price { font-size: 1.8rem; font-weight: 900; color: var(--primary); margin-bottom: 16px; }
.vip-benefits { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; display: grid; gap: 10px; }
.vip-benefits li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .95rem; }
.v-check { background: var(--online); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; flex-shrink: 0; }
.vip-until { color: var(--online); font-weight: 700; margin: 0 0 14px; }
.vip-soon { font-size: .78rem; color: var(--text-muted); margin: 12px 0 0; }
.pay-ok { background: color-mix(in srgb, var(--online) 16%, transparent); color: var(--online); border-radius: 12px; padding: 12px 16px; margin: 0 auto 16px; max-width: 420px; font-weight: 700; text-align: center; }
.plan-toggle { display: flex; gap: 8px; margin: 14px 0; }
.plan-opt { position: relative; flex: 1; border: 2px solid var(--border); background: var(--surface); color: var(--text); border-radius: 14px; padding: 12px 8px; display: grid; gap: 2px; cursor: pointer; }
.plan-opt.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.plan-opt span { font-size: .78rem; color: var(--text-muted); font-weight: 700; }
.plan-opt b { font-size: 1.1rem; }
.plan-opt b small { font-size: .7rem; color: var(--text-muted); font-weight: 600; }
.plan-save { position: absolute; top: -9px; right: 8px; background: var(--online); color: #fff; font-size: .62rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.plan-price { font-size: 1.6rem; font-weight: 900; color: var(--primary); margin: 6px 0 16px; }
.plan-price span { font-size: .95rem; color: var(--text-muted); font-weight: 600; }
.pay-buttons { display: grid; gap: 10px; }
.pix-card { text-align: center; }
.pix-qr { display: grid; place-items: center; margin: 8px 0 14px; }
.pix-qr img { width: 220px; height: 220px; border-radius: 12px; background: #fff; padding: 8px; }
.pix-status { font-size: .85rem; color: var(--text-muted); margin: 12px 0 0; font-weight: 600; }

/* ---- admin ---- */
/* ── admin panel ── */
.admin { max-width: 1060px; margin: 0 auto; padding: 16px 14px 60px; }
.admin-brand { font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.admin-top-actions { display: flex; gap: 8px; align-items: center; }
/* metrics */
.a-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
@media (min-width: 620px) { .a-metrics { grid-template-columns: repeat(6, 1fr); } }
.a-metric { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 8px 10px; text-align: center; box-shadow: var(--shadow); transition: border-color .15s; }
.a-metric:hover { border-color: var(--primary); }
.a-metric-ico { display: block; font-size: 1.2rem; margin-bottom: 4px; }
.a-metric b { display: block; font-size: 1.35rem; font-weight: 800; }
.a-metric > span { font-size: .67rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.a-metric-vip b { color: #f59e0b; }
.a-metric-online b { color: #22c55e; }
.a-metric-danger b { color: var(--danger, #e53e3e); }
/* layout sidebar */
.a-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 840px) { .a-layout { grid-template-columns: 190px 1fr; } }
.a-sidebar { display: flex; flex-direction: row; gap: 4px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
@media (min-width: 840px) { .a-sidebar { flex-direction: column; position: sticky; top: 14px; overflow: visible; padding: 0; gap: 2px; } }
.a-sidebar-label { display: none; }
@media (min-width: 840px) { .a-sidebar-label { display: block; font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: 10px 12px 4px; } }
.a-sidelink { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 10px; font-size: .82rem; font-weight: 600; color: var(--text-muted); text-decoration: none; white-space: nowrap; transition: background .13s, color .13s; flex-shrink: 0; }
.a-sidelink:hover { background: var(--surface-2); color: var(--text); }
.a-sidelink-danger { color: #ef4444 !important; }
.a-sidelink-danger:hover { background: rgba(239,68,68,.08) !important; color: #ef4444 !important; }
.a-main { min-width: 0; }

/* ── Página judicial ── */
.jud-wrap { display: flex; flex-direction: column; gap: 20px; padding: 20px; max-width: 900px; margin: 0 auto; }
.jud-search-card { padding: 20px; }
.jud-form { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.jud-input { flex: 1; min-width: 220px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: .95rem; }
.jud-search-btn { padding: 10px 20px; background: var(--primary); color: #fff; border: none; border-radius: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.jud-error { color: #ef4444; margin-top: 10px; font-size: .9rem; }
.jud-user-card { display: grid; gap: 6px; padding: 4px 0 16px; }
.jud-user-row { display: flex; gap: 12px; font-size: .9rem; padding: 6px 0; border-bottom: 1px solid var(--border); }
.jud-label { font-weight: 700; min-width: 110px; color: var(--text-muted); flex-shrink: 0; }
.jud-export-bar { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.jud-fmt-label { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }
.jud-export-btn { padding: 10px 22px; background: #ef4444; color: #fff; border: none; border-radius: 10px; font-weight: 700; cursor: pointer; align-self: flex-start; }
.jud-note { font-size: .78rem; color: var(--text-muted); margin: 0; }
.jud-table-wrap { overflow-x: auto; }
.jud-sent td:first-child { color: var(--primary); font-weight: 700; font-size: .8rem; }
.jud-recv td:first-child { color: #f59e0b; font-weight: 700; font-size: .8rem; }
.jud-ts { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }
/* cards */
.a-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); scroll-margin-top: 14px; }
.a-card-title { display: flex; align-items: center; gap: 7px; font-size: .97rem; font-weight: 800; margin-bottom: 14px; }
.a-card-title span { font-size: 1.1rem; line-height: 1; }
.a-cardhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.a-section-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin: 14px 0 8px; }
.a-section-label:first-child { margin-top: 0; }
.a-hint { font-size: .82rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5; }
.a-muted { color: var(--text-muted); }
.a-empty { font-size: .85rem; color: var(--text-muted); }
/* form elements */
.a-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
@media (min-width: 580px) { .a-grid { grid-template-columns: 1fr 1fr; } }
.a-check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.a-field { display: grid; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.a-field input { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: .95rem; }
.a-search { display: flex; gap: 8px; margin-top: 10px; }
.a-search input { flex: 1; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
/* tables */
.a-tablewrap { overflow-x: auto; margin-top: 8px; }
.a-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.a-table td { padding: 9px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.a-table tr:last-child td { border-bottom: none; }
.a-banned { opacity: .45; }
.a-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; white-space: nowrap; }
.a-dt-cell { white-space: nowrap; }
.a-inline { display: inline; }
.btn-xs { padding: 5px 9px; font-size: .72rem; border-radius: 8px; }
/* chips & tags */
.a-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.a-chip { background: var(--surface-2); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: .82rem; display: inline-flex; align-items: center; gap: 4px; }
.a-chip form { display: inline; }
.a-chip button { border: none; background: none; color: var(--danger); cursor: pointer; font-size: .9rem; }
.a-tag { display: inline-block; font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); }
.a-tag-vip { background: rgba(245,158,11,.15); color: #b45309; }
.a-tag-danger { background: color-mix(in srgb, var(--danger, #e53e3e) 14%, transparent); color: var(--danger, #e53e3e); }
.a-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); font-size: .65rem; font-weight: 800; padding: 0 5px; margin-left: 4px; }
.a-badge-danger { background: var(--danger, #e53e3e); color: #fff; }
/* media */
.a-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; margin-top: 6px; border: 1px solid var(--border); }
.a-dt { color: var(--text-muted); font-size: .72rem; }

/* ---- legal / contato / footer ---- */
.legal { padding: 24px 18px 8px; max-width: 640px; margin: 0 auto; }
.legal h1 { font-size: 1.5rem; margin: 0 0 16px; }
.legal h2 { font-size: 1.02rem; margin: 20px 0 6px; }
.legal p { color: var(--text-muted); font-size: .92rem; margin: 0 0 8px; }
.contact-page .contact-form { margin-top: 14px; }
.contact-email { display: inline-block; margin-top: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 22px; font-weight: 800; font-size: 1.05rem; color: var(--primary); box-shadow: var(--shadow); }
.contact-email:hover { border-color: var(--primary); }
.contact-ok { background: color-mix(in srgb, var(--online) 16%, transparent); color: var(--online); border-radius: 10px; padding: 12px; margin: 12px 0; font-weight: 600; }
.site-footer { padding: 24px 18px; border-top: 1px solid var(--border); margin-top: 24px; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 10px; }
.footer-links a { font-size: .82rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }
.footer-copy { font-size: .74rem; color: var(--text-muted); margin: 0; }

/* ---- resposta + menções ---- */
.mention { color: var(--primary); font-weight: 700; }
.msg.own .mention { color: #fff; text-decoration: underline; }
.msg-quote { display: block; width: 100%; text-align: left; border: none; border-left: 3px solid var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); border-radius: 6px; padding: 5px 9px; margin-bottom: 6px; cursor: pointer; }
.msg.own .msg-quote { border-left-color: rgba(255,255,255,.8); background: rgba(255,255,255,.18); }
.msg-quote b { display: block; font-size: .72rem; color: var(--primary); }
.msg.own .msg-quote b { color: #fff; }
.msg-quote span { font-size: .78rem; color: var(--text-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-quote-body { display: flex; align-items: center; gap: 6px; }
.msg-quote-thumb { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.msg-quote-body span { flex: 1; min-width: 0; }
.reply-bar-thumb { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.msg.own .msg-quote span { color: rgba(255,255,255,.85); }
.msg-reply { border: none; background: transparent; font-size: .95rem; cursor: pointer; opacity: 1; padding: 0; line-height: 1; color: var(--primary); font-weight: 700; }
.msg.own .msg-reply { color: #fff; }
.msg-reply:hover { transform: scale(1.15); }
/* Quebra de linha correta em mensagens grandes */
.msg-body { min-width: 0; }
.msg-text { overflow-wrap: anywhere; word-break: break-word; }

/* Reações */
.msg-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.msg-reactions:empty { display: none; }
.rx-chip { border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; font-size: .78rem; cursor: pointer; }
.rx-chip.mine { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 16%, transparent); }
.msg.own .rx-chip { background: rgba(255,255,255,.22); border-color: transparent; color: #fff; }
.msg-react { border: none; background: transparent; font-size: .95rem; cursor: pointer; opacity: .6; padding: 0; line-height: 1; }
.msg-react:hover { opacity: 1; }
.rx-picker { position: fixed; z-index: 130; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow); padding: 4px 8px; display: flex; gap: 4px; }
.rx-picker[hidden] { display: none; }
.rx-picker button { border: none; background: transparent; font-size: 1.4rem; cursor: pointer; padding: 2px; line-height: 1; }
.rx-picker button:active { transform: scale(1.25); }
.msg.flash .msg-body { animation: msgflash 1s ease; }
@keyframes msgflash { 0%, 100% { background: var(--bubble-other); } 40% { background: color-mix(in srgb, var(--primary) 30%, var(--bubble-other)); } }
.msg.own.flash .msg-body { animation: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 40%, transparent); }
.reply-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--surface-2); border-top: 1px solid var(--border); }
.reply-bar-ico { color: var(--primary); font-size: 1.1rem; }
.reply-bar-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.reply-bar-name { font-size: .78rem; color: var(--primary); }
.reply-bar-text { font-size: .8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-bar-x { border: none; background: transparent; color: var(--text-muted); font-size: 1rem; }
.mention-box { background: var(--surface); border: 1px solid var(--border); border-top: none; box-shadow: var(--shadow); max-height: 220px; overflow-y: auto; }
.mb-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: transparent; padding: 8px 14px; color: var(--text); font-size: .9rem; font-weight: 600; }
.mb-item:hover { background: var(--surface-2); }
.mb-item img, .mb-fb { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mb-fb { display: grid; place-items: center; background: var(--surface-2); color: var(--primary); font-weight: 800; }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px); transform: translateX(-50%) translateY(20px);
  background: #14161c; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: .88rem;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .25s; z-index: 120; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }

/* ---- pv list — topbar WhatsApp-style ---- */
.pv-list { display: flex; flex-direction: column; height: calc(100dvh - var(--top-h) - var(--nav-h) - env(safe-area-inset-bottom)); overflow: hidden; }
.pv-topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
.pv-topbar-title { font-size: 1.25rem; font-weight: 800; }
.pv-new-btn { border: none; background: transparent; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.pv-new-btn:hover { background: var(--surface-2); color: var(--primary); }
.pv-convos { flex: 1; overflow-y: auto; }
.pv-convos[hidden] { display: none; }

/* ---- search bar (always visible) ---- */
.pv-search-bar { position: relative; padding: 14px 12px; border-bottom: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
.pv-search-ico { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); color: var(--text-muted); display: flex; pointer-events: none; z-index: 1; }
.pv-search-input { width: 100%; padding: 9px 14px 9px 40px; border-radius: 22px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: .95rem; box-sizing: border-box; }
.pv-search-input:focus { outline: 2px solid var(--primary); border-color: transparent; }
.pv-search-results { flex: 1; overflow-y: auto; display: block; }
.pv-search-results[hidden] { display: none !important; }
.pv-result-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); }
.pv-result-item:hover { background: var(--surface-2); }
.pv-result-handle { font-size: .8rem; color: var(--text-muted); font-weight: 600; display: block; }
.pv-no-results { text-align: center; color: var(--text-muted); padding: 40px 20px; font-size: .9rem; }

/* ---- empty state ---- */
.pv-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 60px 24px; text-align: center; color: var(--text-muted); }
.pv-empty-ico { opacity: .35; }
.pv-empty p { margin: 0; font-size: .95rem; }

.auth-or { text-align: center; font-size: .82rem; color: var(--text-muted); margin: 0; }

/* ---- @username display ---- */
.profile-username { display: block; color: var(--text-muted); font-size: .88rem; font-weight: 600; margin: -6px 0 8px; }
.profile-username-add { border: 1px dashed var(--border); background: transparent; color: var(--text-muted); padding: 6px 14px; border-radius: 12px; font-size: .82rem; font-weight: 600; margin: -4px auto 12px; display: block; cursor: pointer; }
.profile-username-add:hover { color: var(--primary); border-color: var(--primary); }

/* ---- username form inside edit modal and register ---- */
.uname-wrap { position: relative; display: flex; align-items: center; }
.uname-at { position: absolute; left: 14px; color: var(--text-muted); font-weight: 700; font-size: 1rem; pointer-events: none; }
.uname-wrap input { padding-left: 28px !important; }

/* username hint badge */
.reg-uname-hint { font-size: .75rem; font-weight: 700; margin-left: 6px; border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.uname-ok { color: #22c55e; background: rgba(34,197,94,.12); }
.uname-bad { color: #ef4444; background: rgba(239,68,68,.12); }
.uname-checking { color: var(--text-muted); background: transparent; }

/* account type row in register */
.reg-type-row { display: flex; align-items: center; gap: 14px; padding: 4px 0 8px; flex-wrap: wrap; }
.reg-type-label { font-size: .8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.reg-type-opt { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border); transition: background .15s, border-color .15s; }
.reg-type-opt:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }

/* admin select inside user table */
.a-sel-xs { padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: .78rem; cursor: pointer; }

/* ---- edit modal divider and note ---- */
.edit-divider { height: 1px; background: var(--border); margin: 16px 0 14px; }
.edit-note { font-size: .78rem !important; color: var(--text-muted); margin-top: 2px !important; }

/* ---- account type radio in edit modal ---- */
.acct-type-row { flex-direction: row !important; display: flex !important; align-items: center; gap: 8px; font-weight: 600 !important; color: var(--text) !important; font-size: .9rem !important; }
.acct-type-row input[type="radio"] { width: 16px; height: 16px; flex-shrink: 0; }

/* ---- business badge (inline, kept for other uses) ---- */
.biz-badge { display: inline-flex; align-items: center; gap: 3px; background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary); font-size: .72rem; font-weight: 700; border-radius: 8px; padding: 2px 8px; margin-left: 4px; vertical-align: middle; }

/* ---- business profile label (below avatar) ---- */
.profile-biz-label { display: inline-flex; align-items: center; gap: 5px; margin: 0 auto 6px; padding: 4px 14px; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35); border-radius: 999px; color: #b45309; font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .profile-biz-label { color: #fbbf24; } }
:root[data-theme="dark"] .profile-biz-label { color: #fbbf24; }
.profile-name-biz { gap: 6px; }
.profile-name-biz .verified-badge svg { width: 18px; height: 18px; }

/* ---- landing page card (right column) ---- */
.lp-card-title { font-size: 1.25rem; font-weight: 800; margin: 0 0 4px; text-align: center; color: var(--text); }
.lp-card-sub { font-size: .86rem; color: var(--text-muted); text-align: center; margin: 0 0 12px; }

/* ---- composer: send button sem fundo azul ---- */
.composer-send { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: none; background: transparent; color: var(--primary); cursor: pointer; flex-shrink: 0; transition: background .15s, color .15s; }
.composer-send:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.composer-send svg { display: block; }

/* ── custom audio player ── */
.msg-audio { display: flex; align-items: center; gap: 8px; padding: 4px 0; min-width: 220px; max-width: 270px; }
.audio-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 1px 6px rgba(0,0,0,.28); }
.audio-avatar-fb { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .95rem; flex-shrink: 0; box-shadow: 0 1px 6px rgba(0,0,0,.28); }
.audio-play-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; border: none; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; transition: filter .15s; }
.msg.own .audio-play-btn { background: rgba(255,255,255,.25); }
.audio-play-btn:hover { filter: brightness(1.12); }
.audio-track { flex: 1; height: 3px; background: color-mix(in srgb, currentColor 18%, transparent); border-radius: 2px; cursor: pointer; position: relative; overflow: hidden; }
.audio-prog { height: 100%; background: var(--primary); width: 0%; border-radius: 2px; transition: width .1s linear; }
.msg.own .audio-prog { background: rgba(255,255,255,.85); }
.audio-dur { font-size: .72rem; color: var(--text-muted); white-space: nowrap; min-width: 28px; text-align: right; }
.msg.own .audio-dur { color: rgba(255,255,255,.7); }

/* ── online dot ── */
.online-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 25%, transparent); animation: dot-pulse 2s ease-in-out infinite; vertical-align: middle; margin-right: 5px; }
@keyframes dot-pulse { 0%,100%{ box-shadow:0 0 0 2px color-mix(in srgb,#22c55e 25%,transparent); } 50%{ box-shadow:0 0 0 5px color-mix(in srgb,#22c55e 10%,transparent); } }
.pv-head-status.is-online { color: #22c55e; }

/* ── read receipts ── */
.msg-check { display: inline-block; vertical-align: middle; margin-left: 1px; flex-shrink: 0; }
.msg-delivered { color: rgba(255,255,255,.5); }
.msg-read { color: #ef4444; }

/* ── reply button (hover/swipe) ── */
.msg { position: relative; }
.msg-reply-btn { position: absolute; top: 50%; transform: translateY(-50%); display: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); cursor: pointer; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.1); z-index: 2; }
.msg:hover .msg-reply-btn { display: grid; }
.msg.own .msg-reply-btn { right: 100%; margin-right: 8px; }
.msg:not(.own) .msg-reply-btn { left: 100%; margin-left: 8px; }

/* ── reply strip above composer ── */
#replyStrip { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--surface-2); border-top: 1px solid var(--border); }
#replyStrip[hidden] { display: none; }
.reply-bar { width: 3px; min-height: 32px; background: var(--primary); border-radius: 2px; flex-shrink: 0; align-self: stretch; }
.reply-content { flex: 1; min-width: 0; }
.reply-from { display: block; font-size: .75rem; font-weight: 700; color: var(--primary); }
.reply-text { display: block; font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-close { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 4px; display: flex; align-items: center; }

/* ── quoted message inside bubble ── */
.msg-quote { font-size: .78rem; color: var(--text-muted); border-left: 3px solid var(--primary); padding: 3px 8px; margin-bottom: 4px; border-radius: 0 4px 4px 0; background: rgba(0,0,0,.04); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.msg.own .msg-quote { background: rgba(0,0,0,.10); border-left-color: rgba(255,255,255,.5); color: rgba(255,255,255,.65); }

/* ---- pv chat head: info (nome + status) ---- */
.pv-head-user { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; flex: 1; }
.pv-head-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pv-head-name { font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.pv-head-status { font-size: .73rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: .9em; transition: color .2s; }

/* ---- composer: mic button ---- */
.composer-mic { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: none; background: transparent; color: var(--text-muted); cursor: pointer; flex-shrink: 0; transition: color .15s, background .15s; }
.composer-mic:hover { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.composer-mic.recording { color: #ef4444; background: rgba(239,68,68,.12); animation: rec-pulse 1s ease-in-out infinite; }
@keyframes rec-pulse { 0%,100%{opacity:1}50%{opacity:.4} }

/* ---- audio message player ---- */
.msg-audio { margin: 2px 0; }
.msg-audio-player { display: block; width: 210px; max-width: 100%; height: 36px; accent-color: var(--primary); }

/* ---- pv chat head: call buttons ---- */
.pv-head { justify-content: space-between; }
.pv-head-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.pv-call-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: none; background: transparent; color: var(--text-muted); cursor: pointer; transition: background .15s, color .15s; }
.pv-call-btn:hover { background: var(--surface-2); color: var(--primary); }
.pv-call-btn svg { display: block; }

/* ---- call overlays ---- */
#callCard {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.75); backdrop-filter: blur(10px);
}
#callCard[hidden] { display: none; }

.call-card {
  background: var(--surface);
  border-radius: 28px;
  padding: 36px 28px 28px;
  text-align: center;
  width: min(300px, 88vw);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}

.call-ring-av {
  width: 76px; height: 76px; border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary); font-size: 2rem; font-weight: 800;
  display: grid; place-items: center; margin-bottom: 4px;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 10%, transparent),
              0 0 0 16px color-mix(in srgb, var(--primary) 5%, transparent);
  animation: call-pulse 1.6s ease-in-out infinite;
}
@keyframes call-pulse {
  0%, 100% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 10%, transparent), 0 0 0 16px color-mix(in srgb, var(--primary) 5%, transparent); }
  50%       { box-shadow: 0 0 0 10px color-mix(in srgb, var(--primary) 14%, transparent), 0 0 0 20px color-mix(in srgb, var(--primary) 7%, transparent); }
}

.call-card-name { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.call-card-type { font-size: .84rem; color: var(--text-muted); }

.call-actions { display: flex; justify-content: center; gap: 36px; margin-top: 12px; }

.call-btn-accept,
.call-btn-reject {
  width: 62px; height: 62px; border-radius: 50%; border: none;
  display: grid; place-items: center; cursor: pointer; color: #fff;
  transition: filter .15s;
}
.call-btn-accept { background: #22c55e; }
.call-btn-reject { background: #ef4444; }
.call-btn-accept:hover { filter: brightness(1.12); }
.call-btn-reject:hover { filter: brightness(1.12); }

/* ---- active call overlay ---- */
#callActive {
  position: fixed; inset: 0; z-index: 900;
  background: #0d1117;
  display: flex; flex-direction: column; align-items: stretch;
}
#callActive[hidden] { display: none; }

#callRemote {
  flex: 1; width: 100%; object-fit: cover; background: #1a1e2a;
  min-height: 0;
}

#callLocal {
  position: absolute; bottom: 110px; right: 16px;
  width: 88px; height: 128px; border-radius: 12px;
  object-fit: cover; background: #2a2e3a;
  border: 2px solid rgba(255,255,255,.18);
  display: none;
}

.call-top {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 44px 24px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,.6), transparent);
  color: #fff; text-align: center;
}
.call-top-name  { font-size: 1.3rem; font-weight: 800; }
.call-top-timer { font-size: .88rem; opacity: .7; margin-top: 4px; }

.call-ctrls {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: center; align-items: center; gap: 18px;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
}

.call-ctrl {
  width: 54px; height: 54px; border-radius: 50%; border: none;
  display: grid; place-items: center; color: #fff;
  background: rgba(255,255,255,.15); cursor: pointer;
  transition: background .15s;
}
.call-ctrl:hover  { background: rgba(255,255,255,.28); }
.call-ctrl-on     { background: var(--primary) !important; }
.call-ctrl-end    { width: 64px; height: 64px; background: #ef4444; }
.call-ctrl-end:hover { filter: brightness(1.12); }

/* ── attachment popup ── */
.attach-wrap { position: relative; flex-shrink: 0; }
.composer-attach { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: none; background: transparent; color: var(--text-muted); cursor: pointer; transition: background .15s, color .15s; }
.composer-attach:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.composer-attach svg { display: block; }
.attach-menu { position: absolute; bottom: calc(100% + 8px); left: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); min-width: 170px; padding: 6px; z-index: 50; display: flex; flex-direction: column; gap: 2px; }
.attach-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; border: none; background: transparent; color: var(--text); font-size: .88rem; cursor: pointer; text-align: left; transition: background .12s; }
.attach-item:hover { background: var(--surface-2); }
.attach-item svg { color: var(--primary); flex-shrink: 0; }
.attach-item span { white-space: nowrap; }

/* ── document message bubble ── */
.msg-doc { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 8%, transparent); text-decoration: none; color: inherit; min-width: 180px; max-width: 260px; transition: background .15s; }
.msg-doc:hover { background: color-mix(in srgb, var(--primary) 14%, transparent); }
.doc-icon { color: var(--primary); flex-shrink: 0; }
.msg.own .doc-icon { color: rgba(255,255,255,.85); }
.doc-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc-name { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.doc-ext  { font-size: .68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.msg.own .doc-ext { color: rgba(255,255,255,.6); }

/* ── poll message bubble ── */
.msg-poll { min-width: 180px; max-width: 280px; }
.poll-question { font-weight: 700; font-size: .88rem; margin-bottom: 6px; }
.poll-option { display: flex; align-items: center; gap: 6px; font-size: .83rem; padding: 5px 10px; margin: 3px 0; border-radius: 8px; background: color-mix(in srgb, currentColor 8%, transparent); }

/* ── poll creation dialog ── */
.poll-overlay { position: fixed; inset: 0; z-index: 800; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
.poll-dialog { background: var(--surface); border-radius: 20px; padding: 20px; width: min(360px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 10px; }
.poll-dialog-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 1rem; color: var(--text); }
.poll-close { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; padding: 2px 6px; border-radius: 6px; }
.poll-close:hover { background: var(--surface-2); }
.poll-input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: .88rem; outline: none; }
.poll-input:focus { border-color: var(--primary); }
.poll-add-opt { background: transparent; border: 1px dashed var(--border); border-radius: 10px; padding: 8px 14px; color: var(--primary); font-size: .84rem; cursor: pointer; transition: background .12s; }
.poll-add-opt:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.poll-send-btn { background: var(--primary); color: var(--primary-ink); border: none; border-radius: 12px; padding: 11px; font-size: .9rem; font-weight: 700; cursor: pointer; transition: filter .15s; }
.poll-send-btn:hover { filter: brightness(1.1); }

/* ── story creation modal ── */
.story-create-modal { position: fixed; inset: 0; z-index: 700; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
.story-create-box { background: var(--surface); border-radius: 24px 24px 0 0; width: min(480px, 100%); padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; max-height: 92vh; overflow-y: auto; }
.story-create-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 1rem; color: var(--text); }
.story-create-close { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; padding: 4px 8px; border-radius: 8px; }
.story-create-close:hover { background: var(--surface-2); }
.story-create-tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; }
.story-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border: none; border-radius: 9px; background: transparent; color: var(--text-muted); font-size: .86rem; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.story-tab.active { background: var(--surface); color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.story-tab-panel { display: flex; flex-direction: column; gap: 12px; }
.story-pick-btn { padding: 12px; background: var(--primary); color: var(--primary-ink); border: none; border-radius: 12px; font-weight: 700; font-size: .9rem; cursor: pointer; transition: filter .15s; }
.story-pick-btn:hover { filter: brightness(1.1); }
.story-canvas-preview { aspect-ratio: 9/16; max-height: 280px; border-radius: 16px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; background: #6d28d9; }
.story-text-display { color: #fff; font-size: 1.4rem; font-weight: 800; text-align: center; padding: 16px; line-height: 1.3; word-break: break-word; pointer-events: none; }
.story-color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform .12s, border-color .12s; flex-shrink: 0; }
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--primary); transform: scale(1.1); }
.story-text-input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: .9rem; resize: none; outline: none; }
.story-text-input:focus { border-color: var(--primary); }
.story-caption-field { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: .86rem; outline: none; }
.story-caption-field:focus { border-color: var(--primary); }

/* ── story: who viewed ── */
.story-who-viewed { position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.story-views-chip { display: flex; align-items: center; gap: 6px; padding: 7px 16px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); border: none; border-radius: 20px; color: #fff; font-size: .82rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.story-views-chip:hover { background: rgba(0,0,0,.72); }
.story-viewers-list { background: rgba(10,12,20,.85); backdrop-filter: blur(8px); border-radius: 14px; padding: 6px; min-width: 200px; max-height: 220px; overflow-y: auto; }
.viewer-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; color: #fff; font-size: .84rem; }
.viewer-av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.viewer-av-fb { background: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; }
.viewer-empty { padding: 12px 16px; color: rgba(255,255,255,.6); font-size: .84rem; text-align: center; }

/* ── quote image thumbnail ── */
.msg-quote { display: flex; align-items: center; gap: 8px; }
.quote-thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }

/* ── link in messages ── */
.msg-link { color: var(--primary); text-decoration: underline; word-break: break-all; }
.msg-link-wrap { display: inline-flex; align-items: center; gap: 4px; }
.link-report { background: transparent; border: none; padding: 0 2px; cursor: pointer; font-size: .8rem; opacity: .5; }
.link-report:hover { opacity: 1; }
/* links inside own (sent) bubbles */
.msg.own .msg-link { color: rgba(255,255,255,.92); text-decoration-color: rgba(255,255,255,.4); }
.msg.own .link-report { color: rgba(255,255,255,.65); }

/* ── link preview card ── */
.link-preview-container { margin-top: 8px; }
.link-preview { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); max-width: 320px; }
.lp-img { width: 100%; max-height: 160px; object-fit: cover; display: block; }
.lp-body { padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 3px; }
.lp-domain { font-size: .72rem; color: var(--text-muted); text-transform: lowercase; }
.lp-title { font-size: .84rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.lp-desc { font-size: .77rem; color: var(--text-muted); line-height: 1.4; }
/* preview card inside own bubbles */
.msg.own .link-preview { border-color: rgba(255,255,255,.22); background: rgba(0,0,0,.18); }
.msg.own .lp-domain { color: rgba(255,255,255,.6); }
.msg.own .lp-title { color: rgba(255,255,255,.95); }
.msg.own .lp-desc { color: rgba(255,255,255,.65); }
/* suspicious badge on preview card */
.lp-suspicious { display: flex; align-items: center; gap: 5px; padding: 6px 12px; font-size: .72rem; font-weight: 700; color: #c0392b; background: rgba(192,57,43,.09); border-top: 1px solid rgba(192,57,43,.15); }
.msg.own .lp-suspicious { color: #ffb3ab; background: rgba(255,100,80,.22); border-top-color: rgba(255,150,130,.25); }

/* ── link safety modal ── */
#linkSafetyModal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: flex-end; justify-content: center; }
#linkSafetyModal[hidden] { display: none; }
.safety-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.48); }
.safety-card { position: relative; z-index: 1; background: var(--surface); border-radius: 24px 24px 0 0; padding: 26px 22px 30px; width: 100%; max-width: 480px; box-shadow: 0 -8px 40px rgba(0,0,0,.22); animation: slideUp .22s ease; }
@media (min-width: 520px) { .safety-card { border-radius: 20px; margin-bottom: 40px; max-width: 400px; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.safety-ico { font-size: 2.1rem; margin-bottom: 10px; line-height: 1; }
.safety-heading { font-size: 1.05rem; font-weight: 800; margin: 0 0 8px; color: var(--text); }
.safety-url-box { font-size: .78rem; font-weight: 600; color: var(--primary); word-break: break-all; margin: 0 0 12px; line-height: 1.45; background: color-mix(in srgb, var(--primary) 10%, transparent); padding: 8px 11px; border-radius: 8px; }
.safety-url-box.is-suspicious { color: #c0392b; background: rgba(192,57,43,.1); }
.safety-note { font-size: .85rem; color: var(--text-muted); margin: 0 0 20px; line-height: 1.5; }
.safety-note.is-suspicious { color: #c0392b; font-weight: 700; }
.safety-btns { display: flex; gap: 10px; }
.safety-btns .btn { flex: 1; padding: 12px; font-size: .94rem; }

/* ── clear history button ── */
.pv-clear-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 6px; border-radius: 8px; transition: color .15s; margin-left: 4px; }
.pv-clear-btn:hover { color: var(--danger, #e53e3e); }

/* ── profile story privacy select ── */
.ptool-select { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 4px 8px; font-size: .82rem; cursor: pointer; outline: none; margin-top: 2px; }

/* ── call history panel ── */
.call-history-panel { border-radius: 16px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; margin: 0 16px 12px; }
.ch-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: .9rem; color: var(--text); }
.ch-clear-btn { background: transparent; border: none; color: var(--text-muted); font-size: .8rem; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.ch-clear-btn:hover { color: var(--danger, #e53e3e); background: var(--surface-2); }
.ch-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.ch-row:last-child { border-bottom: none; }
.ch-ico { font-size: 1.3rem; flex-shrink: 0; }
.ch-info { display: flex; flex-direction: column; gap: 2px; }
.ch-name { font-size: .86rem; font-weight: 600; color: var(--text); }
.ch-meta { font-size: .76rem; color: var(--text-muted); }

/* ── call message bubble ── */
.msg-call { display: flex; align-items: center; gap: 10px; padding: 4px 2px; min-width: 160px; }
.msg-call-ico { flex-shrink: 0; display: flex; align-items: center; opacity: .85; }
.msg-call-missed .msg-call-ico { color: #ef4444; opacity: 1; }
.msg-call-info { display: flex; flex-direction: column; gap: 1px; }
.msg-call-label { font-size: .88rem; font-weight: 600; }
.msg-call-meta { font-size: .76rem; color: var(--text-muted); }
.msg-call-missed .msg-call-meta { color: #ef4444; }

/* ── message date separator ── */
.msg-date-sep { text-align: center; font-size: .74rem; color: var(--text-muted); margin: 12px 0 6px; position: relative; }
.msg-date-sep::before, .msg-date-sep::after { content: ''; position: absolute; top: 50%; width: 30%; height: 1px; background: var(--border); }
.msg-date-sep::before { left: 0; }
.msg-date-sep::after  { right: 0; }

/* ── profile call history wrapping ── */
.ptool-wrap { display: flex; flex-direction: column; }
.ptool-chevron { color: var(--text-muted); font-size: 1.1rem; transition: transform .2s; flex-shrink: 0; }
.call-history-panel { border-top: 1px solid var(--border); overflow: hidden; }
.ch-empty { padding: 14px 16px; color: var(--text-muted); font-size: .84rem; text-align: center; }
.ch-ico-missed { color: #e53e3e; }

/* ============================================================
   Grupos
   ============================================================ */

/* ── chip de grupo na lista de conversas ── */
.pv-group-chip {
  display: inline-flex;
  align-items: center;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 2px 6px;
  border-radius: 99px;
  background: var(--primary);
  color: #fff;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 1;
}
.pv-item-group .pv-avatar { border-radius: 50%; }
.grp-avatar { border-radius: 50% !important; }
.grp-avatar-fb {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 12px;
}

/* ── lista de grupos ── */
.grp-list .pv-topbar { display: flex; align-items: center; justify-content: space-between; }
.grp-create-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 400;
  text-decoration: none;
  line-height: 1;
  transition: opacity .15s;
}
.grp-create-btn:hover { opacity: .85; }
.grp-member-count { color: var(--text-muted); font-size: .8rem; }

/* ── criar grupo ── */
.grp-create-page, .grp-settings-page, .grp-join-page { max-width: 520px; margin: 0 auto; padding-bottom: 80px; }

/* cabeçalho interno (páginas com chrome visível) */
.grp-page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.grp-page-back {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 600;
  flex-shrink: 0;
  transition: background .15s;
}
.grp-page-back:hover { background: var(--border); }
.grp-page-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }

.grp-create-form, .grp-settings-form {
  padding: 20px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* foto do grupo — círculo clicável */
.grp-photo-picker { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.grp-photo-preview {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.grp-photo-preview:hover { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); }
.grp-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.grp-photo-placeholder { color: var(--text-muted); display: flex; }
.grp-photo-label { font-size: .8rem; color: var(--primary); cursor: pointer; font-weight: 600; letter-spacing: .01em; }

/* capa — banner retangular */
.grp-cover-picker { display: flex; flex-direction: column; gap: 6px; }
.grp-cover-preview {
  width: 100%; height: 96px;
  border-radius: 14px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border: 2px dashed var(--border);
  color: var(--text-muted);
  font-size: .84rem;
  cursor: pointer;
  transition: border-color .2s;
}
.grp-cover-preview:hover { border-color: var(--primary); }
.grp-cover-preview img { width: 100%; height: 100%; object-fit: cover; }

/* campos do formulário */
.grp-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.grp-field > span, .grp-field-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.grp-field input[type="text"],
.grp-field textarea,
.grp-field select,
.grp-field-input {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: .97rem;
  font-family: inherit;
  transition: border-color .18s, box-shadow .18s;
  resize: vertical;
}
.grp-field input[type="text"]:focus,
.grp-field textarea:focus,
.grp-field select:focus,
.grp-field-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
  background: var(--surface);
}
.grp-field input::placeholder,
.grp-field textarea::placeholder { color: var(--text-muted); opacity: .7; }

/* ── chat de grupo ── */
.grp-chat { display: flex; flex-direction: column; height: 100%; }
.grp-pinned {
  padding: 8px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-muted);
}
.grp-sender-name {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}
.grp-msg-av {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-right: 6px;
  align-self: flex-end;
}
.grp-msg-av-fb {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 6px;
  align-self: flex-end;
}
.msg-row { display: flex; align-items: flex-end; gap: 0; margin: 3px 0; padding: 0 8px; }
.msg-row.own { flex-direction: row-reverse; }
.msg-pin-btn {
  background: none; border: none; cursor: pointer;
  font-size: .7rem; padding: 0 2px; opacity: 0; transition: opacity .15s;
  line-height: 1;
}
.bubble:hover .msg-pin-btn { opacity: .6; }
.grp-readonly-bar {
  padding: 12px 16px;
  text-align: center;
  font-size: .84rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* ── painel de membros ── */
.grp-members-panel {
  position: absolute;
  top: 0; right: 0;
  width: 280px; max-width: 90vw;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 20;
  box-shadow: -4px 0 20px rgba(0,0,0,.1);
  overflow-y: auto;
}
.grp-members-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: .95rem;
}
.grp-members-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.1rem; line-height: 1;
}
.grp-members-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.grp-member-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
}
.grp-member-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.grp-member-name { font-size: .9rem; font-weight: 600; color: var(--text); text-decoration: none; }
.grp-member-actions { display: flex; gap: 4px; }
.grp-role-badge {
  display: inline-flex; align-items: center;
  font-size: .68rem; font-weight: 700;
  padding: 2px 6px; border-radius: 99px;
}
.grp-role-badge.owner { background: #f59e0b; color: #fff; }
.grp-role-badge.admin { background: var(--primary); color: #fff; }
.grp-role-badge.me    { background: var(--surface-2); color: var(--text-muted); }
.grp-add-btn { margin: 8px 16px; }
.grp-leave-btn { margin: 8px 16px; }

/* ── configurações ── */
.grp-settings-cover-wrap {
  position: relative;
  height: 140px;
  background: var(--surface-2);
  overflow: hidden;
}
.grp-settings-cover { width: 100%; height: 100%; object-fit: cover; }
.grp-settings-cover-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .88rem;
}
.grp-cover-edit-btn, .grp-photo-edit-btn {
  position: absolute;
  bottom: 8px; right: 10px;
  background: rgba(0,0,0,.5);
  color: #fff;
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.grp-settings-photo-wrap {
  position: relative;
  width: 80px; height: 80px;
  margin: -40px auto 0;
  border-radius: 50%;
  background: var(--surface-2);
  border: 3px solid var(--bg);
  overflow: hidden;
}
.grp-settings-photo { width: 100%; height: 100%; object-fit: cover; }
.grp-settings-photo-fb {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: var(--primary); color: #fff;
  font-weight: 700; font-size: 1.6rem;
}
.grp-photo-edit-btn {
  top: auto; bottom: 0; right: 0;
  width: 24px; height: 24px;
  font-size: .7rem;
}
.grp-settings-form { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.grp-settings-info { padding: 16px; }
.grp-rules-box {
  margin-top: 12px; padding: 12px;
  background: var(--surface-2);
  border-radius: 10px;
  font-size: .88rem;
  line-height: 1.5;
}
.grp-invite-box {
  margin: 0 16px 20px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.grp-invite-row { display: flex; gap: 8px; }
.grp-invite-input {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: .82rem;
}
.grp-regen-btn { align-self: flex-start; }
.grp-members-section { padding: 0 16px 16px; }
.grp-section-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: .9rem;
  padding: 12px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.grp-add-member-form { padding: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.grp-add-search-results { display: flex; flex-direction: column; gap: 4px; }
.grp-add-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: none; cursor: pointer; text-align: left; width: 100%;
  font-size: .88rem; color: var(--text);
}
.grp-add-result-item:hover { background: var(--border); }
.grp-add-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.grp-add-no-result { font-size: .84rem; color: var(--text-muted); text-align: center; padding: 10px; }
.grp-members-list { display: flex; flex-direction: column; }
.grp-danger-zone { padding: 16px; margin-top: 8px; border-top: 1px solid var(--border); }

/* ── entrar em grupo ── */
.grp-join-page {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 40px 20px 80px;
  text-align: center;
}
.grp-join-photo {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
}
.grp-join-photo-fb {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.grp-join-desc { color: var(--text-muted); font-size: .9rem; max-width: 300px; }
.grp-join-members { font-size: .85rem; color: var(--text-muted); }

/* .bottomnav já usa flex + flex:1 por item — distribui os 5 itens automaticamente */

/* ── extra buttons ── */
.btn-ghost { background: none; border: 1.5px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger-outline { background: none; border: 1.5px solid var(--danger); color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger); color: #fff; }
.btn-sm  { font-size: .82rem; padding: 6px 14px; border-radius: 8px; }
.btn-xs  { font-size: .76rem; padding: 4px 10px; border-radius: 6px; }

/* ── regras banner fixo no topo do chat de grupo ── */
.grp-rules-banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
  flex-shrink: 0;
  font-size: .84rem;
}
.grp-rules-ico { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.grp-rules-text { flex: 1; }
.grp-rules-text strong { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); }
.grp-rules-text p { margin: 2px 0 0; color: var(--text); line-height: 1.45; white-space: pre-wrap; }
.grp-rules-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: .8rem; line-height: 1;
  padding: 2px 4px; margin-top: -2px; flex-shrink: 0;
}

/* ── avatar fallback nos msgs de grupo ── */
.grp-msg-av-fb {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; text-transform: uppercase;
}

/* ── readonly bar ── */
.grp-readonly-bar {
  padding: 10px 16px; text-align: center;
  font-size: .84rem; color: var(--text-muted);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

/* ── perfil do grupo ── */
.grp-profile-page { display: flex; flex-direction: column; padding-bottom: 80px; }
.grp-prof-cover-wrap { height: 160px; background: var(--surface-2); overflow: hidden; flex-shrink: 0; }
.grp-prof-cover { width: 100%; height: 100%; object-fit: cover; }
.grp-prof-cover-empty { width: 100%; height: 100%; background: linear-gradient(135deg, var(--primary) 0%, #0096b4 100%); }
.grp-prof-photo-wrap { display: flex; justify-content: center; margin-top: -40px; position: relative; z-index: 1; }
.grp-prof-photo {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--bg);
}
.grp-prof-photo-fb {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700;
  border: 3px solid var(--bg);
}
.grp-prof-info { padding: 12px 20px 8px; text-align: center; }
.grp-prof-name { font-size: 1.3rem; font-weight: 700; margin: 0 0 4px; }
.grp-prof-meta { font-size: .84rem; color: var(--text-muted); margin: 0 0 8px; }
.grp-prof-desc { font-size: .9rem; color: var(--text); max-width: 340px; margin: 0 auto 10px; line-height: 1.5; }
.grp-prof-rules {
  background: var(--surface-2); border-radius: 10px;
  padding: 10px 14px; font-size: .85rem;
  line-height: 1.5; text-align: left;
  margin: 8px auto 0; max-width: 400px;
}
.grp-prof-rules-label { font-weight: 700; display: block; margin-bottom: 4px; }
.grp-prof-actions { display: flex; justify-content: center; gap: 10px; padding: 12px 16px; }
.grp-prof-members-section { padding: 0 16px; }
.grp-prof-members-list { display: flex; flex-direction: column; }
.grp-prof-member {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.grp-prof-more { font-size: .83rem; color: var(--text-muted); padding: 8px 0; }

/* ── msg del buttons ── */
.grp-del-all, .grp-del-self {
  background: none; border: none; cursor: pointer;
  font-size: .85rem; padding: 0 2px;
  opacity: 0; transition: opacity .15s;
}
.msg:hover .grp-del-all, .msg:hover .grp-del-self { opacity: 1; }

/* ── system message pill ── */
.msg-system {
  display: flex; justify-content: center; padding: 6px 0;
}
.msg-system span {
  background: var(--surface-2); color: var(--text-muted);
  font-size: .76rem; padding: 3px 12px; border-radius: 20px;
  border: 1px solid var(--border);
}

/* ── search result in settings ── */
.grp-search-result {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--surface-2);
  border-radius: 10px; font-size: .88rem;
}
.grp-search-result small { color: var(--text-muted); }
.grp-search-info { flex: 1; }
.grp-search-av {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 600;
  background: var(--primary); color: #fff;
}
.grp-search-empty { font-size: .84rem; color: var(--text-muted); text-align: center; padding: 8px; }

/* ── criar grupo photo picker ── */
.grp-photo-picker {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 20px 16px 0;
}
.grp-photo-preview {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer;
  border: 2px dashed var(--border);
}
.grp-photo-placeholder { color: var(--text-muted); }
.grp-photo-label { font-size: .8rem; color: var(--primary); font-weight: 600; cursor: pointer; }

.grp-cover-picker { padding: 8px 16px; }
.grp-cover-preview {
  width: 100%; height: 80px; border-radius: 12px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden;
  border: 2px dashed var(--border);
}
.grp-cover-placeholder { font-size: .82rem; color: var(--text-muted); }

/* ── avatar fallback nos fb ── */
.grp-avatar-fb {
  width: 100%; height: 100%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.3rem;
  border-radius: 12px;
}

/* ── grp chat layout ── */
.grp-chat { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.grp-chat .messages { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.grp-chat .composer { flex-shrink: 0; }

/* ── admin: reset de senha ── */
.a-reset-pw-panel {
  position: absolute; z-index: 100; right: 0; top: 100%;
  background: var(--surface, #1a1a24); border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; padding: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  min-width: 260px; margin-top: 4px;
}
details.a-inline { position: relative; }
details.a-inline summary { list-style: none; }
details.a-inline summary::-webkit-details-marker { display: none; }
.a-reset-pw-form { display: flex; gap: 6px; align-items: center; }
.a-input-xs { padding: 4px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.05); color: inherit; font-size: .8rem; flex: 1; }
.a-reset-hint { font-size: .73rem; color: rgba(255,255,255,.35); display: block; margin-top: 6px; }

/* ── admin: grupos stats ── */
.a-groups-stats { display: flex; gap: 16px; padding: 8px 0 14px; }
.a-gstat { display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,.04); border-radius: 10px; padding: 10px 20px; }
.a-gstat b { font-size: 1.4rem; font-weight: 800; }
.a-gstat span { font-size: .75rem; color: rgba(255,255,255,.45); }

/* ── figurinha (sticker) ── */
.msg.own .msg-sticker { margin-left: auto; }

/* Botão figurinha no composer */
.composer-sticker-btn { border: none; background: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; cursor: pointer; opacity: .7; transition: opacity .15s; color: var(--text-muted); }
.composer-sticker-btn:hover { opacity: 1; background: var(--surface-2); }

/* ── Editor de figurinhas ── */
.sticker-ed-ov { position: fixed; inset: 0; background: rgba(0,0,0,.86); z-index: 9997; display: flex; align-items: flex-end; justify-content: center; }
.sticker-ed-ov[hidden] { display: none; }
.sticker-ed-panel { background: var(--surface); width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; max-height: 98dvh; overflow: hidden; }
.sticker-ed-hd { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; border-bottom: 1px solid var(--border); font-size: .88rem; font-weight: 700; }
.sticker-ed-cancel-btn { border: none; background: none; color: var(--text-muted); cursor: pointer; font-size: .85rem; }
.sticker-ed-save-btn { border: none; background: var(--primary); color: #fff; border-radius: 20px; padding: 6px 18px; font-size: .85rem; font-weight: 700; cursor: pointer; }
.sticker-ed-cwrap { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); padding: 12px; }
.sticker-ed-cwrap canvas { max-width: 100%; max-height: 38vh; border-radius: 12px; cursor: crosshair; display: block; }
.sticker-ed-hint { font-size: .7rem; color: var(--text-muted); margin: 4px 0 0; text-align: center; }
.sticker-ed-tools { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); }
.sticker-ed-text-in { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-size: .95rem; box-sizing: border-box; outline: none; }
.sticker-ed-text-in:focus { border-color: var(--primary); }
.sticker-ed-row { display: flex; align-items: center; gap: 12px; }
.sticker-ed-palette { display: flex; gap: 8px; }
.sted-color { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; background: var(--cc, #fff); transition: transform .1s, border-color .1s; flex-shrink: 0; }
.sted-color.sel { border-color: var(--primary); transform: scale(1.2); }
.sticker-ed-size-sl { flex: 1; accent-color: var(--primary); }
.sticker-ed-bg-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.sticker-ed-bg-label { font-size: .78rem; color: var(--text-secondary); white-space: nowrap; }
.sticker-ed-bg-palette { display: flex; gap: 6px; flex-wrap: wrap; }
.sted-bg { width: 26px; height: 26px; border-radius: 6px; border: 2px solid var(--border); cursor: pointer; background: var(--bgc, transparent); flex-shrink: 0; transition: transform .1s, border-color .1s; }
.sted-bg[data-bg=""] { background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 0 0/10px 10px; }
.sted-bg.sel { border-color: var(--primary); transform: scale(1.18); }

/* Overlay de processamento de figurinha */
.sticker-proc-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 9998; display: grid; place-items: center; }
.sticker-proc-overlay[hidden] { display: none; }
.sticker-proc-box { background: var(--surface); border-radius: 18px; padding: 28px 36px; display: flex; flex-direction: column; align-items: center; gap: 14px; box-shadow: 0 8px 32px rgba(0,0,0,.3); }
.sticker-proc-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sticker-proc-msg { font-size: .9rem; font-weight: 600; color: var(--text); }

/* Mensagem de figurinha — sem bolha, transparente */
.msg.sticker-msg .msg-body { background: none !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; }
.msg.sticker-msg .msg-foot { padding-top: 2px; }
.msg-sticker { max-width: 180px; max-height: 180px; object-fit: contain; display: block; background: transparent; cursor: pointer; }

/* Painel de figurinhas */
.sticker-panel { position: fixed; bottom: 0; left: 0; right: 0; max-height: 42vh; background: var(--surface); border-top: 1px solid var(--border); border-radius: 16px 16px 0 0; z-index: 90; display: flex; flex-direction: column; animation: slideUp .2s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sticker-panel[hidden] { display: none; }
.sticker-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 6px; font-size: .88rem; font-weight: 600; border-bottom: 1px solid var(--border); }
.sticker-upload-btn { cursor: pointer; font-size: 1.3rem; padding: 2px 8px; border-radius: 8px; background: var(--surface-2); color: var(--primary); font-weight: 700; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; padding: 10px 12px; overflow-y: auto; }
.sticker-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--surface-2); }
.sticker-item img { width: 100%; height: 100%; object-fit: contain; }
.sticker-item:hover { outline: 2px solid var(--primary); }
.sticker-del { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: .65rem; cursor: pointer; display: none; place-items: center; }
.sticker-item:hover .sticker-del { display: grid; }
.sticker-empty { grid-column: 1/-1; text-align: center; color: var(--text-muted); font-size: .84rem; padding: 20px 0; }

/* ── Lightbox (zoom de imagem) ── */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 9999; display: flex; align-items: center; justify-content: center; cursor: zoom-out; animation: lbFadeIn .18s ease; }
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-overlay[hidden] { display: none; }
.lightbox-overlay img { max-width: 94vw; max-height: 92vh; object-fit: contain; border-radius: 6px; box-shadow: 0 8px 40px rgba(0,0,0,.6); pointer-events: none; }
.lightbox-close { position: fixed; top: 14px; right: 18px; background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 1.5rem; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; z-index: 10000; }
