@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap');
:root {
  --ink: #12261f;
  --ink-soft: #4a5d55;
  --line: #dfe6e1;
  --bg: #f5f7f4;
  --card: #ffffff;
  --brand: #0f6b4f;
  --brand-dark: #0a4f3a;
  --brand-tint: #e3f2ec;
  --warn: #b3261e;
  --warn-tint: #fdecea;
  --line-strong: #c8d2cc;
  --surface: #f1f4f2;
  --surface-hover: #e6efe9;
  --tint: #e3f7ea;
  --green-text: #1a7f5a;
  --green-line: #9fdcb7;
  --purple-tint: #f6f0ff;
  --purple-tint-2: #e4d2fb;
  --purple-text: #6b3fc2;
  --purple-line: #e0d0fa;
  --blue-tint: #e0e7ff;
  --blue-text: #3730a3;
  --warn2-tint: #fff8e6;
  --warn2-text: #7a5200;
  --danger-tint: #ffe3e3;
  --radius: 12px;
  --font: "Roboto", "Segoe UI", "Helvetica Neue", Helvetica, "Lucida Grande", Arial, Ubuntu, Cantarell, "Fira Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

/* ---------- Telas de autenticação ---------- */
.auth-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 8px 30px rgba(18, 38, 31, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 24px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
}

h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -0.01em; }
.sub { color: var(--ink-soft); margin: 0 0 22px; font-size: 15px; }

label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 107, 79, 0.15);
}

.btn {
  width: 100%;
  margin-top: 18px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  transition: background 0.15s;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-ghost {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line-strong);
  margin-top: 0;
}
.btn-ghost:hover { background: var(--surface); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 13px;
  margin: 18px 0 4px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.row-between { display: flex; justify-content: space-between; align-items: center; }
.small { font-size: 13px; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.mt { margin-top: 20px; }

.alert {
  display: none;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  background: var(--warn-tint);
  color: var(--warn);
}
.alert.show { display: block; }
.alert.ok { background: var(--brand-tint); color: var(--brand-dark); }

.lang-switch {
  position: fixed;
  top: 14px;
  right: 14px;
}
.lang-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.lang-btn:hover { background: var(--surface); }

/* ---------- Painel ---------- */
.shell { display: flex; min-height: 100%; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
}
.sidebar .brand { padding: 0 8px; margin-bottom: 20px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 9px;
  color: var(--ink);
  font-weight: 600;
  font-size: 14.5px;
}
.nav-item.active { background: var(--brand-tint); color: var(--brand-dark); }
.nav-item.disabled { color: var(--ink-soft); cursor: default; }
.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink-soft);
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.user-chip { font-size: 14px; color: var(--ink-soft); }
.topbar .lang-btn, .topbar .btn-ghost { width: auto; padding: 7px 12px; }

.content { padding: 28px; max-width: 880px; }
.content h1 { font-size: 26px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-top: 18px;
}
.card h2 { margin: 0 0 4px; font-size: 17px; }

.checklist { list-style: none; margin: 14px 0 0; padding: 0; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.checklist li:first-child { border-top: 0; }
.dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}
.dot.done { background: var(--brand); border-color: var(--brand); }
.checklist .tag { margin-left: auto; }

@media (max-width: 720px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  .sidebar .brand { margin-bottom: 10px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .content { padding: 18px 16px; }
  .topbar { padding: 12px 16px; }
}

/* ---------- Canais (WhatsApp / SMS) ---------- */
.panel { max-width: 460px; }
.view[hidden] { display: none; }
.opt {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 14px; margin-top: 12px; font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; cursor: pointer;
}
.opt:hover { border-color: var(--brand); }
.opt.rec { border-color: var(--brand); background: var(--surface); }
.opt-ico {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--brand-tint); color: var(--brand-dark); display: grid; place-items: center; font-size: 18px; font-weight: 700;
}
.opt-ico.wa, .hero.wa { background: var(--tint); color: var(--green-text); }
.opt-text { flex: 1; min-width: 0; }
.opt-text strong { display: block; font-size: 15px; }
.opt-text small { display: block; color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.chev { color: var(--ink-soft); font-size: 22px; }
.hero {
  width: 64px; height: 64px; border-radius: 50%; margin: 6px auto 14px;
  display: grid; place-items: center; font-size: 28px; font-weight: 700;
}
.back {
  font: inherit; font-weight: 700; font-size: 16px; color: var(--ink);
  background: none; border: 0; padding: 4px 0; margin-bottom: 14px; cursor: pointer;
}
.view h2 { font-size: 19px; margin: 0 0 6px; }
.help { margin-top: 22px; }
.help h2 { font-size: 16px; }
.help p { margin: 6px 0 0; }
.badge.tag { margin-left: 6px; background: var(--brand-tint); color: var(--brand-dark); }
.steps { text-align: left; padding-left: 20px; margin: 14px 0 0; }
.steps li { margin: 4px 0; }
.code {
  font-family: ui-monospace, Consolas, monospace; font-size: 34px; font-weight: 700; letter-spacing: 0.12em;
  text-align: center; background: var(--brand-tint); color: var(--brand-dark);
  border-radius: 12px; padding: 14px 8px; margin: 8px 0;
}
.qr-box { width: 280px; height: 280px; margin: 0 auto 6px; display: grid; place-items: center; }
.qr-box img { width: 280px; height: 280px; border-radius: 8px; }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--brand); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.inline { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.inline input { flex: 1; min-width: 0; border-radius: 999px; }
.pill {
  font: inherit; font-weight: 700; font-size: 14px; color: #fff; background: #14b8a6;
  border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer; white-space: nowrap;
}
.pill:hover { background: #0f9d8e; }
input[type="tel"] {
  width: 100%; padding: 11px 12px; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line-strong); border-radius: 10px; outline: none;
}
input[type="tel"]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 107, 79, 0.15); }

/* ---------- Barra inferior ---------- */
body.has-tabbar .shell { padding-bottom: 68px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: 64px;
  display: flex; justify-content: space-around; align-items: stretch;
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink-soft); font-size: 12px; font-weight: 600; text-decoration: none;
}
.tab:hover { text-decoration: none; color: var(--ink); }
.tab.active { color: #f08a00; }
.tab-ico { position: relative; display: inline-flex; }
.tab-badge {
  position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #f08a00; color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.tab-badge[hidden] { display: none; }

/* ---------- Conversas ---------- */
.shell:has(.chat-layout) { height: 100vh; }
body.has-tabbar .shell:has(.chat-layout) { padding-bottom: 64px; height: 100vh; }
.main:has(.chat-layout) { min-height: 0; }
.chat-layout { flex: 1; min-height: 0; display: flex; background: var(--card); }
.chat-list-pane { width: 340px; flex-shrink: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.pane-head { padding: 16px 16px 8px; }
.pane-head h1 { font-size: 20px; margin-bottom: 10px; }
input[type="search"], #msg-input {
  width: 100%; padding: 10px 14px; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid transparent; border-radius: 999px; outline: none;
}
input[type="search"]:focus, #msg-input:focus { border-color: var(--brand); background: var(--card); }
.chat-list { flex: 1; overflow-y: auto; }
.chat-row {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left;
  font: inherit; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
.chat-row:hover { background: var(--surface); }
.chat-row.active { background: var(--brand-tint); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; background: var(--tint); color: var(--green-text);
  display: grid; place-items: center; font-weight: 700;
}
.avatar.av-c0 { background: #d9f2e6; color: #1a7f5a; }
.avatar.av-c1 { background: #d6e8fb; color: #1e5fa8; }
.avatar.av-c2 { background: #e6dcf8; color: #6b44b8; }
.avatar.av-c3 { background: #fde6cf; color: #b3601a; }
.avatar.av-c4 { background: #fbdbe6; color: #b8396a; }
.avatar.av-c5 { background: #d3f0f0; color: #17808a; }
html[data-theme="dark"] .avatar.av-c0 { background: #1f3a2d; color: #5fd39a; }
html[data-theme="dark"] .avatar.av-c1 { background: #1d3552; color: #6fb1ff; }
html[data-theme="dark"] .avatar.av-c2 { background: #35295a; color: #b79cff; }
html[data-theme="dark"] .avatar.av-c3 { background: #4a3220; color: #ffab66; }
html[data-theme="dark"] .avatar.av-c4 { background: #4d2638; color: #ff8fb5; }
html[data-theme="dark"] .avatar.av-c5 { background: #1c4145; color: #62d6e0; }
.chat-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-mid strong, .chat-mid small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-mid small { color: var(--ink-soft); font-size: 13px; }
.chat-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.chat-side small { color: var(--ink-soft); font-size: 12px; }
.unread {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #1a9e55; color: #fff;
  font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.empty { padding: 28px 20px; text-align: center; color: var(--ink-soft); }
.empty[hidden] { display: none; }
.empty .btn { display: inline-block; width: auto; padding: 10px 18px; text-decoration: none; }

.chat-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--surface); }
.chat-placeholder { margin: auto; }
.chat-open { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-open[hidden], .chat-placeholder[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.chat-head .back { display: none; margin: 0; font-size: 20px; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.day { align-self: center; margin: 10px 0; padding: 3px 10px; font-size: 12px; color: var(--ink-soft); background: var(--card); border-radius: 999px; }
.bubble { max-width: 72%; padding: 7px 10px 5px; border-radius: 12px; background: var(--card); white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.bubble.out { align-self: flex-end; background: var(--tint); }
.bubble.in { align-self: flex-start; }
.bubble small { display: block; text-align: right; font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.bubble-sender { font-size: 12px; font-weight: 700; color: var(--green-text); }
.composer { display: flex; gap: 8px; padding: 10px 12px; background: var(--card); border-top: 1px solid var(--line); }
.send {
  width: 42px; height: 42px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--brand);
  color: #fff; font-size: 16px; cursor: pointer;
}
.send:hover { background: var(--brand-dark); }
.chat-open .alert { margin: 0; border-radius: 0; }

@media (max-width: 720px) {
  .shell:has(.chat-layout) { height: auto; }
  .chat-layout { height: calc(100vh - 64px - 120px); }
  .chat-list-pane { width: 100%; border-right: 0; }
  .chat-pane { display: none; }
  .chat-layout.chat-opened .chat-list-pane { display: none; }
  .chat-layout.chat-opened .chat-pane { display: flex; }
  .chat-head .back { display: block; }
  .bubble { max-width: 85%; }
}
/* ---------- Tradutor ---------- */
.tr-wrap { position: relative; margin-left: auto; }
.tr-toggle { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 16px; }
.tr-toggle:hover { background: var(--surface); }
.tr-menu {
  position: absolute; right: 0; top: 42px; z-index: 30; width: 290px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 30px rgba(18, 38, 31, 0.15);
}
.tr-menu[hidden] { display: none; }
.tr-menu label { margin: 10px 0 4px; }
.tr-menu label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.tr-menu label.check input { margin-top: 3px; }
.tr-menu select { width: 100%; padding: 7px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; }
.tr-menu small { display: block; margin-top: 10px; font-size: 12px; }
.bubble { position: relative; }
.tr-btn {
  position: absolute; top: 4px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
  background: #25d366; color: #fff; font-size: 12px; cursor: pointer; opacity: 0; transition: opacity 0.12s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.bubble.in .tr-btn { right: -32px; }
.bubble.out .tr-btn { left: -32px; }
.bubble:hover .tr-btn, .tr-btn:focus { opacity: 1; }
@media (hover: none) { .tr-btn { opacity: 0.85; } .bubble.in .tr-btn { right: -28px; } .bubble.out .tr-btn { left: -28px; } }
.wt-box {
  margin-top: 4px; padding: 4px 6px; font-size: 0.9em; font-style: italic;
  border-left: 3px solid #25d366; background: rgba(37, 211, 102, 0.12); border-radius: 4px;
}
.tr-out {
  height: 42px; padding: 0 12px; flex-shrink: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--blue-tint); color: var(--blue-text); font: inherit; font-weight: 700; font-size: 13px;
}
.tr-out:hover { background: var(--blue-tint); }
@media (max-width: 720px) { .msgs { overflow-x: hidden; } .bubble.in { margin-right: 30px; } .bubble.out { margin-left: 30px; } }
/* ---------- SMS ---------- */
.seg { display: flex; gap: 16px; margin: 6px 0 4px; }
.seg label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; }
#gw-host-wrap[hidden], #gw-cloud-note[hidden] { display: none; }
input[type="text"], input[type="password"] { width: 100%; }
.sms-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: var(--blue-tint); color: var(--blue-text); margin-left: 6px; vertical-align: middle; }
.new-sms { margin-top: 8px; width: 100%; padding: 8px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--card); font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.new-sms:hover { background: var(--surface); }
.new-sms[hidden] { display: none; }
.bubble small.st-failed { color: #b3261e; font-weight: 700; }

.st-error { margin-top: 4px; font-size: 12px; color: #b3261e; font-weight: 600; }

.opt[hidden], .card[hidden] { display: none; }

/* ---------- Clientes ---------- */
.btn-add { width: auto; margin-top: 0; padding: 9px 16px; }
.content > input[type="search"] { margin-top: 4px; }
.cl-card { padding: 0; overflow: hidden; }
.cl-list .chat-row:last-child { border-bottom: 0; }
textarea {
  width: 100%; padding: 11px 12px; font: inherit; color: var(--ink); background: var(--card); resize: vertical;
  border: 1px solid var(--line-strong); border-radius: 10px; outline: none;
}
textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 107, 79, 0.15); }
.modal {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(18, 38, 31, 0.45);
}
.modal[hidden] { display: none; }
.modal-card {
  width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; background: var(--card);
  border-radius: 16px; padding: 22px 22px 18px; box-shadow: 0 16px 50px rgba(18, 38, 31, 0.3);
}
.modal-card h2 { margin: 0 0 4px; font-size: 19px; }
.modal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.modal-actions .btn { width: auto; margin-top: 0; padding: 10px 14px; text-align: center; }
.modal-actions .spacer { flex: 1; }
.modal-actions a.btn:hover { text-decoration: none; }
.btn-danger { color: var(--warn); }
.btn-danger:hover { background: var(--warn-tint); }
.btn[hidden], .modal-actions a[hidden] { display: none; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.head-actions .tr-wrap { margin-left: 0; }
.tr-toggle[hidden] { display: none; }

/* ---------- Agenda ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 12px 0 18px; overflow-x: auto; }
.tab-btn {
  font: inherit; font-weight: 600; color: var(--ink-soft); background: none; border: 0; white-space: nowrap;
  border-bottom: 3px solid transparent; padding: 10px 14px; cursor: pointer; margin-bottom: -1px;
}
.tab-btn.active { color: var(--brand-dark); border-bottom-color: var(--brand); }
.tab-panel[hidden] { display: none; }
.day-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.day-nav .btn { width: auto; margin-top: 0; padding: 8px 12px; }
.day-nav .btn-add { padding: 9px 16px; }
.day-nav .spacer { flex: 1; }
.day-nav input[type="date"] { width: auto; padding: 8px 10px; }
.day-title { font-size: 18px; margin: 16px 0 0; }
.tab-panel .card { margin-top: 12px; }
input[type="date"], input[type="time"], input[type="number"], select.field {
  width: 100%; padding: 11px 12px; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line-strong); border-radius: 10px; outline: none;
}
input[type="date"]:focus, input[type="time"]:focus, input[type="number"]:focus, select.field:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 107, 79, 0.15);
}
input.field { width: 100%; }
#tab-services select.field { width: auto; min-width: 160px; }
#hr-step { width: auto; min-width: 120px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.slots-label { width: 100%; }
.slot {
  font: inherit; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); cursor: pointer;
}
.slot:hover { background: var(--surface); }
.slot.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.bk-row { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.bk-row:last-child { border-bottom: 0; }
.bk-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left;
  font: inherit; color: var(--ink); background: none; border: 0; cursor: pointer;
}
.bk-main:hover { background: var(--surface); }
.bk-time { display: flex; flex-direction: column; align-items: center; min-width: 52px; font-weight: 700; line-height: 1.25; }
.bk-time small { font-weight: 500; color: var(--ink-soft); font-size: 12px; }
.bk-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bk-mid strong, .bk-mid small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-mid small { color: var(--ink-soft); font-size: 13px; }
.bk-chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--surface); color: var(--ink-soft); white-space: nowrap; }
.bk-chip.scheduled { background: var(--blue-tint); color: var(--blue-text); }
.bk-chip.done { background: var(--brand-tint); color: var(--brand-dark); }
.bk-chip.cancelled { background: var(--warn-tint); color: var(--warn); }
.bk-chip.no_show { background: var(--warn2-tint); color: var(--warn2-text); }
.bk-row.cancelled .bk-mid strong, .bk-row.no_show .bk-mid strong { text-decoration: line-through; color: var(--ink-soft); }
.bk-act {
  width: 34px; height: 34px; margin-right: 8px; flex-shrink: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 14px; color: var(--ink-soft);
}
.bk-act:hover { background: var(--surface); color: var(--ink); }
.hr-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.hr-row:first-child { border-top: 0; }
.hr-day { flex: 1; margin: 0; min-width: 120px; }
.hr-row input[type="time"] { width: 112px; padding: 8px 10px; }
.hr-row.off { opacity: 0.55; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr 1fr; } .hr-day { min-width: 100px; } }

/* ---------- IA ---------- */
.mt-s { margin-top: 8px; }
#ai-card label { margin-top: 16px; }
#ai-card label.check { margin-top: 12px; }
#ai-card select.field { width: auto; min-width: 200px; }
#ai-card p { margin: 6px 0 0; }
.ai-btn {
  height: 42px; padding: 0 12px; flex-shrink: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--purple-tint); color: var(--purple-text); font: inherit; font-weight: 700; font-size: 15px;
}
.ai-btn:hover { background: var(--purple-tint-2); }
.ai-btn:disabled { opacity: 0.6; cursor: wait; }
.ai-note {
  display: none; padding: 8px 14px; font-size: 13px; background: var(--purple-tint); color: var(--purple-text);
  border-top: 1px solid var(--purple-line);
}
.ai-note.show { display: block; }

/* ---------- Ganhos ---------- */
.month-label { min-width: 150px; text-align: center; font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat small { display: block; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; }
.stat strong { display: block; margin-top: 4px; font-size: 20px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.stat:first-child strong { color: var(--brand-dark); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; margin-top: 14px; }
.bar-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar { width: 100%; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 0; }
.bar-col:hover .bar { background: var(--brand-dark); }
.bar-lbl { height: 16px; margin-top: 4px; font-size: 10px; color: var(--ink-soft); line-height: 16px; white-space: nowrap; }
.ea-row { padding: 8px 0; border-top: 1px solid var(--line); }
.ea-row:first-child { border-top: 0; }
.ea-row-top { display: flex; align-items: baseline; gap: 8px; }
.ea-row-top span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ea-meter { height: 5px; margin-top: 6px; background: var(--surface); border-radius: 3px; overflow: hidden; }
.ea-meter span { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
#ea-pending { margin-top: 14px; background: var(--warn2-tint); color: var(--warn2-text); }
#ea-pending[hidden] { display: none; }
#ea-pending a { color: var(--warn2-text); text-decoration: underline; }
.ea-card { display: block; text-decoration: none; color: var(--ink); }
.ea-card:hover { text-decoration: none; border-color: var(--brand); }
.ea-card-row { display: flex; gap: 28px; margin-top: 8px; flex-wrap: wrap; }
.ea-card-row small { display: block; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; }
.ea-card-row strong { font-size: 22px; letter-spacing: -0.01em; }
@media (max-width: 720px) { .stats { grid-template-columns: 1fr 1fr; } .stat strong { font-size: 17px; } .month-label { min-width: 120px; } }

/* ---- Cartão de sugestão de IA + atalhos do chat ---- */
.ai-card { margin: 8px 12px 0; padding: 12px; background: var(--purple-tint); border: 1px solid var(--purple-line); border-radius: 14px; }
.ai-card[hidden] { display: none; }
.ai-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--purple-text); }
.ai-card-btns { display: flex; gap: 6px; }
.ai-ico { width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; font-size: 16px; line-height: 1; background: var(--card); color: var(--purple-text); }
.ai-ico:disabled { opacity: .6; cursor: wait; }
.ai-ico.ai-x { background: var(--danger-tint); color: #d12b2b; }
.ai-lbl { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin: 6px 0 3px; }
.ai-said { background: var(--card); border-radius: 10px; padding: 8px 10px; font-size: 14px; max-height: 70px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.ai-edit { background: none; border: 0; color: var(--purple-text); font-weight: 600; cursor: pointer; padding: 0 0 0 6px; }
.ai-text { width: 100%; box-sizing: border-box; resize: vertical; border: 1px solid var(--purple-line); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; background: var(--card); }
.ai-card.editing .ai-text { border-color: #6b3fc2; }
.ai-card-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.ai-approve { background: #1fa35c; color: #fff; border: 0; border-radius: 10px; padding: 9px 22px; font-weight: 700; cursor: pointer; }
.ai-approve:disabled { opacity: .6; }
.quick-row { display: flex; justify-content: space-around; gap: 6px; padding: 8px 12px 2px; background: var(--card); }
.quick { background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; }
.quick-ico { width: 46px; height: 46px; border-radius: 50%; background: var(--purple-tint); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.quick:hover .quick-ico { background: var(--purple-tint-2); }
.quick small { font-size: 11px; color: var(--ink-soft); text-align: center; }
.quick:disabled { opacity: .5; }

/* ---- Enviar mídia ---- */
.media-card { max-width: 420px; display: flex; flex-direction: column; gap: 8px; }
.media-head { display: flex; align-items: center; justify-content: space-between; }
.mm-tabs { display: flex; border-bottom: 1px solid var(--line); }
.mm-tab { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px; cursor: pointer; color: var(--ink-soft); font-weight: 600; }
.mm-tab.active { color: #0e9f8e; border-bottom-color: #0e9f8e; }
.mm-folderbar { display: flex; gap: 8px; align-items: center; }
.mm-folderbar select { flex: 1; }
.mm-folderbar .btn { width: auto; margin: 0; padding: 8px 12px; }
.mm-sec { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-top: 4px; }
.mm-sec[hidden], .mm-grid[hidden] { display: none; }
.mm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mm-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface); cursor: pointer; border: 2px solid transparent; }
.mm-item.sel { border-color: #0e9f8e; }
.mm-item img, .mm-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-vtag { position: absolute; left: 4px; bottom: 4px; font-size: 13px; }
.mm-del { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #ef4444; color: #fff; font-size: 11px; cursor: pointer; padding: 0; line-height: 22px; }
.mm-drop { border: 2px dashed var(--line); border-radius: 18px; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; }
.mm-drop.over { border-color: #0e9f8e; background: var(--surface); }
.mm-drop .btn { width: auto; padding: 8px 18px; }
.mm-drop-ico { font-size: 38px; }
.mm-picked { font-size: 13px; color: var(--green-text); font-weight: 600; word-break: break-all; }
.mm-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid #0e9f8e; color: #0e9f8e; background: var(--card); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 13px; }
.chip.on { background: #0e9f8e; color: #fff; }
.mm-price { position: relative; }
.mm-price span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.mm-once { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.mm-once small { display: block; color: var(--ink-soft); font-weight: 400; font-size: 12px; }
.mm-once input { width: 20px; height: 20px; accent-color: #0e9f8e; }
#mm-send { background: #0e9f8e; }
.msg-media { position: relative; cursor: pointer; margin: -2px -4px 4px; border-radius: 10px; overflow: hidden; background: #000; }
.msg-media img, .msg-media video { display: block; width: 100%; max-width: 280px; max-height: 340px; object-fit: contain; margin: 0 auto; }
.msg-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; color: #fff; text-shadow: 0 1px 6px #000a; pointer-events: none; }
.msg-once { position: absolute; top: 8px; left: 8px; background: #0008; color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.msg-price { position: absolute; top: 8px; right: 8px; background: #0e9f8e; color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.msg-once-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 2px; margin-bottom: 2px; background: none; border: 0; font: inherit; font-size: 15px; color: inherit; cursor: pointer; }
.msg-once-chip .once-ic { width: 20px; height: 20px; border-radius: 50%; border: 2px dashed currentColor; opacity: .75; position: relative; flex: none; }
.msg-once-chip .once-ic::after { content: '1'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.msg-once-chip .once-price { background: #0e9f8e; color: #fff; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.msg-once-note { font-size: 12px; color: var(--ink-soft); margin-bottom: 2px; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img, .lightbox video { max-width: 94vw; max-height: 92vh; }
@media (max-width: 480px) { .mm-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---- Setinha e menu das conversas ---- */
.chat-num { color: var(--green-text) !important; font-size: 12px !important; font-weight: 600; }
.chat-titles { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.chat-marks { font-size: 12px; margin-left: 4px; }
.row-arrow { background: none; border: 0; padding: 0 4px; font-size: 18px; line-height: 1; color: var(--ink-soft); cursor: pointer; border-radius: 6px; }
.row-arrow:hover { background: var(--surface-hover); color: var(--ink); }
.unread.muted-badge { background: #9aa5a0; }
.archived-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--card); border: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; cursor: pointer; font: inherit; color: var(--green-text); font-weight: 600; }
.chat-menu { position: fixed; z-index: 70; min-width: 230px; background: var(--card); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.22); padding: 6px; }
.chat-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.chat-menu button:hover { background: var(--surface); }
.chat-menu button.danger { color: #d12b2b; }
.chat-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

.archived-ico { width: 42px; text-align: center; font-size: 18px; }
.archived-n { margin-left: auto; color: var(--ink-soft); font-weight: 600; }
.chat-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.chip-f { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 5px 14px; font-size: 14px; cursor: pointer; }
.chip-f.on { background: var(--tint); border-color: var(--green-line); color: var(--green-text); font-weight: 600; }

.avatar.has-img { padding: 0; overflow: hidden; background: var(--surface-hover); }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.chat-titles.clickable { cursor: pointer; }
.chat-titles.clickable .chat-num { text-decoration: underline dotted; }
.chat-titles.clickable:hover strong { color: var(--green-text); }

/* ---- Painel de informações do contato ---- */
.info-modal { justify-content: flex-end; padding: 0; }
.info-card { max-width: 400px; height: 100%; max-height: 100%; border-radius: 0; padding: 0 0 12px; position: relative; }
.info-close { position: absolute; top: 12px; right: 12px; }
.info-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px 16px; text-align: center; }
.info-head h2 { margin: 6px 0 0; font-size: 22px; }
.info-avatar { width: 96px; height: 96px; font-size: 38px; }
.info-sec { padding: 12px 20px; border-top: 1px solid var(--line); }
.info-sec small { display: block; color: var(--ink-soft); margin-bottom: 4px; }
.info-sec div { word-break: break-word; }
.info-row { display: flex; align-items: center; gap: 18px; width: 100%; text-align: left; background: none; border: 0; padding: 14px 20px; cursor: pointer; font: inherit; color: var(--ink); }
.info-row:hover { background: var(--surface); }
.info-row.danger { color: #d12b2b; }
.info-ico { width: 24px; text-align: center; }
.info-card hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

.info-form { display: flex; flex-direction: column; gap: 6px; }
.info-form input, .info-form textarea { width: 100%; box-sizing: border-box; }
.info-form .btn { margin-top: 4px; }
.info-form .alert.ok { background: var(--tint); color: var(--green-text); }
.member-list { display: flex; flex-direction: column; }
.member { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.avatar.sm { width: 36px; height: 36px; font-size: 14px; }
.member-mid { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.member-mid small { color: var(--ink-soft); }
.member-admin { font-size: 11px; color: var(--green-text); border: 1px solid var(--green-line); border-radius: 6px; padding: 1px 6px; }

.grp-tools { display: flex; justify-content: center; gap: 28px; padding: 6px 16px 14px; }
.grp-tool { background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; }
.grp-tool-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.grp-tool:hover .grp-tool-ico { background: var(--surface-hover); }
.grp-tool small { color: var(--ink); }

/* ---- Adicionar participantes ---- */
.info-card { display: flex; flex-direction: column; }
#info-body { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }
.am-head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.am-back { background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--ink); }
.am-search { margin: 0 16px 8px; width: auto; border-radius: 999px; }
.am-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; }
.am-chip { background: var(--tint); border: 0; border-radius: 999px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: 13px; }
.am-list { flex: 1; overflow-y: auto; padding: 4px 16px; min-height: 120px; }
.am-sec { color: var(--ink-soft); font-size: 13px; padding: 12px 0 4px; }
.am-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; cursor: pointer; }
.am-row input { width: 18px; height: 18px; accent-color: #1fa35c; }
.am-foot { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.am-go { background: #1fa35c; color: #fff; border: 0; border-radius: 999px; padding: 12px; font-weight: 700; cursor: pointer; font: inherit; font-weight: 700; }
.am-go:disabled { background: #b8dcc8; cursor: default; }

/* ---- Mensagem: setinha, reações, resposta, tracinhos ---- */
.bubble { position: relative; }
.bubble.has-react { margin-bottom: 14px; }
.msg-chev { position: absolute; top: 2px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer; padding: 0; opacity: 0; transition: opacity .12s; }
.bubble:hover .msg-chev, .msg-chev:focus { opacity: 1; }
.react-btn { position: absolute; top: 34px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: var(--card); color: var(--ink-soft); font-size: 15px; cursor: pointer; opacity: 0; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.bubble.in .react-btn { right: -32px; }
.bubble.out .react-btn { left: -32px; }
.bubble:hover .react-btn { opacity: 1; }
@media (hover: none) { .msg-chev, .react-btn { opacity: .85; } .bubble.in .react-btn { right: -28px; } .bubble.out .react-btn { left: -28px; } }
.react-pill { position: absolute; bottom: -13px; right: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; font-size: 13px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.react-pill.mine { border-color: #25d366; }
.bubble.in .react-pill { left: 10px; right: auto; }
.react-bar { padding: 6px 8px; min-width: 0; border-radius: 999px; }
.react-bar:has(.react-grid:not([hidden])) { border-radius: 16px; }
.react-row { display: flex; gap: 2px; }
.react-bar button { width: auto; padding: 4px 6px; font-size: 22px; border-radius: 50%; }
.react-bar button.on { background: var(--tint); }
.react-more { color: var(--ink-soft); font-size: 20px !important; }
.react-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; margin-top: 6px; max-width: 280px; }
.msg-quote { background: rgba(0,0,0,.06); border-left: 4px solid #25d366; border-radius: 6px; padding: 4px 8px; margin: -2px 0 4px; font-size: 13px; display: flex; flex-direction: column; max-width: 100%; }
.msg-quote strong { color: var(--green-text); font-size: 12px; }
.msg-quote span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
.msg-deleted { font-style: italic; color: var(--ink-soft); }
.tick { color: var(--ink-soft); letter-spacing: -2px; font-size: 12px; }
.tick.read { color: #2f8cff; }
.tick.pending { letter-spacing: 0; }
.tick svg { vertical-align: -1px; }
.reply-bar { display: flex; align-items: center; gap: 10px; margin: 8px 12px 0; padding: 8px 12px; background: var(--surface); border-left: 4px solid #25d366; border-radius: 10px; }
.reply-bar[hidden] { display: none; }
.reply-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.reply-txt strong { color: var(--green-text); }
.reply-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.mi-preview { align-self: stretch; max-width: none; margin: 0 16px 8px; }

.msg-quote { flex-direction: row !important; align-items: center; gap: 8px; cursor: pointer; }
.msg-quote-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msg-quote img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.avatar.clickable, #chat-avatar.has-img { cursor: pointer; }
.chat-mid small .tick { letter-spacing: -2px; }


/* ---------- Tema escuro (Configurações › Exibição › Tema) ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e9edef;
  --ink-soft: #9aa0a3;
  --line: #2a2e30;
  --line-strong: #3a3f42;
  --bg: #0c0f10;
  --card: #161717;
  --surface: #1d1f1f;
  --surface-hover: #2a2f32;
  --brand: #21c063;
  --brand-dark: #1aa352;
  --brand-tint: #1b2a22;
  --tint: #144d37;
  --green-text: #21c063;
  --green-line: #2f5a46;
  --purple-tint: #2a2140;
  --purple-tint-2: #3a2d56;
  --purple-text: #cdb0ff;
  --purple-line: #4a3a6b;
  --blue-tint: #222c52;
  --blue-text: #b3bcff;
  --warn: #ff8a80;
  --warn-tint: #3b1d1b;
  --warn2-tint: #3a2f12;
  --warn2-text: #f5c76b;
  --danger-tint: #4a1f1f;
}
html[data-theme="dark"] input, html[data-theme="dark"] textarea, html[data-theme="dark"] select { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
html[data-theme="dark"] ::placeholder { color: #7d8f85; }
html[data-theme="dark"] .modal { background: rgba(0, 0, 0, 0.65); }
html[data-theme="dark"] .msg-chev { background: rgba(40, 52, 46, 0.9); color: var(--ink); }
html[data-theme="dark"] .bubble.out { background: #144d37; }
html[data-theme="dark"] .msg-quote { background: rgba(255, 255, 255, 0.07); }
html[data-theme="dark"] .chat-menu { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6); }
html[data-theme="dark"] .tick { color: #8a9296; }
html[data-theme="dark"] .tick.read { color: #4aa3ff; }
html[data-theme="dark"] .btn-ghost { color: var(--ink); }

/* Linha de opção "Tema" nas configurações */
.opt-row { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; padding: 12px 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.opt-row small { display: block; color: var(--ink-soft); }
.opt-row .chev { color: var(--ink-soft); font-size: 22px; }
.theme-list { display: flex; flex-direction: column; gap: 4px; margin: 12px 0 4px; }
.theme-opt { display: flex; align-items: center; gap: 14px; padding: 10px 4px; cursor: pointer; }
.theme-opt input { width: 20px; height: 20px; accent-color: var(--brand); }

.set-sec { margin: 18px 0 4px; font-size: 13px; text-transform: none; color: var(--ink-soft); font-weight: 600; }

.sys-note { align-self: center; margin: 6px 0; padding: 5px 14px; font-size: 13px; font-weight: 600; color: var(--green-text); background: var(--tint); border-radius: 999px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pay-row small { color: var(--ink-soft); display: block; }
.pay-st { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface); }
.pay-st.paid { background: var(--tint); color: var(--green-text); }
.pay-st.cancelled { color: var(--ink-soft); }
.mode-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 6px; background: var(--warn2-tint); color: var(--warn2-text); }
.mode-badge.live { background: var(--danger-tint); color: var(--warn); }

/* channel filter dropdown */
.ch-wrap{position:relative;display:inline-block;margin-top:6px}
.ch-menu{position:absolute;z-index:30;left:0;top:calc(100% + 6px);min-width:200px;background:var(--card,#fff);border:1px solid var(--line,#e3e6e3);border-radius:12px;padding:8px;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.ch-title{font-size:11px;letter-spacing:.06em;text-transform:uppercase;opacity:.6;padding:4px 8px}
.ch-item{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:8px;cursor:pointer;font-size:14px}
.ch-item:hover{background:rgba(127,127,127,.12)}
.ch-item.off{opacity:.5;cursor:default}
.ch-item em{margin-left:auto;font-size:11px;font-style:normal;opacity:.8}

.chat-filters{flex-wrap:nowrap;align-items:center}
.chat-filters .chip-f,.ch-btn{white-space:nowrap;padding:5px 12px;font-size:14px}
.ch-btn{border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:999px;cursor:pointer}
.ch-wrap{margin-top:0}

.chat-filters{gap:6px}
.chat-filters .chip-f,.ch-btn{padding:5px 10px;font-size:13px}
.ch-btn.ico{padding:5px 9px}
.ch-btn.on{background:var(--tint);border-color:var(--green-line)}
.chat-filters .ch-wrap:last-child .ch-menu{left:auto;right:0}
.dt-menu{min-width:250px}
.dt-head{display:flex;align-items:center;justify-content:space-between;padding:4px 6px;text-transform:capitalize}
.dt-head button{border:0;background:none;color:inherit;font-size:20px;cursor:pointer;padding:0 8px}
.dt-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;text-align:center}
.dt-dow{font-size:11px;font-weight:700;color:var(--green-text);padding:4px 0}
.dt-day{border:0;background:none;color:inherit;border-radius:50%;aspect-ratio:1;font-size:13px;cursor:pointer}
.dt-day:hover{background:rgba(127,127,127,.15)}
.dt-day.out{opacity:.35}
.dt-day.today{color:var(--green-text);font-weight:700}
.dt-day.sel{background:var(--green-text);color:#fff}
.dt-foot{display:flex;justify-content:space-between;margin-top:8px}
.dt-foot button{border:0;background:none;color:inherit;font-size:13px;cursor:pointer;padding:6px 8px}
.dt-foot .dt-ok{background:var(--green-text);color:#fff;border-radius:999px;padding:6px 14px}

/* pay modal */
.pay-card{max-width:420px}
.pay-contact{display:flex;align-items:center;gap:12px;background:var(--surface);border-radius:14px;padding:12px 14px;margin:12px 0}
.pay-contact .avatar{width:40px;height:40px;flex:none}
.pay-who{display:flex;flex-direction:column;min-width:0}
.pay-who strong,.pay-who small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pay-who small{color:var(--ink-soft)}
.pay-label{font-size:14px;color:var(--ink-soft);display:block;margin:6px 0}
.pay-amt{display:flex;align-items:center;gap:8px;border:2px solid #14b8a6;border-radius:14px;padding:4px 12px;background:var(--card)}
.pay-amt span{color:var(--ink-soft)}
.pay-amt input{border:0!important;outline:0;box-shadow:none!important;background:transparent;flex:1;font-size:16px;padding:8px 0!important;margin:0!important;color:var(--ink)}
.pay-chips{display:flex;gap:8px;margin:12px 0}
.pay-chips button{border:0;border-radius:999px;padding:6px 14px;background:rgba(20,184,166,.12);color:#0e9f8e;font-weight:600;cursor:pointer}
.pay-chips button.on{background:#14b8a6;color:#fff}
.pay-actions{display:flex;justify-content:flex-end;align-items:center;gap:14px;margin-top:16px}
.pay-cancel{border:0;background:none;color:#0e9f8e;font-weight:600;cursor:pointer;font-size:14px}
.pay-send{border:0;border-radius:999px;background:#14b8a6;color:#fff;font-weight:600;padding:10px 18px;cursor:pointer;font-size:14px}

/* links e telefones nas mensagens */
.msg-link{color:inherit;text-decoration:underline;word-break:break-all}
.msg-phone{text-decoration:underline dotted;cursor:pointer}
.msg-phone:hover{text-decoration:underline}
.num-menu{position:fixed;z-index:80;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:6px;box-shadow:0 8px 24px rgba(0,0,0,.25);min-width:240px}
.num-menu button{display:flex;gap:10px;align-items:center;width:100%;text-align:left;border:0;background:none;color:inherit;font-size:14px;padding:10px;border-radius:8px;cursor:pointer}
.num-menu button:hover{background:rgba(127,127,127,.15)}

/* vários números */
.line-tag{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;font-size:11px;font-weight:600;background:rgba(20,184,166,.14);color:#0e9f8e;vertical-align:middle}
.line-add{display:flex;flex-direction:column;gap:8px;margin-top:14px}
.line-add .btn{width:100%;margin:0}
.line-tools{margin-top:16px}
.line-tools .inline{display:flex;gap:8px}
.line-tools .inline input{flex:1}
.line-tools .btn{margin-top:10px}
.btn.danger{color:#dc2626;border-color:#fca5a5}

/* ---------- Sem barra lateral: a navegação fica na barra de baixo ---------- */
.sidebar { display: none !important; }

/* Barra de baixo ocupa a largura toda; página de conversas não rola nem "pula" */
.tabbar { left: 0; right: 0; }
body:has(.chat-layout) { overflow: hidden; }
@media (max-width: 720px) { body:has(.chat-layout) { overflow: auto; } }

/* Filtros da lista: quebram de linha em vez de cortar; botão de calendário com tamanho fixo */
.chat-filters { flex-wrap: wrap; row-gap: 6px; }
.ch-btn.ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 30px; padding: 0; color: var(--green-text); }

/* ---------- Pesquisar mensagens na conversa ---------- */
.ms-bar { position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--line); }
.ms-bar[hidden] { display: none; }
.ms-bar input { flex: 1; min-width: 0; margin: 0; }
.ms-ic { width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; }
.ms-ic:hover { background: var(--surface); }
.ms-count { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.ms-pop { position: absolute; right: 8px; top: calc(100% + 6px); z-index: 40; width: 290px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.25); }
.ms-pop[hidden] { display: none; }
.ms-pop .dt-day { width: 100%; font-weight: 600; }
.ms-pop .dt-day.none { opacity: .3; cursor: default; }
.ms-pop .dt-day.has { background: var(--tint); color: var(--green-text); }
.ms-pop .dt-day.out { opacity: .25; }
.bubble.ms-hit { box-shadow: 0 0 0 2px rgba(240,138,0,.45); }
.bubble.ms-cur { box-shadow: 0 0 0 3px #f08a00; }
.bubble.ms-flash { animation: msflash 1.6s ease; }
@keyframes msflash { 0%, 60% { box-shadow: 0 0 0 3px #f08a00; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ================= Aparência estilo WhatsApp Web ================= */
body { font-size: 14.2px; }
.chat-list-pane { background: #fff; }
.chat-head, .composer { background: #f0f2f5; border-color: #e9edef; }
.chat-row { border-bottom: 0; }
.chat-row:hover { background: #f5f6f6; }
.chat-row.active { background: #f0f2f5; }
.chat-pane, .msgs { background-color: #efeae2; }
.msgs { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22220%22%20height%3D%22220%22%20viewBox%3D%220%200%20220%20220%22%20fill%3D%22none%22%20stroke%3D%22rgba%2811%2C20%2C26%2C0.07%29%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2230%22%20cy%3D%2230%22%20r%3D%229%22/%3E%3Cpath%20d%3D%22M80%2024l4%209%2010%201-7%207%202%2010-9-5-9%205%202-10-7-7%2010-1z%22/%3E%3Cpath%20d%3D%22M150%2022c0-7%2012-7%2012%200%200%207-12%2012-12%2018%200-6-12-11-12-18%200-7%2012-7%2012%200z%22%20transform%3D%22translate%286%20-2%29%22/%3E%3Crect%20x%3D%22186%22%20y%3D%2226%22%20width%3D%2222%22%20height%3D%2216%22%20rx%3D%225%22/%3E%3Cpath%20d%3D%22M192%2042l-2%207%208-7%22/%3E%3Cpath%20d%3D%22M24%2092h24M24%20100h14%22/%3E%3Ccircle%20cx%3D%2292%22%20cy%3D%22100%22%20r%3D%223%22/%3E%3Cpath%20d%3D%22M130%2086a12%2012%200%201%200%2014%2018%22/%3E%3Cpath%20d%3D%22M176%2088l16%2016M192%2088l-16%2016%22/%3E%3Crect%20x%3D%2222%22%20y%3D%22150%22%20width%3D%2224%22%20height%3D%2218%22%20rx%3D%224%22/%3E%3Cpath%20d%3D%22M28%20150v-4a6%206%200%200%201%2012%200v4%22/%3E%3Cpath%20d%3D%22M84%20148l10%2018H74z%22/%3E%3Ccircle%20cx%3D%22140%22%20cy%3D%22158%22%20r%3D%2210%22/%3E%3Cpath%20d%3D%22M136%20158l3%203%206-6%22/%3E%3Cpath%20d%3D%22M186%20150c8%200%208%2012%200%2012s-8-12%200-12z%22/%3E%3Cpath%20d%3D%22M40%20200c10-10%2020%2010%2030%200%22/%3E%3Cpath%20d%3D%22M120%20204h30M128%20196h14%22/%3E%3Ccircle%20cx%3D%22196%22%20cy%3D%22200%22%20r%3D%222%22/%3E%3C/svg%3E"); background-size: 220px 220px; padding: 16px 5%; gap: 2px; }
.bubble { border-radius: 7.5px; padding: 6px 7px 6px 9px; font-size: 14.2px; line-height: 19px; box-shadow: 0 1px 0.5px rgba(11,20,26,0.13); color: #111b21; }
.bubble.in { background: #fff; border-top-left-radius: 0; }
.bubble.out { background: #d9fdd3; border-top-right-radius: 0; }
.bubble small { font-size: 11px; color: #667781; margin-top: 1px; }
.day { background: #fff; color: #54656f; font-size: 12.5px; padding: 5px 12px; border-radius: 7.5px; box-shadow: 0 1px 0.5px rgba(11,20,26,0.13); margin: 12px 0; }
#msg-input { background: #fff; border-radius: 8px; padding: 10px 12px; }
.bubble-sender { color: #06cf9c; }

html[data-theme="dark"] .chat-list-pane { background: #161717; }
html[data-theme="dark"] .chat-head, html[data-theme="dark"] .composer { background: #1d1f1f; border-color: #2a2e30; }
html[data-theme="dark"] .chat-row:hover { background: #1d1f1f; }
html[data-theme="dark"] .chat-row.active { background: #2a2f32; }
html[data-theme="dark"] .chat-pane, html[data-theme="dark"] .msgs { background-color: #0c0f10; }
html[data-theme="dark"] .msgs { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22220%22%20height%3D%22220%22%20viewBox%3D%220%200%20220%20220%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C0.045%29%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2230%22%20cy%3D%2230%22%20r%3D%229%22/%3E%3Cpath%20d%3D%22M80%2024l4%209%2010%201-7%207%202%2010-9-5-9%205%202-10-7-7%2010-1z%22/%3E%3Cpath%20d%3D%22M150%2022c0-7%2012-7%2012%200%200%207-12%2012-12%2018%200-6-12-11-12-18%200-7%2012-7%2012%200z%22%20transform%3D%22translate%286%20-2%29%22/%3E%3Crect%20x%3D%22186%22%20y%3D%2226%22%20width%3D%2222%22%20height%3D%2216%22%20rx%3D%225%22/%3E%3Cpath%20d%3D%22M192%2042l-2%207%208-7%22/%3E%3Cpath%20d%3D%22M24%2092h24M24%20100h14%22/%3E%3Ccircle%20cx%3D%2292%22%20cy%3D%22100%22%20r%3D%223%22/%3E%3Cpath%20d%3D%22M130%2086a12%2012%200%201%200%2014%2018%22/%3E%3Cpath%20d%3D%22M176%2088l16%2016M192%2088l-16%2016%22/%3E%3Crect%20x%3D%2222%22%20y%3D%22150%22%20width%3D%2224%22%20height%3D%2218%22%20rx%3D%224%22/%3E%3Cpath%20d%3D%22M28%20150v-4a6%206%200%200%201%2012%200v4%22/%3E%3Cpath%20d%3D%22M84%20148l10%2018H74z%22/%3E%3Ccircle%20cx%3D%22140%22%20cy%3D%22158%22%20r%3D%2210%22/%3E%3Cpath%20d%3D%22M136%20158l3%203%206-6%22/%3E%3Cpath%20d%3D%22M186%20150c8%200%208%2012%200%2012s-8-12%200-12z%22/%3E%3Cpath%20d%3D%22M40%20200c10-10%2020%2010%2030%200%22/%3E%3Cpath%20d%3D%22M120%20204h30M128%20196h14%22/%3E%3Ccircle%20cx%3D%22196%22%20cy%3D%22200%22%20r%3D%222%22/%3E%3C/svg%3E"); }
html[data-theme="dark"] .bubble { color: #e9edef; box-shadow: 0 1px 0.5px rgba(11,20,26,0.4); }
html[data-theme="dark"] .bubble.in { background: #242626; }
html[data-theme="dark"] .bubble.out { background: #144d37; }
html[data-theme="dark"] .bubble small { color: rgba(233,237,239,0.6); }
html[data-theme="dark"] .day { background: #1d1f1f; color: #9aa0a3; box-shadow: none; }
html[data-theme="dark"] #msg-input { background: #2a2f32; color: #d1d7db; }
@media (max-width: 720px) { .msgs { padding: 12px 3%; } }

/* Cabeçalho da lista: título + botão redondo de nova conversa, e busca com lupa */
.pane-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pane-title h1 { margin: 0 !important; }
.new-sms { margin: 0; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.new-sms:hover { background: var(--brand-dark); }
.new-sms[hidden] { display: none; }
#chat-search { padding-left: 42px; background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%238696a0%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%227%22/%3E%3Cpath%20d%3D%22M20%2020l-3.5-3.5%22/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px center; background-size: 17px; border-radius: 8px; }
html[data-theme="dark"] .new-sms { background: #fff; color: #161717; }

/* ---------- Painel "Nova conversa" ---------- */
.chat-list-pane { position: relative; }
.nc-panel { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; background: var(--card); }
.nc-panel[hidden] { display: none; }
.nc-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px; font-size: 17px; }
.nc-search { padding: 0 14px 8px; }
.nc-search input { width: 100%; }
.nc-body { flex: 1; overflow-y: auto; padding-bottom: 12px; }
.nc-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 8px 16px; border: 0; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.nc-row:hover { background: var(--surface); }
.nc-av { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--tint); color: var(--green-text); font-weight: 700; font-size: 17px; }
.nc-av.act { background: #25d366; color: #fff; font-size: 19px; }
.nc-tx { display: flex; flex-direction: column; min-width: 0; }
.nc-tx strong { font-weight: 500; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-tx small { color: var(--ink-soft); font-size: 13px; }
.nc-letter { padding: 16px 28px 6px; color: var(--ink-soft); font-size: 14px; }
.nc-empty { padding: 24px; text-align: center; color: var(--ink-soft); }

/* Sem negrito: tudo em peso normal, como no WhatsApp Web */
body, body * { font-weight: 400 !important; }

/* ---------- Ligações ---------- */
.calls-page { max-width: 640px; margin: 0 auto; }
.calls-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.calls-top h1 { margin: 0; }
.calls-fab { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #25d366; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.calls-menu { right: 0; left: auto; }
.calls-filter { min-height: 18px; margin: 8px 2px 0; }
.calls-list { margin-top: 4px; }
.call-row { display: flex; align-items: center; gap: 14px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.call-av { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--tint); color: var(--green-text); font-size: 18px; }
.call-av.miss { background: #fde3e6; color: #d6284a; }
.call-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.call-tx strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-sub { display: flex; align-items: center; gap: 4px; color: var(--ink-soft); font-size: 13.5px; }
.call-sub.miss { color: #e5173f; }
.call-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--ink-soft); }
.call-tag.wa { background: #d9fdd3; color: #0a7a3f; }
.call-tag.sms { background: #e0e7ff; color: #3730a3; }
.call-when { font-size: 12.5px; color: var(--ink-soft); min-width: 64px; text-align: right; }
.tab-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; display: block; }
.nc-av { overflow: hidden; } .nc-av-img { width: 100%; height: 100%; object-fit: cover; }

#msg-input { resize: none; overflow-y: auto; max-height: 140px; line-height: 1.35; font-family: inherit; font-size: 15px; box-sizing: border-box; min-height: 42px; align-self: flex-end; white-space: pre-wrap; }
.line-add, .line-add[hidden], #add-wa, #add-sms { display: none !important; }
.dlg-back { position: fixed; inset: 0; z-index: 9999; background: rgba(11,20,26,.55); display: grid; place-items: center; padding: 16px; }
.dlg-box { width: min(420px, 100%); background: #fff; color: #111b21; border-radius: 12px; padding: 24px 24px 18px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.dlg-text { margin: 0 0 22px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.dlg-row { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.dlg-btn { border-radius: 999px; padding: 9px 20px; font: inherit; font-size: 14px; cursor: pointer; border: 1px solid #d1d7db; background: #fff; color: #008069; }
.dlg-btn:hover { background: #f0f2f5; }
.dlg-yes { background: #008069; border-color: #008069; color: #fff; }
.dlg-yes:hover { background: #006e5a; }
.dlg-yes.danger { background: #d93025; border-color: #d93025; }
.dlg-yes.danger:hover { background: #b9271d; }
.dlg-btn:focus-visible { outline: 2px solid #25d366; outline-offset: 2px; }
html[data-theme="dark"] .dlg-box { background: #1d1f1f; color: #e9edef; }
html[data-theme="dark"] .dlg-btn { background: transparent; border-color: #3a3f42; color: #21c063; }
html[data-theme="dark"] .dlg-btn:hover { background: #2a2f32; }
html[data-theme="dark"] .dlg-yes { background: #21c063; border-color: #21c063; color: #161717; }
html[data-theme="dark"] .dlg-yes.danger { background: #f15c6d; border-color: #f15c6d; color: #161717; }
.mini-ico { display: inline-flex; vertical-align: -3px; color: #667781; margin-right: 1px; }
html[data-theme="dark"] .mini-ico { color: #9aa0a3; }

.sel-bar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: #f0f2f5; border-top: 1px solid #e9edef; }
.sel-bar[hidden] { display: none; }
.sel-x, .sel-trash { background: none; border: 0; font-size: 20px; cursor: pointer; color: #54656f; padding: 6px 10px; border-radius: 50%; }
.sel-x:hover, .sel-trash:hover { background: rgba(0,0,0,.06); }
.sel-trash:disabled { opacity: .35; cursor: default; }
.sel-n { flex: 1; font-size: 15px; color: #111b21; }
.sel-row { display: flex; align-items: center; gap: 14px; padding: 2px 6px; margin: 0 -16px; padding-left: 22px; padding-right: 22px; cursor: pointer; }
.sel-row.on { background: rgba(37,211,102,.16); }
.sel-row .bubble { align-self: auto; }
.sel-row.out .bubble { margin-left: auto; }
.sel-cb { width: 20px; height: 20px; flex: 0 0 20px; border: 2px solid #8696a0; border-radius: 4px; display: grid; place-items: center; font-size: 13px; color: transparent; }
.sel-row.on .sel-cb { background: #25d366; border-color: #25d366; color: #fff; }
.msgs.selecting .msg-chev, .msgs.selecting .react-btn, .msgs.selecting .tr-btn { display: none !important; }
.msgs.selecting .bubble a { pointer-events: none; }
.dlg-row.dlg-col { flex-direction: column; align-items: stretch; }
.dlg-row.dlg-col .dlg-btn { text-align: center; }
html[data-theme="dark"] .sel-bar { background: #1d1f1f; border-color: #2a2e30; }
html[data-theme="dark"] .sel-n, html[data-theme="dark"] .sel-x, html[data-theme="dark"] .sel-trash { color: #e9edef; }
html[data-theme="dark"] .sel-row.on { background: rgba(0,168,132,.22); }
.composer[hidden] { display: none !important; }

/* selo do canal no canto da foto (lista de conversas) */
.av-wrap { position: relative; flex-shrink: 0; width: 42px; height: 42px; }
.av-wrap .chan-badge { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg, #fff); }
.chat-row.active .av-wrap .chan-badge { box-shadow: 0 0 0 2px var(--brand-tint); }

/* contato sem nome: silhueta branca sobre a cor do contato */
.avatar.anon { color: #fff; }
.avatar.anon .anon-ic { width: 62%; height: 62%; fill: #fff; }
.avatar.anon.av-c0 { background: #2fb585; }
.avatar.anon.av-c1 { background: #3f8fe0; }
.avatar.anon.av-c2 { background: #8a62d6; }
.avatar.anon.av-c3 { background: #ff8a3d; }
.avatar.anon.av-c4 { background: #e5568a; }
.avatar.anon.av-c5 { background: #20a8b3; }
html[data-theme="dark"] .avatar.anon { color: #fff; }
html[data-theme="dark"] .avatar.anon.av-c0 { background: #2fb585; }
html[data-theme="dark"] .avatar.anon.av-c1 { background: #3f8fe0; }
html[data-theme="dark"] .avatar.anon.av-c2 { background: #8a62d6; }
html[data-theme="dark"] .avatar.anon.av-c3 { background: #ff8a3d; }
html[data-theme="dark"] .avatar.anon.av-c4 { background: #e5568a; }
html[data-theme="dark"] .avatar.anon.av-c5 { background: #20a8b3; }


/* player de mensagem de voz */
.ap { display: flex; align-items: center; gap: 8px; box-sizing: border-box; width: 290px; max-width: 100%; padding: 8px 12px; margin: 2px 0 4px; border-radius: 22px; background: #2b2d2c; color: #fff; }
.ap-btn { flex: none; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; }
.ap-wave { flex: 1 1 0; min-width: 0; overflow: hidden; height: 26px; display: flex; align-items: center; gap: 1px; cursor: pointer; touch-action: none; }
.ap-wave i { flex: 1 1 0; min-width: 0; max-width: 3px; border-radius: 2px; background: rgba(255,255,255,.35); }
.ap-wave i.on { background: #fff; }
.ap-time { flex: none; white-space: nowrap; min-width: 74px; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.85); }
.ap-speed { flex: none; padding: 1px 6px; border: 0; border-radius: 10px; background: rgba(255,255,255,.18); color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; }

/* ---------- Barra lateral (telas largas) ---------- */
.siderail { display: none; }
@media (min-width: 721px) {
  .siderail {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    position: fixed; left: 0; top: 0; bottom: 0; width: 64px; padding: 14px 0; z-index: 20;
    background: var(--card); border-right: 1px solid var(--line);
  }
  .tabbar { display: none; }
  body.has-tabbar { padding-left: 64px; }
  body.has-tabbar .shell, body.has-tabbar .shell:has(.chat-layout) { padding-bottom: 0; }
  .rail-btn {
    position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
    color: var(--ink-soft); text-decoration: none;
  }
  .rail-btn:hover { background: var(--surface-hover, rgba(0,0,0,.06)); color: var(--ink); text-decoration: none; }
  .rail-btn.active { background: var(--brand-tint, #e4f3ec); color: var(--brand, #0f6b4f); }
  .rail-btn .tab-badge { top: -4px; right: -6px; }
  .rail-btn .tab-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
  .rail-sep { width: 28px; height: 1px; margin: 6px 0; background: var(--line-strong, var(--line)); }
  .rail-spacer { flex: 1; }
  .rail-btn::after {
    content: attr(data-tip); position: absolute; left: 54px; top: 50%; transform: translateY(-50%);
    padding: 4px 9px; border-radius: 7px; background: #1f2a24; color: #fff; font-size: 12px; font-weight: 600;
    white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s;
  }
  .rail-btn:hover::after { opacity: 1; }
}

/* selo de mensagens temporárias no canto da foto */
.av-wrap2 { position: relative; display: inline-flex; flex-shrink: 0; }
.eph-badge { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 2px var(--card, #fff); }
.eph-ic { width: 15px; height: 15px; vertical-align: -3px; margin-left: 2px; }

.tick .wa-tick { vertical-align: -3px; }

/* "digitando..." */
.chat-num.is-typing { color: var(--green-text) !important; font-style: italic; text-decoration: none !important; }
.typing-b { display: flex; gap: 4px; align-items: center; width: fit-content; margin: 4px 12px 8px; padding: 11px 14px; background: #fff; border-radius: 12px; box-shadow: 0 1px 1px rgba(0,0,0,.12); }
.typing-b i { width: 7px; height: 7px; border-radius: 50%; background: #8696a0; animation: typ-dot 1.2s infinite ease-in-out; }
.typing-b i:nth-child(2) { animation-delay: .2s; }
.typing-b i:nth-child(3) { animation-delay: .4s; }
@keyframes typ-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* gravação de voz */
.rec-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--panel, #f0f2f5); }
.rec-bar[hidden] { display: none; }
.rec-bar .rec-x { border: 0; background: none; font-size: 20px; cursor: pointer; }
.rec-bar .rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e53935; animation: rec-blink 1s infinite; }
.rec-bar .rec-t { flex: 1; font-variant-numeric: tabular-nums; font-weight: 600; }
@keyframes rec-blink { 50% { opacity: .25; } }
.mic-btn[hidden] { display: none !important; }

/* som de notificação */
.snd-line { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.snd-line > span { min-width: 80px; font-weight: 600; }
.snd-line select, .snd-line input[type=range] { flex: 1; }
.chat-mid small.is-typing { color: var(--green-text); font-style: italic; }

/* calculadora da barra lateral */
.rail-btn { border: 0; background: none; cursor: pointer; padding: 0; font: inherit; }
.calc-box { position: fixed; left: 72px; bottom: 70px; z-index: 40; width: 244px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.calc-hist { min-height: 16px; text-align: right; font-size: 12px; color: var(--ink-soft); }
.calc-disp { text-align: right; font-size: 30px; font-weight: 600; padding: 2px 4px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calc-keys button { height: 44px; border: 0; border-radius: 10px; background: var(--surface-hover, rgba(0,0,0,.06)); color: var(--ink); font: inherit; font-size: 17px; cursor: pointer; }
.calc-keys button:hover { filter: brightness(.95); }
.calc-keys button.op { background: var(--brand, #0f6b4f); color: #fff; }
.calc-keys button.fn { color: var(--brand, #0f6b4f); font-weight: 700; }
@media (max-width: 720px) { #rail-calc, .calc-box { display: none; } }

.st-warn { margin-top: 4px; font-size: 12px; color: #9a6700; font-weight: 600; }

.draft-chip { display: inline-block; padding: 0 7px; border-radius: 6px; background: #f59e0b; color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; }

.sent-arrow { width: 15px; height: 15px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }

/* Conversas de RCS/SMS: visual do Google Mensagens (claro e escuro) */
#chat-pane.ch-sms, #chat-pane.ch-sms .msgs { background-color: #fff; background-image: none; }
#chat-pane.ch-sms .chat-head, #chat-pane.ch-sms .composer { background: #fff; border-color: #e3e3e3; }
#chat-pane.ch-sms .bubble { border-radius: 18px; padding: 8px 14px 6px; font-size: 14.5px; box-shadow: none; color: #1f1f1f; }
#chat-pane.ch-sms .bubble.in { background: #eef1f6; border-top-left-radius: 18px; }
#chat-pane.ch-sms .bubble.out { background: #d3e3fd; color: #041e49; border-top-right-radius: 18px; }
#chat-pane.ch-sms .bubble small { color: #5f6368; }
#chat-pane.ch-sms .bubble.out small { color: #44546f; }
#chat-pane.ch-sms .day { background: transparent; color: #5f6368; box-shadow: none; font-weight: 500; }
#chat-pane.ch-sms #msg-input { background: #f0f4f9; border-radius: 24px; color: #1f1f1f; }
html[data-theme="dark"] #chat-pane.ch-sms, html[data-theme="dark"] #chat-pane.ch-sms .msgs { background-color: #131314; background-image: none; }
html[data-theme="dark"] #chat-pane.ch-sms .chat-head, html[data-theme="dark"] #chat-pane.ch-sms .composer { background: #1e1f20; border-color: #2d2f31; }
html[data-theme="dark"] #chat-pane.ch-sms .bubble { color: #e3e3e3; box-shadow: none; }
html[data-theme="dark"] #chat-pane.ch-sms .bubble.in { background: #2d2f31; }
html[data-theme="dark"] #chat-pane.ch-sms .bubble.out { background: #0842a0; color: #d3e3fd; }
html[data-theme="dark"] #chat-pane.ch-sms .bubble small { color: #9aa0a6; }
html[data-theme="dark"] #chat-pane.ch-sms .bubble.out small { color: #a8c7fa; }
html[data-theme="dark"] #chat-pane.ch-sms .day { background: transparent; color: #9aa0a6; }
html[data-theme="dark"] #chat-pane.ch-sms #msg-input { background: #2d2f31; color: #e3e3e3; }

/* Tudo arredondado: nada de cantos retos em linhas, botões e campos */
.chat-row { width: calc(100% - 16px); margin: 2px 8px; border-radius: 14px; }
.cl-list .chat-row { width: 100%; margin: 0; border-radius: 0; }
.row-arrow, .row-arrow:hover { border-radius: 50%; width: 26px; height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.chat-row:focus, .chat-row:focus-visible, .row-arrow:focus, .row-arrow:focus-visible { outline: none; }
.chat-row:focus-visible { box-shadow: 0 0 0 2px var(--green-line); }
.chat-side, .chat-side small { border-radius: 10px; }
.chat-list-pane input, #chat-search, .modal-card input, .modal-card textarea, .modal-card select, #msg-input { border-radius: 24px; }
.modal-card textarea { border-radius: 14px; }
.modal-card, .dlg-box, .chat-menu, .calc-box, .siderail .rail-btn, .tabbar .tab { border-radius: 16px; }
.btn, .btn-ghost, .dlg-btn, .lang-btn, .user-chip { border-radius: 999px; }
.bubble small, .bubble .tick, .msg-quote, .msg-media, .alert, .sys-note, .day { border-radius: 12px; }
.avatar, .av-wrap { border-radius: 50%; }
.cl-list .chat-row:first-child { border-radius: 14px 14px 0 0; } .cl-list .chat-row:last-child { border-radius: 0 0 14px 14px; }

/* RCS/SMS: resposta em duas cores, como no Google Mensagens (citação em cima, sua resposta embaixo) */
#chat-pane.ch-sms .bubble.out { background: linear-gradient(135deg, #1a73e8, #0b57d0); color: #fff; }
#chat-pane.ch-sms .bubble.out small { color: rgba(255,255,255,.8); }
#chat-pane.ch-sms .msg-quote { margin: -8px -14px 8px; padding: 8px 14px; border: 0; border-radius: 18px 18px 0 0; background: #f1f3f4; color: #3c4043; }
#chat-pane.ch-sms .msg-quote strong { color: #5f6368; font-weight: 600; }
#chat-pane.ch-sms .bubble.in .msg-quote { background: #dfe3ea; }
#chat-pane.ch-sms .bubble.has-quote { font-weight: 600; }
html[data-theme="dark"] #chat-pane.ch-sms .bubble.out { background: linear-gradient(135deg, #1a5fd0, #0842a0); color: #fff; }
html[data-theme="dark"] #chat-pane.ch-sms .bubble.out small { color: rgba(255,255,255,.75); }
html[data-theme="dark"] #chat-pane.ch-sms .msg-quote { background: #2d2f31; color: #e3e3e3; }
html[data-theme="dark"] #chat-pane.ch-sms .msg-quote strong { color: #9aa0a6; }
html[data-theme="dark"] #chat-pane.ch-sms .bubble.in .msg-quote { background: #3a3c3e; }
#chat-pane.ch-sms .bubble.has-quote .msg-quote { font-weight: 400; }

/* citação encostada nas bordas do balão (o max-width antigo deixava uma folga) */
#chat-pane.ch-sms .msg-quote { max-width: none; width: calc(100% + 28px); box-sizing: border-box; }
/* seta do menu da mensagem: só a setinha, sem balão em volta */
.msg-chev, html[data-theme="dark"] .msg-chev { background: none !important; box-shadow: none; }
#chat-pane.ch-sms .bubble.out .msg-chev { color: #fff; }
#chat-pane.ch-sms .bubble.has-quote .msg-chev { color: #5f6368; }
html[data-theme="dark"] #chat-pane.ch-sms .bubble.has-quote .msg-chev { color: #bdc1c6; }

/* balões enviados voltam ao padrão anterior do Google Mensagens (a resposta com citação segue em duas cores) */
#chat-pane.ch-sms .bubble.out { background: #d3e3fd; color: #041e49; }
#chat-pane.ch-sms .bubble.out small { color: #44546f; }
#chat-pane.ch-sms .bubble.out .msg-chev { color: #041e49; }
html[data-theme="dark"] #chat-pane.ch-sms .bubble.out { background: #0842a0; color: #d3e3fd; }
html[data-theme="dark"] #chat-pane.ch-sms .bubble.out small { color: #a8c7fa; }
html[data-theme="dark"] #chat-pane.ch-sms .bubble.out .msg-chev { color: #d3e3fd; }

.chev-ic { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.msg-chev { display: inline-flex; align-items: center; justify-content: center; }

/* reação: bolinha redonda com o emoji, no canto de baixo do balão */
.react-pill, .react-pill.mine, .bubble.in .react-pill { left: auto; right: -4px; bottom: -13px; min-width: 22px; height: 22px; padding: 0 4px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: #fff; font-size: 13px; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.28); }
.bubble.has-react { margin-bottom: 20px; }
html[data-theme="dark"] .react-pill, html[data-theme="dark"] .react-pill.mine { background: #2d2f31; box-shadow: 0 1px 4px rgba(0,0,0,.6); }

/* seletor de emojis */
.chat-menu.emoji-pop { padding: 0; width: 340px; border-radius: 16px; overflow: hidden; }
.emoji-pick { display: flex; flex-direction: column; height: 380px; }
.ep-tabs { display: flex; justify-content: space-around; padding: 6px 4px 0; border-bottom: 1px solid var(--line); }
.chat-menu .ep-tab { width: auto; padding: 6px 7px; font-size: 18px; border-radius: 8px 8px 0 0; opacity: .7; background: none; }
.chat-menu .ep-tab:hover { opacity: 1; background: var(--surface); }
.ep-search { margin: 10px 12px 4px; padding: 9px 14px; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.ep-body { flex: 1; overflow-y: auto; padding: 0 10px 10px; position: relative; }
.ep-h { font-weight: 700; font-size: 14px; margin: 12px 4px 6px; color: var(--ink); }
.ep-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.chat-menu .ep-e { width: auto; padding: 4px 0; font-size: 24px; line-height: 1.2; text-align: center; border-radius: 10px; background: none; }
.chat-menu .ep-e:hover { background: var(--surface-hover); }

.ep-top { display: flex; align-items: center; gap: 6px; margin: 10px 12px 4px; }
.ep-top .ep-search { flex: 1; margin: 0; min-width: 0; }
.chat-menu .ep-tone { width: 36px; height: 36px; padding: 0; font-size: 20px; border-radius: 50%; background: var(--surface); flex: none; }
.ep-tones { display: flex; gap: 8px; justify-content: center; padding: 4px 0 6px; }
.chat-menu .ep-dot { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 2px solid transparent; }
.chat-menu .ep-dot.on { border-color: var(--green-text); }

/* horário com a mesma cor do contador de não lidas */
.chat-side small.chat-time.has-unread { color: #1a9e55; font-weight: 600; }
.chat-side small.chat-time.has-unread.muted { color: #9aa5a0; }

/* visualização única (ícone SVG) */
.msg-once-chip .once-ic { width: 22px; height: 22px; border: 0; border-radius: 0; opacity: .85; flex: none; }
.msg-once-chip .once-ic::after { content: none; }
.msg-once-chip .once-ic.opened { opacity: .6; }

/* tela de conversas maior, como no WhatsApp Web */
.chat-list-pane { width: 420px; }
.pane-head h1 { font-size: 22px; }
.chat-row { padding: 14px 16px; gap: 14px; }
.chat-row .avatar, .chat-row .av-wrap, .chat-row .av-wrap .avatar { width: 52px; height: 52px; }
.chat-mid strong { font-size: 17px; font-weight: 600; }
.chat-mid small { font-size: 14.5px; }
.chat-mid small.chat-num { font-size: 13px; }
.chat-side small { font-size: 13px; }
.unread { min-width: 22px; height: 22px; font-size: 13px; }
input[type="search"], #msg-input { padding: 12px 16px; font-size: 15.5px; }
.chat-head { padding: 12px 20px; }
.chat-head strong { font-size: 17px; }
#chat-pane .bubble, #chat-pane.ch-sms .bubble { font-size: 16px; line-height: 22px; max-width: 68%; }
#chat-pane .bubble small { font-size: 12px; }
.msg-once-chip { font-size: 16px; font-style: normal; }
.msg-once-chip .once-ic.opened + span { font-style: italic; }
.topbar { padding: 8px 24px; }
@media (max-width: 720px) { .chat-list-pane { width: 100%; } #chat-pane .bubble, #chat-pane.ch-sms .bubble { max-width: 85%; } }
.chat-side small.chat-time.has-unread, .chat-side small.chat-time.has-unread.muted { color: var(--ink); font-weight: 600; }

/* === Conversa igual ao WhatsApp Web: hora/ticks na linha do texto, rabinho do balão, agrupamento === */
.msgs { gap: 0; padding: 16px 5% 12px; }
.bubble { display: flow-root; margin-top: 8px; padding: 6px 7px 6px 9px; }
.bubble.in + .bubble.in, .bubble.out + .bubble.out { margin-top: 2px; }
.bubble > small { float: right; display: inline-flex; align-items: center; gap: 3px; margin: 6px 0 -4px 12px; line-height: 15px; font-size: 11px !important; color: #667781; white-space: nowrap; }
.bubble > small .tick { display: inline-flex; align-items: center; letter-spacing: 0; font-size: 11px; color: #8696a0; }
.bubble > small .tick.read { color: #53bdeb; }
.bubble > small .tick .wa-tick { vertical-align: 0; }
/* rabinho (só na primeira mensagem de uma sequência) */
.bubble.in::before, .bubble.out::before { content: ''; position: absolute; top: 0; width: 8px; height: 13px; }
.bubble.in::before { left: -8px; background: #fff; clip-path: polygon(100% 0, 0 0, 100% 100%); }
.bubble.out::before { right: -8px; background: #d9fdd3; clip-path: polygon(0 0, 100% 0, 0 100%); }
.bubble.in + .bubble.in::before, .bubble.out + .bubble.out::before { display: none; }
.bubble.in + .bubble.in { border-top-left-radius: 7.5px; }
.bubble.out + .bubble.out { border-top-right-radius: 7.5px; }
html[data-theme="dark"] .bubble.in::before { background: #242626; }
html[data-theme="dark"] .bubble.out::before { background: #144d37; }
html[data-theme="dark"] .bubble > small .tick { color: #8696a0; }
html[data-theme="dark"] .bubble > small .tick.read { color: #53bdeb; }
#chat-pane.ch-sms .bubble::before { display: none !important; }
/* barra de envio: ícones sem cara de botão, campo branco arredondado */
.composer { align-items: flex-end; gap: 6px; padding: 10px 16px; }
#msg-input { border-radius: 8px !important; background: #fff; padding: 10px 14px; }
html[data-theme="dark"] #msg-input { background: #2a3942; }
.composer .ai-btn, .composer .tr-out { background: none; border: 0; box-shadow: none; }
.composer .send { background: none; border: 0; color: #54656f; box-shadow: none; }
.composer .send:hover { color: #00a884; }
.chat-head .head-actions .tr-toggle { background: none; border: 0; border-radius: 50%; color: #54656f; }
.chat-head .head-actions .tr-toggle:hover { background: rgba(11,20,26,.06); }
/* ticks do balão no tamanho do WhatsApp Web */
.bubble > small .tick .wa-tick { width: 18px; height: 17px; margin-left: 1px; }
.bubble > small .tick .wa-tick[viewBox="0 0 12 15"] { width: 14px; }

/* menu da mensagem (botão direito / setinha) igual ao WhatsApp Web */
.chat-menu.wa-menu { background: none; box-shadow: none; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; border-radius: 0; }
.wa-menu .wa-react { display: flex; align-items: center; gap: 2px; align-self: flex-start; padding: 6px 10px; background: var(--card); border-radius: 999px; box-shadow: 0 2px 12px rgba(11,20,26,.28); }
.wa-menu .wa-react button { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; border-radius: 50%; background: none; transition: transform .12s; }
.wa-menu .wa-react button:hover { transform: scale(1.25); background: none; }
.wa-menu .wa-react button.on { background: var(--tint); }
.wa-menu .wa-react .react-more { font-size: 22px; color: var(--ink-soft); background: var(--surface); margin-left: 4px; }
.wa-menu .wa-list { min-width: 240px; padding: 8px 0; background: var(--card); border-radius: 16px; box-shadow: 0 2px 16px rgba(11,20,26,.3); }
.wa-menu .wa-list button { display: flex; align-items: center; gap: 16px; width: 100%; padding: 10px 24px 10px 20px; border-radius: 0; font-size: 15px; color: var(--ink); background: none; text-align: left; }
.wa-menu .wa-list button svg { flex: none; color: var(--ink-soft); }
.wa-menu .wa-list button:hover { background: var(--surface); }
.wa-menu .wa-list button.danger, .wa-menu .wa-list button.danger svg { color: var(--ink); }
.wa-menu .wa-list hr { margin: 6px 0; }

/* números e links dentro das mensagens: azul do WhatsApp Web */
.bubble .msg-link, .bubble .msg-phone { color: #027eb5; text-decoration: none; }
.bubble .msg-link:hover, .bubble .msg-phone:hover { text-decoration: underline; }
html[data-theme="dark"] .bubble .msg-link, html[data-theme="dark"] .bubble .msg-phone { color: #53bdeb; }
#chat-pane.ch-sms .bubble.out .msg-link, #chat-pane.ch-sms .bubble.out .msg-phone { color: #fff; text-decoration: underline; }

/* Ligações: duas colunas como no WhatsApp Web (lista à esquerda, dados da ligação à direita) */
.calls-page { max-width: none; margin: 0; padding: 0; flex: 1; min-height: 0; display: flex; }
.calls-wrap { flex: 1; min-height: 0; display: flex; width: 100%; background: var(--card); }
.calls-left { width: 420px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); padding: 16px 12px 0; overflow-y: auto; }
.calls-right { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--surface); overflow-y: auto; }
.calls-ph { margin: auto; text-align: center; padding: 24px; }
.calls-det { padding: 0 0 24px; }
.calls-sec { margin: 14px 8px 4px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.calls-list .call-row { cursor: pointer; border-bottom: 0; border-radius: 12px; padding: 10px 10px; }
.calls-list .call-row:hover { background: var(--surface); }
.calls-list .call-row.active { background: var(--surface-hover, var(--surface)); }
.call-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.call-chev { width: 24px; height: 24px; padding: 0; border: 0; background: none; color: var(--ink-soft); border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; visibility: hidden; }
.call-row:hover .call-chev, .call-row.active .call-chev, .call-chev:focus { visibility: visible; }
.call-chev:hover { background: var(--line); }
.calls-dh { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.calls-back { display: none; border: 0; background: none; color: var(--ink); cursor: pointer; padding: 4px; }
.call-av.big { width: 42px; height: 42px; font-size: 17px; }
.calls-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.calls-who strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calls-who small { color: var(--ink-soft); }
.calls-acts { display: flex; gap: 4px; }
.calls-acts button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--ink-soft); display: grid; place-items: center; cursor: pointer; }
.calls-acts button:hover { background: var(--line); }
.calls-card { margin: 16px; padding: 4px 0 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.calls-day { padding: 14px 20px 6px; font-size: 14px; color: var(--ink-soft); }
.calls-ent { display: flex; align-items: center; gap: 14px; padding: 8px 20px; }
.calls-ent-ic { color: var(--ink-soft); display: inline-flex; }
.calls-ent.miss .calls-ent-ic, .calls-ent.miss .calls-ent-tx > span { color: #e5173f; }
.calls-ent-tx { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.calls-ent-tx small { color: var(--ink-soft); font-size: 13px; }
.calls-ent-st { color: var(--ink-soft); font-size: 13.5px; min-width: 84px; text-align: right; }
.calls-pop button svg { vertical-align: -3px; margin-right: 4px; }
@media (max-width: 900px) {
  .calls-left { width: 100%; border-right: 0; }
  .calls-right { display: none; }
  .calls-wrap.calls-sel .calls-left { display: none; }
  .calls-wrap.calls-sel .calls-right { display: flex; }
  .calls-back { display: inline-flex; }
}

/* campo de mensagem sem setinhas de rolagem (como no WhatsApp Web) */
#msg-input { scrollbar-width: none; }
#msg-input::-webkit-scrollbar { display: none; }

/* botão de enviar redondo com seta para cima (cinza vazio, colorido com texto); emoji e áudio em ícone */
.composer .send { width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0; border-radius: 50%; background: #00a884 !important; color: #fff !important; transition: background .15s; }
.composer .send:hover { background: #008f72 !important; color: #fff !important; }
.composer .send.empty { background: #c5cacd !important; cursor: default; }
#chat-pane.ch-sms .composer .send { background: #1a73e8 !important; }
#chat-pane.ch-sms .composer .send:hover { background: #0b57d0 !important; }
#chat-pane.ch-sms .composer .send.empty { background: #c5cacd !important; }
html[data-theme="dark"] .composer .send.empty { background: #3b4448 !important; }
.composer .emoji-btn, .composer .mic-btn { width: 40px; padding: 0; display: inline-grid; place-items: center; background: none; color: #54656f; }
.composer .emoji-btn:hover, .composer .mic-btn:hover { background: rgba(11,20,26,.06); }
html[data-theme="dark"] .composer .emoji-btn, html[data-theme="dark"] .composer .mic-btn { color: #aebac1; }
.composer .emoji-btn[hidden] { display: none !important; }
@media (max-width: 720px) {
  .composer { gap: 2px; padding: 8px 8px; }
  .composer .emoji-btn, .composer .mic-btn { width: 34px; height: 40px; }
  .composer .ai-btn:not(.emoji-btn):not(.mic-btn), .composer .tr-out { width: 34px; padding: 0; font-size: 13px; }
  .composer .send { width: 40px; height: 40px; }
  #msg-input { min-width: 0; padding: 10px 12px !important; }
}

/* barra de digitar redonda, com emoji e áudio dentro (como no WhatsApp) */
.composer .composer-box { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 0; background: #fff; border-radius: 24px; padding: 0 6px 0 4px; }
.composer .composer-box #msg-input { flex: 1; min-width: 0; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: none; padding: 12px 10px !important; color: inherit; }
.composer .composer-box .emoji-btn, .composer .composer-box .mic-btn { height: 42px; width: 38px; border-radius: 50%; flex-shrink: 0; }
#chat-pane.ch-sms .composer .composer-box { background: #f0f4f9; }
html[data-theme="dark"] .composer .composer-box { background: #2a3942; }
html[data-theme="dark"] #chat-pane.ch-sms .composer .composer-box { background: #2d2f31; }
@media (max-width: 720px) { .composer .composer-box { padding: 0 2px 0 2px; } .composer .composer-box .emoji-btn, .composer .composer-box .mic-btn { width: 34px; } }
#msg-input::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
