:root {
  --bg: #0b0f14;
  --panel: #121820;
  --panel-2: #1a222d;
  --line: #263341;
  --ink: #e6edf3;
  --ink-dim: #8b9bab;
  --accent: #35d0ba;
  --accent-ink: #052925;
  --danger: #ff6b6b;
  --ok: #48d597;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font);
  -webkit-font-smoothing: antialiased; line-height: 1.45;
}
.brand { display: flex; align-items: baseline; gap: 8px; font-weight: 700; letter-spacing: -.02em; }
.brand b { font-size: 20px; }
.brand span { color: var(--accent); }
.muted { color: var(--ink-dim); }

/* ---------- login ---------- */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px;
}
.login-card .brand { margin-bottom: 4px; }
.login-card p { color: var(--ink-dim); font-size: 14px; margin: 0 0 20px; }
label { display: block; font-size: 13px; color: var(--ink-dim); margin: 0 0 6px; }
.field {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);
  border-radius: 9px; padding: 12px 14px; font-size: 15px; font-family: var(--font); outline: none;
}
.field:focus { border-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); border: none; cursor: pointer;
  border-radius: 9px; padding: 12px 16px; font-size: 15px; font-weight: 650; font-family: var(--font);
}
.btn:hover { filter: brightness(1.06); }
.btn.block { width: 100%; margin-top: 16px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 550; }
.btn.ghost:hover { border-color: var(--accent); filter: none; }
.btn.small { padding: 8px 12px; font-size: 13px; }
.error { color: var(--danger); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ---------- app ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.topbar .brand b { font-size: 17px; }
.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-dim); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-dim); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(72,213,151,.15); }
.dot.off { background: var(--danger); box-shadow: 0 0 0 3px rgba(255,107,107,.15); }
.url { max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spacer { flex: 1; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }

.stage-wrap { padding: 16px; max-width: 1320px; margin: 0 auto; }
.hint {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; font-size: 14px; color: var(--ink);
}
.hint b { color: var(--accent); }
.hint ol { margin: 8px 0 0; padding-left: 20px; color: var(--ink-dim); }
.hint li { margin: 3px 0; }

.stage {
  position: relative; background: #000; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; outline: none; aspect-ratio: 16 / 10; display: grid; place-items: center;
}
.stage.live { cursor: crosshair; }
.stage.armed { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(53,208,186,.35); }
.stage img { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; }
.stage .placeholder { position: absolute; color: var(--ink-dim); font-size: 14px; text-align: center; padding: 24px; }
.kbd-flag {
  position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px;
  background: rgba(11,15,20,.82); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 11px; font-size: 12px; color: var(--ink-dim); pointer-events: none;
}
.kbd-flag .dot { width: 8px; height: 8px; }
.stage.armed .kbd-flag { color: var(--ink); border-color: var(--accent); }
.stage.armed .kbd-flag .dot { background: var(--accent); }

.foot { margin-top: 12px; font-size: 13px; color: var(--ink-dim); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  .url { max-width: 18ch; }
  .topbar { gap: 10px; }
  .stage { aspect-ratio: 3 / 4; }
}

/* ==========================================================================
   PAINEL — centro de controle do tim-mari (Pessoas · WhatsApp · Diário)
   Estende as variáveis acima. Concept: a cara do Tinder com a precisão de
   uma sala de operações. Teal = "IA no comando"; rosa = Tinder; verde = WhatsApp.
   ========================================================================== */
:root {
  --love: #ff5b7f;          /* semântica Tinder / like */
  --love-ink: #2b0912;
  --wa: #25d366;            /* verde WhatsApp */
  --wa-ink: #06301a;
  --ig: #d6317f;            /* magenta Instagram (monocromático) */
  --ig-txt: #e8619f;        /* o magenta puro dá 3,89:1 em texto pequeno; este passa em AA */
  --ig-ink: #2b0716;
  --warn: #ffb454;
  --panel-3: #212b38;
  --line-soft: #1e2732;
  /* Calendário: estados explícitos evitam que estilos nativos de <button> vazem para a UI. */
  --cal-cell-bg: #121820;
  --cal-cell-hover: #1a222d;
  --cal-cell-selected: #15312f;
  --cal-cell-out: #0f151c;
  --cal-day-out: #7b8ea1;
  /* modos de conversa (quentes → paquera/romance; frio → amigo; neutro → negócio; âmbar → cívico) */
  --mode-paquera: #ff9068;
  --mode-romance: var(--love);
  --mode-amigo: #56b3e0;
  --mode-negocio: #a9b7c6;
  --mode-civico: var(--warn);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.65);
  --shadow-md: 0 10px 30px -12px rgba(0,0,0,.55);
  --ease: cubic-bezier(.22,.61,.36,1);
}
::selection { background: rgba(53,208,186,.28); }
.app-body { display: flex; flex-direction: column; min-height: 100%; overflow-x: clip; }

/* ---------- SVG icons: herdam a cor do texto ---------- */
.ico { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.ico-sm { width: 14px; height: 14px; }
.ico-lg { width: 22px; height: 22px; }

/* ---------- topo fixo + abas ---------- */
.topbar.panel { z-index: 40; padding-inline: clamp(12px, 4vw, 22px); }
.topbar .brand span.tag { color: var(--ink-dim); font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.tabs { display: flex; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.tab {
  appearance: none; border: none; background: transparent; color: var(--ink-dim); cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 600; letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.tab .ico { opacity: .8; }
.tab:hover { color: var(--ink); }
.tab.active { background: var(--panel-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.tab.active .ico { opacity: 1; color: var(--accent); }
.tab .tab-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--love); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1;
}
.tab.active .tab-badge, .tab:not(.active) .tab-badge { background: rgba(255,91,127,.9); }

.status-stack { display: flex; align-items: center; gap: 14px; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-dim);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px 6px 9px;
  white-space: nowrap;
}
.stat-pill .lbl { color: var(--ink-dim); }
.stat-pill.up .lbl { color: var(--ink); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(255,180,84,.16); }
.dot.pulse { animation: dotpulse 1.6s ease-in-out infinite; }
@keyframes dotpulse { 0%,100% { box-shadow: 0 0 0 3px rgba(53,208,186,.14); } 50% { box-shadow: 0 0 0 6px rgba(53,208,186,.05); } }

/* ---------- container das telas ---------- */
.view { flex: 1; padding: clamp(14px, 3vw, 22px); max-width: 1280px; width: 100%; margin: 0 auto; }
.view[hidden] { display: none; }
.view-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.view-head h1 { font-size: 19px; font-weight: 750; letter-spacing: -.02em; margin: 0; }
.view-head .sub { color: var(--ink-dim); font-size: 13px; }

/* ---------- chips de filtro (componente próprio) ---------- */
.filters { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
/* alternador Grade/Lista da aba Tinder */
.view-switch { display: inline-flex; gap: 3px; margin-left: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.vsw { appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 30px; border: 0; background: transparent; color: var(--ink-dim); border-radius: 999px; transition: background .15s, color .15s; }
.vsw:hover { color: var(--accent); }
.vsw.active { background: var(--panel-3); color: var(--accent); }
.people-list { display: flex; flex-direction: column; }
.people-results { display: flex; flex-direction: column; gap: 12px; }
.wc-unread.pend { display: inline-block; width: 9px; height: 9px; padding: 0; min-width: 0; border-radius: 50%; background: var(--accent); font-size: 0; line-height: 0; }
.chip {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 13px; letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px;
  background: var(--panel); color: var(--ink-dim); border: 1px solid var(--line);
  transition: all .18s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--line-soft); transform: translateY(-1px); }
.chip .ico { opacity: .7; }
.chip .cnt {
  min-width: 20px; height: 19px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 700;
  display: inline-grid; place-items: center; background: var(--panel-3); color: var(--ink-dim); line-height: 1;
}
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 4px 16px -6px rgba(53,208,186,.6); }
.chip.active .ico { opacity: 1; }
.chip.active .cnt { background: rgba(5,41,37,.25); color: var(--accent-ink); }

/* ---------- primeiras mensagens: ação direta + seleção em lote ---------- */
.opener-toolbar {
  position: sticky; top: 8px; z-index: 18; min-height: 58px; display: flex; align-items: center; gap: 10px;
  padding: 8px 9px 8px 11px; border: 1px solid rgba(53,208,186,.3); border-radius: 15px;
  background: color-mix(in srgb, var(--panel) 94%, transparent); box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}
.opener-select-all,
.opener-bulk-send,
.opener-select,
.opener-send {
  appearance: none; border: 0; font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}
.opener-select-all {
  min-height: 42px; padding: 0 12px; gap: 7px; flex: none; border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel-2); color: var(--ink); font-size: 12px; font-weight: 700;
}
.opener-select-all[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: rgba(53,208,186,.08); }
.opener-toolbar-hint { display: flex; flex: 1; min-width: 0; flex-direction: column; line-height: 1.25; }
.opener-toolbar-hint b { color: var(--ink); font-size: 13px; }
.opener-toolbar-hint small { color: var(--ink-dim); font-size: 11px; margin-top: 2px; }
.opener-bulk-send {
  min-height: 42px; padding: 0 15px; gap: 7px; flex: none; border-radius: 11px;
  background: var(--accent); color: var(--accent-ink); font-size: 12.5px; font-weight: 800;
}
.opener-bulk-send:hover:not(:disabled),
.opener-send:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); }
.opener-bulk-send:disabled,
.opener-select:disabled,
.opener-send:disabled { cursor: wait; opacity: .58; transform: none; }

.opener-actions { display: flex; align-items: center; gap: 7px; }
.opener-select {
  width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel-2); color: transparent;
}
.opener-select[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.opener-select:focus-visible,
.opener-send:focus-visible,
.opener-select-all:focus-visible,
.opener-bulk-send:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.opener-send {
  min-height: 42px; padding: 0 14px; gap: 7px; border-radius: 11px;
  background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; white-space: nowrap;
}
.opener-checking { width: 112px; flex: none; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-dim); font-size: 10.5px; line-height: 1.25; }
.opener-checking .spin { width: 13px; height: 13px; border-width: 1.5px; }

/* ---------- grade de cards estilo Tinder ---------- */
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.card-shell { position: relative; min-width: 0; }
.card {
  position: relative; border-radius: 16px; overflow: hidden; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line);
  aspect-ratio: 3 / 4; display: block; text-align: left; padding: 0;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
  appearance: none; font: inherit; color: inherit; width: 100%; animation: cardin .4s var(--ease) both;
}
@keyframes cardin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-soft); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: var(--panel-3); }
.card .photo.ph { display: grid; place-items: center; color: var(--line-soft); }
.card .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,9,13,.92) 0%, rgba(6,9,13,.5) 26%, rgba(6,9,13,0) 52%); }
.card .meta { position: absolute; left: 12px; right: 12px; bottom: 11px; }
.card .who { display: flex; align-items: baseline; gap: 7px; }
.card .who .nm { font-weight: 750; font-size: 16px; letter-spacing: -.02em; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.card .who .ag { color: rgba(230,237,243,.82); font-weight: 500; font-size: 14px; }
.card .last { margin-top: 4px; font-size: 12.5px; color: rgba(230,237,243,.7); display: flex; align-items: center; gap: 5px; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.card .last .arrow { color: var(--accent); font-weight: 700; flex: none; }
.card .last .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .last.empty { color: rgba(230,237,243,.45); font-style: italic; }
.card-shell.opener .card .meta { bottom: 62px; }
.opener-actions.card {
  position: absolute; left: 9px; right: 9px; bottom: 9px; z-index: 5;
  padding: 4px; border: 1px solid rgba(255,255,255,.16); border-radius: 13px;
  background: rgba(8,13,18,.82); backdrop-filter: blur(10px);
}
.opener-actions.card .opener-select { width: 38px; height: 38px; flex-basis: 38px; border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.08); }
.opener-actions.card .opener-select[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.opener-actions.card .opener-send { flex: 1; min-width: 0; min-height: 38px; padding-inline: 8px; }

/* badges no topo do card */
.card .badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; align-items: center; gap: 6px; }
.badge {
  height: 24px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .01em; backdrop-filter: blur(8px);
  background: rgba(11,15,20,.62); border: 1px solid rgba(255,255,255,.08); color: var(--ink);
}
.badge .ico { width: 13px; height: 13px; }
.badge.ai { background: rgba(53,208,186,.9); color: var(--accent-ink); border-color: transparent; }
.badge.wa { background: rgba(37,211,102,.16); color: var(--wa); border-color: rgba(37,211,102,.3); }
.badge.network.channel-whatsapp { background: rgba(37,211,102,.16); color: var(--wa); border-color: rgba(37,211,102,.3); }
.badge.network.channel-instagram { background: rgba(214,49,127,.18); color: var(--ig-txt); border-color: rgba(214,49,127,.38); }
.badge.network.channel-badoo { background: rgba(120,144,255,.16); color: #aab8ff; border-color: rgba(120,144,255,.32); }
.badge.pending { width: 24px; padding: 0; justify-content: center; background: rgba(255,91,127,.95); color: #fff; border-color: transparent; box-shadow: 0 0 0 4px rgba(255,91,127,.18); }
.badge.pending .pdot { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.card .badges .push { margin-left: auto; }
.card-link-action {
  appearance: none; position: absolute; z-index: 6; top: 42px; right: 10px; height: 28px;
  display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; border-radius: 999px;
  color: var(--ink); background: rgba(8,13,18,.78); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px); font: inherit; font-size: 10.5px; font-weight: 750; cursor: pointer;
  transition: border-color .14s var(--ease), background .14s var(--ease), transform .14s var(--ease);
}
.card-link-action:hover { background: rgba(8,13,18,.94); border-color: var(--accent); transform: translateY(-1px); }
.card-link-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- estados vazio / carregando ---------- */
.empty {
  border: 1px dashed var(--line); border-radius: 16px; padding: 54px 24px; text-align: center;
  color: var(--ink-dim); background: linear-gradient(180deg, rgba(26,34,45,.4), transparent);
}
.empty .ico { width: 40px; height: 40px; color: var(--line-soft); margin-bottom: 12px; }
.empty h3 { color: var(--ink); font-size: 16px; font-weight: 650; margin: 0 0 6px; }
.empty p { margin: 0 auto; max-width: 40ch; font-size: 13.5px; }
.skeleton-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.sk { aspect-ratio: 3 / 4; border-radius: 16px; background: linear-gradient(100deg, var(--panel-2) 30%, var(--panel-3) 50%, var(--panel-2) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- drawer / ficha da pessoa ---------- */
.scrim-bg { position: fixed; inset: 0; background: rgba(6,9,13,.6); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .28s var(--ease); z-index: 45; }
.scrim-bg.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); z-index: 50;
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .32s var(--ease);
}
.drawer.show { transform: none; }
.drawer-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line);
  flex: none; background: var(--panel);
}
.drawer-head .nm { font-weight: 750; font-size: 16px; letter-spacing: -.02em; }
.drawer-head .meta-line { color: var(--ink-dim); font-size: 12.5px; margin-top: 1px; display: flex; gap: 6px; align-items: center; }
.objective-trigger {
  appearance: none; flex: none; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line);
  border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--panel-2); color: var(--ink-dim); font: inherit; font-size: 12px; font-weight: 650;
  cursor: pointer; transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.objective-trigger[hidden] { display: none !important; }
.objective-trigger:hover { color: var(--ink); border-color: var(--accent); }
.objective-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.objective-trigger.has-objective {
  color: var(--accent); border-color: rgba(53,208,186,.38); background: rgba(53,208,186,.09);
}
.icon-btn {
  appearance: none; cursor: pointer; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-dim);
  width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center; flex: none;
  transition: all .16s var(--ease);
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-soft); background: var(--panel-3); }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

/* carrossel de fotos */
.gallery { position: relative; aspect-ratio: 4 / 5; background: #000; overflow: hidden; }
.gallery .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s var(--ease); }
.gallery .slide.on { opacity: 1; }
.gallery .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line-soft); }
.gallery .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer; background: rgba(11,15,20,.55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); transition: background .16s; }
.gallery .nav:hover { background: rgba(11,15,20,.8); }
.gallery .nav.prev { left: 10px; } .gallery .nav.next { right: 10px; }
.gallery .dots { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; }
.gallery .dots i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.28); transition: background .2s; }
.gallery .dots i.on { background: #fff; }
.gallery .grad { position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(to top, rgba(6,9,13,.85), transparent); pointer-events: none; }

.person-info { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.person-info .row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.person-info .row .nm { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.person-info .row .ag { color: var(--ink-dim); font-size: 16px; font-weight: 500; }
.person-info .place { color: var(--ink-dim); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.person-info .bio { margin-top: 10px; font-size: 13.5px; color: var(--ink); line-height: 1.5; white-space: pre-wrap; }

/* conversa (bolhas) */
.convo { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 3px; }
.day-sep { align-self: center; font-size: 11px; color: var(--ink-dim); background: var(--panel-2); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; margin: 10px 0 6px; }
.bubble-row { display: flex; margin-top: 5px; }
.bubble-row.me { justify-content: flex-end; }
.bubble-row.her { justify-content: flex-start; }
.bubble {
  max-width: 74%; padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.45; position: relative;
  word-break: break-word;
}
.bubble-row.her .bubble { border: 1px solid var(--line-soft); }
.bubble-row.me .bubble { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.bubble-row.her .bubble { background: var(--panel-3); color: var(--ink); border-bottom-left-radius: 5px; }
.bubble .chan {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; opacity: .75; margin-bottom: 3px;
}
.bubble-row.me .bubble .chan { color: var(--accent-ink); }
.bubble .chan.wa { color: var(--wa); }
.bubble .ts { font-size: 10.5px; opacity: .6; margin-top: 3px; text-align: right; }
.convo-empty { text-align: center; color: var(--ink-dim); font-size: 13px; padding: 30px 10px; }

/* rodapé de controles fixo na ficha */
.controls { flex: none; border-top: 1px solid var(--line); background: var(--panel); padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
.ai-bar {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 12px; margin-bottom: 11px;
  background: var(--panel-2); border: 1px solid var(--line); transition: all .25s var(--ease);
}
.ai-bar.on { background: linear-gradient(100deg, rgba(53,208,186,.16), rgba(53,208,186,.05)); border-color: rgba(53,208,186,.4); }
.ai-bar .ai-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-3); color: var(--ink-dim); flex: none; transition: all .25s var(--ease); }
.ai-bar.on .ai-ico { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 4px rgba(53,208,186,.16); }
.ai-bar .ai-txt { flex: 1; min-width: 0; }
.ai-bar .ai-txt .t { font-weight: 650; font-size: 14px; }
.ai-bar .ai-txt .d { font-size: 12px; color: var(--ink-dim); margin-top: 1px; }
.ai-bar.on .ai-txt .d { color: var(--accent); }

/* toggle desenhado */
.toggle { appearance: none; cursor: pointer; border: none; background: var(--panel-3); width: 46px; height: 27px; border-radius: 999px; position: relative; flex: none; transition: background .22s var(--ease); box-shadow: inset 0 0 0 1px var(--line); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: var(--ink-dim); transition: transform .24s var(--ease), background .22s var(--ease); }
.toggle[aria-checked="true"] { background: var(--accent); box-shadow: none; }
.toggle[aria-checked="true"]::after { transform: translateX(19px); background: var(--accent-ink); }
.toggle:disabled { opacity: .4; cursor: not-allowed; }
/* variante compacta (linha de conversa) */
.toggle.sm { width: 38px; height: 22px; }
.toggle.sm::after { top: 3px; left: 3px; width: 16px; height: 16px; }
.toggle.sm[aria-checked="true"]::after { transform: translateX(16px); }

/* seletor de canal (segmented, próprio) */
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; margin-bottom: 11px; width: 100%; }
.seg button { flex: 1; appearance: none; border: none; background: transparent; color: var(--ink-dim); cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 650; padding: 7px 10px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all .18s var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button.active { color: var(--ink); background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line); }
.seg button.active .ico { color: var(--accent); }
.seg button.wa.active .ico { color: var(--wa); }
.seg-when { font-size: 11px; font-weight: 600; color: var(--ink-dim); opacity: .85; }
/* o canal com a mensagem mais recente, quando não é o que está aberto */
.seg button.newer .seg-when { color: var(--accent); opacity: 1; }
.seg button.newer.wa .seg-when { color: var(--wa); }
.seg button.newer .seg-when::before {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 5px;
  border-radius: 50%; background: currentColor; vertical-align: 1px;
}
.seg button.disabled, .seg button:disabled { opacity: .38; cursor: not-allowed; }
.seg button.disabled:hover { color: var(--ink-dim); }
.seg-hint { font-size: 11.5px; color: var(--ink-dim); margin: -6px 0 11px; display: flex; align-items: center; gap: 6px; }
.seg-hint::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--wa); opacity: .55; flex: none; }

.composer { display: flex; flex-direction: column; gap: 9px; }
.composer .draft {
  width: 100%; min-height: 74px; max-height: 200px; resize: vertical; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--ink); border-radius: 11px; padding: 11px 13px; font: inherit; font-size: 14px;
  line-height: 1.45; outline: none; transition: border-color .16s;
}
.composer .draft:focus { border-color: var(--accent); }
.composer .draft::placeholder { color: var(--ink-dim); }
.composer .row { display: flex; gap: 9px; }
.composer .row .btn { flex: 1; }
.btn.gen { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.btn.gen:hover { border-color: var(--accent); background: var(--panel-3); filter: none; }
.btn.gen .ico { color: var(--accent); }
.btn[disabled] { opacity: .5; cursor: not-allowed; filter: none; }
.btn.send:disabled { opacity: .4; }

/* spinner */
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.gen-state { font-size: 12px; color: var(--ink-dim); display: flex; align-items: center; gap: 8px; min-height: 16px; }
.gen-state.err { color: var(--danger); }

/* ---------- aba WhatsApp ---------- */
.wa-stage { display: flex; flex-direction: column; align-items: center; }
.wa-hero {
  width: 100%; max-width: 420px; margin: clamp(10px, 5vh, 48px) auto; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; box-shadow: var(--shadow-md);
}
.wa-hero .glyph { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 18px; }
.wa-hero .glyph.idle { background: var(--panel-2); color: var(--ink-dim); border: 1px solid var(--line); }
.wa-hero .glyph.live { background: rgba(37,211,102,.14); color: var(--wa); border: 1px solid rgba(37,211,102,.32); }
.wa-hero h2 { font-size: 18px; font-weight: 750; letter-spacing: -.02em; margin: 0 0 6px; }
.wa-hero p { color: var(--ink-dim); font-size: 13.5px; margin: 0 0 22px; }
.wa-hero .btn.wa-connect { background: var(--wa); color: var(--wa-ink); width: 100%; padding: 13px; font-weight: 700; }

/* QR */
.qr-card {
  width: 100%; max-width: 420px; margin: clamp(10px, 4vh, 36px) auto; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow-md);
}
.qr-card .expect { font-size: 13px; color: var(--ink-dim); margin-bottom: 16px; }
.qr-frame { width: min(260px, 72vw); aspect-ratio: 1; margin: 0 auto 20px; border-radius: 16px; background: #fff; padding: 12px; position: relative; box-shadow: 0 8px 30px -10px rgba(0,0,0,.5); }
.qr-frame img { width: 100%; height: 100%; display: block; image-rendering: pixelated; border-radius: 6px; }
.qr-frame.waiting { display: grid; place-items: center; background: var(--panel-2); }
.qr-steps { display: flex; flex-direction: column; gap: 2px; text-align: left; max-width: 280px; margin: 0 auto; }
.qr-step { display: flex; align-items: center; gap: 11px; padding: 9px 6px; font-size: 13px; color: var(--ink); }
.qr-step .n { width: 22px; height: 22px; border-radius: 50%; background: var(--panel-3); color: var(--accent); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.qr-step .arw { color: var(--ink-dim); }
.qr-card.pairing .qr-frame img { filter: blur(3px) brightness(.7); }
.qr-card .pairing-note { display: none; align-items: center; justify-content: center; gap: 9px; color: var(--accent); font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.qr-card.pairing .pairing-note { display: flex; }

.section-title { font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-dim); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title .cnt { background: var(--panel-3); color: var(--ink-dim); border-radius: 8px; font-size: 11px; padding: 1px 7px; font-weight: 700; letter-spacing: 0; }

/* avatar (foto redonda ou inicial sobre cor derivada do nome) */
.avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; background: var(--panel-3); }
.avatar.ph { display: grid; place-items: center; color: var(--line-soft); }

/* ==========================================================================
   Cliente de WhatsApp — master-detail (lista de conversas + thread)
   ========================================================================== */
.wa-client { width: 100%; display: flex; flex-direction: column; min-height: 0; }
/* cabeçalho discreto de status */
.wa-client-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.wa-client-head .wc-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wa-client-head .wc-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--wa); box-shadow: 0 0 0 3px rgba(37,211,102,.18); }
.wa-client-head .wc-txt { display: flex; flex-direction: column; min-width: 0; }
.wa-client-head .wc-txt b { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.wa-client-head .wc-txt span { font-size: 12px; color: var(--wa); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* fila de revisão de vínculos (bloco discreto no topo) */
.wc-reviews { margin-bottom: 16px; padding-bottom: 4px; border-bottom: 1px solid var(--line-soft); }

/* corpo master-detail */
.wc-body {
  display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 14px;
  min-height: 0; height: calc(100dvh - 210px); min-height: 440px;
}
.wc-list {
  display: flex; flex-direction: column; min-height: 0; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.wc-list-head {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 13px 15px; border-bottom: 1px solid var(--line-soft);
  font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-dim);
}
.wc-list-head .cnt { margin-left: auto; background: var(--panel-3); color: var(--ink-dim); border-radius: 8px; font-size: 11px; padding: 1px 7px; font-weight: 700; letter-spacing: 0; }
.wc-list-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.wc-loading { display: flex; align-items: center; gap: 8px; color: var(--ink-dim); font-size: 13px; padding: 18px 12px; }
.wc-loading .ico { color: var(--line-soft); }
.wc-list-scroll .empty { padding: 40px 18px; }

.wc-items { display: flex; flex-direction: column; gap: 2px; }
.wc-item {
  appearance: none; font: inherit; text-align: left; cursor: pointer; width: 100%;
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 12px;
  background: transparent; border: 1px solid transparent; color: inherit;
  transition: background .16s var(--ease), border-color .16s var(--ease);
}
.wc-item:hover { background: var(--panel-2); }
.wc-item.active { background: var(--panel-2); border-color: var(--line); }
.wc-item.from-tinder { background: linear-gradient(100deg, rgba(255,91,127,.06), transparent 72%); }
.wc-item.from-tinder.active { background: linear-gradient(100deg, rgba(255,91,127,.1), var(--panel-2)); border-color: rgba(255,91,127,.28); }
.wc-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.wc-av { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; background: var(--panel-3); }
.wc-av.ph { display: grid; place-items: center; font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--ink); }
.wc-item-main { flex: 1; min-width: 0; }
.wc-item-top { display: flex; align-items: center; gap: 7px; }
.wc-nm { font-weight: 650; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wc-tag {
  display: inline-flex; align-items: center; gap: 3px; flex: none; font-size: 10px; font-weight: 700;
  letter-spacing: .02em; padding: 1px 7px; border-radius: 999px; color: var(--love);
  background: rgba(255,91,127,.12); border: 1px solid rgba(255,91,127,.28);
}
.wc-tag .ico { width: 10px; height: 10px; }
/* selo Tinder interativo no cabeçalho (botão: abre popover pra desmarcar) */
.wc-tag-btn { appearance: none; cursor: pointer; font: inherit; line-height: 1; transition: background .14s var(--ease), border-color .14s var(--ease); }
.wc-tag-btn:hover { background: rgba(255,91,127,.2); border-color: rgba(255,91,127,.45); }
.wc-tag-btn:focus-visible { outline: 2px solid var(--love); outline-offset: 2px; }
.wc-tag-btn[aria-expanded="true"] { background: rgba(255,91,127,.24); border-color: rgba(255,91,127,.5); }
.tinder-link-tag.channel-whatsapp { color: var(--wa); background: rgba(37,211,102,.1); border-color: rgba(37,211,102,.3); }
.tinder-link-tag.channel-whatsapp:hover { background: rgba(37,211,102,.18); border-color: rgba(37,211,102,.48); }
.tinder-link-tag.channel-instagram { color: var(--ig-txt); background: rgba(214,49,127,.1); border-color: rgba(214,49,127,.34); }
.tinder-link-tag.channel-instagram:hover { background: rgba(214,49,127,.18); border-color: rgba(214,49,127,.52); }
.tinder-link-tag.channel-badoo { color: #aab8ff; background: rgba(120,144,255,.1); border-color: rgba(120,144,255,.3); }
.tinder-link-tag.channel-badoo:hover { background: rgba(120,144,255,.18); border-color: rgba(120,144,255,.48); }
.tinder-link-tag:focus-visible { outline-color: currentColor; }
.wc-when { margin-left: auto; flex: none; font-size: 11px; color: var(--ink-dim); }
.wc-item-bot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.wc-prev { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-prev .mute { color: var(--line-soft); font-style: italic; }
.wc-flags { flex: none; display: flex; align-items: center; gap: 6px; }
.wc-unread {
  min-width: 19px; height: 19px; padding: 0 6px; border-radius: 10px; background: var(--wa); color: var(--wa-ink);
  font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1;
}
/* toggle de IA compacto, à direita de cada conversa da lista */
.wc-item-ai-wrap { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-left: 4px; }
.wc-item-ai-lbl { display: inline-grid; place-items: center; color: var(--ink-dim); line-height: 1; transition: color .18s var(--ease); }
.wc-item-ai-wrap:has(.wc-item-ai[aria-checked="true"]) .wc-item-ai-lbl { color: var(--accent); }
.opener-actions.list { flex: none; margin-left: 4px; }
.opener-actions.list.selected .opener-send { box-shadow: 0 0 0 2px rgba(53,208,186,.18); }
.opener-actions.list .opener-send { min-width: 190px; }

@media (max-width: 760px) {
  .opener-toolbar { top: 6px; flex-wrap: wrap; }
  .opener-toolbar-hint { order: -1; flex-basis: 100%; padding: 2px 3px 0; }
  .opener-select-all,
  .opener-bulk-send { flex: 1; min-height: 46px; }
  .opener-actions.list { gap: 5px; }
  .opener-actions.list .opener-select { width: 44px; height: 44px; flex-basis: 44px; }
  .opener-actions.list .opener-send { min-width: 0; width: 48px; height: 44px; padding: 0 10px; }
  .opener-actions.list .opener-send span { display: none; }
  .opener-checking { width: 44px; font-size: 0; }
}

/* painel da thread */
.wc-thread {
  display: flex; flex-direction: column; min-height: 0; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.wc-thread-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  color: var(--ink-dim); padding: 40px 24px; gap: 4px;
}
.wc-thread-empty .ico { color: var(--line-soft); margin-bottom: 8px; }
.wc-thread-empty h3 { color: var(--ink); font-size: 16px; font-weight: 650; margin: 0; }
.wc-thread-empty p { margin: 0; max-width: 34ch; font-size: 13.5px; }
.wc-thread-empty.small { padding: 30px 20px; }
.wc-thread-empty.small .ico { width: 26px; height: 26px; }

/* cabeçalho da thread */
.wc-thread-head {
  position: relative; /* âncora do popover do selo Tinder */
  flex: none; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
}
.wc-back { display: none; }
.wc-av-head { width: 40px; height: 40px; }
.wc-av-head.ph { font-size: 15px; }
.wc-head-id { flex: 1; min-width: 0; }
.wc-head-nm { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; color: var(--ink); }
.wc-head-nm .wc-tag { font-size: 10px; }
.wc-head-ph { font-size: 12px; color: var(--ink-dim); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-ai-toggle { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.wc-ai-lbl { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-dim); }
.wc-ai-lbl .ico { color: var(--accent); }
.wc-ai-toggle:has(.toggle[aria-checked="true"]) .wc-ai-lbl { color: var(--accent); }

/* ---------- modo de conversa (pill no cabeçalho + popover custom + chip na lista) ---------- */
/* cada modo injeta a própria cor via --mc; quem usa lê com fallback neutro */
.mode-c-paquera { --mc: var(--mode-paquera); }
.mode-c-romance { --mc: var(--mode-romance); }
.mode-c-amigo   { --mc: var(--mode-amigo); }
.mode-c-negocio { --mc: var(--mode-negocio); }
.mode-c-civico  { --mc: var(--mode-civico); }

/* chip discreto na linha da lista (só existe quando a conversa tem modo) */
.wc-mode-tag {
  display: inline-flex; align-items: center; flex: none; font-size: 10px; font-weight: 700;
  letter-spacing: .02em; padding: 1px 7px; border-radius: 999px; color: var(--mc, var(--ink-dim));
  background: color-mix(in srgb, var(--mc, var(--ink-dim)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--mc, var(--ink-dim)) 30%, transparent);
}

/* pill compacta no cabeçalho da thread */
.wc-mode { position: relative; flex: none; }
.wc-mode-pill {
  appearance: none; cursor: pointer; font: inherit; display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--ink-dim); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 8px 6px 10px;
  transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.wc-mode-pill:hover { color: var(--ink); border-color: var(--line-soft); background: var(--panel-3); }
.wc-mode-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wc-mode-pill b { font-weight: 700; color: var(--ink-dim); }
.wc-mode-pill.has-mode b { color: var(--mc, var(--ink)); }
.wc-mode-pill.has-mode { border-color: color-mix(in srgb, var(--mc, var(--line)) 32%, transparent); }
.wc-mode-pill.has-objective { border-color: rgba(53,208,186,.38); background: rgba(53,208,186,.07); }
.wc-mode-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--mc, var(--line-soft)); }
.wc-mode-pill.has-mode .wc-mode-dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc, var(--line-soft)) 16%, transparent); }
.wc-objective-mark { display: inline-grid; place-items: center; color: var(--accent); }
.wc-objective-mark .ico { width: 13px; height: 13px; }
.wc-mode-pill .chev { display: inline-grid; place-items: center; color: var(--ink-dim); transform: rotate(90deg); transition: transform .2s var(--ease); }
.wc-mode-pill[aria-expanded="true"] .chev { transform: rotate(-90deg); }

/* popover (desktop: ancorado abaixo da pill, à direita) */
.wc-mode-scrim { display: none; }
.wc-mode-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 35;
  min-width: 262px; max-width: min(320px, calc(100vw - 24px));
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 5px; display: flex; flex-direction: column; gap: 2px;
  animation: modepop .16s var(--ease);
  /* teto real vem do JS (espaço livre na tela); aqui fica a garantia de rolagem */
  max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
/* sem espaço embaixo, o menu sobe: mesma âncora, ancorado pelo pé (no mobile é folha, não sobe) */
@media (min-width: 641px) {
  .wc-mode-menu.up { top: auto; bottom: calc(100% + 8px); }
}
/* rolando, o título da seção continua visível */
.wc-mode-menu .wc-context-section { position: sticky; top: -5px; z-index: 1; background: var(--panel-2); }
@keyframes modepop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes modesheet { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes modescrim { from { opacity: 0; } to { opacity: 1; } }
.wc-mode-opt {
  appearance: none; border: none; background: transparent; cursor: pointer; font: inherit; color: var(--ink);
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  padding: 9px 10px; border-radius: 10px; transition: background .14s var(--ease);
}
.wc-mode-opt:hover { background: var(--panel-3); }
.wc-mode-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.wc-mode-opt.on { background: color-mix(in srgb, var(--mc, var(--accent)) 9%, transparent); }
.wc-mode-swatch {
  width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--mc, var(--line-soft));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc, var(--line-soft)) 16%, transparent);
}
.wc-mode-opt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wc-mode-opt-txt b { font-size: 13px; font-weight: 650; }
.wc-mode-opt.on .wc-mode-opt-txt b { color: var(--mc, var(--ink)); }
.wc-mode-opt-txt b .df { font-size: 11px; font-weight: 500; color: var(--ink-dim); }
.wc-mode-opt-txt small { font-size: 11.5px; color: var(--ink-dim); margin-top: 1px; }
.wc-mode-check { flex: none; color: var(--mc, var(--accent)); opacity: 0; transform: scale(.7); transition: opacity .14s var(--ease), transform .14s var(--ease); }
.wc-mode-opt.on .wc-mode-check { opacity: 1; transform: none; }
.wc-objective-menu-opt { margin-bottom: 2px; }
.wc-objective-menu-opt.has-objective { background: rgba(53,208,186,.07); }
.wc-objective-menu-icon {
  width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; flex: none;
  color: var(--accent); background: rgba(53,208,186,.1); border: 1px solid rgba(53,208,186,.2);
}
.wc-objective-menu-icon .ico { width: 16px; height: 16px; }
.wc-objective-menu-opt .wc-mode-opt-txt small {
  max-width: 215px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wc-context-edit { flex: none; display: inline-grid; color: var(--ink-dim); }
.wc-vinc-retry .wc-mode-opt-txt b { color: var(--danger); }
.wc-vinc-retry .wc-mode-swatch { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 16%, transparent); }
.wc-context-section {
  padding: 8px 10px 5px; margin-top: 2px; border-top: 1px solid var(--line-soft);
  color: var(--ink-dim); font-size: 10px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase;
}

/* ---------- editor de objetivo: popover central no desktop, sheet no mobile ---------- */
body.objective-open { overflow: hidden; }
.objective-overlay {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px;
  background: rgba(6,9,13,.64); backdrop-filter: blur(4px); animation: modescrim .18s var(--ease);
}
.objective-sheet {
  width: min(520px, 100%); max-height: min(720px, calc(100dvh - 40px)); overflow-y: auto; overscroll-behavior: contain;
  padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel);
  box-shadow: var(--shadow-lg); animation: modepop .2s var(--ease);
}
.objective-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.objective-kicker {
  display: block; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase;
}
.objective-sheet h2 { margin: 2px 0 0; color: var(--ink); font-size: 19px; letter-spacing: -.02em; }
.objective-principle {
  display: flex; align-items: center; gap: 11px; margin: 16px 0; padding: 12px;
  border: 1px solid rgba(53,208,186,.2); border-radius: 13px; background: rgba(53,208,186,.07);
}
.objective-principle-icon {
  width: 36px; height: 36px; border-radius: 11px; display: inline-grid; place-items: center; flex: none;
  color: var(--accent); background: rgba(53,208,186,.11);
}
.objective-principle > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.objective-principle b { color: var(--ink); font-size: 13.5px; }
.objective-principle small { color: var(--ink-dim); font-size: 12px; line-height: 1.4; margin-top: 2px; }
.objective-label { color: var(--ink); font-size: 13px; font-weight: 650; margin-bottom: 7px; }
.objective-input {
  appearance: none; width: 100%; min-height: 116px; resize: vertical; padding: 12px 13px;
  border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--panel-2); color: var(--ink);
  font: inherit; font-size: 14px; line-height: 1.5; transition: border-color .16s, box-shadow .16s;
}
.objective-input::placeholder { color: var(--ink-dim); opacity: .8; }
.objective-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(53,208,186,.1); }
.objective-input-meta {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 6px;
  color: var(--ink-dim); font-size: 11.5px; line-height: 1.4;
}
.objective-counter { flex: none; font-variant-numeric: tabular-nums; }
.objective-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.objective-action-spacer { flex: 1; }
.objective-actions .btn { min-height: 42px; }
.objective-remove { color: var(--danger) !important; }
.objective-remove:hover { border-color: rgba(255,107,107,.5) !important; background: rgba(255,107,107,.08) !important; }
.objective-remove[hidden] { display: none !important; }

@media (max-width: 640px) {
  .objective-overlay { place-items: end center; padding: 0; }
  .objective-sheet {
    width: 100%; max-height: min(86dvh, 720px); padding: 17px 16px calc(16px + env(safe-area-inset-bottom));
    border-left: 0; border-right: 0; border-bottom: 0; border-radius: 20px 20px 0 0; animation: modesheet .22s var(--ease);
  }
  .objective-input { min-height: 126px; font-size: 16px; }
  .objective-input-meta > span:first-child { max-width: 27ch; }
  .objective-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .objective-action-spacer { display: none; }
  .objective-actions .btn { min-height: 48px; padding-inline: 10px; }
  .objective-remove { grid-column: 1 / -1; grid-row: 2; }
}

/* cabeçalho apertado: some o prefixo "Modo:", fica só o nome do modo */
@media (max-width: 900px) {
  .wc-mode-txt .pfx { display: none; }
}
/* mobile: o popover vira uma folha simples ancorada embaixo, com scrim pra fechar tocando fora */
@media (max-width: 640px) {
  .wc-mode-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(6,9,13,.55); backdrop-filter: blur(2px); animation: modescrim .18s var(--ease); }
  .wc-mode-menu {
    position: fixed; top: auto; left: 10px; right: 10px;
    /* acima da navegação inferior: encostado nela, a última opção fica embaixo da barra */
    bottom: calc(var(--mobile-nav-h, 84px) + 10px); z-index: 56;
    min-width: 0; max-width: none; max-height: min(70dvh, 480px); overflow-y: auto; overscroll-behavior: contain;
    border-radius: 16px; padding: 8px; animation: modesheet .22s var(--ease);
  }
  .wc-mode-opt { padding: 11px 10px; }
}
@media (max-width: 480px) {
  .wc-mode-pill { padding: 6px 7px 6px 9px; gap: 6px; }
}

/* ---------- popover do selo Tinder (reaproveita .wc-mode-menu / .wc-mode-opt) ---------- */
/* ancorado abaixo/à esquerda do selo, dentro do cabeçalho (position: relative) */
.wc-tag-menu { top: calc(100% + 6px); right: auto; left: 12px; min-width: 236px; }
.wc-tag-hint { padding: 8px 10px 6px; font-size: 11.5px; color: var(--ink-dim); line-height: 1.4; }
.wc-tag-opt.danger { color: var(--danger); }
.wc-tag-opt.danger:hover { background: rgba(255,107,107,.1); }
.wc-tag-opt.danger .wc-mode-opt-txt b { color: var(--danger); }
.wc-tag-opt:not(.danger) .wc-tag-opt-ico { color: var(--love); }
.wc-tag-opt-ico { flex: none; display: inline-grid; place-items: center; }
/* mobile: mesma folha ancorada embaixo (a regra genérica .wc-mode-menu já cobre; realinha) */
@media (max-width: 640px) {
  .wc-tag-menu { left: 10px; right: 10px; }
}

/* corpo de mensagens (bolhas) */
.wc-msgs {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 3px;
}
.wc-msgs .day-sep { align-self: center; }
.wc-marker { font-style: italic; opacity: .85; }
/* bolha de mídia do Instagram (imagem/vídeo) */
.bubble.wc-media { padding: 5px 5px 6px; max-width: 78%; }
.wc-media-img {
  display: block; max-width: 260px; width: 100%; max-height: 340px; object-fit: cover;
  border-radius: 11px; cursor: zoom-in; background: var(--panel-2);
}
.wc-media-cap {
  display: flex; align-items: flex-start; gap: 5px; font-size: 12px; line-height: 1.4;
  opacity: .82; padding: 6px 6px 0; max-width: 260px;
}
.wc-media-cap .ico { flex: 0 0 auto; margin-top: 2px; opacity: .7; }
.bubble.wc-media .wc-marker { padding: 4px 8px; display: inline-block; }
.bubble.wc-media .ts { padding: 0 6px; }
/* figurinha do WhatsApp: sem fundo de bolha (webp já é transparente) */
.bubble.wc-sticker { background: transparent !important; border: none !important; padding: 2px !important; box-shadow: none; }
.wc-sticker-img { display: block; width: 130px; height: 130px; object-fit: contain; }
.bubble.wc-sticker .ts { padding: 0 4px; }
/* envio avançado (overlay dirigida pelo catálogo) */
.adv-sheet { width: min(560px, 94vw); max-height: 88vh; display: flex; flex-direction: column; }
.adv-body { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.adv-lbl { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-dim); font-weight: 600; }
.adv-lbl.row { flex-direction: row; align-items: center; gap: 8px; }
.adv-lbl input[type=text], .adv-lbl input[type=number], .adv-lbl input[type=datetime-local], .adv-sel, .adv-lbl textarea {
  font: inherit; font-size: 14px; font-weight: 400; color: var(--ink); background: var(--panel-2);
  border: 1px solid var(--line-soft); border-radius: 9px; padding: 8px 10px; width: 100%; box-sizing: border-box;
}
.adv-lbl textarea { resize: vertical; min-height: 38px; }
.adv-lbl.row input[type=checkbox] { width: 16px; height: 16px; }
#advFields { display: flex; flex-direction: column; gap: 11px; }
.adv-note { font-size: 12px; color: var(--warn, #c9820a); min-height: 1em; }
/* biblioteca de figurinhas animadas (Lottie) */
.lot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.lot-item { display: flex; flex-direction: column; align-items: center; gap: 7px; background: var(--panel-2);
  border: 1px solid var(--line-soft); border-radius: 13px; padding: 10px 8px; cursor: pointer; color: var(--ink);
  font: inherit; transition: border-color .12s, transform .12s; }
.lot-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.lot-item.sending { opacity: .5; pointer-events: none; }
.lot-prev { width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; }
.lot-prev svg { width: 100% !important; height: 100% !important; }
.lot-item > span { font-size: 12px; color: var(--ink-dim); text-align: center; line-height: 1.2; }
.pj-lightbox { align-items: center; padding: 20px; z-index: 95; cursor: zoom-out; }
.pj-lightbox-img { max-width: 92vw; max-height: 88vh; border-radius: 10px; box-shadow: 0 8px 40px rgba(0,0,0,.5); }
.bubble-row.pending .bubble { opacity: .72; }
.bubble-row.failed .bubble { background: rgba(255,107,107,.14); color: var(--ink); border: 1px solid rgba(255,107,107,.4); }
.bubble .ts .wc-sending { display: inline-flex; align-items: center; }
.bubble .ts .wc-sending .spin { width: 11px; height: 11px; border-width: 1.6px; }
.bubble .ts .wc-err { display: inline-flex; align-items: center; gap: 3px; color: var(--danger); font-weight: 600; }
.bubble .ts .wc-err .ico { width: 11px; height: 11px; }

/* ---------- bolha de áudio: player custom + transcrição ---------- */
/* a bolha herda a cor do lado (me = accent-ink sobre accent; her = ink sobre panel-3);
   o player desenha em cima disso com currentColor + transparências, então funciona nos dois. */
.bubble.wc-audio { min-width: 210px; max-width: min(300px, 74%); }
.wc-au-player { display: flex; align-items: center; gap: 10px; }
.wc-au-btn {
  appearance: none; cursor: pointer; flex: none; width: 38px; height: 38px; border-radius: 50%;
  border: none; display: grid; place-items: center; padding: 0;
  background: currentColor; transition: transform .12s var(--ease), opacity .16s;
}
.wc-au-btn .ico { width: 18px; height: 18px; }
/* o glifo usa a cor de fundo da bolha (contraste garantido contra o círculo cheio) */
.bubble-row.her .wc-au-btn .ico { color: var(--panel-3); }
.bubble-row.me .wc-au-btn .ico { color: var(--accent); }
/* o ícone de play fica levemente deslocado; o de pause centra */
.wc-au-btn:not(.playing) .ico { margin-left: 2px; }
.wc-au-btn:hover { transform: scale(1.05); }
.wc-au-btn:active { transform: scale(.96); }
.wc-au-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.wc-au-btn:disabled { cursor: not-allowed; opacity: .5; }
.wc-au-btn:disabled:hover { transform: none; }

.wc-au-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wc-au-track {
  position: relative; height: 4px; border-radius: 3px; cursor: pointer;
  background: color-mix(in srgb, currentColor 24%, transparent);
}
.wc-au-track::before { content: ""; position: absolute; inset: -8px 0; }  /* alvo de toque maior */
.wc-au-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: currentColor; transition: width .1s linear; }
.wc-au-knob {
  position: absolute; top: 50%; left: 0; width: 11px; height: 11px; border-radius: 50%;
  background: currentColor; transform: translate(-50%, -50%); box-shadow: 0 1px 3px rgba(0,0,0,.3);
  opacity: 0; transition: opacity .14s;
}
.wc-au-player.playing .wc-au-knob, .wc-au-track:hover .wc-au-knob { opacity: 1; }
.wc-au-time { font-size: 11px; font-variant-numeric: tabular-nums; opacity: .72; line-height: 1; }

/* transcrição: bloco discreto abaixo do player, dentro da mesma bolha */
.wc-au-tr {
  margin-top: 9px; padding-top: 8px; font-size: 12.5px; line-height: 1.45;
  border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}
.wc-au-tr-lbl {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase; opacity: .62; margin-bottom: 4px;
}
.wc-au-tr-lbl .ico { width: 12px; height: 12px; }
.wc-au-tr-txt { display: block; opacity: .92; word-break: break-word; }
.wc-au-tr.fail .wc-au-tr-note { font-style: italic; opacity: .6; font-size: 12px; }
/* estado "transcrevendo…": rótulo + barrinha shimmer no lugar do ícone */
.wc-au-tr.pending .wc-au-tr-lbl { opacity: .7; }
.wc-au-shimmer {
  width: 26px; height: 8px; border-radius: 4px; display: inline-block;
  background: linear-gradient(100deg, color-mix(in srgb, currentColor 12%, transparent) 30%,
    color-mix(in srgb, currentColor 34%, transparent) 50%, color-mix(in srgb, currentColor 12%, transparent) 70%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite;
}

/* compositor da thread */
.wc-composer {
  /* relative é obrigatório: o picker de áudio salvo (.wc-audio-pop) é absolute com
     bottom: 100% e se ancora AQUI. Sem isso ele resolve contra a página inteira e vai
     desenhar acima do topo da janela — o menu abre, com os áudios dentro, e ninguém vê. */
  position: relative;
  flex: none; display: flex; align-items: flex-end; gap: 9px; padding: 11px 12px calc(11px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft); background: var(--panel);
}
.wc-composer .draft {
  flex: 1; min-height: 42px; max-height: 140px; resize: none; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--ink); border-radius: 12px; padding: 10px 13px; font: inherit; font-size: 14px;
  line-height: 1.4; outline: none; transition: border-color .16s; overflow-y: auto;
}
.wc-composer .draft:focus { border-color: var(--accent); }
.wc-composer .draft::placeholder { color: var(--ink-dim); }
.wc-comp-actions { flex: none; display: flex; align-items: center; gap: 8px; }
.wc-composer .btn { padding: 10px 13px; }
.wc-composer .btn.gen { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.wc-composer .btn.gen:hover { border-color: var(--accent); background: var(--panel-3); filter: none; }
.wc-composer .btn.gen .ico { color: var(--accent); }
.wc-composer .btn.send:disabled { opacity: .45; }

/* ==========================================================================
   Instagram — reaproveita todo o esqueleto .wc-* / .wa-client do WhatsApp.
   Só ajusta: cor do banner (magenta), @username discreto, badge não-lida e
   o botão "Sincronizar agora". O #igClient tem a classe .wa-client, então
   herda os breakpoints master-detail sem duplicar nada.
   ========================================================================== */
.ig-head .wc-dot { background: var(--ig); box-shadow: 0 0 0 3px rgba(214,49,127,.18); }
.ig-head .wc-dot.off { background: var(--ink-dim); box-shadow: 0 0 0 3px rgba(139,155,171,.14); }
.ig-head .wc-txt span { color: var(--ig); }
.ig-head .wc-txt b { color: var(--ink); }
.ig-sync { padding: 8px 12px; font-size: 12.5px; font-weight: 600; gap: 7px; flex: none; }
.ig-sync .ico { color: var(--ig); }
.ig-sync:hover { border-color: var(--ig); filter: none; }
.ig-sync:disabled { opacity: .55; cursor: not-allowed; }

/* @username discreto na linha da lista (e no cabeçalho reaproveita .wc-head-ph) */
.wc-handle { flex: none; font-size: 11.5px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 12ch; }
/* badge de não-lidas na cor do Instagram */
.wc-unread.ig { background: var(--ig); color: var(--ig-ink); }
/* status pill do topo acende em magenta quando conectado */
#stIg.up .dot { background: var(--ig); box-shadow: 0 0 0 3px rgba(214,49,127,.18); }
#stIg .ico { opacity: .85; }

/* fila de revisão de vínculo */
.review-list { display: grid; gap: 11px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.review-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 15px; }
.review-card .q { font-size: 14px; line-height: 1.5; margin-bottom: 4px; }
.review-card .q b { color: var(--ink); }
.review-card .num { color: var(--wa); font-weight: 650; }
.review-card .guess { color: var(--love); font-weight: 700; }
.review-card .score { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-dim); margin-bottom: 13px; }
.review-card .score .bar { width: 54px; height: 5px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.review-card .score .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.review-card .acts { display: flex; gap: 9px; }
.review-card .acts .btn { flex: 1; }
.btn.confirm { background: var(--wa); color: var(--wa-ink); }
.btn.reject { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.reject:hover { border-color: var(--danger); color: var(--danger); filter: none; }

/* ---------- aba Diário ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 4px 0 18px; }
.tl-item .marker { position: absolute; left: -26px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--panel); border: 2px solid var(--line-soft); display: grid; place-items: center; }
.tl-item .marker .ico { width: 9px; height: 9px; color: var(--accent); }
.tl-item.love .marker { border-color: rgba(255,91,127,.5); } .tl-item.love .marker .ico { color: var(--love); }
.tl-item.wa .marker { border-color: rgba(37,211,102,.5); } .tl-item.wa .marker .ico { color: var(--wa); }
.tl-item .when { font-size: 11.5px; color: var(--ink-dim); }
.tl-item .what { font-size: 14px; color: var(--ink); margin-top: 2px; }
.tl-item .what b { font-weight: 650; }

/* ---------- aba Config (sobre mim, só leitura) ---------- */
.cfg-intro {
  display: flex; align-items: center; gap: 9px; margin-bottom: 16px; padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; font-size: 13.5px; color: var(--ink);
}
.cfg-intro .ico { color: var(--accent); flex: none; }
.cfg-list { display: flex; flex-direction: column; gap: 16px; }
.cfg-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cfg-head {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(26,34,45,.5), transparent);
}
.cfg-ico { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; background: var(--panel-2); color: var(--accent); border: 1px solid var(--line); }
.cfg-titles { min-width: 0; }
.cfg-label { font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.cfg-sub { font-size: 12px; color: var(--ink-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-warn {
  display: flex; align-items: center; gap: 8px; margin: 14px 18px 0; padding: 9px 12px; border-radius: 10px;
  font-size: 12.5px; color: var(--warn); background: rgba(255,180,84,.1); border: 1px solid rgba(255,180,84,.3);
}
.cfg-warn .ico { flex: none; }
.cfg-trunc { font-size: 12px; color: var(--ink-dim); font-style: italic; padding: 0 20px 16px; }
.cfg-empty-text { color: var(--ink-dim); font-style: italic; font-size: 13px; padding: 16px 20px; }

/* corpo do documento: markdown legível, largura de leitura limitada, scroll interno se enorme */
.cfg-md {
  padding: 8px 20px 20px; max-width: 72ch; font-size: 14.5px; line-height: 1.65; color: var(--ink);
  max-height: 62vh; overflow-y: auto; overscroll-behavior: contain;
}
.cfg-md > :first-child { margin-top: 8px; }
.cfg-md h1, .cfg-md h2, .cfg-md h3, .cfg-md h4, .cfg-md h5, .cfg-md h6 {
  color: var(--ink); font-weight: 700; letter-spacing: -.01em; line-height: 1.3; margin: 22px 0 8px;
}
.cfg-md h1 { font-size: 20px; } .cfg-md h2 { font-size: 18px; }
.cfg-md h3 { font-size: 16px; } .cfg-md h4, .cfg-md h5, .cfg-md h6 { font-size: 14.5px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .03em; }
.cfg-md p { margin: 0 0 12px; }
.cfg-md ul, .cfg-md ol { margin: 0 0 12px; padding-left: 22px; }
.cfg-md li { margin: 4px 0; }
.cfg-md li::marker { color: var(--accent); }
.cfg-md strong { font-weight: 700; color: var(--ink); }
.cfg-md em { font-style: italic; }
.cfg-md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--accent);
}
.cfg-md blockquote {
  margin: 0 0 12px; padding: 6px 14px; border-left: 3px solid var(--line); color: var(--ink-dim); font-style: italic;
}
.cfg-md hr { border: none; border-top: 1px solid var(--line-soft); margin: 18px 0; }

/* etiqueta "A IA lê isto" + contador discreto do conteúdo principal */
.cfg-read-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 20px 0; }
.cfg-pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .01em;
  padding: 3px 9px; border-radius: 999px; flex: none;
}
.cfg-pill.reads { background: rgba(53,208,186,.14); color: var(--accent); border: 1px solid rgba(53,208,186,.32); }
.cfg-pill.reads .ico { width: 12px; height: 12px; }
.cfg-count { font-size: 11.5px; color: var(--ink-dim); }

/* bloco recolhível: material completo do arquivo (fonte de pesquisa) */
.cfg-full { border-top: 1px solid var(--line-soft); margin-top: 4px; }
.cfg-full-toggle {
  appearance: none; width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--ink-dim);
  display: flex; align-items: center; gap: 10px; padding: 13px 20px; background: transparent; border: none;
  transition: color .16s var(--ease), background .16s var(--ease);
}
.cfg-full-toggle:hover { color: var(--ink); background: var(--panel-2); }
.cfg-full-toggle .chev { flex: none; display: inline-grid; place-items: center; color: var(--ink-dim); transition: transform .2s var(--ease); }
.cfg-full.open .cfg-full-toggle .chev { transform: rotate(90deg); }
.cfg-full-lbl { display: flex; flex-direction: column; min-width: 0; }
.cfg-full-lbl b { font-size: 13px; font-weight: 650; color: var(--ink); }
.cfg-full-lbl small { font-size: 11.5px; color: var(--ink-dim); margin-top: 1px; }
.cfg-full-panel { border-top: 1px solid var(--line-soft); background: rgba(11,15,20,.35); }
.cfg-md-full { color: var(--ink-dim); }
.cfg-md-full h1, .cfg-md-full h2, .cfg-md-full h3 { color: var(--ink); }

/* Config como central operacional: conta OpenAI, consumo, diagnóstico e contexto. */
#view-config .view-head, #configHost { max-width: 1180px; margin-inline: auto; }
.cfg-dashboard { display: flex; flex-direction: column; gap: 32px; }
.cfg-section { min-width: 0; }
.cfg-section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 0 0 13px;
}
.cfg-section-head > div { min-width: 0; }
.cfg-section-head h2 { margin: 2px 0 0; color: var(--ink); font-size: 17px; letter-spacing: -.02em; }
.cfg-section-head p { margin: 4px 0 0; color: var(--ink-dim); font-size: 12.5px; line-height: 1.45; }
.cfg-kicker {
  color: var(--accent); font-size: 9.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
}
.cfg-refresh { flex: none; }
.cfg-ai-workspace { display: flex; flex-direction: column; gap: 13px; }

.cfg-provider-picker {
  display: grid; grid-template-columns: minmax(220px, .8fr) minmax(420px, 1.2fr); align-items: center; gap: 18px;
  padding: 15px 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
}
.cfg-provider-copy h3, .cfg-saved-head h3, .cfg-oauth-head h3, .cfg-claude-note h3 {
  margin: 2px 0 0; color: var(--ink); font-size: 14px; letter-spacing: -.015em;
}
.cfg-provider-copy p, .cfg-saved-head p, .cfg-oauth-intro, .cfg-claude-note p {
  margin: 4px 0 0; color: var(--ink-dim); font-size: 11.5px; line-height: 1.45;
}
.cfg-provider-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cfg-provider-option {
  appearance: none; min-width: 0; min-height: 64px; padding: 9px 10px; display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 9px;
  color: var(--ink); background: rgba(11,15,20,.22); border: 1px solid var(--line-soft);
  border-radius: 13px; text-align: left; font: inherit; cursor: pointer;
}
.cfg-provider-option:hover { border-color: rgba(53,208,186,.34); background: rgba(53,208,186,.045); }
.cfg-provider-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cfg-provider-option.active { border-color: rgba(53,208,186,.52); background: rgba(53,208,186,.09); box-shadow: inset 0 0 0 1px rgba(53,208,186,.08); }
.cfg-provider-option.unavailable:not(.active) { opacity: .7; }
.cfg-provider-icon {
  width: 36px; height: 36px; display: grid; place-items: center; color: var(--accent);
  border: 1px solid rgba(53,208,186,.22); border-radius: 10px; background: rgba(53,208,186,.08);
}
.cfg-provider-icon .ico { width: 18px; height: 18px; }
.cfg-provider-option > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cfg-provider-option b { font-size: 12.5px; }
.cfg-provider-option small { color: var(--ink-dim); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-provider-option em { color: var(--accent); font-size: 9.5px; font-style: normal; font-weight: 750; }

.cfg-openai-card {
  overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 46px -40px rgba(53,208,186,.5);
}
.cfg-openai-head {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  background:
    radial-gradient(circle at 8% 0%, rgba(53,208,186,.13), transparent 28%),
    linear-gradient(180deg, rgba(26,34,45,.72), rgba(18,24,32,.2));
  border-bottom: 1px solid var(--line-soft);
}
.cfg-openai-brand {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  color: var(--accent); background: rgba(53,208,186,.1); border: 1px solid rgba(53,208,186,.28); border-radius: 14px;
}
.cfg-openai-brand .ico { width: 24px; height: 24px; }
.cfg-openai-identity { min-width: 0; flex: 1; }
.cfg-openai-identity h2, .cfg-openai-head h2 {
  margin: 2px 0 0; color: var(--ink); font-size: 18px; line-height: 1.25; letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.cfg-openai-identity p, .cfg-openai-head p { margin: 4px 0 0; color: var(--ink-dim); font-size: 12px; }
.cfg-openai-badges { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.cfg-status {
  min-height: 26px; display: inline-flex; align-items: center; padding: 3px 9px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink-dim); background: var(--panel-2);
  font-size: 10.5px; font-weight: 750;
}
.cfg-status.ok { color: var(--ok); border-color: rgba(65,211,155,.3); background: rgba(65,211,155,.08); }
.cfg-status.off { color: var(--danger); border-color: rgba(255,107,107,.3); background: rgba(255,107,107,.08); }
.cfg-status.plan { color: var(--accent); border-color: rgba(53,208,186,.3); background: rgba(53,208,186,.08); }

.cfg-account-facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line-soft);
}
.cfg-account-facts > div { min-width: 0; padding: 13px 17px; border-right: 1px solid var(--line-soft); }
.cfg-account-facts > div:last-child { border-right: 0; }
.cfg-account-facts span, .cfg-token-stats span {
  display: block; color: var(--ink-dim); font-size: 10px; line-height: 1.3; text-transform: uppercase; letter-spacing: .04em;
}
.cfg-account-facts strong {
  display: block; margin-top: 4px; color: var(--ink); font-size: 12.5px; font-weight: 680;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cfg-openai-body { display: grid; grid-template-columns: 1.15fr .85fr; }
.cfg-account-block { min-width: 0; padding: 19px 20px 20px; }
.cfg-account-block + .cfg-account-block { border-left: 1px solid var(--line-soft); }
.cfg-block-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.cfg-block-head h3 { margin: 2px 0 0; color: var(--ink); font-size: 14px; }
.cfg-rate-list { display: grid; gap: 11px; }
.cfg-rate-window { padding: 12px 13px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(11,15,20,.25); }
.cfg-rate-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cfg-rate-top > span { min-width: 0; display: flex; flex-direction: column; }
.cfg-rate-top b { color: var(--ink); font-size: 12px; }
.cfg-rate-top span small { margin-top: 2px; color: var(--ink-dim); font-size: 10.5px; }
.cfg-rate-top > strong { flex: none; color: var(--ink); font-size: 15px; letter-spacing: -.02em; }
.cfg-rate-top > strong small { color: var(--ink-dim); font-size: 9.5px; font-weight: 600; letter-spacing: 0; }
.cfg-rate-track { height: 7px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: var(--panel-3); }
.cfg-rate-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #62e2cf); }
.cfg-rate-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--ink-dim); font-size: 9.5px; }
.cfg-limit-details { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.cfg-limit-details > span { min-width: 116px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(11,15,20,.22); }
.cfg-limit-details small { display: block; color: var(--ink-dim); font-size: 8.5px; text-transform: uppercase; letter-spacing: .04em; }
.cfg-limit-details b { display: block; margin-top: 3px; color: var(--ink); font-size: 11.5px; }
.cfg-limit-details .warn { border-color: rgba(255,180,84,.35); background: rgba(255,180,84,.08); }
.cfg-limit-details .warn b { color: var(--warn); }
.cfg-account-empty { margin: 0; color: var(--ink-dim); font-size: 12px; line-height: 1.5; }
.cfg-token-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cfg-token-stats > div { min-width: 0; padding: 11px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(11,15,20,.25); }
.cfg-token-stats strong {
  display: block; color: var(--ink); font-size: 17px; line-height: 1.2; letter-spacing: -.025em;
  overflow: hidden; text-overflow: ellipsis;
}
.cfg-token-stats span { margin-top: 4px; font-size: 8.8px; }
.cfg-token-chart {
  height: 78px; margin-top: 13px; padding: 8px 8px 5px; display: flex; align-items: flex-end; gap: 5px;
  border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(11,15,20,.22);
}
.cfg-token-chart > span { height: 100%; min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.cfg-token-chart i { width: min(14px, 75%); min-height: 4px; border-radius: 4px 4px 2px 2px; background: rgba(53,208,186,.72); }
.cfg-token-chart small { color: var(--ink-dim); font-size: 8px; }

/* Livro-caixa de tokens: tabela deliberadamente densa, com rolagem própria só no eixo X. */
.cfg-usage-monitor {
  overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--panel);
}
.cfg-usage-toolbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: radial-gradient(circle at 0 0, rgba(53,208,186,.09), transparent 34%);
}
.cfg-usage-toolbar h3 { margin: 2px 0 0; color: var(--ink); font-size: 14px; }
.cfg-usage-toolbar p { margin: 4px 0 0; color: var(--ink-dim); font-size: 11.5px; line-height: 1.45; }
.cfg-usage-periods {
  flex: none; display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line);
  border-radius: 11px; background: rgba(11,15,20,.28);
}
.cfg-usage-periods button {
  appearance: none; min-width: 43px; min-height: 31px; padding: 5px 9px; border: 0;
  border-radius: 8px; color: var(--ink-dim); background: transparent; font: inherit;
  font-size: 10.5px; font-weight: 720; cursor: pointer;
}
.cfg-usage-periods button:hover, .cfg-usage-periods button.active { color: var(--ink); background: var(--panel-3); }
.cfg-usage-periods button.active { color: var(--accent); }
.cfg-usage-periods button:disabled { opacity: .55; cursor: wait; }
.cfg-usage-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line-soft); }
.cfg-usage-summary > div { min-width: 0; padding: 13px 17px; border-right: 1px solid var(--line-soft); }
.cfg-usage-summary > div:last-child { border-right: 0; }
.cfg-usage-summary strong { display: block; color: var(--ink); font-size: 18px; line-height: 1.2; letter-spacing: -.025em; }
.cfg-usage-summary span { display: block; margin-top: 3px; color: var(--ink-dim); font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
.cfg-usage-summary .ok strong { color: var(--ok); }
.cfg-usage-summary .warn strong { color: var(--warn); }
.cfg-usage-warning {
  margin: 0; padding: 9px 17px; display: flex; align-items: center; gap: 7px;
  color: var(--warn); background: rgba(255,180,84,.07); border-bottom: 1px solid rgba(255,180,84,.18);
  font-size: 10.5px;
}
.cfg-usage-table-wrap { max-height: 430px; overflow: auto; }
.cfg-usage-table { width: 100%; min-width: 1120px; border-collapse: collapse; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.cfg-usage-table th, .cfg-usage-table td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.cfg-usage-table th:first-child, .cfg-usage-table th:nth-child(2), .cfg-usage-table th:nth-child(3),
.cfg-usage-table td:first-child, .cfg-usage-table td:nth-child(2), .cfg-usage-table td:nth-child(3) { text-align: left; }
.cfg-usage-table thead { position: sticky; top: 0; z-index: 1; background: var(--panel); }
.cfg-usage-table thead th { color: var(--ink-dim); font-size: 8.5px; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; }
.cfg-usage-table tbody tr:hover { background: rgba(53,208,186,.025); }
.cfg-usage-table td { color: var(--ink-dim); }
.cfg-usage-table td b { color: var(--ink); font-weight: 680; }
.cfg-usage-table td small { display: block; max-width: 210px; margin-top: 2px; overflow: hidden; color: var(--ink-dim); font-size: 8.5px; text-overflow: ellipsis; }
.cfg-usage-empty { height: 92px; text-align: center !important; white-space: normal !important; }
.cfg-usage-toggle { display: inline-flex; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; font-size: 8.5px; font-weight: 750; }
.cfg-usage-toggle.on { color: var(--ok); border-color: rgba(65,211,155,.28); background: rgba(65,211,155,.07); }
.cfg-usage-toggle.off { color: var(--warn); border-color: rgba(255,180,84,.3); background: rgba(255,180,84,.08); }
.cfg-usage-toggle.manual, .cfg-usage-toggle.unknown { color: var(--ink-dim); }
.cfg-usage-memory { display: flex; align-items: flex-start; gap: 11px; padding: 13px 17px; border-top: 1px solid var(--line-soft); background: rgba(53,208,186,.035); }
.cfg-usage-memory > span { width: 32px; height: 32px; flex: none; display: grid; place-items: center; color: var(--accent); border: 1px solid rgba(53,208,186,.22); border-radius: 9px; background: rgba(53,208,186,.07); }
.cfg-usage-memory b { color: var(--ink); font-size: 11.5px; }
.cfg-usage-memory p { margin: 3px 0 0; color: var(--ink-dim); font-size: 10.5px; line-height: 1.45; }

.cfg-claude-card .cfg-openai-brand { color: #d8b9ff; border-color: rgba(189,135,255,.3); background: rgba(189,135,255,.09); }
.cfg-claude-note { padding: 18px 20px 20px; }
.cfg-claude-note p { max-width: 820px; }

.cfg-saved-accounts {
  padding: 16px 17px 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
}
.cfg-saved-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.cfg-saved-head > div { min-width: 0; }
.cfg-add-account { flex: none; }
.cfg-saved-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.cfg-saved-account {
  min-width: 0; padding: 12px; border: 1px solid var(--line-soft); border-radius: 13px;
  background: rgba(11,15,20,.22);
}
.cfg-saved-account.selected { border-color: rgba(53,208,186,.38); background: rgba(53,208,186,.055); }
.cfg-saved-account-main {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px;
}
.cfg-saved-avatar {
  width: 34px; height: 34px; display: grid; place-items: center; color: var(--accent);
  border: 1px solid rgba(53,208,186,.2); border-radius: 10px; background: rgba(53,208,186,.07);
}
.cfg-saved-avatar .ico { width: 17px; height: 17px; }
.cfg-saved-identity { min-width: 0; display: flex; flex-direction: column; }
.cfg-saved-identity b { color: var(--ink); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-saved-identity small { margin-top: 2px; color: var(--ink-dim); font-size: 9.5px; }
.cfg-saved-usage { margin-top: 10px; }
.cfg-saved-usage > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cfg-saved-usage b { color: var(--ink); font-size: 10.5px; }
.cfg-saved-usage small { color: var(--ink-dim); font-size: 9.5px; }
.cfg-saved-track { height: 5px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: var(--panel-3); }
.cfg-saved-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #62e2cf); }
.cfg-saved-actions { min-height: 30px; display: flex; align-items: flex-end; justify-content: flex-end; margin-top: 10px; }
.cfg-current-account { display: inline-flex; align-items: center; gap: 5px; color: var(--ok); font-size: 10px; font-weight: 700; }

.cfg-oauth-host:empty { display: none; }
.cfg-oauth-flow {
  margin-top: 13px; padding: 14px; border: 1px solid rgba(53,208,186,.28); border-radius: 13px;
  background: linear-gradient(135deg, rgba(53,208,186,.07), rgba(11,15,20,.3));
}
.cfg-oauth-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cfg-oauth-intro { max-width: 720px; }
.cfg-oauth-flow ol { margin: 11px 0 12px; padding-left: 20px; color: var(--ink-dim); font-size: 11px; line-height: 1.5; }
.cfg-oauth-flow li + li { margin-top: 3px; }
.cfg-oauth-flow b { color: var(--ink); }
.cfg-oauth-label { display: block; margin: 11px 0 5px; color: var(--ink-dim); font-size: 10px; font-weight: 700; }
.cfg-oauth-flow input, .cfg-oauth-flow textarea {
  width: 100%; padding: 9px 10px; color: var(--ink); background: rgba(11,15,20,.48);
  border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 11.5px;
}
.cfg-oauth-flow textarea { min-height: 76px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; line-height: 1.4; }
.cfg-oauth-flow input:focus, .cfg-oauth-flow textarea:focus { border-color: var(--accent); outline: 2px solid rgba(53,208,186,.12); }
.cfg-oauth-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.cfg-oauth-status { margin: 7px 0 0; color: var(--ink-dim); font-size: 10px; line-height: 1.4; }
.cfg-oauth-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 11px; }

.cfg-tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cfg-tool-card {
  appearance: none; min-width: 0; min-height: 94px; padding: 15px; border: 1px solid var(--line); border-radius: 15px;
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  color: var(--ink); background: var(--panel); text-align: left; font: inherit; cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s;
}
.cfg-tool-card:hover { border-color: rgba(53,208,186,.4); background: var(--panel-2); transform: translateY(-1px); }
.cfg-tool-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--accent); background: rgba(53,208,186,.08); }
.cfg-tool-copy { min-width: 0; display: flex; flex-direction: column; }
.cfg-tool-copy small { color: var(--ink-dim); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.cfg-tool-copy b { margin-top: 2px; color: var(--ink); font-size: 14px; }
.cfg-tool-copy > span { margin-top: 3px; color: var(--ink-dim); font-size: 11.5px; line-height: 1.4; }
.cfg-tool-arrow { color: var(--ink-dim); }

/* ---------- toast ---------- */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--panel-3); border: 1px solid var(--line); color: var(--ink); padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 550; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 8px; animation: toastin .28s var(--ease); }
.toast.ok .ico { color: var(--ok); } .toast.err { border-color: rgba(255,107,107,.4); } .toast.err .ico { color: var(--danger); }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- responsivo ---------- */
@media (max-width: 1550px) {
  .topbar.panel { gap: 9px; }
  .tab { padding-inline: 10px; }
  .status-stack { gap: 8px; }
  .stat-pill .lbl { display: none; }
}
@media (max-width: 1280px) {
  .topbar.panel { gap: 10px; }
  .tab { padding-inline: 10px; }
  .status-stack { gap: 8px; }
  .stat-pill .lbl { display: none; }
}
@media (max-width: 720px), (max-height: 480px) and (pointer: coarse) {
  .topbar.panel { flex-wrap: wrap; row-gap: 10px; }
  .topbar.panel .tabs { order: 3; width: 100%; justify-content: space-between; }
  .tab { flex: 1; justify-content: center; }
  .status-stack { gap: 8px; }
  .stat-pill .lbl { display: none; }
  .grid, .skeleton-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 11px; }
  .drawer { width: 100%; border-left: none; }
  .review-list { grid-template-columns: 1fr; }
}

/* ---------- WhatsApp client: master-detail vs. tela cheia ---------- */
/* telas estreitas: lista ocupa tudo; a thread cobre por cima com botão voltar */
@media (max-width: 900px) {
  .wc-body { grid-template-columns: 1fr; height: calc(100dvh - 190px); position: relative; }
  .wc-thread {
    position: absolute; inset: 0; z-index: 3;
    transform: translateX(100%); opacity: 0; pointer-events: none;
    transition: transform .3s var(--ease), opacity .2s var(--ease);
  }
  .wa-client.thread-open .wc-thread { transform: none; opacity: 1; pointer-events: auto; }
  .wc-back { display: inline-grid; }
  .wc-ai-lbl { display: none; }  /* no cabeçalho estreito, só o switch */
}
/* telas largas: os dois lados lado a lado, thread sempre visível */
@media (min-width: 901px) {
  .wc-thread { transform: none !important; opacity: 1 !important; pointer-events: auto !important; }
}
/* 4 abas em telas estreitas: aperta padding/gap pra caberem sem estourar */
@media (max-width: 480px) {
  .tab { padding: 8px 8px; gap: 5px; font-size: 12.5px; }
  .tab .tab-txt {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .tab.active .tab-txt {
    position: static; width: auto; height: auto; margin: 0;
    overflow: hidden; clip-path: none; text-overflow: ellipsis;
  }
  .tabs { gap: 1px; }
}
@media (max-width: 380px) {
  .grid, .skeleton-grid { grid-template-columns: 1fr 1fr; }
  /* compositor apertado: mantém os botões, esconde só o texto "Gerar com IA" */
  .wc-composer .btn.gen .lbl { display: none; }
  .wc-composer .btn { padding: 10px 12px; }
}
@media (min-width: 721px) {
  .tab-txt-full { display: inline; }
}
/* ===== Agenda (Google Calendar) ===== */
#view-agenda .view-head, #agendaHost { max-width: 1180px; margin-inline: auto; }
#view-agenda .view-head { margin-bottom: 12px; }
#agendaHost { padding: 0 0 40px; }
.agenda-conn {
  display: grid; grid-template-columns: minmax(230px, 1fr) minmax(230px, auto) auto;
  align-items: center; gap: 10px 14px; padding: 9px 10px; margin-bottom: 14px;
  background: rgba(18,24,32,.64); border: 1px solid var(--line); border-radius: 13px;
}
.agenda-conn:not(.connected) { grid-template-columns: minmax(0, 1fr) auto; padding: 12px; }
.agenda-conn-status { display: flex; align-items: center; gap: 10px; min-width: 0; }
.agenda-state-icon {
  width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; flex: none;
  color: var(--accent); background: rgba(53,208,186,.12); border: 1px solid rgba(53,208,186,.22);
}
.agenda-state-icon .ico { width: 17px; height: 17px; }
.agenda-conn-copy { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.agenda-conn-copy > b, .agenda-conn-title b { color: var(--ink); font-size: 13px; font-weight: 700; }
.agenda-conn-copy > span:not(.agenda-conn-title):not(.agenda-email) { color: var(--ink-dim); font-size: 12.5px; }
.agenda-conn-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.agenda-live {
  display: inline-flex; align-items: center; gap: 5px; height: 19px; padding: 0 7px;
  border-radius: 999px; color: var(--accent); background: rgba(53,208,186,.1);
  font-size: 10px; font-weight: 700; letter-spacing: .015em;
}
.agenda-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(53,208,186,.12); }
.agenda-email { color: var(--ink-dim); font-size: 11.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-aware {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 220px;
  padding: 6px 8px 6px 10px; margin: 0; color: var(--ink);
  background: rgba(11,15,20,.34); border: 1px solid var(--line-soft); border-radius: 12px;
}
.agenda-aware-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.agenda-aware-copy b { color: var(--ink); font-size: 12px; font-weight: 650; }
.agenda-aware-copy span { color: var(--ink-dim); font-size: 10.5px; white-space: nowrap; }
.agenda-conn .toggle { width: 40px; height: 23px; }
.agenda-conn .toggle::after { width: 17px; height: 17px; }
.agenda-conn .toggle[aria-checked="true"]::after { transform: translateX(17px); }
.agenda-conn-actions { display: flex; gap: 8px; justify-self: end; }
.agenda-conn .btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; text-decoration: none; white-space: nowrap; }
.agenda-conn .btn.danger-soft:hover { color: var(--danger); border-color: rgba(255,107,107,.5); }
.agenda-connect-btn { justify-self: end; }
.agenda-workspace {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 340px);
  align-items: start; gap: 16px;
}
.agenda-calendar-pane { min-width: 0; }
.agenda-proposals-pane {
  position: sticky; top: 76px; min-width: 0; height: clamp(420px, calc(100dvh - 220px), 608px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: 15px;
}
.agenda-proposals-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 15px 12px; border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(53,208,186,.08), transparent 62%);
}
.agenda-proposals-head h2 { color: var(--ink); font-size: 15px; font-weight: 700; letter-spacing: -.015em; margin: 1px 0 0; }
.agenda-pane-kicker { display: block; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.agenda-side-head-actions { display: flex; align-items: center; gap: 7px; }
.agenda-side-head-actions .icon-btn { width: 32px; height: 32px; }
.agenda-proposals-count {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 9px; display: inline-grid; place-items: center;
  color: var(--accent); background: rgba(53,208,186,.1); border: 1px solid rgba(53,208,186,.18);
  font-size: 12px; font-weight: 750;
}
.agenda-proposals-list { min-height: 0; padding: 10px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.agenda-emptyline {
  color: var(--ink-dim); font-size: 12.5px; line-height: 1.45; padding: 14px;
  border: 1px dashed var(--line); border-radius: 11px; background: rgba(26,34,45,.35);
}
.agenda-item {
  display: block; padding: 12px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; margin-bottom: 8px; box-shadow: inset 3px 0 0 rgba(53,208,186,.78);
}
.agenda-item:last-child { margin-bottom: 0; }
.agenda-item.prop { border-left-color: var(--line); }
.agenda-main { flex: 1; min-width: 0; }
.agenda-title { display: flex; align-items: flex-start; gap: 7px; font-size: 13.5px; line-height: 1.35; font-weight: 650; color: var(--ink); }
.agenda-title .ico { color: var(--accent); flex: none; }
.agenda-when { color: var(--accent); font-size: 12.5px; font-weight: 650; margin-top: 5px; }
.agenda-sub { color: var(--ink-dim); font-size: 11.5px; line-height: 1.4; margin-top: 3px; }
.agenda-quote {
  color: var(--ink-dim); font-size: 11.5px; line-height: 1.4; font-style: italic;
  margin-top: 8px; border-left: 2px solid var(--line); padding-left: 8px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.agenda-actions { display: flex; flex-direction: row; gap: 7px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.agenda-actions .btn { flex: 1; display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; white-space: nowrap; }
.agenda-day-event {
  appearance: none; width: 100%; min-height: 66px; margin: 0 0 8px; padding: 11px 10px;
  display: grid; grid-template-columns: 58px minmax(0, 1fr) 16px; align-items: center; gap: 10px;
  color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  text-align: left; font: inherit; cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease);
}
.agenda-day-event:last-child { margin-bottom: 0; }
.agenda-day-event:hover, .agenda-day-event:focus-visible { outline: none; border-color: rgba(53,208,186,.5); background: var(--panel-3); }
.agenda-day-event.tim-mari { box-shadow: inset 3px 0 0 var(--accent); }
.agenda-day-time { color: var(--accent); font-size: 12px; font-weight: 700; }
.agenda-day-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.agenda-day-copy b { font-size: 13.5px; overflow-wrap: anywhere; }
.agenda-day-copy small { display: flex; align-items: center; gap: 4px; color: var(--ink-dim); font-size: 11.5px; overflow-wrap: anywhere; }
.agenda-day-copy small .ico { width: 13px; height: 13px; }
.agenda-day-arrow { color: var(--ink-dim); }

.agenda-event-sheet { max-width: 580px; }
.agenda-event-sheet .pj-sheet-head { align-items: flex-start; }
.agenda-event-sheet .pj-sheet-head > div { min-width: 0; }
.agenda-event-sheet .pj-sheet-head h2 { margin-top: 2px; overflow-wrap: anywhere; }
.agenda-event-meta { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.agenda-event-meta-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 10px;
  padding: 12px 13px; border-bottom: 1px solid var(--line-soft);
}
.agenda-event-meta-row:last-child { border-bottom: 0; }
.agenda-event-meta-row > .ico { width: 18px; height: 18px; color: var(--accent); margin-top: 1px; }
.agenda-event-meta-row span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.agenda-event-meta-row b { color: var(--ink); font-size: 12px; }
.agenda-event-meta-row small { color: var(--ink-dim); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.agenda-event-description { margin-top: 12px; padding: 12px 13px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line-soft); }
.agenda-event-description > span, .agenda-event-field > span { display: block; margin-bottom: 6px; color: var(--ink-dim); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.agenda-event-description p { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.agenda-event-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.agenda-event-actions .btn { flex: 1 1 auto; justify-content: center; text-decoration: none; }
.btn.danger-soft { color: var(--danger); }
.btn.danger-soft:hover, .btn.danger-soft.confirming { border-color: rgba(255,107,107,.55); background: rgba(255,107,107,.08); }
.agenda-event-form { display: flex; flex-direction: column; gap: 13px; }
.agenda-event-timegrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(112px, .55fr); gap: 10px; }
.agenda-event-field { min-width: 0; }
.agenda-event-field input, .agenda-event-field textarea {
  width: 100%; color-scheme: dark; padding: 10px 11px; color: var(--ink); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px;
}
.agenda-event-field textarea { resize: vertical; line-height: 1.45; }
.agenda-event-field input:focus, .agenda-event-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(53,208,186,.09); }
.agenda-event-allday { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 600; }
.agenda-event-allday input { width: 17px; height: 17px; accent-color: var(--accent); }
.agenda-event-form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
@media (max-width: 860px) {
  .agenda-conn.connected { grid-template-columns: minmax(0, 1fr) auto; }
  .agenda-conn.connected .agenda-aware { grid-column: 1 / -1; grid-row: 2; }
  .agenda-conn.connected .agenda-conn-actions { grid-column: 2; grid-row: 1; }
}
@media (max-width: 900px) {
  .agenda-workspace { grid-template-columns: 1fr; }
  .agenda-proposals-pane { position: static; height: auto; }
  .agenda-proposals-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; overflow: visible; }
  .agenda-item { margin-bottom: 0; }
}
@media (max-width: 560px) {
  .agenda-conn, .agenda-conn:not(.connected) { grid-template-columns: 1fr; align-items: stretch; gap: 12px; padding: 14px; }
  .agenda-conn.connected .agenda-aware, .agenda-conn.connected .agenda-conn-actions { grid-column: 1; grid-row: auto; }
  .agenda-conn-actions { display: grid; grid-template-columns: 1fr 1fr; justify-self: stretch; }
  .agenda-conn-actions .btn, .agenda-connect-btn { width: 100%; }
  .agenda-connect-btn { justify-self: stretch; }
  .agenda-email { white-space: normal; overflow-wrap: anywhere; }
  .agenda-proposals-list { grid-template-columns: 1fr; }
  .agenda-actions .btn { justify-content: center; }
  .agenda-event-timegrid { grid-template-columns: minmax(0, 1fr) 96px; }
  .agenda-event-actions, .agenda-event-form-actions { display: grid; grid-template-columns: 1fr; }
  .agenda-event-actions .danger-soft { grid-row: 3; }
}

/* ===== Calendário (grade de mês) ===== */
.cal { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.cal-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
/* Sem `capitalize`: em português o mês vem "julho de 2026", e capitalizar PALAVRA por palavra
   escrevia "Julho De 2026". Quem põe a maiúscula só na primeira letra é o JS (renderCalendar). */
.cal-title { font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; flex: 1; text-align: center; }
.cal-head .icon-btn { flex: none; }
.cal-head #calToday { flex: none; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--panel-2, rgba(255,255,255,.02)); border-bottom: 1px solid var(--line); }
.cal-wd { text-align: center; padding: 8px 0; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-dim); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell {
  appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; min-height: 78px;
  margin: 0; padding: 6px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--cal-cell-bg); color: var(--ink); font: inherit; text-align: left;
  cursor: pointer; transition: background .15s var(--ease), box-shadow .15s var(--ease);
  display: flex; flex-direction: column; gap: 4px; overflow: hidden;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--cal-cell-hover); }
.cal-cell:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.cal-cell.out { background: var(--cal-cell-out); }
.cal-cell.out .cal-daynum { color: var(--cal-day-out); }
.cal-cell.out:hover { background: var(--cal-cell-hover); }
.cal-cell.sel { background: var(--cal-cell-selected); box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-daynum { font-size: 13px; font-weight: 600; color: var(--ink); width: 26px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.cal-cell.today .cal-daynum { background: var(--accent); color: var(--accent-ink); }
.cal-evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-ev { font-size: 11.5px; line-height: 1.3; padding: 2px 6px; border-radius: 6px; background: rgba(53,208,186,.14); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 2px solid var(--accent); }
.cal-ev.tim-mari { background: rgba(53,208,186,.9); color: var(--accent-ink); border-left-color: var(--accent-ink); font-weight: 600; }
.cal-ev.allday { background: rgba(255,180,84,.18); border-left-color: var(--warn); }
.cal-ev .t { font-weight: 600; opacity: .8; }
.cal-more { font-size: 10.5px; color: var(--ink-dim); padding: 0 6px; }
.cal-detail { min-height: 46px; border-top: 1px solid var(--line); padding: 12px 14px; }
.cal-detail-hint, .cal-detail-empty { color: var(--ink-dim); font-size: 13.5px; }
.cal-detail-head { font-size: 14px; font-weight: 650; color: var(--ink); text-transform: capitalize; margin-bottom: 10px; }
.cal-detail-row { display: flex; gap: 12px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); }
.cal-detail-row:first-of-type { border-top: none; }
.cal-detail-time { flex: none; width: 62px; font-size: 13px; font-weight: 600; color: var(--accent); }
.cal-detail-title { font-size: 14px; color: var(--ink); }
@media (min-width: 901px) and (max-height: 760px) {
  .cal-head { padding-block: 10px; }
  .cal-wd { padding-block: 6px; }
  .cal-cell { min-height: 64px; }
  .cal-detail { min-height: 40px; padding-block: 9px; }
}
@media (max-width: 560px) {
  .cal-cell { min-height: 62px; padding: 4px; }
  .cal-daynum { font-size: 12px; width: 22px; height: 20px; }
  .cal-ev { font-size: 0; padding: 3px; border-left-width: 0; height: 6px; border-radius: 3px; }
  .cal-ev .t { display: none; }
  .cal-more { font-size: 9px; }
}

/* ===== Monitor (sinais do WhatsApp) ===== */
#monHost, .mon-filters { max-width: 760px; margin-left: auto; margin-right: auto; }
.mon-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 2px 16px; }
.mon-list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 40px; }
.mon-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; border-left: 3px solid var(--ink-dim); }
.mon-item .mon-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.05); color: var(--ink-dim); }
.mon-item .mon-ico .ico { width: 18px; height: 18px; }
.mon-body { min-width: 0; flex: 1; }
.mon-sum { font-size: 14px; color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }
.mon-meta { font-size: 12px; color: var(--ink-dim); margin-top: 3px; }
/* cor por tipo */
.mon-item.k-deleted { border-left-color: var(--danger); } .mon-item.k-deleted .mon-ico { color: var(--danger); background: rgba(255,107,107,.12); }
.mon-item.k-receipt { border-left-color: var(--accent); } .mon-item.k-receipt .mon-ico { color: var(--accent); background: rgba(53,208,186,.12); }
.mon-item.k-reaction { border-left-color: var(--warn); } .mon-item.k-reaction .mon-ico { color: var(--warn); background: rgba(255,180,84,.14); }
.mon-item.k-call { border-left-color: var(--wa); } .mon-item.k-call .mon-ico { color: var(--wa); background: rgba(37,211,102,.12); }
.mon-item.k-edited .mon-ico { color: var(--warn); }
.mon-item.k-profile_pic .mon-ico, .mon-item.k-profile_status .mon-ico, .mon-item.k-profile_name .mon-ico { color: var(--accent); }

/* ==========================================================================
   MOBILE-FIRST — shell e componentes próprios para operação por toque.
   Tudo abaixo fica restrito a <= 720px; o desktop mantém a composição original.
   ========================================================================== */
.mobile-only { display: none !important; }
.wc-item-ai-text { display: none; }
.mon-chip-rail { display: contents; }
.cal-mobile-list { display: none; }
.cal-list-row { appearance: none; width: 100%; color: var(--ink); background: transparent; border: 0; text-align: left; font: inherit; cursor: pointer; }
.cfg-doc-toggle { display: none; }

@media (max-width: 720px), (max-height: 480px) and (pointer: coarse) {
  :root {
    --mobile-header-h: calc(54px + env(safe-area-inset-top));
    --mobile-nav-h: calc(68px + env(safe-area-inset-bottom));
  }

  html { min-width: 0; height: auto; min-height: 100%; overflow-x: hidden; }
  body { min-width: 0; }
  .app-body {
    height: auto; min-height: 100dvh;
    padding-bottom: var(--mobile-nav-h);
    overflow-x: hidden;
  }
  .mobile-only { display: revert !important; }
  .mobile-only[hidden], .mobile-channel-shell[hidden], .mobile-view[hidden] { display: none !important; }
  .desktop-only { display: none !important; }

  /* Cabeçalho curto: identidade + saúde do sistema. A navegação vai para baixo. */
  .topbar.panel {
    position: sticky; top: 0; z-index: 42;
    width: 100%; min-height: var(--mobile-header-h); height: var(--mobile-header-h);
    padding: calc(7px + env(safe-area-inset-top)) 14px 7px;
    flex-wrap: nowrap; row-gap: 0; background: rgba(18,24,32,.96);
    backdrop-filter: saturate(140%) blur(18px);
  }
  .topbar.panel .tabs, .topbar.panel .status-stack, .topbar.panel > .spacer { display: none; }
  .topbar.panel .brand { flex: 1; }
  .topbar.panel .brand b { font-size: 20px; }
  .topbar.panel .brand .tag { font-size: 11px; }
  .mobile-top-status {
    appearance: none; width: 44px; height: 44px; border: 0; border-radius: 13px;
    display: inline-flex !important; align-items: center; justify-content: center; gap: 6px;
    color: var(--ink-dim); background: var(--panel-2);
  }
  .mobile-top-status .ico { width: 16px; height: 16px; }
  .mobile-status-dots { display: flex; gap: 3px; }
  .mobile-status-dots i, .home-connections button > i {
    width: 6px; height: 6px; border-radius: 50%; background: var(--ink-dim); flex: none;
  }
  .mobile-status-dots i.on, .home-connections button > i.on { background: var(--ok); }
  .mobile-status-dots i.warn, .home-connections button > i.warn { background: var(--warn); }
  .mobile-status-dots i.off, .home-connections button > i.off { background: var(--danger); }

  /* Navegação contextual: mantém os três canais claros sem disputar o menu global. */
  .mobile-channel-shell {
    position: sticky; top: var(--mobile-header-h); z-index: 34;
    padding: 10px 14px 11px; border-bottom: 1px solid var(--line-soft);
    background: rgba(11,15,20,.96); backdrop-filter: saturate(140%) blur(18px);
  }
  .mobile-channel-title { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; }
  .mobile-channel-title > span { font-size: 18px; font-weight: 760; letter-spacing: -.025em; }
  .mobile-channel-title small { min-width: 0; color: var(--ink-dim); font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .mobile-channel-nav {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
    padding: 3px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel);
  }
  .mobile-channel-nav button {
    appearance: none; min-width: 0; min-height: 44px; border: 0; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: transparent; color: var(--ink-dim); font: inherit; font-size: 12px; font-weight: 650;
  }
  .mobile-channel-nav button.active { color: var(--ink); background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line); }
  .mobile-channel-nav button[data-tab="pessoas"].active .ico { color: var(--love); }
  .mobile-channel-nav button[data-tab="whatsapp"].active .ico { color: var(--wa); }
  .mobile-channel-nav button[data-tab="instagram"].active .ico { color: var(--ig); }

  /* Navegação global inferior — cinco destinos estáveis e alcançáveis com o polegar. */
  .mobile-bottom-nav {
    position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
    height: var(--mobile-nav-h); padding: 5px 5px calc(5px + env(safe-area-inset-bottom));
    display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr));
    background: rgba(18,24,32,.97); border-top: 1px solid var(--line);
    backdrop-filter: saturate(150%) blur(20px);
  }
  .mobile-bottom-nav button {
    appearance: none; border: 0; min-width: 0; min-height: 56px; border-radius: 12px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    background: transparent; color: var(--ink-dim); font: inherit; font-size: 10.5px; font-weight: 650;
  }
  .mobile-bottom-nav button .ico { width: 21px; height: 21px; }
  .mobile-bottom-nav button.active { color: var(--accent); background: rgba(53,208,186,.08); }
  .mobile-nav-icon { position: relative; display: inline-grid; place-items: center; }
  .mobile-nav-icon i {
    position: absolute; top: -7px; right: -12px; min-width: 17px; height: 17px; padding: 0 4px;
    display: grid; place-items: center; border: 2px solid var(--panel); border-radius: 9px;
    background: var(--love); color: #fff; font-size: 9px; font-style: normal; font-weight: 800;
  }
  .mobile-nav-icon i[hidden] { display: none; }
  .mobile-keyboard-open .mobile-bottom-nav { display: none !important; }
  .mobile-keyboard-open .app-body { padding-bottom: 0; }

  /* Conteúdo e títulos */
  .view { width: 100%; min-width: 0; padding: 14px; padding-bottom: 28px; }
  .view-head { display: block; margin-bottom: 14px; }
  .view-head h1 { font-size: 24px; letter-spacing: -.03em; }
  .view-head .sub { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; }
  .mobile-page-head { margin: 2px 0 18px; }
  .mobile-page-head .mobile-kicker, .mobile-kicker {
    color: var(--accent); font-size: 10px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase;
  }
  .mobile-page-head h1 { margin: 2px 0 0; font-size: 30px; line-height: 1.12; letter-spacing: -.04em; }
  .mobile-page-head p { margin: 5px 0 0; color: var(--ink-dim); font-size: 14px; }

  /* Busca primária */
  .mobile-search {
    width: 100%; min-height: 46px; display: flex !important; align-items: center; gap: 9px;
    padding: 0 13px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 13px;
    background: var(--panel); color: var(--ink-dim);
  }
  .mobile-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(53,208,186,.1); }
  .mobile-search input {
    width: 100%; min-width: 0; height: 44px; padding: 0; border: 0; outline: 0;
    background: transparent; color: var(--ink); font: inherit; font-size: 16px;
  }
  .mobile-search input::placeholder { color: var(--ink-dim); }

  /* Tela Hoje */
  .home-stack { display: flex; flex-direction: column; gap: 14px; }
  .home-priority-card {
    padding: 17px; border: 1px solid rgba(53,208,186,.26); border-radius: 18px;
    background: linear-gradient(145deg, rgba(53,208,186,.14), rgba(18,24,32,.92) 58%);
  }
  .home-card-kicker { color: var(--accent); font-size: 11px; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; }
  .home-priority-card h2 { margin: 5px 0 16px; font-size: 20px; line-height: 1.25; letter-spacing: -.025em; }
  .home-priority-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .home-action {
    appearance: none; min-width: 0; min-height: 72px; border: 1px solid var(--line); border-radius: 14px;
    padding: 10px; display: flex; align-items: center; gap: 9px; text-align: left;
    background: var(--panel-2); color: var(--ink); font: inherit;
  }
  .home-action.primary { border-color: rgba(53,208,186,.3); }
  .home-action > .ico { color: var(--accent); }
  .home-action span { min-width: 0; display: flex; flex-direction: column; }
  .home-action b { font-size: 13px; }
  .home-action small { color: var(--ink-dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .home-section { padding: 4px 0; }
  .home-section-head { display: flex; align-items: center; justify-content: space-between; margin: 0 3px 8px; }
  .home-section-head h2 { margin: 0; font-size: 16px; }
  .home-section-head button { min-height: 44px; border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 13px; }
  .home-connections { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
  .home-connections button {
    appearance: none; width: 100%; min-height: 64px; padding: 9px 13px; border: 0; border-bottom: 1px solid var(--line-soft);
    display: grid; grid-template-columns: 6px 22px minmax(0, 1fr) 14px; align-items: center; gap: 10px;
    color: var(--ink); background: transparent; text-align: left; font: inherit;
  }
  .home-connections button:last-child { border-bottom: 0; }
  .home-connections button > span { display: flex; flex-direction: column; min-width: 0; }
  .home-connections b { font-size: 14px; }
  .home-connections small { color: var(--ink-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .home-connections button > .ico:last-child { color: var(--ink-dim); }
  .home-projects {
    min-height: 78px; padding: 13px; border: 1px dashed var(--line); border-radius: 16px;
    display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 11px; background: rgba(18,24,32,.5);
  }
  .home-project-icon, .mobile-more-ico {
    width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
    color: var(--accent); background: var(--panel-2); border: 1px solid var(--line);
  }
  .home-projects > span:nth-child(2) { display: flex; flex-direction: column; }
  .home-projects b { font-size: 14px; }
  .home-projects small { color: var(--ink-dim); font-size: 12px; line-height: 1.35; }
  .mobile-soon {
    color: var(--ink-dim); background: var(--panel-3); border-radius: 999px;
    padding: 4px 7px; font-size: 9px; font-weight: 700; white-space: nowrap;
  }
  .home-loading { min-height: 180px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--ink-dim); font-size: 13px; }

  /* Tinder: busca + filtros em trilho, lista como padrão móvel. */
  #view-pessoas { padding-top: 12px; }
  .filters {
    width: calc(100% + 28px); margin: 0 -14px 12px; padding: 0 14px 6px;
    flex-wrap: nowrap; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: none; scroll-snap-type: x proximity;
  }
  .filters::-webkit-scrollbar, .mon-chip-rail::-webkit-scrollbar { display: none; }
  .chip { min-height: 44px; padding: 9px 13px; flex: none; scroll-snap-align: start; }
  .view-switch { flex: none; margin-left: 0; padding: 3px; }
  .vsw { width: 44px; height: 44px; }
  .people-list { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
  .people-list .wc-item { border-radius: 0; border: 0; border-bottom: 1px solid var(--line-soft); }
  .people-list .wc-item:last-child { border-bottom: 0; }
  .grid, .skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { min-height: 220px; }

  /* Alvos de toque — o glifo pode ser menor, mas a região interativa não. */
  .btn, .btn.small, .icon-btn, .gallery .nav, .wc-au-btn, .seg button,
  .wc-mode-pill, .wc-mode-opt, .cfg-full-toggle, .agenda-conn-disclosure {
    min-height: 44px;
  }
  .icon-btn, .gallery .nav, .wc-au-btn { width: 44px; height: 44px; }
  .toggle, .toggle.sm, .agenda-conn .toggle {
    width: 50px; height: 44px; min-width: 50px; min-height: 44px;
    background: transparent; box-shadow: none;
  }
  .toggle::before, .toggle.sm::before {
    content: ""; position: absolute; inset: 8px 2px; border-radius: 999px;
    background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line);
    transition: background .22s var(--ease), box-shadow .22s var(--ease);
  }
  .toggle[aria-checked="true"]::before { background: var(--accent); box-shadow: none; }
  .toggle::after, .toggle.sm::after {
    top: 11px; left: 5px; width: 22px; height: 22px; background: var(--ink-dim);
  }
  .agenda-conn .toggle::after { top: 11px; left: 5px; width: 22px; height: 22px; }
  .toggle[aria-checked="true"]::after, .toggle.sm[aria-checked="true"]::after {
    transform: translateX(18px); background: var(--accent-ink);
  }
  .agenda-conn .toggle[aria-checked="true"]::after { transform: translateX(18px); }
  button:focus-visible, [role="button"]:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
  }

  /* WhatsApp/Instagram: ações preservadas, busca primária e thread em tela cheia. */
  #view-whatsapp, #view-instagram { padding: 10px 14px 0; }
  #view-whatsapp:not([hidden]), #view-instagram:not([hidden]) {
    height: calc(100dvh - var(--mobile-header-h) - var(--mobile-nav-h) - 108px);
    max-height: calc(100dvh - var(--mobile-header-h) - var(--mobile-nav-h) - 108px);
    min-height: 0; flex: none;
    display: flex; flex-direction: column; overflow: hidden;
  }
  #view-whatsapp .wa-client, #view-instagram .wa-client {
    flex: none; min-height: 0;
    height: calc(100dvh - var(--mobile-header-h) - var(--mobile-nav-h) - 118px);
    max-height: calc(100dvh - var(--mobile-header-h) - var(--mobile-nav-h) - 118px);
    display: flex; flex-direction: column; overflow: hidden;
  }
  .wa-client-head {
    min-height: 52px; margin-bottom: 10px; align-items: center; gap: 8px;
  }
  .wa-client-head .wc-id { flex: 1; min-width: 0; }
  .wa-client-head .wc-txt b { font-size: 13px; }
  .wa-client-head .wc-txt span { font-size: 11.5px; }
  .wa-client-head > .btn { flex: none; max-width: 48%; padding-inline: 10px; font-size: 11.5px; }
  .ig-head { align-items: stretch; flex-wrap: wrap; }
  .ig-head .wc-id { min-height: 44px; }
  .ig-head-btns { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .ig-head-btns .btn { min-width: 0; padding-inline: 8px; font-size: 11px; }
  .wc-body { flex: 1; height: auto; min-height: 0; gap: 0; }
  .wc-list { border-radius: 15px; }
  .wc-list-head { min-height: 44px; padding: 10px 13px; }
  .wc-search { margin: 8px 8px 2px; width: calc(100% - 16px); flex: none; }
  .wc-list-scroll { padding: 5px; }
  .wc-item { min-height: 68px; padding: 8px; gap: 9px; }
  .wc-item-ai-wrap {
    min-width: 50px; min-height: 48px; justify-content: center; padding-left: 3px;
    border-left: 1px solid var(--line-soft);
  }
  .wc-item-ai-lbl { display: flex; align-items: center; gap: 3px; font-size: 9px; }
  .wc-item-ai-text { display: inline; font-weight: 700; }
  .wc-av { width: 44px; height: 44px; }
  .wc-when, .wc-handle { font-size: 10.5px; }
  .wc-mode-tag, .wc-tag { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .wa-client.thread-open .wc-thread {
    position: fixed; z-index: 46; left: 0; right: 0; top: var(--mobile-header-h); bottom: var(--mobile-nav-h);
    width: 100%; height: auto; border: 0; border-radius: 0; transform: none; opacity: 1; pointer-events: auto;
  }
  .mobile-keyboard-open .wa-client.thread-open .wc-thread {
    bottom: auto; height: calc(var(--mobile-vh, 100dvh) - var(--mobile-header-h));
  }
  .wc-thread-head {
    min-height: 64px; padding: 9px 10px; gap: 8px;
    display: grid; grid-template-columns: 44px minmax(72px, 1fr) auto 48px; align-items: center;
  }
  .wc-thread-head .wc-back { display: inline-grid; grid-column: 1; }
  .wc-thread-head .wc-av-head { display: none; }
  .wc-head-id { grid-column: 2; }
  .wc-head-nm { font-size: 14px; }
  .wc-mode { grid-column: 3; }
  .wc-mode-pill { max-width: 104px; padding: 6px 8px; }
  .wc-mode-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wc-ai-toggle { grid-column: 4; min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
  .wc-ai-toggle::before { content: "IA"; color: var(--ink-dim); font-size: 9px; font-weight: 700; line-height: 1; }
  .wc-ai-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .wc-msgs { padding: 12px 11px; }
  .bubble { max-width: 86%; font-size: 15px; }

  .wc-composer {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }
  .wc-composer .draft {
    width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; font-size: 16px;
  }
  .wc-comp-actions { gap: 6px; }
  .wc-composer .btn {
    position: relative; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 12px;
  }
  .wc-composer .btn .lbl {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }

  /* Agenda: conexão recolhível, calendário legível e alternativa em lista. */
  #view-agenda { padding-top: 13px; }
  #view-agenda .view-head { margin-bottom: 10px; }
  #agendaHost { padding-bottom: 10px; }
  .agenda-conn, .agenda-conn:not(.connected) {
    grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; padding: 10px;
  }
  .agenda-conn.mobile-collapsed { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .agenda-conn.mobile-collapsed .agenda-email,
  .agenda-conn.mobile-collapsed .agenda-aware,
  .agenda-conn.mobile-collapsed .agenda-conn-actions { display: none; }
  .agenda-conn.mobile-expanded { grid-template-columns: 1fr; }
  .agenda-conn-disclosure {
    appearance: none; border: 1px solid var(--line-soft); border-radius: 11px; padding: 0 10px;
    display: inline-flex !important; align-items: center; justify-content: space-between; gap: 6px;
    color: var(--ink-dim); background: rgba(11,15,20,.3); font: inherit; font-size: 11px; font-weight: 650;
  }
  .agenda-conn.mobile-collapsed .agenda-conn-disclosure { min-width: 116px; }
  .agenda-conn.mobile-expanded .agenda-conn-disclosure .ico { transform: rotate(90deg); }
  .agenda-aware { min-width: 0; min-height: 52px; }
  .agenda-conn-actions { grid-template-columns: 1fr 1fr; }
  .agenda-conn .btn, .agenda-actions .btn { min-height: 44px; }
  .agenda-workspace { gap: 12px; }
  .cal-head {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px 58px; gap: 6px;
    padding: 9px;
  }
  .cal-title { min-width: 0; font-size: 16px; }
  .cal-head #calToday { min-width: 0; padding-inline: 8px; }
  .cal-head #calMode { grid-column: 1 / -1; width: 100%; }
  .cal-wd { padding: 7px 0; font-size: 10px; }
  .cal-cell {
    min-width: 0; min-height: 64px; padding: 4px;
    border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  }
  .cal-daynum { font-size: 12px; width: 22px; height: 22px; }
  .cal-evs { gap: 2px; width: 100%; }
  .cal-ev {
    width: 100%; height: auto; min-height: 13px; padding: 1px 3px; border-left-width: 2px;
    border-radius: 4px; font-size: 9px; line-height: 1.2; text-overflow: ellipsis;
  }
  .cal-ev .t { display: none; }
  .cal-more { padding: 0 2px; }
  .cal-detail { min-height: 58px; padding: 11px; }
  .cal-detail-row { align-items: flex-start; padding: 9px 0; }
  .cal-detail-time { width: 58px; }
  .cal-mobile-list { padding: 5px 10px 10px; }
  .cal.mobile-list-mode .cal-weekdays,
  .cal.mobile-list-mode .cal-grid,
  .cal.mobile-list-mode .cal-detail { display: none; }
  .cal.mobile-list-mode .cal-mobile-list { display: block; }
  .cal-list-row {
    min-height: 64px; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px;
    align-items: center; padding: 9px 3px; border-bottom: 1px solid var(--line-soft);
  }
  .cal-list-row:last-child { border-bottom: 0; }
  .cal-list-date, .cal-list-copy { display: flex; flex-direction: column; min-width: 0; }
  .cal-list-date b { color: var(--accent); font-size: 13px; text-transform: capitalize; }
  .cal-list-date span, .cal-list-copy span { color: var(--ink-dim); font-size: 11.5px; }
  .cal-list-copy b { font-size: 14px; }
  .cal-list-copy span { display: flex; align-items: center; gap: 4px; margin-top: 3px; }
  .cal-list-empty { padding: 24px 10px; color: var(--ink-dim); text-align: center; font-size: 13px; }
  .agenda-proposals-pane { border-radius: 15px; }
  .agenda-proposals-head { min-height: 62px; }
  .agenda-proposals-list { padding: 9px; }
  .agenda-item { padding: 13px; }
  .agenda-title { font-size: 14px; }
  .agenda-quote { -webkit-line-clamp: 3; font-size: 12px; }
  .btn.confirming { color: var(--danger); border-color: rgba(255,107,107,.55); background: rgba(255,107,107,.08); }

  /* Atividade: busca, filtros em uma linha e eventos técnicos somente sob demanda. */
  #view-monitor { padding-top: 13px; }
  .mon-filters { display: block; padding: 0 0 12px; }
  .mon-search { margin-bottom: 9px; }
  .mon-chip-rail {
    width: calc(100% + 28px); margin: 0 -14px; padding: 0 14px 5px;
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
  }
  .mon-list { gap: 7px; padding-bottom: 8px; }
  .mon-item { min-height: 68px; padding: 11px; border-radius: 13px; }
  .mon-group-count {
    display: inline-flex; margin-left: 4px; padding: 1px 6px; border-radius: 999px;
    color: var(--accent); background: rgba(53,208,186,.1); font-size: 10px; font-weight: 750;
  }

  /* Diário: eventos compreensíveis e agrupados por data. */
  #view-diario { padding-top: 13px; }
  .diary-view-filter {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
    margin-bottom: 15px; padding: 3px; border: 1px solid var(--line);
    border-radius: 13px; background: var(--panel);
  }
  .diary-view-filter button {
    appearance: none; min-height: 44px; border: 0; border-radius: 10px;
    background: transparent; color: var(--ink-dim); font: inherit; font-size: 12px; font-weight: 700;
  }
  .diary-view-filter button.active { color: var(--ink); background: var(--panel-3); }
  .timeline { padding-left: 30px; }
  .timeline-day {
    margin: 10px 0 12px -30px; color: var(--ink-dim); font-size: 11px; font-weight: 720;
    letter-spacing: .06em; text-transform: uppercase;
  }
  .tl-item { min-height: 64px; padding: 5px 0 17px; }
  .tl-item .marker { width: 22px; height: 22px; left: -30px; }
  .tl-item .marker .ico { width: 12px; height: 12px; }
  .tl-item .when { font-size: 11.5px; }
  .tl-item .what { margin-top: 4px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
  .diary-group-count {
    display: inline-flex; padding: 1px 6px; border-radius: 999px;
    color: var(--accent); background: rgba(53,208,186,.1); font-size: 10px; font-weight: 800;
  }

  /* Configurações: cartões compactos; documento abre no fluxo, sem rolagem aninhada. */
  #view-config { padding-top: 13px; }
  .cfg-intro { display: none; }
  .cfg-list { gap: 11px; }
  .cfg-card { border-radius: 15px; }
  .cfg-head { min-height: 68px; padding: 11px 13px; }
  .cfg-ico { width: 42px; height: 42px; }
  .cfg-label { font-size: 15px; }
  .cfg-sub { font-size: 12px; }
  .cfg-read-meta { padding: 11px 13px; border-bottom: 1px solid var(--line-soft); }
  .cfg-pill { font-size: 11px; }
  .cfg-count { font-size: 12px; }
  .cfg-doc-toggle {
    appearance: none; width: 100%; min-height: 48px; padding: 0 14px; border: 0;
    display: flex; align-items: center; gap: 8px; text-align: left;
    color: var(--ink); background: transparent; font: inherit; font-size: 13px; font-weight: 650;
  }
  .cfg-doc-toggle span { flex: 1; }
  .cfg-doc-toggle .chev { color: var(--ink-dim); transition: transform .18s var(--ease); }
  .cfg-doc-toggle[aria-expanded="true"] .chev { transform: rotate(90deg); }
  .cfg-md { max-width: none; max-height: none; overflow: visible; padding: 6px 15px 20px; font-size: 15.5px; line-height: 1.65; }
  .cfg-md[hidden] { display: none; }
  .cfg-md h1 { font-size: 22px; }
  .cfg-md h2 { font-size: 19px; }
  .cfg-md h3 { font-size: 17px; }
  .cfg-full-toggle { padding: 11px 14px; }
  .cfg-full-lbl b { font-size: 13.5px; }
  .cfg-full-lbl small { font-size: 12px; line-height: 1.35; }
  .cfg-dashboard { gap: 25px; }
  .cfg-section-head { align-items: flex-start; gap: 10px; margin-bottom: 11px; }
  .cfg-section-head h2 { font-size: 17px; }
  .cfg-section-head p { font-size: 12px; }
  .cfg-refresh { min-width: 44px; min-height: 44px; padding-inline: 11px; }
  .cfg-provider-picker { grid-template-columns: 1fr; gap: 12px; padding: 13px; }
  .cfg-provider-options { grid-template-columns: 1fr; }
  .cfg-provider-option { min-height: 62px; }
  .cfg-openai-card { border-radius: 16px; }
  .cfg-openai-head {
    display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 11px;
    padding: 14px;
  }
  .cfg-openai-brand { width: 46px; height: 46px; border-radius: 13px; }
  .cfg-openai-identity h2, .cfg-openai-head h2 { font-size: 16px; }
  .cfg-openai-identity p, .cfg-openai-head p { font-size: 11.5px; line-height: 1.4; }
  .cfg-openai-badges { grid-column: 1 / -1; justify-content: flex-start; }
  .cfg-status { min-height: 28px; }
  .cfg-account-facts { grid-template-columns: 1fr 1fr; }
  .cfg-account-facts > div { min-height: 66px; padding: 11px 12px; }
  .cfg-account-facts > div:nth-child(2) { border-right: 0; }
  .cfg-account-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .cfg-account-facts strong { white-space: normal; overflow-wrap: anywhere; }
  .cfg-openai-body { grid-template-columns: 1fr; }
  .cfg-account-block { padding: 15px 13px 16px; }
  .cfg-account-block + .cfg-account-block { border-left: 0; border-top: 1px solid var(--line-soft); }
  .cfg-rate-window { padding: 12px; }
  .cfg-rate-track { height: 8px; }
  .cfg-token-stats { gap: 7px; }
  .cfg-token-stats > div { min-height: 68px; padding: 10px; }
  .cfg-token-chart { height: 84px; overflow: hidden; gap: 3px; }
  .cfg-token-chart small { font-size: 7.5px; }
  .cfg-usage-monitor { border-radius: 15px; }
  .cfg-usage-toolbar { align-items: flex-start; flex-direction: column; padding: 13px; gap: 11px; }
  .cfg-usage-periods { width: 100%; }
  .cfg-usage-periods button { flex: 1; min-height: 38px; }
  .cfg-usage-summary { grid-template-columns: 1fr 1fr; }
  .cfg-usage-summary > div { min-height: 64px; padding: 11px 12px; }
  .cfg-usage-summary > div:nth-child(2) { border-right: 0; }
  .cfg-usage-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .cfg-usage-table-wrap { max-height: 360px; }
  .cfg-usage-memory { padding: 12px 13px; }
  .cfg-claude-note { padding: 15px 13px 16px; }
  .cfg-saved-accounts { padding: 14px 13px; }
  .cfg-saved-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .cfg-add-account { width: 100%; min-height: 42px; justify-content: center; }
  .cfg-saved-list { grid-template-columns: 1fr; }
  .cfg-saved-usage > span { align-items: flex-start; flex-direction: column; gap: 2px; }
  .cfg-saved-track { height: 7px; }
  .cfg-oauth-flow { padding: 13px; }
  .cfg-oauth-actions { align-items: stretch; flex-direction: column; }
  .cfg-oauth-actions .btn { min-height: 44px; justify-content: center; }
  .cfg-oauth-link { min-height: 44px; justify-content: center; width: 100%; }
  .cfg-tools-grid { grid-template-columns: 1fr; gap: 8px; }
  .cfg-tool-card { min-height: 86px; padding: 12px; border-radius: 14px; }

  /* Mais: todas as funções secundárias continuam visíveis no celular. */
  .mobile-more-list { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); }
  .mobile-more-row {
    appearance: none; width: 100%; min-height: 72px; padding: 10px 13px; border: 0; border-bottom: 1px solid var(--line-soft);
    display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 11px;
    color: var(--ink); background: transparent; text-align: left; font: inherit;
  }
  .mobile-more-row:last-child { border-bottom: 0; }
  .mobile-more-row > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
  .mobile-more-row b { font-size: 14px; }
  .mobile-more-row small { color: var(--ink-dim); font-size: 12px; margin-top: 2px; }
  .mobile-more-row .chev { color: var(--ink-dim); }
  .mobile-more-row.future { opacity: .72; }
  .mobile-more-row.danger .mobile-more-ico, .mobile-more-row.danger b { color: var(--danger); }

  .drawer { top: 0; bottom: 0; width: 100%; border-left: 0; }
  .drawer-head { padding-top: calc(10px + env(safe-area-inset-top)); }
  .drawer-head .objective-trigger { width: 44px; height: 44px; padding: 0; border-radius: 12px; }
  .drawer-head .objective-trigger span { display: none; }
  .drawer .controls { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(var(--mobile-nav-h) + 10px); width: calc(100% - 28px); }
  .toast { max-width: 100%; border-radius: 14px; }
  .mobile-keyboard-open .toasts { bottom: 10px; }
}

/* ===== Agenda: remarcar + vencidas ===== */
.agenda-vencido { color: var(--danger); font-weight: 600; }
.agenda-item.expired { opacity: .82; }
.agenda-resched { margin-top: 10px; padding: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px; }
.resched-lbl { font-size: 12px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .04em; }
.resched-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.resched-days .chip { padding: 6px 10px; font-size: 12.5px; }
.resched-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.resched-time { width: 78px; text-align: center; padding: 8px 10px; font-size: 15px; font-variant-numeric: tabular-nums; }
.resched-time.err { border-color: var(--danger); }
.agenda-expired { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.agenda-expired-head { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: none; cursor: pointer; color: var(--ink-dim); font-size: 13px; font-weight: 600; padding: 6px 2px; }
.agenda-expired-head .ico { transition: transform .18s var(--ease); }
.agenda-expired-head.open .ico { transform: rotate(90deg); }
.agenda-expired-count { background: rgba(255,255,255,.06); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; color: var(--ink-dim); }
.agenda-expired-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.agenda-expired-list[hidden] { display: none !important; }

/* respeita quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .05ms !important; }
}

/* ================================================================ PROJETOS */
.capture-fab { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--accent); color: var(--accent-ink);
  box-shadow: var(--shadow-lg); cursor: pointer; display: grid; place-items: center; transition: transform .15s var(--ease); }
/* `display:grid` ganha do atributo [hidden]: sem esta linha o botão flutuante de captura
   aparece em TODAS as abas, não só na de Projetos (era assim antes de 24/07/2026). */
.capture-fab[hidden] { display: none; }
.capture-fab:hover { transform: scale(1.06); }
.capture-fab .ico { width: 26px; height: 26px; }
@media (max-width: 860px) { .capture-fab { bottom: calc(var(--mobile-nav-h, 84px) + 12px); } }

.pj { max-width: 1080px; margin: 0 auto; }
.pj-head { display: flex; align-items: flex-end; justify-content: space-between; }
.pj-seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; margin: 4px 0 18px; }
.pj-seg button { border: none; background: transparent; color: var(--ink-dim); font: inherit; font-weight: 600; font-size: 14px; padding: 8px 18px; border-radius: 999px; cursor: pointer; transition: all .15s var(--ease); }
.pj-seg button.active { background: var(--accent); color: var(--accent-ink); }

.pj-block { margin-bottom: 24px; }
.pj-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; width: 100%; background: none; border: none; padding: 0; cursor: default; }
button.pj-block-head { cursor: pointer; }
.pj-block-head h2 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0; letter-spacing: .01em; }
.pj-block-head .chev { transition: transform .2s var(--ease); color: var(--ink-dim); }
.pj-block-head.collapsible:not(.open) .chev { transform: rotate(0deg); }
.pj-block-head.collapsible.open .chev { transform: rotate(90deg); }

.pj-habits { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pj-habits::-webkit-scrollbar { display: none; }
.pj-habit { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; transition: all .15s var(--ease); }
.pj-habit .pj-habit-check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: 0 0 auto; }
.pj-habit.done { background: color-mix(in srgb, var(--ok) 16%, var(--panel-2)); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.pj-habit.done .pj-habit-check { background: var(--ok); border-color: var(--ok); color: #062b1a; }
.pj-habit.off-day { opacity: .55; }
.pj-habit-streak { display: inline-flex; align-items: center; gap: 2px; color: var(--warn); font-weight: 700; }
.pj-habit-streak .ico { width: 14px; height: 14px; }

.pj-today-list { display: flex; flex-direction: column; gap: 8px; }
.pj-today-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; }
.pj-today-item.pj-event-open {
  appearance: none; width: 100%; color: var(--ink); text-align: left; font: inherit; cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.pj-today-item.pj-event-open:hover, .pj-today-item.pj-event-open:focus-visible { outline: none; border-color: rgba(53,208,186,.48); background: var(--panel-2); }
.pj-event-arrow { flex: 0 0 auto !important; color: var(--ink-dim) !important; }
.pj-today-item.past { opacity: .5; }
.pj-today-item.overdue { border-left: 3px solid var(--danger); }
.pj-today-item.next { cursor: default; }
.pj-today-time { flex: 0 0 auto; min-width: 52px; font-size: 13px; font-weight: 700; color: var(--ink-dim); display: inline-flex; align-items: center; gap: 3px; }
.pj-today-item.overdue .pj-today-time, .pj-today-item.rem.overdue .pj-today-time { color: var(--danger); }
.pj-today-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pj-today-body b { font-size: 14px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pj-today-body small { font-size: 12px; color: var(--ink-dim); display: inline-flex; align-items: center; gap: 5px; }
.pj-today-body .ico { width: 13px; height: 13px; }
.pj-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.pj-chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; margin-left: 6px;
  color: var(--pc, var(--accent)); background: color-mix(in srgb, var(--pc, var(--accent)) 15%, transparent); border: 1px solid color-mix(in srgb, var(--pc, var(--accent)) 35%, transparent); }
.pj-check, .pj-mini { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-dim); display: grid; place-items: center; cursor: pointer; transition: all .15s; }
.pj-check:hover { background: var(--ok); border-color: var(--ok); color: #062b1a; }
.pj-mini:hover { color: var(--ink); border-color: var(--line); }
.pj-rem-actions { display: inline-flex; gap: 6px; }

/* tarefas */
.pj-task { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 11px; }
.pj-task.detail { background: transparent; border: none; border-bottom: 1px solid var(--line-soft); border-radius: 0; padding: 11px 4px; }
.pj-task.overdue { border-left: 3px solid var(--danger); }
.pj-check-box { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); background: transparent; cursor: pointer; display: grid; place-items: center; color: transparent; margin-top: 1px; transition: all .15s; }
.pj-check-box:hover { border-color: var(--accent); }
.pj-check-box.on { background: var(--ok); border-color: var(--ok); color: #062b1a; }
.pj-check-box.big { width: 30px; height: 30px; border-radius: 9px; }
.pj-task-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pj-task-body b { font-size: 14px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.pj-task.done .pj-task-body b { text-decoration: line-through; color: var(--ink-dim); }
.pj-task-due { font-size: 12px; color: var(--ink-dim); }
.pj-task.overdue .pj-task-due { color: var(--danger); font-weight: 600; }
.pj-next-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .03em; }
.pj-next-tag .ico { width: 12px; height: 12px; }

/* caixa de entrada + grade de projetos */
.pj-inbox-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: color-mix(in srgb, var(--warn) 10%, var(--panel)); border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line)); border-radius: 12px; margin-bottom: 16px; cursor: pointer; color: var(--ink); text-align: left; }
.pj-inbox-card b { font-size: 14px; } .pj-inbox-card small { display: block; font-size: 12px; color: var(--ink-dim); }
.pj-inbox-card > span:nth-child(2) { flex: 1; } .pj-inbox-ico .ico { width: 22px; height: 22px; color: var(--warn); }
.pj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 640px) { .pj-grid { grid-template-columns: 1fr; } }
.pj-card { position: relative; text-align: left; padding: 16px 16px 16px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; color: var(--ink); overflow: hidden; transition: border-color .15s, transform .1s; display: flex; flex-direction: column; gap: 8px; }
.pj-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pc, var(--accent)); }
.pj-card:hover { border-color: color-mix(in srgb, var(--pc, var(--accent)) 50%, var(--line)); }
.pj-card.status-pausado { opacity: .6; } .pj-card.status-concluido { opacity: .7; }
.pj-card-top { display: flex; align-items: center; justify-content: space-between; }
.pj-card-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); }
.pj-card-date { font-size: 12px; font-weight: 600; color: var(--pc, var(--accent)); }
.pj-card-name { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.pj-card-next { font-size: 13px; color: var(--ink-dim); display: flex; align-items: center; gap: 5px; }
.pj-card-next .ico { width: 13px; height: 13px; color: var(--pc, var(--accent)); flex: 0 0 auto; }
.pj-progress { height: 5px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.pj-progress i { display: block; height: 100%; background: var(--pc, var(--accent)); border-radius: 999px; transition: width .3s var(--ease); }
.pj-progress.big { height: 8px; margin-top: 6px; }
.pj-progress-lbl { font-size: 11px; color: var(--ink-dim); }
.pj-card-metric { display: flex; flex-direction: column; gap: 1px; } .pj-card-metric span { font-size: 11px; color: var(--ink-dim); } .pj-card-metric b { font-size: 14px; color: var(--pc, var(--accent)); }
.pj-card-people { display: flex; align-items: center; }
.pj-ava { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; margin-left: -6px; border: 2px solid var(--panel); font-size: 11px; display: inline-grid; place-items: center; }
.pj-ava:first-child { margin-left: 0; }
.pj-ava.more { background: var(--panel-3); color: var(--ink-dim); font-weight: 700; font-size: 11px; }
.pj-card.ghostcard { align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: var(--ink-dim); border-style: dashed; min-height: 120px; }
.pj-card.ghostcard::before { display: none; }
.pj-card.ghostcard .ico { width: 24px; height: 24px; }
.pj-done-wrap { margin-top: 18px; }
.pj-done-head, .pj-done-tasks-head { display: flex; align-items: center; gap: 8px; background: none; border: none; color: var(--ink-dim); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; padding: 8px 0; width: 100%; }
.pj-done-head .chev, .pj-done-tasks-head .chev { transition: transform .2s; } .pj-done-head.open .chev, .pj-done-tasks-head.open .chev { transform: rotate(90deg); }
.pj-done-count { background: var(--panel-3); border-radius: 999px; padding: 1px 8px; font-size: 12px; }

/* semana */
.pj-week-day { margin-bottom: 6px; }
.pj-week-head { font-size: 13px; font-weight: 700; color: var(--ink); padding: 12px 2px 6px; text-transform: capitalize; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.pj-week-empty { font-size: 12px; color: var(--ink-dim); padding: 2px 2px 8px; opacity: .6; }
.pj-week-item { display: flex; align-items: center; gap: 8px; padding: 7px 2px; font-size: 14px; color: var(--ink); }
.pj-week-item .ico { width: 15px; height: 15px; color: var(--ink-dim); flex: 0 0 auto; }
.pj-week-item.evento .ico { color: var(--accent); } .pj-week-item.lembrete .ico { color: var(--warn); }
.pj-week-item.clickable { cursor: pointer; border-radius: 8px; padding-inline: 7px; }
.pj-week-item.clickable:hover, .pj-week-item.clickable:focus-visible { outline: none; background: var(--panel-2); }
.pj-week-time { min-width: 42px; font-size: 12px; font-weight: 700; color: var(--ink-dim); }
.pj-week-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* detalhe */
.pj-detail { max-width: 760px; margin: 0 auto; }
.pj-detail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.pj-detail-title { flex: 1; min-width: 0; }
.pj-detail-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--pc, var(--accent)); }
.pj-detail-title h1 { font-size: 22px; font-weight: 800; margin: 2px 0 0; color: var(--ink); line-height: 1.15; cursor: text; overflow-wrap: anywhere; }
.pj-name-input { font-size: 22px; font-weight: 800; background: var(--panel-2); border: 1px solid var(--accent); border-radius: 8px; color: var(--ink); width: 100%; padding: 2px 8px; font-family: inherit; }
/* quanto do projeto está feito: anel + número, o primeiro bloco depois do título */
.pj-prog-banner { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; display: flex; align-items: center; gap: 14px; }
.pj-ring-wrap { position: relative; width: 54px; height: 54px; flex: none; display: grid; place-items: center; }
.pj-ring { transform: rotate(-90deg); display: block; }
.pj-ring circle { fill: none; stroke-width: 5; }
.pj-ring-bg { stroke: var(--panel-3); }
.pj-ring-fg { stroke: var(--pc, var(--accent)); stroke-linecap: round; transition: stroke-dashoffset .45s var(--ease); }
.pj-ring-pct { position: absolute; font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.pj-ring-pct i { font-style: normal; font-size: 10px; font-weight: 700; color: var(--ink-dim); }
.pj-prog-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pj-prog-txt span { font-size: 12px; color: var(--ink-dim); }
.pj-prog-txt b { font-size: 16px; font-weight: 700; color: var(--ink); }
.pj-progress-lbl b { color: var(--pc, var(--accent)); font-weight: 800; }
.pj-metric-banner { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.pj-metric-name { font-size: 12px; color: var(--ink-dim); } .pj-metric-banner b { font-size: 20px; color: var(--pc, var(--accent)); font-weight: 800; }
.pj-metric-banner .btn { position: absolute; right: 12px; top: 12px; }
.pj-next-box { background: color-mix(in srgb, var(--pc, var(--accent)) 10%, var(--panel)); border: 1px solid color-mix(in srgb, var(--pc, var(--accent)) 30%, var(--line)); border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; }
.pj-next-kicker { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--pc, var(--accent)); }
.pj-next-kicker .ico { width: 13px; height: 13px; }
.pj-next-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.pj-next-row b { flex: 1; font-size: 16px; font-weight: 600; color: var(--ink); }
.pj-sec { margin-bottom: 24px; }
.pj-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; width: 100%; }
button.pj-sec-head { background: none; border: none; cursor: pointer; padding: 0; }
.pj-sec-head h2 { font-size: 14px; font-weight: 700; color: var(--ink); margin: 0; }
.pj-sec-count { font-size: 12px; color: var(--ink-dim); background: var(--panel-3); border-radius: 999px; padding: 1px 8px; }
.pj-sec-head .chev { transition: transform .2s; color: var(--ink-dim); } .pj-sec-head.open .chev { transform: rotate(90deg); }
.pj-add { display: flex; gap: 8px; margin-top: 8px; }
.pj-add input { flex: 1; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); padding: 10px 12px; font: inherit; font-size: 14px; }
.pj-add input:focus { outline: none; border-color: var(--accent); }
.pj-empty-line { font-size: 13px; color: var(--ink-dim); padding: 8px 2px; opacity: .8; }
.pj-event, .pj-rem-row, .pj-person, .pj-note, .pj-inbox-item, .pj-hab-row, .pj-pp-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 10px; margin-bottom: 6px; }
.pj-event.pj-event-open { appearance: none; width: 100%; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.pj-event.pj-event-open:hover, .pj-event.pj-event-open:focus-visible { outline: none; border-color: rgba(53,208,186,.48); background: var(--panel-2); }
.pj-event .ico, .pj-rem-row > .ico { color: var(--ink-dim); width: 16px; height: 16px; flex: 0 0 auto; }
.pj-event span, .pj-rem-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pj-event b, .pj-rem-body b { font-size: 14px; font-weight: 600; color: var(--ink); } .pj-event small, .pj-rem-body small { font-size: 12px; color: var(--ink-dim); }
.pj-person-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pj-person-body b { font-size: 14px; font-weight: 600; } .pj-person-body small { font-size: 12px; color: var(--ink-dim); display: inline-flex; align-items: center; gap: 4px; }
.pj-person-body small .ico { width: 13px; height: 13px; }
.pj-note { flex-wrap: wrap; } .pj-note > span { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; } .pj-note small { font-size: 11px; color: var(--ink-dim); }
.pj-log-row { display: flex; gap: 10px; padding: 6px 2px; font-size: 13px; color: var(--ink); }
.pj-log-when { color: var(--ink-dim); font-size: 12px; min-width: 70px; flex: 0 0 auto; }

/* overlays / sheets / pops */
.pj-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fade .15s var(--ease); }
@media (min-width: 700px) { .pj-overlay { align-items: center; padding: 20px; } }
.pj-sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 18px 18px 0 0; width: 100%; max-width: 520px; padding: 18px; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: sheetUp .22s var(--ease); }
@media (min-width: 700px) { .pj-sheet { border-radius: 18px; } }
.pj-sheet.tall { min-height: 60vh; } .pj-sheet.capture .pj-capture-input { width: 100%; }
.pj-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pj-sheet-head h2 { font-size: 17px; font-weight: 700; margin: 0; }
.pj-sheet-name { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); padding: 12px 14px; font: inherit; font-size: 16px; margin-bottom: 14px; }
.pj-sheet-name:focus { outline: none; border-color: var(--accent); }
.pj-sheet-lbl { font-size: 12px; font-weight: 700; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .03em; margin: 10px 0 8px; }
.pj-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pj-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.pj-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform .1s; }
.pj-swatch.on { border-color: var(--ink); transform: scale(1.12); } .pj-swatch:hover { transform: scale(1.1); }
.btn.wide { width: 100%; justify-content: center; margin-top: 18px; padding: 13px; font-size: 15px; }
.pj-capture-input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); padding: 14px; font: inherit; font-size: 16px; resize: none; }
.pj-capture-input:focus { outline: none; border-color: var(--accent); }
.pj-capture-actions { margin-top: 4px; }
.pj-preview { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 14px; }
.pj-preview-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 10px; overflow-wrap: anywhere; }
.pj-preview-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pj-pchip { display: inline-flex; align-items: center; gap: 5px; background: var(--panel-3); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; cursor: pointer; }
.pj-pchip:hover { border-color: var(--accent); } .pj-pchip .ico { width: 14px; height: 14px; color: var(--ink-dim); }
.pj-search { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.pj-search .ico { width: 18px; height: 18px; color: var(--ink-dim); } .pj-search input { flex: 1; background: none; border: none; color: var(--ink); font: inherit; font-size: 15px; outline: none; }
.pj-pp-results { display: flex; flex-direction: column; gap: 6px; } .pj-pp-item { width: 100%; text-align: left; cursor: pointer; color: var(--ink); }
.pj-pp-item:hover { border-color: var(--accent); }
.pj-inbox-item { } .pj-inbox-item > span { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; } .pj-inbox-item .ico { color: var(--ink-dim); width: 16px; height: 16px; }
.pj-hab-row { } .pj-hab-name { flex: 1; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }

/* pop flutuante */
.pj-pop { position: fixed; z-index: 95; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; gap: 2px; min-width: 180px; animation: fade .12s var(--ease); }
.pj-pop.wide { min-width: 220px; } .pj-pop.scroll { max-height: 320px; overflow-y: auto; }
.pj-pop button { display: flex; align-items: center; gap: 8px; background: none; border: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.pj-pop button:hover { background: var(--panel-2); } .pj-pop button.danger { color: var(--danger); }
.pj-pop button .ico { width: 16px; height: 16px; color: var(--ink-dim); flex: 0 0 auto; } .pj-pop button.danger .ico { color: var(--danger); }
.pj-pop.colors { flex-direction: row; flex-wrap: wrap; max-width: 200px; }
.pj-pop.input { flex-direction: row; align-items: center; padding: 10px; min-width: 240px; }
.pj-pop.input.col { flex-direction: column; align-items: stretch; }
.pj-pop.input input { flex: 1; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); padding: 9px 11px; font: inherit; font-size: 14px; }
.pj-pop.input input:focus { outline: none; border-color: var(--accent); }
.pj-pop.big { min-width: 300px; }
.pj-dot { }

/* seletor de data nosso */
.pj-datesheet { background: var(--panel); padding: 4px; }
.pj-datesheet.floating { position: fixed; z-index: 95; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px; width: min(320px, 92vw); }
.pj-ds-days { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; max-height: 120px; overflow-y: auto; }
.pj-ds-row { display: flex; align-items: center; gap: 8px; }
.pj-ds-row span { font-size: 13px; color: var(--ink-dim); } .pj-ds-time { width: 76px; text-align: center; }
.pj-ds-rec-lbl, .pj-ds-rec-lbl { font-size: 12px; color: var(--ink-dim); margin: 10px 0 6px; }
.field.err, .pj-ds-time.err { border-color: var(--danger) !important; }
@keyframes sheetUp { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================ ÁUDIOS SALVOS ============ */
/* Botões genéricos que faltavam (usados aqui e no editor de metadados). */
.btn.primary { background: var(--accent); color: var(--accent-ink); border: none; font-weight: 650; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.sa-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-dim); }
.sa-field span small { font-weight: 400; opacity: .8; }
.sa-field input {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); border-radius: 10px;
  padding: 9px 11px; font: inherit; font-size: 14px; outline: none; transition: border-color .16s;
}
.sa-field input:focus { border-color: var(--accent); }
.sa-field input::placeholder { color: var(--ink-dim); }

/* --- botão do composer que força o modo "/" --- */
.wc-composer .btn.wc-audio-trigger { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.wc-composer .btn.wc-audio-trigger:hover { border-color: var(--accent); background: var(--panel-3); filter: none; }
.wc-composer .btn.wc-audio-trigger .ico { color: var(--accent); }

/* --- picker "/" acima do composer (molde do popover de modo) --- */
.wc-audio-pop { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 8px); z-index: 40; }
.wc-audio-scrim { display: none; }
.wc-audio-menu {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: modepop .16s var(--ease);
}
.wc-audio-head {
  display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-dim);
}
.wc-audio-head .ico { color: var(--accent); }
.wc-audio-head small { margin-left: auto; font-weight: 500; text-transform: none; letter-spacing: 0; opacity: .8; }
.wc-audio-list { max-height: min(320px, 44vh); overflow-y: auto; padding: 5px; display: flex; flex-direction: column; gap: 2px; }
.wc-audio-opt {
  appearance: none; border: none; background: transparent; cursor: pointer; font: inherit; color: var(--ink);
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  padding: 8px 9px; border-radius: 10px; transition: background .14s var(--ease);
}
.wc-audio-opt:hover, .wc-audio-opt.on { background: var(--panel-3); }
.wc-audio-opt.on { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.wc-audio-opt-play {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.wc-audio-opt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wc-audio-opt-top { display: flex; align-items: baseline; gap: 8px; }
.wc-audio-opt-top b { font-size: 13.5px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-audio-opt-dur { margin-left: auto; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--ink-dim); flex: none; }
.wc-audio-opt-sub { font-size: 11.5px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-audio-empty { padding: 18px 14px; text-align: center; color: var(--ink-dim); display: flex; flex-direction: column; gap: 3px; }
.wc-audio-empty b { color: var(--ink); font-size: 13px; }
.wc-audio-empty small { font-size: 11.5px; }

/* --- seção "Áudios salvos" na Config: gravador + biblioteca --- */
.cfg-audios { display: flex; flex-direction: column; gap: 18px; }
/* Toggle "IA pode mandar áudios" no topo da seção de áudios salvos */
.sa-ai-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); margin-bottom: 14px; }
.sa-ai-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sa-ai-txt b { font-size: 13.5px; }
.sa-ai-txt small { color: var(--ink-dim); font-size: 12px; }

.sa-recorder {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.sa-rec-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sa-rec-btn { display: inline-flex; align-items: center; gap: 8px; }
.sa-rec-btn .sa-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); flex: none; transition: transform .2s; }
.sa-rec-btn.recording .sa-rec-dot { animation: sarecpulse 1s ease-in-out infinite; }
@keyframes sarecpulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .55; } }
.sa-rec-meter { display: flex; align-items: center; gap: 8px; }
.sa-rec-time { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.sa-rec-hint { font-size: 12px; color: var(--ink-dim); }
.sa-rec-preview-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ok); }
.sa-rec-form { display: flex; flex-direction: column; gap: 11px; border-top: 1px solid var(--line); padding-top: 12px; }
.sa-rec-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sa-rec-perm { margin: 0; font-size: 12.5px; color: var(--danger); }

.sa-library { display: flex; flex-direction: column; gap: 9px; }
.sa-lib-loading, .sa-lib-empty { padding: 20px 14px; text-align: center; color: var(--ink-dim); font-size: 13px; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.sa-lib-loading .ico { color: var(--accent); }
.sa-lib-empty b { color: var(--ink); }
.sa-lib-empty small { font-size: 11.5px; }
.sa-lib-list { display: flex; flex-direction: column; gap: 9px; }
.sa-lib-row {
  display: grid; grid-template-columns: minmax(150px, 220px) 1fr auto; gap: 14px; align-items: center;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.sa-lib-row.inactive { opacity: .6; }
/* o player da biblioteca herda o motor .wc-au-* mas usa a cor de destaque (fundo escuro) */
.sa-lib-player { display: flex; align-items: center; gap: 10px; color: var(--accent); }
.sa-lib-player .wc-au-btn { width: 34px; height: 34px; }
.sa-lib-player .wc-au-btn .ico { color: var(--accent-ink); }
.sa-lib-player .wc-au-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.sa-lib-meta { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sa-lib-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sa-lib-title { font-size: 14px; font-weight: 620; color: var(--ink); }
.sa-lib-chip { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-variant-numeric: tabular-nums; }
.sa-lib-chip.soft { background: var(--panel-3); color: var(--ink-dim); }
.sa-lib-chip.off { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.sa-lib-desc { font-size: 12.5px; color: var(--ink-dim); }
.sa-lib-tr { display: inline-flex; align-items: flex-start; gap: 6px; font-size: 12px; color: var(--ink-dim); line-height: 1.45; }
.sa-lib-tr .ico { color: var(--accent); flex: none; margin-top: 2px; }
.sa-lib-tr.pending { opacity: .8; }
.sa-lib-tr.fail { font-style: italic; opacity: .6; }
.sa-lib-actions { display: flex; gap: 6px; align-items: center; }
.sa-lib-actions .icon-btn.arm { border-color: var(--danger); color: var(--danger); }
.sa-lib-actions .icon-btn.danger-hover:hover { border-color: var(--danger); color: var(--danger); }
.objective-sheet-body { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.objective-sheet-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* mobile: o picker "/" vira folha ancorada embaixo, com scrim (igual ao popover de modo) */
@media (max-width: 720px), (max-height: 480px) and (pointer: coarse) {
  .wc-audio-pop { position: fixed; inset: 0; left: 0; right: 0; bottom: 0; z-index: 55; display: flex; flex-direction: column; justify-content: flex-end; }
  .wc-audio-scrim { display: block; position: fixed; inset: 0; background: rgba(6,9,13,.55); backdrop-filter: blur(2px); animation: modescrim .18s var(--ease); }
  .wc-audio-menu { position: relative; z-index: 1; border-radius: 16px 16px 0 0; animation: modesheet .2s var(--ease); }
  .wc-audio-list { max-height: 50vh; }
  .sa-lib-row { grid-template-columns: 1fr; gap: 10px; }
  .sa-lib-player { order: 2; }
  .sa-lib-actions { order: 3; justify-content: flex-end; }
}

/* ===================== ABA VÍNCULOS ===================== */
/* Identidade da mesma pessoa em canais diferentes: interruptores do "chamar primeiro",
   listas (revisar/ativos/frios/chamadas) e a prova de cada vínculo (a frase de origem). */
#vincHost { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px 90px; }

.vinc-auto {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 12px;
}
.vinc-auto-head { display: flex; flex-direction: column; gap: 3px; }
.vinc-auto-head b { font-size: 15px; }
.vinc-auto-head small { color: var(--ink-dim); font-size: 12.5px; line-height: 1.4; text-wrap: pretty; }
.vinc-auto-rows { display: flex; flex-wrap: wrap; gap: 10px; }
.vinc-auto-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 11px;
  padding: 9px 12px; min-width: 190px; flex: 1 1 190px;
}
.vinc-auto-row > span { display: inline-flex; align-items: center; gap: 7px; font-weight: 550; font-size: 13.5px; }
.vinc-auto-nota { margin: 0; color: var(--ink-dim); font-size: 12px; line-height: 1.45; text-wrap: pretty; }

.vinc-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.vinc-bar .view-switch { margin-left: 0; flex-wrap: wrap; }
.vinc-bar-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.vinc-cnt {
  display: inline-block; min-width: 17px; padding: 0 5px; border-radius: 999px;
  background: var(--panel-2); color: var(--ink-dim); font-size: 11px; font-weight: 700; line-height: 17px; text-align: center;
}
.vinc-bar .pj-seg { margin: 0; flex-wrap: wrap; }
.pj-seg button.active .vinc-cnt { background: rgba(5, 41, 37, .25); color: var(--accent-ink); }

.vinc-lista { display: flex; flex-direction: column; gap: 10px; }
.vinc-card {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; display: flex; flex-direction: column; gap: 8px;
}
.vinc-card.revisar { border-left: 3px solid var(--accent); }
.vinc-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vinc-card-top b { font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }
.vinc-tag {
  font-size: 11px; font-weight: 650; letter-spacing: .01em; padding: 3px 8px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-dim);
}
.vinc-tag.ok { color: var(--ok); border-color: rgba(72, 213, 151, .35); }
.vinc-tag.alerta { color: #ffc861; border-color: rgba(255, 200, 97, .3); }
.vinc-tag.erro { color: var(--danger); border-color: rgba(255, 107, 107, .35); }
.vinc-onde, .vinc-motivo { margin: 0; font-size: 13px; color: var(--ink-dim); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vinc-motivo { display: block; line-height: 1.45; text-wrap: pretty; }
.vinc-motivo b { color: var(--ink); }
.vinc-frase {
  margin: 0; padding: 8px 12px; border-left: 2px solid var(--line); background: var(--panel);
  border-radius: 0 8px 8px 0; color: var(--ink); font-size: 13px; line-height: 1.5;
  text-wrap: pretty; overflow-wrap: anywhere;
}
.vinc-sem-prova { margin: 0; font-size: 12px; color: var(--ink-dim); font-style: italic; }
.vinc-acoes, .vinc-opcoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 2px; }
.vinc-autoriza {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-dim);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px 5px 12px;
}
.btn.danger { color: var(--danger); border-color: rgba(255, 107, 107, .3); }
.btn.danger:hover { background: rgba(255, 107, 107, .1); }

.vinc-motivos { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; }
.vinc-motivo-op {
  appearance: none; cursor: pointer; text-align: left; font: inherit; color: inherit;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 14px; display: flex; flex-direction: column; gap: 3px;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.vinc-motivo-op:hover { border-color: var(--accent); background: var(--panel); }
.vinc-motivo-op:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vinc-motivo-op b { font-size: 13.5px; }
.vinc-motivo-op small { color: var(--ink-dim); font-size: 12px; line-height: 1.4; text-wrap: pretty; }

/* Veredito na bolha: "foi pra pessoa certa?". Fica ESCONDIDO até você passar o mouse na
   bolha (ou focar pelo teclado) — dois ícones soltos em toda mensagem não diziam nada e
   poluíam a conversa. O que já foi marcado fica sempre visível, com o texto junto. */
.msg-veredito { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; vertical-align: middle; }
.msg-veredito:not(.marcado) { opacity: 0; transition: opacity .15s var(--ease); pointer-events: none; }
.bubble-row:hover .msg-veredito, .msg-veredito:focus-within { opacity: 1; pointer-events: auto; }
.msg-veredito .mv-hint { font-size: 10.5px; letter-spacing: .01em; color: rgba(5, 41, 37, .62); margin-right: 1px; }
.msg-veredito button {
  appearance: none; cursor: pointer; background: rgba(5, 41, 37, .1); border: 0; padding: 3px;
  color: rgba(5, 41, 37, .68); border-radius: 999px; line-height: 0;
  display: inline-flex; align-items: center; gap: 4px;
}
.msg-veredito button:hover { background: rgba(5, 41, 37, .2); color: var(--accent-ink); }
.msg-veredito button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 1px; }
.msg-veredito .mv-txt { font-size: 10.5px; font-weight: 600; padding-right: 4px; }
.msg-veredito.marcado button { padding: 3px 4px 3px 5px; }
.msg-veredito .marcado-certo { color: #0b5c3f; background: rgba(72, 213, 151, .38); }
.msg-veredito .marcado-errado { color: #7a1420; background: rgba(255, 107, 107, .34); }
/* no celular não existe hover: aparece sempre, discreto */
@media (hover: none) {
  .msg-veredito:not(.marcado) { opacity: .55; pointer-events: auto; }
  .msg-veredito .mv-hint { display: none; }
}

@media (max-width: 720px) {
  #vincHost { padding: 12px 12px 96px; }
  .vinc-bar { flex-direction: column; align-items: stretch; }
  .vinc-bar-acoes .btn { flex: 1; justify-content: center; }
}

/* sub-abas do WhatsApp (Conversas | Aprovações) — a aprovação é uma PÁGINA à parte, não
   um bloco empilhado em cima da lista (que enterrava o inbox). */
.wc-subtabs { padding: 10px 14px 4px; }
.wc-aprovacoes { padding: 6px 14px 24px; display: flex; flex-direction: column; gap: 12px; }
.wc-aprov-intro { margin: 0; color: var(--ink-dim); font-size: 13px; line-height: 1.5; max-width: 62ch; text-wrap: pretty; }
.wc-aprovacoes .review-list { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.wc-aprovacoes .review-card { width: 100%; }
.review-motivo { color: var(--ink-dim); font-size: 12.5px; line-height: 1.45; text-wrap: pretty; }
.review-card .vinc-frase { margin-top: 2px; font-size: 12.5px; }
.wc-aprov-loading { color: var(--ink-dim); font-size: 13px; padding: 6px 2px; }
.wc-aprovacoes .section-title { margin-top: 6px; }
.wc-aprov-fechados { display: flex; flex-wrap: wrap; gap: 8px; max-width: 760px; }
.wc-aprov-fechado {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 12px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; font-size: 13px;
}
.wc-aprov-fechado span { color: var(--ink-dim); font-size: 12px; }

/* ==================== DESCOBERTA (auto-deslizar) ==================== */
.chip-descoberta { margin-left: auto; }
.desc-topbar { display: flex; align-items: center; gap: 12px; padding: 12px 0 4px; flex-wrap: wrap; }
.desc-status { font-size: 12.5px; font-weight: 650; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-dim); }
.desc-status.shadow { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.desc-status.live { color: #ff6b81; border-color: #ff6b8155; background: #ff6b8112; }
.desc-page { display: flex; flex-direction: column; gap: 16px; padding-bottom: 96px; }
.desc-card .desc-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.desc-alerta { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; color: var(--ink-dim); }
.desc-alerta.err { border-color: #ff6b8155; background: #ff6b810f; color: #ffb3bf; }
.desc-lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-dim); }
.desc-dica { font-size: 12px; color: var(--ink-dim); line-height: 1.45; }
.desc-sep { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-dim); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 2px; }
.desc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.desc-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.desc-num { display: flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.desc-num input { background: none; border: none; color: var(--ink); font: inherit; font-weight: 650; width: 100%; min-width: 0; outline: none; }
.desc-suf { font-size: 12px; color: var(--ink-dim); flex: none; }
.desc-switch { display: flex; align-items: center; gap: 12px; }
.desc-switch-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.desc-switch-txt b { font-size: 14px; font-weight: 650; }
.desc-switch-txt span { font-size: 12px; color: var(--ink-dim); line-height: 1.4; }
.desc-chips { display: flex; flex-direction: column; gap: 8px; }
.desc-chips-list { display: flex; flex-wrap: wrap; gap: 6px; }
.desc-chips-vazio { font-size: 12px; color: var(--ink-dim); font-style: italic; }
.desc-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 4px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.desc-chip button { background: none; border: none; color: var(--ink-dim); cursor: pointer; display: grid; place-items: center; padding: 0; }
.desc-chip button:hover { color: #ff6b81; }
.desc-chip.acao { cursor: pointer; color: var(--ink); }
.desc-chip.acao:hover { border-color: var(--accent); color: var(--accent); }
.desc-chip.plano { color: var(--accent); }
.desc-chip.plano.feita { color: var(--ink-dim); opacity: .6; }
.desc-chip-input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; color: var(--ink); font: inherit; font-size: 13px; outline: none; min-width: 0; }
.desc-chip-input:focus { border-color: var(--accent); }
.desc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.desc-stats > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.desc-stats b { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.desc-stats span { font-size: 11.5px; color: var(--ink-dim); }
.desc-plano { display: flex; flex-direction: column; gap: 7px; }
.desc-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.desc-hist { display: flex; align-items: flex-end; gap: 3px; height: 66px; }
.desc-hist-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; }
.desc-hist-col i { display: block; width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .8; }
.desc-hist-col.off i { background: var(--line-soft); opacity: .35; }
.desc-hist-col span { font-size: 9px; color: var(--ink-dim); height: 11px; }
.desc-onde { display: flex; flex-direction: column; gap: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.desc-onde b { font-size: 16px; font-weight: 700; }
.desc-onde span { font-size: 12px; color: var(--ink-dim); }
.desc-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.desc-inline .desc-chip-input { flex: 1; min-width: 92px; }
.desc-meter { display: flex; flex-direction: column; gap: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.desc-meter b { font-size: 14px; }
.desc-meter span { font-size: 11.5px; color: var(--ink-dim); line-height: 1.4; }
.desc-bio { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--ink); font: inherit; font-size: 13.5px; line-height: 1.5; resize: vertical; outline: none; }
.desc-bio:focus { border-color: var(--accent); }
.desc-pessoas { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.desc-pessoa { display: flex; flex-direction: column; gap: 9px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 11px; }
.desc-pessoa.feita { opacity: .5; }
.dp-foto { height: 128px; border-radius: 10px; background: var(--panel-3) center/cover no-repeat; }
.dp-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dp-info b { font-size: 14.5px; }
.dp-meta { font-size: 11.5px; color: var(--ink-dim); }
.dp-bio { font-size: 12px; color: var(--ink-dim); line-height: 1.4; }
.dp-veredito { font-size: 11.5px; line-height: 1.4; color: var(--ink-dim); border-left: 2px solid var(--line-soft); padding-left: 7px; margin-top: 3px; }
.dp-veredito.like { color: var(--accent); border-color: var(--accent); }
.dp-veredito.fronteira { color: #e3b341; border-color: #e3b341; }
.dp-acoes { display: flex; gap: 7px; align-items: center; }
.desc-log { display: flex; flex-direction: column; gap: 1px; max-height: 420px; overflow-y: auto; }
.desc-log-linha { display: grid; grid-template-columns: 66px 1fr 2fr auto; gap: 9px; align-items: baseline; padding: 7px 9px; border-radius: 8px; font-size: 12.5px; }
.desc-log-linha:nth-child(odd) { background: var(--panel-2); }
.dl-dec { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-dim); }
.desc-log-linha.like .dl-dec { color: var(--accent); }
.dl-nome { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-motivo { color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-quando { font-size: 11px; color: var(--ink-dim); text-align: right; }
.desc-savebar { position: sticky; bottom: 0; display: flex; gap: 9px; justify-content: flex-end; padding: 12px 0; background: linear-gradient(to top, var(--bg) 62%, transparent); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; }
.btn.danger { color: #ff6b81; border-color: #ff6b8144; }
@media (max-width: 720px) {
  .desc-log-linha { grid-template-columns: 58px 1fr; grid-auto-rows: min-content; }
  .dl-motivo, .dl-quando { grid-column: 1 / -1; text-align: left; white-space: normal; }
  .desc-stats { grid-template-columns: 1fr; }
  .chip-descoberta { margin-left: 0; }
}

/* diálogo próprio da Descoberta (o painel não usa confirm/prompt do navegador) */
.dmodal-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(4,7,10,.72); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .18s var(--ease); }
.dmodal-scrim.show { opacity: 1; }
.dmodal { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow-md); transform: translateY(8px) scale(.98); transition: transform .18s var(--ease); }
.dmodal-scrim.show .dmodal { transform: none; }
.dmodal.perigo { border-color: #ff6b8155; }
.dmodal h3 { font-size: 17px; font-weight: 750; letter-spacing: -.02em; margin-bottom: 7px; }
.dmodal p { font-size: 13.5px; color: var(--ink-dim); line-height: 1.5; }
.dmodal-campo { display: flex; align-items: center; gap: 8px; margin-top: 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; }
.dmodal-campo input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--ink); font: inherit; font-weight: 650; }
.dmodal-campo:focus-within { border-color: var(--accent); }
.dmodal-acoes { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.dmodal-acoes .btn:disabled { opacity: .45; cursor: not-allowed; }
.vinc-auto-row.larga { flex: 1 1 100%; min-width: 0; }

/* ===== perfil do Tinder (abre pelo selo na conversa do WhatsApp) ===== */
.pt-corpo { display: flex; flex-direction: column; gap: 12px; padding: 2px 0 8px; }
.pt-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pt-fotos img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.pt-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.pt-id b { font-size: 17px; letter-spacing: -.01em; }
.pt-id span { color: var(--ink-dim); font-size: 13px; }
.pt-bio { margin: 0; color: var(--ink); font-size: 13.5px; line-height: 1.5; text-wrap: pretty; }
.pt-prova { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-msgs { display: flex; flex-direction: column; gap: 5px; }
.pt-msg { font-size: 13px; line-height: 1.45; color: var(--ink-dim); text-wrap: pretty; }
.pt-msg b { color: var(--ink); font-weight: 600; }
.pt-msg.eu { opacity: .75; }
.perfil-tinder .section-title { margin-top: 4px; }

/* botão "Mesma pessoa" no cabeçalho das conversas + folha de identidade */
.wc-ident { flex: none; white-space: nowrap; }
.drawer-ident[hidden] { display: none !important; }
.drawer-ident.has-links { border-color: rgba(53,208,186,.38); background: rgba(53,208,186,.08); color: var(--ink); }
.drawer-link-icons { display: inline-flex; align-items: center; gap: 4px; }
.drawer-link-icons .channel-whatsapp { color: var(--wa); }
.drawer-link-icons .channel-instagram { color: var(--ig-txt); }
.drawer-link-icons .channel-badoo { color: #aab8ff; }
@media (max-width: 900px) { .wc-ident .lbl { display: none; } }
.id-corpo { display: flex; flex-direction: column; gap: 12px; padding: 2px 0 8px; }
.id-canais { display: flex; flex-direction: column; gap: 8px; }
.id-canal {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
}
.id-canal .pj-person-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.id-canal small { color: var(--ink-dim); font-size: 12px; display: inline-flex; align-items: center; gap: 5px; }

/* ===== Encontros (Config): interruptor de propor date + janelas de disponibilidade ===== */
.cfg-enc, .cfg-fatos { display: flex; flex-direction: column; gap: 14px; }
.enc-ai-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
}
.enc-ai-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.enc-ai-txt b { font-size: 14px; letter-spacing: -.01em; }
.enc-ai-txt small { color: var(--ink-dim); font-size: 12.5px; line-height: 1.4; text-wrap: pretty; }
.enc-body { display: flex; flex-direction: column; gap: 12px; }
.enc-add {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.enc-add-lbl { color: var(--ink-dim); font-size: 12.5px; }
.enc-days { display: flex; flex-wrap: wrap; gap: 5px; }
.enc-day {
  min-width: 42px; padding: 6px 9px; border-radius: 9px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-dim);
  font: inherit; font-size: 12.5px; transition: background .12s, color .12s, border-color .12s;
}
.enc-day:hover { border-color: var(--accent); color: var(--ink); }
.enc-day.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
/* wrap: no mobile a linha tem hora inicial, "até", hora final, lugar e o botão. Sem quebrar,
   o "Adicionar" saía cortado na borda ("Ad") — e botão cortado é botão que não existe. */
.enc-hours { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.enc-hour {
  padding: 6px 11px; border-radius: 9px; cursor: pointer; font: inherit; font-size: 13px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); font-variant-numeric: tabular-nums;
}
.enc-hour:hover { border-color: var(--accent); }
.enc-sep { color: var(--ink-dim); font-size: 12.5px; }
.hour-pop {
  position: fixed; z-index: 90; max-height: 250px; overflow-y: auto; width: 110px;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.hour-opt {
  padding: 7px 10px; border-radius: 8px; border: 0; background: transparent; cursor: pointer;
  color: var(--ink); font: inherit; font-size: 13px; text-align: left; font-variant-numeric: tabular-nums;
}
.hour-opt:hover { background: var(--panel-3); }
.hour-opt.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.enc-list { display: flex; flex-wrap: wrap; gap: 8px; }
.enc-item {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 9px 7px 11px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; font-size: 13px;
}
.enc-item-dia { color: var(--accent); font-weight: 600; text-transform: capitalize; }
.enc-item-hora { color: var(--ink); font-variant-numeric: tabular-nums; }
.enc-item-x {
  border: 0; background: transparent; color: var(--ink-dim); cursor: pointer;
  font-size: 17px; line-height: 1; padding: 0 2px;
}
.enc-item-x:hover { color: var(--danger); }
.enc-vazio { margin: 0; color: var(--ink-dim); font-size: 12.5px; line-height: 1.5; text-wrap: pretty; }
.enc-next { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.enc-next-lbl { color: var(--ink-dim); font-size: 12px; width: 100%; }
.enc-next-chip {
  padding: 5px 9px; border-radius: 8px; font-size: 12px;
  background: rgba(53,208,186,.1); border: 1px solid rgba(53,208,186,.28); color: var(--accent);
}
.enc-next-lbl.vazio { color: var(--warn); }
.enc-item-lugar { display: inline-flex; align-items: center; gap: 4px; color: var(--warn); font-size: 12px; }
.enc-item-lugar .ico { width: 13px; height: 13px; }

/* ===== Disponibilidade (aba Agenda): horários, períodos e lugares =====
   Mora na Agenda desde 26/07/2026: dia, horário, lugar e período só fazem sentido junto do
   mês. Reusa .enc-* (o cadastro de horário é o mesmo de antes) e acrescenta o que é novo. */
.disp-pane {
  margin-top: 18px; padding: 18px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; display: flex; flex-direction: column; gap: 16px;
}
.disp-loading { display: flex; align-items: center; gap: 10px; color: var(--ink-dim); font-size: 13px; }
.disp-loading .ico { width: 20px; height: 20px; }
.disp-head { display: flex; flex-direction: column; gap: 12px; }
.disp-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.disp-head-top h2 { margin: 2px 0 0; font-size: 18px; letter-spacing: -.02em; }
.disp-onde {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  font-size: 12.5px; color: var(--accent); background: rgba(53,208,186,.1); border: 1px solid rgba(53,208,186,.28);
}
.disp-onde.fora { color: var(--warn); background: rgba(255,180,84,.1); border-color: rgba(255,180,84,.32); }
.disp-onde .ico { width: 14px; height: 14px; }
.disp-explica { margin: 0; color: var(--ink-dim); font-size: 12.5px; line-height: 1.55; text-wrap: pretty; }
.disp-explica b { color: var(--ink); font-weight: 600; }
.disp-bloco {
  display: flex; flex-direction: column; gap: 11px; padding-top: 15px; border-top: 1px solid var(--line-soft);
}
.disp-bloco-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.disp-bloco-head b { font-size: 14.5px; letter-spacing: -.01em; }
.disp-bloco-sub { margin: -4px 0 0; color: var(--ink-dim); font-size: 12.5px; line-height: 1.55; text-wrap: pretty; }
/* Com dado na tela a explicação encolhe pra uma linha: o painel é interface, não manual. */
.disp-bloco-sub.curto { font-size: 12px; opacity: .82; }
.disp-bloco-nota { color: var(--warn); font-size: 12px; text-align: right; max-width: 260px; line-height: 1.4; }
.disp-cont {
  display: inline-block; min-width: 18px; padding: 1px 6px; margin-left: 4px; border-radius: 999px;
  background: var(--panel-3); color: var(--ink-dim); font-size: 11px; font-weight: 600; text-align: center;
}
.disp-bloco-sub b { color: var(--ink); font-weight: 600; }
.disp-tabs { display: inline-flex; gap: 3px; padding: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.disp-tabs-full { display: flex; }
.disp-tabs-full .disp-tab { flex: 1; text-align: center; }
.disp-tab {
  padding: 6px 13px; border: 0; border-radius: 8px; cursor: pointer; background: transparent;
  color: var(--ink-dim); font: inherit; font-size: 12.5px; transition: background .14s, color .14s;
}
.disp-tab:hover { color: var(--ink); }
.disp-tab.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.disp-lugar-pick { display: inline-flex; align-items: center; gap: 5px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hour-pop-wide { width: 230px; }

/* períodos */
.disp-per-list, .disp-lug-list { display: flex; flex-direction: column; gap: 7px; }
.disp-per {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px;
  border-left: 3px solid var(--warn);
}
.disp-per.ocupado { border-left-color: var(--danger); }
/* A linha inteira abre o editor. Antes era um div sem afordância: só dava pra apagar. */
.disp-per-abrir {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0;
  border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.disp-per-abrir .ico { color: var(--ink-dim); flex: none; }
.disp-per-abrir:hover .ico { color: var(--accent); }
.disp-per:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.disp-per-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.disp-per-txt b { font-size: 13.5px; }
.disp-per-txt small { color: var(--ink-dim); font-size: 12px; }
.disp-per-meta { opacity: .78; }
.disp-per-meta:empty { display: none; }
.disp-per-cidades { color: var(--ink-dim); opacity: .8; }
/* × armado: apagar viagem por clique errado custa 3 cliques pra refazer. */
.fato-x.armado {
  color: var(--danger); font-size: 12px; font-weight: 600; padding: 3px 7px;
  border-radius: 7px; background: rgba(255,107,107,.12);
}
.disp-per-origem { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-dim); font-size: 12.5px; }
.disp-per-lugar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }

/* lugares */
.disp-lug {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px;
  color: var(--ink); font: inherit; text-align: left;
}
.disp-lug:hover { border-color: var(--accent); }
.disp-lug.base { border-left: 3px solid var(--accent); }
.disp-lug-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.disp-lug-txt b { font-size: 13.5px; display: inline-flex; align-items: center; gap: 7px; }
.disp-lug-txt small { color: var(--ink-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.disp-lug-uso { opacity: .72; font-variant-numeric: tabular-nums; }
.disp-lug-base {
  padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; background: rgba(53,208,186,.14); color: var(--accent);
}
.disp-lug .ico { color: var(--ink-dim); flex: none; }

/* folha de lugar / período */
.disp-lug-sheet, .disp-per-sheet { max-width: 480px; }
.disp-lug-form { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 2px; }
.disp-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.disp-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px 5px 10px; font-size: 12.5px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
}
.disp-chip-x { border: 0; background: transparent; color: var(--ink-dim); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 1px; }
.disp-chip-x:hover { color: var(--danger); }
.disp-chip-vazio { color: var(--ink-dim); font-size: 12.5px; }
.disp-chip-add { display: flex; gap: 8px; margin-top: 8px; }
.disp-chip-add input { flex: 1; }

/* aviso no cartão de compromisso detectado: avisa, nunca bloqueia */
.agenda-aviso {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 7px; padding: 7px 9px;
  border-radius: 9px; font-size: 12.5px; line-height: 1.45;
  color: var(--warn); background: rgba(255,180,84,.1); border: 1px solid rgba(255,180,84,.3);
}
.agenda-aviso .ico { width: 15px; height: 15px; flex: none; margin-top: 1px; }

/* dias do calendário cobertos por período */
.cal-cell.cal-fora { background: color-mix(in srgb, var(--warn) 14%, var(--cal-cell-bg)); }
.cal-cell.cal-ocupado { background: color-mix(in srgb, var(--danger) 14%, var(--cal-cell-bg)); }
.cal-legenda {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 9px 4px 2px;
  color: var(--ink-dim); font-size: 12px;
}
.cal-leg-item { display: inline-flex; align-items: center; gap: 6px; }
.cal-leg-item i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.cal-leg-fora { background: color-mix(in srgb, var(--warn) 45%, var(--cal-cell-bg)); border: 1px solid color-mix(in srgb, var(--warn) 60%, transparent); }
.cal-leg-ocupado { background: color-mix(in srgb, var(--danger) 45%, var(--cal-cell-bg)); border: 1px solid color-mix(in srgb, var(--danger) 60%, transparent); }
.cal-legenda.marcando {
  display: flex; align-items: center; gap: 9px; color: var(--accent); font-weight: 600;
  padding: 10px 12px; border-radius: 11px; margin: 8px 0;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel-2));
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
}
.cal-legenda.marcando .ico { width: 15px; height: 15px; flex: none; }
.cal-legenda.marcando span { flex: 1; font-weight: 500; }
.cal-legenda.marcando b { font-weight: 700; }
.cal-legenda.marcando .btn { flex: none; }
/* A instrução aparece ACIMA do mês também: no mobile as 6 semanas empurram a de baixo pra
   fora da tela justamente enquanto ele precisa dela. */
.cal-legenda.marcando.no-topo { margin: 0 0 10px; }
.cal-cell.cal-marcando { cursor: crosshair; outline: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: -2px; }
.cal-cell.cal-marcado { background: var(--cal-cell-selected); outline: 2px solid var(--accent); outline-offset: -2px; }

/* ===== Sobre mim (Config): fatos com política de uso ===== */
.fatos-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fatos-count { color: var(--ink-dim); font-size: 12px; margin-left: auto; }
.fatos-list { display: flex; flex-direction: column; gap: 7px; }
.fatos-grupo { color: var(--ink-dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; margin-top: 6px; }
.fato-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px;
}
.fato-item.fato-proposto { border-color: rgba(255,180,84,.4); background: rgba(255,180,84,.06); }
.fato-item.sens-nunca { border-color: rgba(255,107,107,.35); }
.fato-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.fato-txt b { font-size: 13.5px; font-weight: 500; line-height: 1.4; text-wrap: pretty; }
.fato-txt b.fato-expirado { text-decoration: line-through; color: var(--ink-dim); }
.fato-txt small { color: var(--ink-dim); font-size: 11.5px; }
.fato-acoes { display: flex; align-items: center; gap: 6px; flex: none; }
.fato-x { border: 0; background: transparent; color: var(--ink-dim); cursor: pointer; font-size: 17px; line-height: 1; padding: 0 3px; }
.fato-x:hover { color: var(--danger); }
.fato-novo-pop {
  position: fixed; z-index: 95; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(440px, 92vw); display: flex; flex-direction: column; gap: 10px; padding: 18px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.fato-novo-pop b { font-size: 15px; }
.fato-novo-pop p { margin: 0; color: var(--ink-dim); font-size: 12.5px; }
.fato-novo-pop input {
  padding: 10px 12px; border-radius: 10px; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); font: inherit; font-size: 13.5px;
}
.fato-novo-pop input:focus { outline: none; border-color: var(--accent); }
.fn-sens { display: flex; flex-wrap: wrap; gap: 6px; }
.fn-opt {
  padding: 6px 10px; border-radius: 9px; cursor: pointer; font: inherit; font-size: 12.5px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-dim);
}
.fn-opt.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.fn-acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* atalho "pode propor encontro" dentro do menu de contexto da conversa */
.wc-enc-opt .wc-mode-check { opacity: 0; transition: opacity .12s; }
.wc-enc-opt.on .wc-mode-check { opacity: 1; color: var(--accent); }

/* barra de "pode propor encontro" no drawer do Tinder (mesma família da barra da IA) */
.ai-bar.enc-bar { margin-top: 8px; }
.ai-bar.enc-bar .ai-ico { opacity: .9; }
.desc-dist { display: flex; flex-direction: column; gap: 10px; }
.desc-dist .desc-field { max-width: 240px; }

/* ===== Pessoas (Config): uniões sugeridas + memória por pessoa ===== */
.cfg-pessoas { display: flex; flex-direction: column; gap: 18px; }
.pss-bloco { display: flex; flex-direction: column; gap: 8px; }
.pss-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.pss-head b { font-size: 14px; }
.pss-head small { color: var(--ink-dim); font-size: 12px; flex: 1; min-width: 160px; }
.pss-uniao, .pss-memorias { display: flex; flex-direction: column; gap: 8px; }
.pss-par {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 11px 13px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
}
.pss-par-lados { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 240px; }
.pss-lado { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pss-lado b { font-size: 13.5px; font-weight: 600; display: block; }
.pss-lado small { color: var(--ink-dim); font-size: 11.5px; }
.pss-igual { color: var(--accent); font-weight: 700; font-size: 15px; }
.pss-motivo { color: var(--ink-dim); font-size: 12px; width: 100%; }
.pss-acoes { display: flex; gap: 6px; margin-left: auto; }
.pss-mem {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
}
.pss-mem-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pss-mem-txt b { font-size: 13.5px; }
.pss-mem-txt p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.pss-mem-txt small { color: var(--ink-dim); font-size: 11.5px; }
.pss-mem-pend { color: var(--warn) !important; }

/* interruptor mestre do "chamar em outras redes" + as redes autorizadas embaixo dele */
.vinc-auto-row.mestre { flex: 1 1 100%; align-items: flex-start; padding: 12px 14px; }
/* a regra base do .vinc-auto-row põe align-items:center — numa coluna isso CENTRALIZA o
   texto. Aqui o alinhamento é à esquerda, como todo o resto do painel. */
.vinc-auto-row.mestre > span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; flex: 1 1 auto; min-width: 0; text-align: left; }
.vinc-auto-row.mestre b { font-size: 15px; }
.vinc-auto-row.mestre small { color: var(--ink-dim); font-size: 12.5px; line-height: 1.4; text-wrap: pretty; font-weight: 400; }
.vinc-sub { display: flex; flex-direction: column; gap: 10px; padding-left: 4px; border-left: 2px solid var(--line); margin-left: 6px; padding-top: 2px; }
.vinc-sub.apagado { opacity: .45; }
.vinc-sub .vinc-auto-head b { font-size: 13.5px; }
.vinc-msgs { color: var(--ink-dim); font-size: 11.5px; }

/* ===== Vínculos: cartões com foto (redesenho 25/07/2026) ===== */
.vinc-card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vinc-quem { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.vinc-quem b { font-size: 14.5px; letter-spacing: -.01em; }
.vinc-quem small { color: var(--ink-dim); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.vinc-av, .vinc-av-sm, .vu-av {
  flex: none; border-radius: 50%; object-fit: cover; background: var(--panel-3);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
}
.vinc-av { width: 40px; height: 40px; font-size: 15px; }
.vinc-av-sm { width: 24px; height: 24px; font-size: 11px; }
.vu-av { width: 52px; height: 52px; font-size: 19px; }
.vinc-av.ph, .vinc-av-sm.ph, .vu-av.ph { border: 0; }
.vinc-elo {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 0;
  padding: 7px 9px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.vinc-elo .vinc-onde { margin: 0; }

/* par de identidade: duas pessoas lado a lado com o elo no meio */
.vinc-uniao .vu-par {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  margin: 12px 0 10px; padding: 12px; border-radius: 14px;
  background: linear-gradient(180deg, var(--panel-3), var(--panel-2));
  border: 1px solid var(--line);
}
.vu-lado { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vu-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vu-info b { font-size: 14px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vu-canal {
  display: inline-flex; align-items: center; gap: 4px; width: fit-content;
  padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-dim);
}
.vu-canal.canal-whatsapp { color: var(--wa); border-color: rgba(37,211,102,.35); }
.vu-canal.canal-instagram { color: var(--ig-txt); border-color: rgba(214,49,127,.35); }
.vu-canal.canal-tinder { color: var(--love); border-color: rgba(255,91,127,.35); }
.vu-sub { color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.vu-elo {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--panel); border: 1px solid var(--line); color: var(--accent);
}
.vu-motivo { display: flex; align-items: center; gap: 6px; color: var(--ink-dim); }
.vinc-uniao .vinc-opcoes { display: flex; gap: 8px; }
@media (max-width: 560px) {
  .vinc-uniao .vu-par { grid-template-columns: 1fr; gap: 6px; }
  .vu-elo { transform: rotate(90deg); margin: 0 auto; }
}

/* ===== o elo: duas bolinhas de rede ligadas por um fio (26/07/2026) ===== */
.rede-bolinha {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-dim);
}
.rede-bolinha.canal-whatsapp { color: var(--wa); border-color: rgba(37, 211, 102, .4); }
.rede-bolinha.canal-instagram { color: var(--ig-txt); border-color: rgba(214, 49, 127, .4); }
.rede-bolinha.canal-tinder { color: var(--love); border-color: rgba(255, 91, 127, .4); }
.rede-bolinha.canal-badoo { color: #a78bfa; border-color: rgba(167, 139, 250, .4); }
.vl-elo { display: inline-flex; align-items: center; flex: none; }
.vl-fio { width: 14px; height: 2px; background: var(--line); flex: none; }

/* ===== vínculo em linha: fechado mostra só o elo; o resto abre ===== */
.vinc-linha {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: border-color .15s ease;
}
.vinc-linha.aberta { border-color: rgba(255, 255, 255, .16); }
.vl-head {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: none; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.vl-head:hover { background: var(--panel-3); }
.vl-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.vl-head .vinc-av { width: 34px; height: 34px; font-size: 13px; }
/* as caras das redes, levemente sobrepostas: lê-se "a mesma pessoa nas duas" */
.vl-caras { display: inline-flex; align-items: center; flex: none; }
.vl-cara { position: relative; display: inline-flex; }
.vl-caras .vl-fio { width: 12px; }
.vl-selo {
  position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-dim);
}
.vl-selo .ico { width: 10px; height: 10px; }
.vl-selo.canal-whatsapp { color: var(--wa); border-color: rgba(37, 211, 102, .5); }
.vl-selo.canal-instagram { color: var(--ig-txt); border-color: rgba(214, 49, 127, .5); }
.vl-selo.canal-tinder { color: var(--love); border-color: rgba(255, 91, 127, .5); }
.vl-selo.canal-badoo { color: #a78bfa; border-color: rgba(167, 139, 250, .5); }
.vl-nome {
  flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vl-meta { font-size: 12px; color: var(--ink-dim); font-variant-numeric: tabular-nums; flex: none; }
.vl-chev { color: var(--ink-dim); flex: none; transition: transform .15s ease; }
.vinc-linha.aberta .vl-chev { transform: rotate(90deg); }
.vl-corpo { display: flex; flex-direction: column; gap: 10px; padding: 2px 14px 14px; }
/* o `hidden` do HTML precisa ganhar da regra acima: sem isto o corpo fica na tela com o
   cartão "fechado", que é exatamente o que o redesenho veio tirar do caminho */
.vl-corpo[hidden] { display: none; }
.vl-pontas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vl-ponta {
  display: flex; align-items: center; gap: 9px; min-width: 0;
  padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.vl-ponta div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vl-ponta b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-ponta small { font-size: 11.5px; color: var(--ink-dim); }
@media (max-width: 560px) { .vl-pontas { grid-template-columns: 1fr; } }

/* ===== filtro de IA nas listas de conversa (os 4 canais) ===== */
.ia-filtro {
  display: flex; gap: 4px; padding: 6px 10px 8px; border-bottom: 1px solid var(--line);
}
.ia-chip {
  flex: 1; padding: 5px 8px; border-radius: 8px; cursor: pointer; font: inherit;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-dim);
}
.ia-chip:hover { color: var(--ink); }
.ia-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ia-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ===== Badoo: fila de quem já te curtiu ===== */
.bcu { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.bcu-head { display: flex; align-items: center; gap: 12px; }
.bcu-tit { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.bcu-tit b { font-size: 15px; }
.bcu-tit small { color: var(--ink-dim); font-size: 12px; }
.bcu-auto {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.bcu-nota { flex-basis: 100%; margin: 2px 0 0; font-size: 12px; color: var(--ink-dim); line-height: 1.5; text-wrap: pretty; }
.bcu-nota b { color: var(--ink); }
.bcu-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.bcu-card {
  display: flex; flex-direction: column; gap: 8px; padding: 10px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.bcu-foto { position: relative; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; background: var(--panel-3); }
.bcu-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bcu-sem-foto { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--ink-dim); }
.bcu-num {
  position: absolute; top: 6px; left: 6px; min-width: 20px; padding: 1px 6px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; font-weight: 700; text-align: center;
}
.bcu-info { display: flex; flex-direction: column; gap: 2px; min-height: 34px; }
.bcu-info b { font-size: 13.5px; }
.bcu-info small { color: var(--ink-dim); font-size: 11.5px; line-height: 1.4; }
.bcu-bio { max-height: 54px; overflow: hidden; }
.bcu-acoes { display: flex; flex-wrap: wrap; gap: 6px; }
.bcu-decisoes { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); }
.bcu-dec { font-size: 12.5px; color: var(--ink-dim); display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.bcu-dec small { font-size: 11.5px; opacity: .8; }
.bcu-dec-like { color: var(--accent); font-weight: 650; }
.bcu-dec-pass { color: var(--ink-dim); font-weight: 650; }

.bcu-travado {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  background: rgba(255, 200, 97, .08); border: 1px solid rgba(255, 200, 97, .3); border-radius: var(--radius);
  color: #ffc861;
}
.bcu-travado b { display: block; font-size: 13.5px; }
.bcu-travado small { display: block; margin-top: 3px; color: var(--ink-dim); font-size: 12px; line-height: 1.5; text-wrap: pretty; }

/* ===== central de pessoas: busca, filtros e a memória dentro da linha ===== */
.pss-barra {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px; margin-bottom: 10px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.pss-busca {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px;
  padding: 7px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-dim);
}
.pss-busca input {
  flex: 1; min-width: 0; background: none; border: 0; color: var(--ink); font: inherit; font-size: 13.5px;
}
.pss-busca input:focus { outline: none; }
.pss-busca:focus-within { border-color: rgba(72, 213, 151, .45); }
.pss-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pss-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-dim);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.pss-chip:hover { color: var(--ink); }
.pss-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pss-chip i { font-style: normal; font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }
.pss-mem-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.pss-lista { display: flex; flex-direction: column; gap: 8px; }
.pss-mais { margin: 6px 2px 0; font-size: 12px; color: var(--ink-dim); text-align: center; }
.pss-ia {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 650;
  background: rgba(72, 213, 151, .12); color: var(--accent); border: 1px solid rgba(72, 213, 151, .3);
}
.pss-ias { display: flex; flex-wrap: wrap; gap: 8px; }
.pss-vinc-tag {
  flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 650;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-dim);
}
.pss-vinc-tag.padrao { opacity: .65; font-style: italic; }
.pss-vinc-wrap { position: relative; display: flex; }
.pss-vinc-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font: inherit;
  padding: 7px 11px; border-radius: 10px; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line);
}
.pss-vinc-btn:hover { border-color: rgba(72, 213, 151, .45); }
.pss-vinc-btn.vazio { color: var(--ink-dim); }
.pss-vinc-btn small { color: var(--ink-dim); font-size: 11px; }
.pss-vinc-btn .chev { color: var(--ink-dim); transform: rotate(90deg); }
.pss-vinc-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; }
.pss-mem-bloco {
  display: flex; flex-direction: column; gap: 8px; padding: 11px 13px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.pss-mem-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.pss-mem-head b { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.pss-mem-head small { color: var(--ink-dim); font-size: 11.5px; }
.pss-mem-txt { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink); text-wrap: pretty; }
.pss-mem-pend { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 12px; color: #ffc861; }

/* ===== revisão: as candidatas viram escolha clicável ===== */
.vr-porque { display: block; margin-top: 3px; font-size: 12.5px; color: var(--ink-dim); }
.vr-opcoes { display: flex; flex-direction: column; gap: 8px; }
.vr-opcao {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 11px; border-radius: 10px; cursor: pointer; font: inherit; color: inherit;
  background: var(--panel); border: 1px solid var(--line); transition: border-color .15s ease, background .15s ease;
}
.vr-opcao:hover { background: var(--panel-3); border-color: rgba(72, 213, 151, .45); }
.vr-opcao:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vr-op-txt { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.vr-op-txt b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.vr-op-txt small { font-size: 11.5px; color: var(--ink-dim); }
.vr-op-escolher {
  flex: none; font-size: 12px; font-weight: 650; color: var(--accent);
  padding: 5px 11px; border-radius: 999px; background: rgba(72, 213, 151, .12);
}

/* ===== tela "Mesma pessoa": um X por rede + qual recebe as mensagens ===== */
.id-canal { position: relative; }
.id-canal.principal { border-color: rgba(53,208,186,.4); background: rgba(53,208,186,.06); }
.id-canal-acoes { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.id-canal-x {
  border: 0; background: transparent; color: var(--ink-dim); cursor: pointer;
  font-size: 19px; line-height: 1; padding: 2px 6px; border-radius: 8px;
}
.id-canal-x:hover { color: var(--danger); background: rgba(255,107,107,.1); }
.id-selo {
  margin-left: 7px; padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600;
  background: rgba(53,208,186,.14); color: var(--accent); border: 1px solid rgba(53,208,186,.3);
  vertical-align: middle;
}
.id-nota { margin: 2px 0 0; color: var(--ink-dim); font-size: 12px; line-height: 1.5; text-wrap: pretty; }

/* ===== Iniciativas (aba Vínculos): a IA sugere puxar papo, o dono decide ===== */
.ini-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.ini-explica { margin: 0; color: var(--ink-dim); font-size: 12.5px; line-height: 1.5; text-wrap: pretty; }
.ini-head-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ini-card .ini-texto {
  width: 100%; resize: vertical; min-height: 44px; margin: 8px 0 10px;
  padding: 9px 11px; border-radius: 10px; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); font: inherit; font-size: 13.5px; line-height: 1.45;
}
.ini-card .ini-texto:focus { outline: none; border-color: var(--accent); }

/* ===== Aba tim-mari: a conversa dele COM o sistema =====
   Deliberadamente diferente das threads de conversa com pessoas: aqui não é paquera,
   é console. Bolha do tim-mari alinhada à esquerda, bolha dele à direita, e as ações
   viram cartões com o que aconteceu de fato (mais desfazer/confirmar). */
.assist-shell { display: flex; flex-direction: column; gap: 10px; height: calc(100vh - 190px); min-height: 380px; }
.assist-thread {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
  padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.assist-msg { display: flex; flex-direction: column; gap: 4px; max-width: 720px; }
.assist-msg.eu { align-self: flex-end; align-items: flex-end; }
.assist-msg.tim-mari { align-self: flex-start; align-items: flex-start; }
.assist-bolha {
  padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); text-wrap: pretty;
}
.assist-msg.eu .assist-bolha { background: rgba(53,208,186,.12); border-color: rgba(53,208,186,.32); }
.assist-msg.pensando .assist-bolha { color: var(--ink-dim); font-style: italic; }
.assist-meta { font-size: 11px; color: var(--ink-dim); }
.assist-acao {
  margin-top: 4px; padding: 8px 11px; border-radius: 11px; font-size: 12.5px; line-height: 1.45;
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 7px; max-width: 100%;
}
.assist-acao.ok { border-left-color: var(--accent); }
.assist-acao.err { border-left-color: var(--danger); }
.assist-acao.warn { border-left-color: #e8b64c; }
.assist-acao.off { opacity: .55; }
.assist-acao-txt b { color: var(--ink); text-transform: lowercase; }
.assist-acao-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.assist-saida {
  margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--bg); color: var(--ink-dim);
  font-size: 11.5px; line-height: 1.45; overflow-x: auto; max-height: 260px; white-space: pre-wrap;
}
.assist-compose { display: flex; gap: 8px; align-items: flex-end; }
.assist-compose textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 140px; padding: 12px 14px;
  border-radius: 12px; background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  font: inherit; font-size: 14px; line-height: 1.45;
}
.assist-compose textarea:focus { outline: none; border-color: var(--accent); }
.assist-hint { display: flex; flex-wrap: wrap; gap: 16px; color: var(--ink-dim); font-size: 12.5px; }
.assist-sw { display: inline-flex; align-items: center; gap: 7px; }
.assist-sw > span { cursor: default; }
.assist-hora {
  width: 56px; text-align: center; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--ink); border-radius: 7px; padding: 3px 6px; font: inherit; font-size: 12px;
}
.assist-hora:focus { outline: none; border-color: var(--accent); }
.assist-acoes { display: flex; flex-direction: column; gap: 6px; align-self: stretch; margin: -4px 0 2px; }
.assist-vazio { color: var(--ink-dim); font-size: 13.5px; line-height: 1.6; }
.assist-vazio ul { margin: 8px 0 0; padding-left: 18px; }
.assist-vazio li { margin: 3px 0; }

/* ===== Barra de comando (Ctrl/Cmd+K) ===== */
.cmdbar-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(6,9,13,.62);
  display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px;
  backdrop-filter: blur(2px);
}
/* display:flex acima vence o [hidden] do navegador — sem esta linha a barra fica SEMPRE
   aberta cobrindo o painel inteiro (foi o que a primeira prova visual pegou). */
.cmdbar-overlay[hidden] { display: none; }
.cmdbar {
  width: 100%; max-width: 640px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.5); overflow: hidden;
}
.cmdbar-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.cmdbar-top .ico { color: var(--accent); flex: none; }
.cmdbar input {
  flex: 1; background: transparent; border: 0; color: var(--ink); font: inherit; font-size: 15.5px;
}
.cmdbar input:focus { outline: none; }
.cmdbar kbd {
  font-size: 10.5px; color: var(--ink-dim); border: 1px solid var(--line);
  border-radius: 5px; padding: 2px 6px; background: var(--panel-2);
}
.cmdbar-out {
  padding: 12px 16px 14px; border-top: 1px solid var(--line); color: var(--ink);
  font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; max-height: 40vh; overflow-y: auto;
}
@media (max-width: 720px) {
  .assist-shell { height: calc(100vh - 210px); }
  .cmdbar-overlay { padding: 8vh 10px 10px; }
}

/* ===== menu de contexto: lista de vínculos agrupada ===== */
.wc-vinc-opts { display: flex; flex-direction: column; }
.wc-vinc-grupo {
  padding: 9px 12px 4px; color: var(--ink-dim); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .07em; font-weight: 600;
}


/* Botão em ação. Nasceu de um relato do dono: "cliquei e não tive nenhum retorno visual e
   nem acho que deu certo o clique". Enquanto a requisição corre, o botão fica travado e
   visivelmente ocupado — some a dúvida entre "não registrou" e "está trabalhando". */
button.trabalhando {
  opacity: .55;
  cursor: progress;
  position: relative;
}
button.trabalhando::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.10) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: btn-trabalhando 1s linear infinite;
  pointer-events: none;
}
@keyframes btn-trabalhando { from { background-position: 200% 0 } to { background-position: -200% 0 } }

/* ================================================================ PROGRESSO DAS CONVERSAS */
.prog { max-width: 1000px; margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* filtros: uma fileira só, acima do conteúdo que eles recortam */
.prog-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.prog-filtros .pj-seg { margin: 4px 0 10px; }
.prog-filtros .pj-seg button { font-size: 13px; padding: 6px 14px; }
.prog-filtros .pj-seg button.on { background: var(--accent); color: var(--accent-ink); }
.prog-csv { margin: 4px 0 10px auto; text-decoration: none; }

.prog-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line)); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; color: var(--ink); }
.prog-banner > span { display: inline-flex; align-items: center; gap: 7px; flex: 1; }
.prog-banner b { font-weight: 700; }

/* o cartão principal */
.prog-hero { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.prog-hero-head { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.prog-hero-id { flex: 1; min-width: 240px; }
.prog-hero-id h2 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.prog-hero-id p { font-size: 12px; color: var(--ink-dim); line-height: 1.5; margin: 0; max-width: 60ch; }
.prog-hero-v { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.prog-hero-v b { font-size: 48px; font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -.03em; }
.prog-hero-v b i { font-style: normal; font-size: 22px; font-weight: 700; color: var(--ink-dim); margin-left: 1px; }
.prog-hero-v small { font-size: 11px; color: var(--ink-dim); }
.prog-cmp { font-size: 12px; font-weight: 700; color: var(--ink-dim); }
.prog-cmp.sobe { color: var(--ok); }
.prog-cmp.desce { color: #ffb454; }
.prog-cmp.fraca { font-weight: 500; }

/* gráfico */
.prog-graf { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.prog-graf-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.prog-graf-tit { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-dim); }
.prog-svg-host { position: relative; width: 100%; }
.prog-svg { display: block; width: 100%; height: auto; outline: none; cursor: crosshair; }
.prog-svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.prog-grid { stroke: var(--line); stroke-width: 1; }
.prog-axis { fill: var(--ink-dim); font-size: 10px; font-family: var(--font); }
.prog-linha { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.prog-linha.parcial { stroke-dasharray: 3 4; opacity: .75; }
.prog-ponto { stroke: var(--panel-2); stroke-width: 2; }
.prog-sem-amostra { fill: none; stroke: var(--line); stroke-width: 1.5; }
.prog-ponta { fill: var(--ink); font-size: 12px; font-weight: 700; font-family: var(--font); }
.prog-cruz { stroke: var(--ink-dim); stroke-width: 1; opacity: 0; pointer-events: none; }
.prog-marca { stroke: var(--panel-2); stroke-width: 2; pointer-events: none; }

.prog-dica { position: absolute; z-index: 3; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; box-shadow: 0 10px 28px rgba(0,0,0,.45); pointer-events: none; min-width: 172px; }
.prog-dica-cab { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); margin-bottom: 6px; }
.prog-dica-l { display: flex; align-items: baseline; gap: 6px; font-size: 11.5px; color: var(--ink-dim); line-height: 1.7; }
.prog-dica-l b { font-size: 13px; font-weight: 800; color: var(--ink); }
.prog-dica-k { width: 10px; height: 2px; border-radius: 2px; flex: none; align-self: center; }
.prog-dica-pe { font-size: 10px; color: var(--ink-dim); margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--line); }

.prog-tabela-wrap { overflow-x: auto; margin-top: 6px; }
.prog-tabela { width: 100%; border-collapse: collapse; font-size: 12px; }
.prog-tabela th, .prog-tabela td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.prog-tabela thead th { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); }
.prog-tabela tbody th { font-weight: 600; color: var(--ink); }
.prog-tabela td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }

/* números do topo */
.prog-topo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 22px; }
.prog-num { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.prog-num b { font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 7px; }
.prog-num span { font-size: 13px; color: var(--ink); font-weight: 600; }
.prog-num small { font-size: 11px; color: var(--ink-dim); }
.prog-num.morno b { color: #ffb454; }
.prog-num.alerta b { color: var(--accent); }
.prog-delta { font-size: 12px; font-weight: 700; color: var(--ink-dim); }
.prog-delta.sobe { color: var(--ok); }
.prog-delta.desce { color: #ffb454; }

.prog-sec { margin-bottom: 26px; }
.prog-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.prog-sec-head h2 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0; }

.prog-dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prog-lado { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.prog-lado-tit { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); }
.prog-lado-nums { display: flex; gap: 22px; margin-top: 10px; flex-wrap: wrap; }
.prog-lado-nums > div { display: flex; flex-direction: column; gap: 1px; }
.prog-lado-nums b { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.prog-lado-nums span { font-size: 11px; color: var(--ink-dim); }

.prog-autores { display: flex; flex-direction: column; gap: 10px; }
.prog-autor { display: grid; grid-template-columns: 90px 1fr 150px; align-items: center; gap: 12px; }
.prog-autor-nm { font-size: 13px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.prog-key { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.prog-autor-v { font-size: 15px; font-weight: 800; color: var(--ink); text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.prog-autor-v small { font-size: 10px; font-weight: 500; color: var(--ink-dim); }
.prog-nota { font-size: 11px; color: var(--ink-dim); line-height: 1.55; margin: 10px 0 0; }
.prog-nota.rodape { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 26px; }
.prog-vazio { font-size: 13px; color: var(--ink-dim); padding: 10px 2px; }

.prog-lista { display: flex; flex-direction: column; }
.prog-item { display: flex; align-items: center; gap: 12px; padding: 10px 8px; background: transparent; border: none; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; font: inherit; width: 100%; transition: background .12s var(--ease); }
.prog-item:hover { background: var(--panel-2); }
.prog-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.prog-item:last-child { border-bottom: none; }
.prog-av { width: 38px; height: 38px; flex: none; }
.prog-item-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.prog-item-nm { font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-canal { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); background: var(--panel-3); border-radius: 999px; padding: 1px 7px; flex: none; }
.prog-canais { display: inline-flex; gap: 4px; flex: none; }
.prog-canais i { font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); background: var(--panel-3); border-radius: 999px; padding: 1px 7px; }
.prog-canais i b { color: var(--ink); font-weight: 800; }
.prog-item-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.prog-tag { font-size: 11px; color: var(--ink-dim); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.prog-tag.ruim { color: #ff8a8a; border-color: color-mix(in srgb, #ff8a8a 35%, var(--line)); }
.prog-item-v { text-align: right; flex: none; display: flex; flex-direction: column; }
.prog-item-v b { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.prog-item-v span { font-size: 10px; color: var(--ink-dim); }

@media (max-width: 860px) {
  .prog-topo { grid-template-columns: repeat(2, 1fr); }
  .prog-dupla { grid-template-columns: 1fr; }
  .prog-hero-head { gap: 12px; }
  .prog-hero-v { text-align: left; align-items: flex-start; }
  .prog-hero-v b { font-size: 38px; }
  .prog-autor { grid-template-columns: 74px 1fr 118px; }
  .prog-csv { margin-left: 0; }
}

/* faixa de saúde da conversa (mesma medida da aba Progresso, dentro da conversa) */
.saude { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 16px; background: var(--panel-2); border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--ink-dim); }
.saude > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.saude b { color: var(--ink); font-weight: 700; }
.saude .ruim, .saude .ruim b { color: #ff8a8a; }
.saude-canais { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; background: var(--panel-3); border-radius: 999px; padding: 1px 8px; }
.saude-est { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; border-radius: 999px; padding: 2px 8px; background: var(--panel-3); color: var(--ink); }
.saude-est.est-andando { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.saude-est.est-nova { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.saude-est.est-esfriando { background: rgba(255,180,84,.18); color: #ffb454; }
.saude-est.est-parada { background: var(--panel-3); color: var(--ink-dim); }
.drawer .saude { border-radius: 10px; border: 1px solid var(--line); margin: 0 0 10px; }

/* Dez abas não cabem em tela de laptop nenhuma (precisam de 1104px e a maior sobra é 1033).
   Em vez de esconder metade delas num scroll sem aviso, o rótulo encolhe pro ícone e só a
   aba aberta fica escrita. O nome continua no title pra quem passa o mouse ou usa leitor de
   tela. Abaixo de 720px vale o layout mobile, que já quebra a linha. */
@media (min-width: 721px) and (max-width: 1550px) {
  .topbar.panel .tab { font-size: 13px; gap: 6px; }
}
@media (min-width: 721px) and (max-width: 1720px) {
  .topbar.panel .tab:not(.active) .tab-txt { display: none; }
  .topbar.panel .tab:not(.active) { padding-inline: 11px; }
}

/* Os rótulos das pilhas de status ("Tinder", "WhatsApp"…) comem ~380px da barra e o ícone
   com a bolinha já diz tudo — o nome fica no title. Sem isso, em tela grande sobrava espaço
   pras pilhas e faltava pras abas. */
.topbar.panel .stat-pill .lbl { display: none; }

/* aperto final entre 721 e 1100: só o ícone, com a folga mínima */
@media (min-width: 721px) and (max-width: 1100px) {
  .topbar.panel .tab:not(.active) { padding-inline: 8px; }
  .topbar.panel .brand .tag { display: none; }
}

/* O drawer é um painel fora da tela (fixed + translateX(100%)) e, mesmo fechado, esticava a
   largura rolável do documento — abaixo de ~1000px a página inteira ganhava rolagem
   horizontal. `clip` corta o que passa sem criar container de rolagem, então o topo continua
   grudado (sticky) e o transbordo de verdade dentro das telas continua sendo pego pelas
   provas, que medem cada view contra o próprio container. */
html { overflow-x: clip; }

/* Drawer fechado é inerte: sem visibilidade ele não pinta, não entra na ordem do Tab e não
   aparece em captura de tela. A transição da visibilidade espera a do transform terminar,
   senão ele sumiria antes de terminar de deslizar pra fora. */
.drawer { visibility: hidden; transition: transform .32s var(--ease), visibility 0s linear .32s; }
.drawer.show { visibility: visible; transition: transform .32s var(--ease), visibility 0s; }

/* chave de deslizar sozinho, no cabeçalho do Badoo */
.bd-desliza { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; margin-right: 6px; }
.bd-desliza-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.bd-desliza small { font-size: 11px; color: var(--ink-dim); white-space: nowrap; }
@media (max-width: 860px) { .bd-desliza small { display: none; } }

/* ================================================================ PRIMEIRA MENSAGEM (sem IA) */
.pri { max-width: 1000px; margin: 0 auto; padding-bottom: 90px; }
.pri-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.pri-tit { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.pri-tit b { font-size: 17px; font-weight: 800; color: var(--ink); }
.pri-tit small { font-size: 12px; color: var(--ink-dim); }
.pri-acoes { display: flex; gap: 8px; }
.pri-sec { margin-bottom: 22px; }
.pri-sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pri-sec-head h2 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0; }
.pri-sec-head small { font-size: 11.5px; color: var(--ink-dim); }
.pri-sec-head small b { color: var(--ink); font-weight: 700; }
.pri-vazio { font-size: 13px; color: var(--ink-dim); padding: 8px 2px; }

.pri-modelos { display: flex; flex-direction: column; gap: 6px; }
.pri-modelo { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.pri-modelo.on { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, var(--panel-2)); }
.pri-check { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 1.5px solid var(--line-soft); background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--accent-ink); padding: 0; }
.pri-modelo.on .pri-check { background: var(--accent); border-color: var(--accent); }
.pri-modelo-txt { flex: 1; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.pri-lixo { flex: none; color: var(--ink-dim); }
.pri-novo { display: flex; gap: 8px; margin-top: 10px; }
.pri-novo input { flex: 1; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font: inherit; font-size: 13.5px; padding: 9px 12px; }
.pri-novo input:focus { outline: none; border-color: var(--accent); }

.pri-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.pri-card { position: relative; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 0 0 8px; cursor: pointer; overflow: hidden; text-align: left; font: inherit; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s var(--ease); }
.pri-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pri-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pri-foto { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--panel-3); }
.pri-foto.ph { display: grid; place-items: center; font-size: 30px; border-radius: 0; }
.pri-nm { display: flex; align-items: baseline; gap: 6px; padding: 0 10px; font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pri-nm i { font-style: normal; font-size: 11px; color: var(--ink-dim); }
.pri-marca { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: rgba(11,15,20,.7); border: 1.5px solid var(--line-soft); display: grid; place-items: center; color: var(--accent-ink); z-index: 1; }
.pri-card.on .pri-marca { background: var(--accent); border-color: var(--accent); }

.pri-rodape { position: sticky; bottom: 0; background: linear-gradient(to top, var(--bg) 70%, transparent); padding: 14px 0 10px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pri-resumo { font-size: 13px; color: var(--ink-dim); flex: 1; }
.pri-resumo b { color: var(--ink); font-weight: 800; }
.pri-btns { display: flex; gap: 8px; }
.pri-btns button[disabled] { opacity: .45; pointer-events: none; }

.pri-result { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pri-result-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.pri-result-top b { font-size: 14px; color: var(--ink); }
.pri-result-top span { font-size: 12px; color: var(--ink-dim); flex: 1; }
.pri-linhas { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; }
.pri-linha { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.pri-linha:last-child { border-bottom: none; }
.pri-linha b { flex: none; width: 140px; color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pri-linha span { color: var(--ink-dim); overflow-wrap: anywhere; }
.pri-linha.ok b { color: var(--ok); }
.pri-linha.ruim b { color: var(--danger); }
.pri-linha.fraco { opacity: .65; }

.pri-modal-fundo { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 200; display: grid; place-items: center; padding: 20px; }
.pri-modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.pri-modal h3 { margin: 0 0 8px; font-size: 16px; color: var(--ink); }
.pri-modal p { margin: 0 0 16px; font-size: 13px; color: var(--ink-dim); line-height: 1.5; }
.pri-modal-btns { display: flex; gap: 8px; justify-content: flex-end; }

@media (max-width: 640px) { .pri-grade { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); } .pri-linha b { width: 96px; } }

/* motor da IA: modelo e esforço, na Config */
.cfg-motor { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.cfg-motor-bloco { display: flex; flex-direction: column; gap: 8px; }
.cfg-motor-head { display: flex; align-items: baseline; gap: 8px; }
.cfg-motor-head b { font-size: 13px; color: var(--ink); font-weight: 700; }
.cfg-motor-head small { font-size: 11px; color: var(--ink-dim); }
.cfg-motor-ops { display: flex; flex-wrap: wrap; gap: 6px; }
.cfg-motor-op { display: flex; flex-direction: column; gap: 1px; align-items: flex-start; padding: 7px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font: inherit; text-align: left; transition: all .15s var(--ease); }
.cfg-motor-op b { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.cfg-motor-op small { font-size: 10.5px; color: var(--ink-dim); }
.cfg-motor-op.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); }
.cfg-motor-op.on b { color: var(--accent); }
.cfg-motor-pe { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.cfg-motor-pe small { font-size: 11px; color: var(--ink-dim); flex: 1; min-width: 200px; }

/* ---------------------------------------------------------------- necessidades
   O que está apertando e quanto falta. Sem total somado: cada necessidade é uma
   coisa única, e a soma delas não significa nada. */
.nec-wrap { display: flex; flex-direction: column; gap: 14px; }

.nec-form { display: grid; grid-template-columns: 1fr 140px 190px auto; gap: 8px; align-items: center; }
.nec-form input {
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; min-width: 0;
}
.nec-form input:focus { outline: none; border-color: var(--accent); }
.nec-form input::placeholder { color: var(--ink-dim); }
/* dinheiro alinhado à direita e com dígitos de largura fixa: coluna de valor que dança a
   cada tecla é o que faz máscara de moeda parecer quebrada mesmo quando está certa */
.nec-money { text-align: right; font-variant-numeric: tabular-nums; }

.nec-lista { display: flex; flex-direction: column; gap: 8px; }
.nec-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
}
.nec-item-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nec-item-txt b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.nec-item-txt span { font-size: 12px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.nec-item-acoes { display: flex; gap: 6px; flex: 0 0 auto; }
.nec-item-acoes .btn { padding: 6px 12px; font-size: 13px; }
.btn.ghost.perigo:hover { border-color: var(--danger); color: var(--danger); }
/* resolvida continua visível (serve de histórico) mas sai do primeiro plano */
.nec-item.resolvida { opacity: .55; }
.nec-item.resolvida .nec-item-txt b { text-decoration: line-through; }

.nec-vazio { color: var(--ink-dim); font-size: 13px; margin: 0; }

/* No celular a linha de 4 colunas não cabe: vira uma coluna, e o botão ocupa a largura
   toda pra ser alcançável com o polegar. */
@media (max-width: 720px) {
  .nec-form { grid-template-columns: 1fr; }
  .nec-money { text-align: left; }
  .nec-item { flex-direction: column; align-items: stretch; }
  .nec-item-acoes { justify-content: flex-end; }
}
