/* Fontes auto-hospedadas (substitui Google Fonts). Os url() sao reescritos com hash pelo ManifestStorage no collectstatic. */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/dmsans-latin.7c87a648293f.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/dmsans-latin-ext.49935c4b6235.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dmserif-latin.c27d5a47c09e.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dmserif-latin-ext.fbcccd02b7b0.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dmserif-italic-latin.581414e1e577.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dmserif-italic-latin-ext.b6dc2f28ec50.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* keep.in.touch â€” design tokens (ver documentation/PROJECT.md) */
:root {
  --forest: #1D3A27; /* escuro primÃ¡rio, tÃ­tulos */
  --grove:  #3A6B47; /* marca, botÃµes, Ã­cones */
  --sage:   #6A8A74; /* texto secundÃ¡rio */
  --mist:   #C4D9C8; /* bordas, divisores */
  --dew:    #F0F4EE; /* fundos, cards */
  --warm:   #E8A87C; /* destaque, calor humano */

  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --surface: #ffffff; /* superfÃ­cie de cards/topo/sidebar */

  --radius: 16px;
  --shadow: 0 8px 24px rgba(29, 58, 39, 0.08);
}

/* Tema escuro â€” mantÃ©m a identidade verde, invertendo claridade */
[data-theme="escuro"] {
  --forest: #EAF1EA; /* vira o texto claro */
  --grove:  #7DBB8C;
  --sage:   #9FB8A6;
  --mist:   #2C4434; /* bordas/divisores escuros */
  --dew:    #13201A; /* fundo */
  --warm:   #E8A87C;
  --surface: #1B2C22; /* cards */
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Interface v3 — paleta do UI Kit aprovado (documentation/v3_layout/info_v3.pdf).
   Sempre depois de [data-theme="escuro"] no cascade: a v3 não tem variante escura,
   então vence e mostra a paleta clara mesmo com o tema escuro do usuário ativo. */
html[data-versao-interface="v3"] {
  --forest:  #1A1A1A; /* texto primário/títulos */
  --grove:   #1A8FBF; /* cerúleo — marca, botões, links, ícones */
  --sage:    #666666; /* texto secundário */
  --mist:    #E0E0E0; /* bordas */
  --dew:     #E8F4FA; /* fundo/tint azul claro */
  --warm:    #F5A623; /* laranja mel — destaque/ação */
  --surface: #FFFFFF; /* cards/topbar/sidebar */
  --shadow:  0 8px 24px rgba(12, 68, 124, .08);
}

/* Sombras/overlays escritos como rgba() literal (equivalentes a --forest/--grove)
   não respondem à redefinição de tokens acima — só as classes usadas fora de
   home.html/home_v2.html/feed_amigo.html (que não são renderizados em v3). */
html[data-versao-interface="v3"] .field input:focus,
html[data-versao-interface="v3"] .field textarea:focus,
html[data-versao-interface="v3"] .field select:focus {
  box-shadow: 0 0 0 3px rgba(26, 143, 191, .15);
}
html[data-versao-interface="v3"] .msg-success { background: rgba(26, 143, 191, .10); }
html[data-versao-interface="v3"] .conexao-card:hover { box-shadow: 0 8px 24px rgba(12, 68, 124, .12); }
html[data-versao-interface="v3"] .audio-overlay,
html[data-versao-interface="v3"] .reco-overlay,
html[data-versao-interface="v3"] dialog#modal-audio-conexao::backdrop {
  background: rgba(12, 68, 124, .55);
}
html[data-versao-interface="v3"] dialog#modal-confirmar,
html[data-versao-interface="v3"] dialog#modal-alerta {
  box-shadow: 0 12px 40px rgba(12, 68, 124, .18);
}
html[data-versao-interface="v3"] dialog#modal-confirmar::backdrop,
html[data-versao-interface="v3"] dialog#modal-alerta::backdrop {
  background: rgba(12, 68, 124, .45);
}

* { box-sizing: border-box; }

/* O atributo hidden é o mecanismo que o JS usa para esconder itens (listas em
   blocos, botões condicionais). Sem esta regra, qualquer `display: flex` de
   componente ganha do display:none do navegador e o elemento continua visível. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--forest);
  background: var(--dew);
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0 0 .4em;
}

a { color: var(--grove); }

/* ---------- Logo ---------- */
.brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--forest);
  text-decoration: none;
}
.brand .dot { color: var(--grove); }
.brand-logo { height: 36px; max-height: 36px; max-width: 160px; width: auto; display: block; object-fit: contain; }

/* ---------- Privacidade / LGPD ---------- */
.privacidade-wrap {
  min-height: 100vh;
  background: var(--dew);
  padding: 48px 24px;
}
.privacidade-content {
  max-width: 720px;
  margin: 0 auto;
}
.privacidade-content .brand { display: inline-block; margin-bottom: 32px; }
.privacidade-content h1 { font-size: 2rem; margin-bottom: 4px; }
.privacidade-atualizado { color: var(--sage); font-size: .85rem; margin-bottom: 32px; }
.privacidade-content h2 { font-size: 1.1rem; margin: 32px 0 8px; color: var(--forest); }
.privacidade-content p, .privacidade-content li { color: var(--forest); line-height: 1.7; }
.privacidade-content ul { padding-left: 20px; margin: 8px 0; }
.privacidade-content li { margin-bottom: 6px; }
.privacidade-content a { color: var(--grove); }
.privacidade-footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--mist); }
.privacidade-estreito { max-width: 560px; }
.privacidade-nota { color: var(--sage); font-size: .85rem; }
.privacidade-sucesso {
  background: rgba(58, 107, 71, .1);
  border: 1px solid var(--grove);
  border-radius: 8px;
  padding: 16px;
}

/* Tabelas legais (bases de tratamento, subprocessadores). Rolam sozinhas para
   que a página nunca ganhe barra horizontal no celular. */
.tabela-scroll { overflow-x: auto; margin: 12px 0 20px; }
.tabela-legal {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: .88rem;
}
.tabela-legal th, .tabela-legal td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--mist);
  color: var(--forest);
  vertical-align: top;
}
.tabela-legal th { color: var(--sage); font-weight: 500; white-space: nowrap; }

.aviso-exclusao {
  background: rgba(232, 168, 124, .13);
  border: 1px solid var(--warm);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
}
.aviso-exclusao strong { color: var(--forest); }
.aviso-exclusao p, .aviso-exclusao li { color: var(--forest); font-size: .9rem; }
.aviso-exclusao p { margin-top: 6px; }
.aviso-exclusao ul { margin: 8px 0 0; padding-left: 20px; }

.btn-inline { display: inline-block; width: auto; text-decoration: none; }
.opcional { color: var(--sage); font-weight: 400; }

/* Aceite dos documentos legais no cadastro */
.field-aceite { margin: 20px 0 16px; }
.label-aceite {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--forest);
  cursor: pointer;
}
.label-aceite input[type="checkbox"] {
  width: auto;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--grove);
}

@media (max-width: 760px) { .privacidade-content h1 { font-size: 1.5rem; } }

/* ---------- Auth (cadastro / login) ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
}
.auth-card h1 { font-size: 1.9rem; }
.auth-sub { color: var(--sage); margin: 0 0 28px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 500;
  font-size: .9rem;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--forest);
  background: var(--dew);
  border: 1px solid var(--mist);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  border-color: var(--grove);
  box-shadow: 0 0 0 3px rgba(58, 107, 71, 0.15);
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 13px 18px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: var(--grove);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--forest); }

.auth-foot { margin-top: 22px; text-align: center; color: var(--sage); font-size: .92rem; }
.auth-lgpd { margin-top: 12px; text-align: center; color: var(--sage); font-size: .78rem; }

.errors {
  list-style: none;
  margin: 0 0 20px;
  padding: 12px 14px;
  background: rgba(232, 168, 124, 0.15);
  border: 1px solid var(--warm);
  border-radius: 10px;
  color: #8a4b25;
  font-size: .9rem;
}
.field-error { color: #8a4b25; font-size: .82rem; margin-top: 5px; }

/* ---------- App shell / dashboard ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--mist);
}
.topbar nav { display: flex; align-items: center; gap: 4px; }
.topbar nav a { margin-left: 18px; color: var(--sage); text-decoration: none; font-size: .92rem; }
.topbar nav a:hover { color: var(--grove); }
@media (max-width: 760px) {
  .hide-mobile { display: none !important; }
  .topbar { padding: 10px 16px; }
  .topbar nav { flex-wrap: nowrap; gap: 2px; }
  .topbar nav a { margin-left: 8px; white-space: nowrap; }
  .brand { font-size: 1.25rem; }
}

.container { max-width: 1040px; margin: 0 auto; padding: 32px; }

.greeting { font-size: 2.1rem; }
.greeting-sub { color: var(--sage); margin-top: -4px; }

.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-top: 28px;
}
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}
.card h2 { font-size: 1.3rem; }
.card .hint { color: var(--sage); font-size: .9rem; }

.empty {
  text-align: center;
  color: var(--sage);
  padding: 18px 8px;
}
.empty .seed { font-size: 2rem; }

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--forest);
  font-size: .8rem;
  margin-right: 6px;
}
.pill.warm { background: rgba(232, 168, 124, 0.25); color: #8a4b25; }

/* ---------- Mensagens (flash) ---------- */
.messages { list-style: none; padding: 0; margin: 0 0 20px; }
.msg {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: .92rem;
  border: 1px solid var(--mist);
  background: var(--surface);
}
.msg-success { background: rgba(58, 107, 71, 0.10); border-color: var(--grove); color: var(--forest); }
.msg-error { background: rgba(232, 168, 124, 0.15); border-color: var(--warm); color: #8a4b25; }

/* ---------- BotÃµes auxiliares ---------- */
.btn-inline { width: auto; }
.btn-ghost {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--mist);
  border-radius: 10px;
  background: var(--surface);
  color: var(--grove);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--grove); }
.btn-ghost.danger { color: #b04a2a; width: 100%; margin-top: 8px; }

.link-acao { font-size: .88rem; text-decoration: none; }
.voltar { display: inline-block; margin-bottom: 16px; color: var(--sage); text-decoration: none; }
.voltar:hover { color: var(--grove); }

/* ---------- CabeÃ§alhos de pÃ¡gina ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; }
.numerao { font-family: var(--font-display); font-size: 2.6rem; color: var(--grove); margin: 4px 0 0; }
.container.narrow { max-width: 680px; }

/* ---------- Avatar ---------- */
.avatar {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--mist) center/cover no-repeat;
  color: var(--forest);
  font-weight: 500;
  font-size: .95rem;
  flex: none;
}
.avatar.lg { width: 60px; height: 60px; font-size: 1.2rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 1.7rem; font-family: var(--font-display); }

/* ---------- Badge de urgÃªncia ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 500;
  color: #fff;
  background: var(--badge, var(--sage));
}

/* ---------- Linhas / cards de conexÃ£o ---------- */
.conexao-linha {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-top: 1px solid var(--mist);
  text-decoration: none;
  color: inherit;
}
.conexao-linha:first-of-type { border-top: none; }
.conexao-linha:hover { background: var(--dew); border-radius: 10px; }
.conexao-linha-info { display: flex; flex-direction: column; flex: 1; }
.conexao-linha-info small { color: var(--sage); }

.conexoes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 180px));
  gap: 18px;
  margin-top: 24px;
}
.conexao-card {
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .12s, box-shadow .12s;
}
.conexao-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(29,58,39,.12); }
.conexao-card .avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 22px;
  flex: unset;
  background-size: cover;
  background-position: center;
}
.conexao-card .name {
  font-size: 17px;
  font-weight: 600;
  color: #2b2b2b;
  margin-bottom: 4px;
}
.conexao-card .location {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}
.conexao-card .separator {
  display: block;
  width: 100%;
  height: 0;
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 0 0 12px;
}
.conexao-card .status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
}
.conexao-card .status.red    { background: #f7dddd; color: #b24a4a; }
.conexao-card .status.orange { background: #f8ead4; color: #a96d19; }
.conexao-card .status.green  { background: #e4f1d8; color: #5d8d25; }
.conexao-card .info { text-align: left; }
.conexao-card .item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #444;
  margin-bottom: 8px;
}
.conexao-card .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.conexao-card .dot.red    { background: #e05a5a; }
.conexao-card .dot.orange { background: #dc9228; }
.conexao-card .dot.green  { background: #6ba428; }
.conexao-card .tag {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #efefef;
  color: #666;
  font-size: 11px;
}

/* ---------- Atividade recente ---------- */
.atividade {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px; border-top: 1px solid var(--mist);
  text-decoration: none; color: inherit;
}
.atividade:first-of-type { border-top: none; }
.atividade small { display: block; color: var(--sage); }
.atividade-icone { font-size: 1.2rem; }

/* ---------- Perfil (pÃ¡gina individual) ---------- */
.perfil-head { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.perfil-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.perfil-id { flex: 1; }

/* ---------- Cadência (perfil da conexão) ----------
   A marcação existia sem nenhuma regra: virava <ul> com marcadores e os spans
   corriam soltos no texto, com o selo no meio da frase. Cada canal vira um
   bloco: título e meta na primeira linha, selo e último contato abaixo. */
.cadencia-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cadencia-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 10px;
  padding: 12px 14px;
  background: var(--dew);
  border-radius: 12px;
}
.cadencia-tipo { font-weight: 600; color: var(--forest); }
.cadencia-meta { justify-self: end; font-size: .88rem; color: var(--sage); }
.cadencia-item .badge { grid-column: 1 / -1; justify-self: start; }
.cadencia-item small { grid-column: 1 / -1; color: var(--sage); font-size: .82rem; }
.perfil-id h1 { margin-bottom: 2px; }
.perfil-id .pill { margin-left: 6px; }

/* ---------- FormulÃ¡rios ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-card { margin-top: 24px; }
.field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--forest);
  background: var(--dew);
  border: 1px solid var(--mist);
  border-radius: 10px;
  outline: none;
}
.field textarea:focus, .field select:focus { border-color: var(--grove); box-shadow: 0 0 0 3px rgba(58,107,71,.15); }
.field-hint { color: var(--sage); font-size: .8rem; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.interacao-form .btn { width: auto; }

/* ---------- Infos (sidebar perfil) ---------- */
.infos { list-style: none; padding: 0; margin: 0; }
.infos li { padding: 6px 0; }
.infos li span { display: inline-block; width: 24px; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline-item { display: flex; gap: 14px; padding: 14px 0; border-left: 2px solid var(--mist); padding-left: 16px; margin-left: 8px; }
.timeline-item.contato { border-left-color: var(--grove); }
.timeline-icone { font-size: 1.2rem; }
.timeline-corpo { flex: 1; }
.timeline-topo { display: flex; justify-content: space-between; align-items: baseline; }
.timeline-topo small { color: var(--sage); }
.timeline-corpo p { margin: 4px 0 0; }

/* ---------- App shell com menu lateral ---------- */
.app-shell {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 65px);
}
.content { flex: 1; min-width: 0; }
.content .container { padding-top: 28px; max-width: none; }

.sidebar {
  width: 240px;
  flex: none;
  background: var(--surface);
  border-right: 1px solid var(--mist);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--forest);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
}
.sidebar-link:hover { background: var(--dew); }
.sidebar-link.active { background: rgba(58, 107, 71, 0.12); color: var(--grove); }
.sidebar-link .ico { width: 20px; text-align: center; }
.sidebar-sub { padding-left: 28px; font-size: .9rem; }
.btn-sidebar { width: 100%; text-align: center; text-decoration: none; margin-top: auto; }

@media (max-width: 760px) {
  .app-shell { flex-direction: column; min-height: 0; }
  .sidebar {
    width: auto;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--mist);
    overflow-x: auto;
    padding: 12px 16px;
  }
  .sidebar-nav { flex-direction: row; gap: 6px; }
  .btn-sidebar { width: auto; margin: 0 0 0 auto; white-space: nowrap; }
}

.field.check label { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.field.check input { width: auto; }

/* ---------- Filtros da lista ---------- */
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}
.filtros input[type="text"] { flex: 1; min-width: 180px; }
.filtros input, .filtros select {
  padding: 10px 12px;
  font: inherit;
  color: var(--forest);
  background: var(--dew);
  border: 1px solid var(--mist);
  border-radius: 10px;
}
.filtros .btn { width: auto; }
.rodape-lista { margin-top: 24px; }
.rodape-lista a { color: var(--sage); text-decoration: none; font-size: .9rem; }

/* ---------- AÃ§Ãµes na timeline ---------- */
.timeline-acoes { display: flex; gap: 14px; margin-top: 8px; }
.timeline-acoes a, .link-btn {
  background: none; border: none; padding: 0;
  color: var(--sage); font: inherit; font-size: .82rem;
  text-decoration: none; cursor: pointer;
}
.timeline-acoes a:hover, .link-btn:hover { color: var(--grove); }
.timeline-acoes form { display: inline; }
.timeline-foto { max-width: 100%; border-radius: 10px; margin-top: 8px; display: block; }

/* ---------- Campos personalizados ---------- */
.campo-card .card-head { align-items: center; gap: 10px; }
.campo-acoes { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.campo-acoes form { display: inline; margin: 0; }
.link-btn.danger { color: #b04a2a; }

/* ---------- Galeria de momentos ---------- */
.galeria { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.galeria img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }

/* ---------- Lembretes ---------- */
.lembretes { list-style: none; padding: 0; margin: 0; }
.lembrete {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  border-top: 1px solid var(--mist);
}
.lembrete:first-child { border-top: none; }
.lembrete-icone { font-size: 1.3rem; }
.lembrete-corpo { flex: 1; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.lembrete-corpo span { color: var(--sage); font-size: .9rem; }
.lembrete.aniversario { background: rgba(232, 168, 124, 0.08); border-radius: 10px; }
.lembrete-data {
  flex-shrink: 0; text-align: right; font-size: .84rem; color: var(--sage); font-variant-numeric: tabular-nums;
}
.lembrete-data small { display: block; font-size: .72rem; opacity: .8; }
.lembrete-data.atrasado { color: #b04a2a; font-weight: 600; }
.ver-mais { margin-top: 10px; font-size: .84rem; }
.secao-contagem {
  font-size: .78rem; font-weight: 600; color: var(--sage);
  background: var(--mist); border-radius: 999px; padding: 1px 8px; vertical-align: middle;
}

/* ---------- BotÃ£o tamanho pequeno ---------- */
.btn-sm { padding: 6px 12px !important; font-size: .82rem !important; width: auto !important; }

/* ---------- CalendÃ¡rio ---------- */
.cal-card { padding: 0; overflow: hidden; }
.cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--mist);
}
.cal-nav h2 { margin: 0; font-size: 1.2rem; }
.cal-btn { padding: 8px 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-header-dia {
  text-align: center; padding: 8px 4px;
  font-size: .75rem; font-weight: 600; color: var(--sage);
  border-bottom: 1px solid var(--mist);
}
.cal-dia {
  min-height: 80px; padding: 6px 4px;
  border-right: 1px solid var(--mist); border-bottom: 1px solid var(--mist);
  vertical-align: top; overflow: hidden;
}
.cal-dia:nth-child(7n) { border-right: none; }
.cal-vazio { background: var(--dew); }
.cal-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: .8rem; margin-bottom: 3px;
}
.cal-hoje .cal-num { background: var(--grove); color: #fff; font-weight: 600; }
.cal-evento {
  display: block; font-size: .72rem; padding: 2px 5px;
  border-radius: 5px; margin-top: 2px; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-decoration: none; line-height: 1.4;
}
.cal-evento:hover { opacity: .85; }
.cal-evento-almoco   { background: var(--warm); }
.cal-evento-jantar   { background: var(--forest); }
.cal-evento-cafe     { background: #8B6914; }
.cal-evento-drinks   { background: #7B5EA7; }
.cal-evento-reuniao  { background: #3B6E9E; }
.cal-evento-encontro { background: var(--grove); }
.cal-evento-outro    { background: var(--sage); }
@media (max-width: 760px) {
  .cal-dia { min-height: 42px; }
  .cal-evento { display: none; }
  .tem-evento .cal-num { outline: 2px solid var(--grove); }
}

/* ---------- Eventos na conexÃ£o ---------- */
.eventos-lista { list-style: none; padding: 0; margin: 0; }
.evento-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px; border-top: 1px solid var(--mist);
}
.evento-item:first-child { border-top: none; }
.evento-icone { font-size: 1.2rem; }
.evento-corpo { flex: 1; display: flex; flex-direction: column; }
.evento-corpo strong { font-size: .95rem; }
.evento-corpo span { color: var(--sage); font-size: .85rem; }

/* ---------- ConexÃµes checkbox (evento form) ---------- */
.conexoes-check { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.conexao-check-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; font-weight: 400;
}
.conexao-check-item:hover { background: var(--dew); }
.conexao-check-item input[type=checkbox] { width: auto; accent-color: var(--grove); }
.conexao-check-item input[type=checkbox]:checked ~ * { color: var(--grove); }
.avatar.sm { width: 32px; height: 32px; font-size: .75rem; }

/* ---------- GravaÃ§Ã£o de voz ---------- */
.btn-mic {
  background: none;
  border: 1px solid var(--mist);
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
  margin-right: 4px;
  vertical-align: middle;
}
.btn-mic:hover { background: var(--dew); border-color: var(--grove); }
.btn-mic.gravando {
  border-color: #C8612E;
  animation: micPulse 1s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 97, 46, 0.4); }
  50%       { box-shadow: 0 0 0 7px rgba(200, 97, 46, 0); }
}

.audio-overlay {
  position: fixed;
  inset: 0;
  background: rgba(29, 58, 39, 0.55);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.audio-overlay[hidden] { display: none; }
.audio-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}
.audio-card h2 { font-size: 1.6rem; margin-bottom: 8px; }
.audio-card p { color: var(--sage); margin: 0 0 20px; }
.audio-acoes { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.audio-acoes .btn, .audio-acoes .btn-ghost { width: auto; }
.audio-mic-emoji { font-size: 3rem; margin-bottom: 16px; }

.audio-pulse-wrap { display: flex; justify-content: center; margin-bottom: 12px; }
.audio-pulse {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(200, 97, 46, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulsaRec 1s ease-in-out infinite;
}
.audio-pulse::after {
  content: '';
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #C8612E;
}
@keyframes pulsaRec {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.2); }
}
.audio-timer {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--forest);
  margin: 0 0 8px;
}
.btn-danger { background: #C8612E !important; }
.btn-danger:hover { background: #a04a23 !important; }

.audio-spinner-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.audio-spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--mist);
  border-top-color: var(--grove);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.audio-ok-icon { font-size: 2.4rem; color: var(--grove); margin-bottom: 10px; }
.audio-resultado-info {
  background: var(--dew);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: left;
  margin: 16px 0 20px;
  font-size: .9rem;
}
.audio-resultado-info strong { display: block; margin-bottom: 4px; color: var(--forest); font-size: 1rem; }
.audio-resultado-info .meta { color: var(--sage); margin-bottom: 6px; }
.audio-multi-lista {
  list-style: none; margin: 16px 0 20px; padding: 14px 16px;
  background: var(--dew); border-radius: 10px; text-align: left; font-size: .9rem;
}
.audio-multi-lista li { padding: 5px 0; color: var(--forest); border-bottom: 1px solid var(--mist); }
.audio-multi-lista li:last-child { border-bottom: none; }
.audio-multi-lista li.multi-erro { color: #b04a2a; }
.audio-transcricao { font-style: italic; color: var(--sage); font-size: .88rem; margin-bottom: 16px; }
.audio-erro-box {
  color: #8a4b25;
  background: rgba(232, 168, 124, 0.15);
  border: 1px solid var(--warm);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0 20px;
  font-size: .9rem;
}

/* ---------- RecomendaÃ§Ãµes ---------- */
.reco-overlay {
  position: fixed;
  inset: 0;
  background: rgba(29, 58, 39, 0.55);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.reco-overlay[hidden] { display: none; }
.reco-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}
.reco-card h2 { font-size: 1.5rem; margin-bottom: 4px; }
.reco-header { margin-bottom: 20px; }
.reco-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px 0; color: var(--sage); }
.reco-content { line-height: 1.75; font-size: .95rem; }
.reco-content p { margin: 0 0 14px; }
.reco-content strong { color: var(--forest); }
.reco-actions { display: flex; justify-content: flex-end; margin-top: 24px; border-top: 1px solid var(--mist); padding-top: 16px; }

/* SugestÃµes individuais */
.reco-sugestao {
  border: 1px solid var(--mist);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.reco-sugestao:last-child { margin-bottom: 0; }
.reco-texto { margin: 0 0 6px; font-size: .95rem; color: var(--forest); line-height: 1.6; }
.reco-porque { margin: 0 0 12px; font-size: .83rem; color: var(--sage); }
.reco-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.reco-btns button:disabled { opacity: .4; cursor: not-allowed; }

/* Mini-form inline */
.mini-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--mist); }
.mini-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.mini-row select, .mini-row input { flex: 1; min-width: 110px; }
.mini-form textarea { width: 100%; resize: vertical; margin-bottom: 8px; }
.mini-acoes { display: flex; gap: 8px; }
.mini-ok { color: var(--grove); font-weight: 500; margin: 8px 0 0; font-size: .9rem; }

/* ---------- Painel Admin ---------- */
.painel-header { margin-bottom: 24px; }
.painel-header h1 { margin-bottom: 2px; }

.painel-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 20px;
  text-align: center;
}
.stat-valor {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--grove);
  line-height: 1;
  margin-bottom: 10px;
}
.stat-rotulo { color: var(--sage); font-size: .9rem; }

.ai-status { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.ai-status-item { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.ai-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--warm);
  flex-shrink: 0;
}
.ai-dot.ok { background: var(--grove); }

.input-toggle-wrap { display: flex; gap: 8px; align-items: center; }
.input-toggle-wrap input { flex: 1; }

/* ---------- Google Calendar ---------- */
.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 10px 18px;
  font-size: .95rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow .2s;
}
.btn-google:hover { box-shadow: 0 1px 4px rgba(0,0,0,.2); color: #3c4043; text-decoration: none; }

.btn-gcal-sm {
  background: none;
  border: 1px solid var(--mist);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: .82rem;
  cursor: pointer;
  line-height: 1.4;
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
}
.btn-gcal-sm:hover { background: var(--dew); border-color: var(--sage); }
.btn-gcal-sm:disabled { opacity: .5; cursor: default; }
.btn-gcal-sm.btn-gcal-ok { border-color: var(--grove); color: var(--grove); }

/* ---------- Quick-add (sugestÃµes da home) ---------- */
.conexao-linha--row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-top: 1px solid var(--mist);
}
.conexao-linha--row:first-of-type { border-top: none; }
.conexao-linha--row:hover { background: var(--dew); border-radius: 10px; }
.conexao-linha-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.btn-quick-add {
  flex: none;
  padding: 5px 11px;
  border: 1px solid var(--grove);
  border-radius: 8px;
  background: transparent;
  color: var(--grove);
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.btn-quick-add:hover { background: var(--grove); color: #fff; }
.btn-quick-add.done { background: var(--grove); color: #fff; pointer-events: none; }
@media (max-width: 760px) {
  .conexao-linha--row { flex-wrap: wrap; align-items: center; }
  .conexao-linha-link { flex: 1 1 100%; }
  /* escopadas ao componente: soltas, empurravam todo .badge e todo
     .btn-quick-add do app no mobile */
  .conexao-linha--row .badge { margin-left: 56px; }
  .conexao-linha--row .btn-quick-add { margin-left: auto; }
}

/* Dentro de widget (coluna estreita): quebra em duas linhas */
.widget .conexao-linha--row {
  flex-wrap: wrap;
  gap: 6px 8px;
}
.widget .conexao-linha-link { flex: 1 1 100%; }
.widget .conexao-linha--row .badge { margin-left: 56px; flex: 1; }
.widget .conexao-linha--row .btn-quick-add { margin-left: auto; }

/* ---------- Streak badge ---------- */
.streak-badge {
  display: inline-block;
  margin: -4px 0 16px;
  color: var(--sage);
  font-size: .88rem;
}

/* ---------- Oportunidade do dia ---------- */
.oportunidade-card {
  display: block;
  margin: 0 0 22px;
  padding: 18px 22px;
  border-radius: 18px;
  text-decoration: none;
  background: linear-gradient(135deg, var(--grove), var(--forest));
  color: #fff;
  box-shadow: 0 12px 30px -16px rgba(29, 58, 39, .6);
  transition: transform .15s ease;
}
.oportunidade-card:hover { transform: translateY(-2px); }
.oportunidade-eyebrow {
  display: block;
  font-size: .78rem;
  letter-spacing: .04em;
  opacity: .9;
  margin-bottom: 4px;
}
.oportunidade-texto { font-size: 1.12rem; font-weight: 500; line-height: 1.35; }

/* ---------- Widgets grid ---------- */
.widgets-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
  grid-auto-flow: dense;
}
@media (max-width: 1280px) { .widgets-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .widgets-grid { grid-template-columns: 1fr; } }
.widget .card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.widget-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.widget-handle {
  cursor: grab;
  color: var(--border);
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color .15s;
  user-select: none;
}
.widget-handle:hover { color: var(--sage); }
.sortable-ghost { opacity: .35; }
.sortable-drag { cursor: grabbing; box-shadow: 0 8px 28px rgba(29,58,39,.18); }

/* Pulso da rede */
.pulso-grid {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.pulso-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-radius: 10px;
  gap: 4px;
}
.pulso-num {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}
.pulso-label { font-size: .75rem; font-weight: 500; opacity: .8; }
.pulso-viva    { background: #e4f1d8; color: #5d8d25; }
.pulso-esfriando { background: #f8ead4; color: #a96d19; }
.pulso-sumindo { background: #f7dddd; color: #b24a4a; }

/* Cartas */
.carta-linha {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.carta-linha:last-child { border-bottom: none; }
.carta-icone { font-size: 1.4rem; }
.carta-info { display: flex; flex-direction: column; gap: 2px; }
.carta-info small { display: block; color: var(--sage); font-size: .78rem; }

/* ---------- MemÃ³rias ---------- */
.memorias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.memoria { margin: 0; }
.memoria img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}
.memoria figcaption {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.memoria figcaption small { color: var(--sage); }

/* ---------- Mapa da amizade ---------- */
.mapa-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}
.mapa-svg {
  width: 100%;
  height: auto;
  background: var(--dew);
  border: 1px solid var(--mist);
  border-radius: var(--radius, 24px);
}
.mapa-svg a { cursor: pointer; }
.mapa-svg a:hover circle { stroke: var(--forest); stroke-width: 2; }
@media (max-width: 760px) {
  .mapa-wrap { grid-template-columns: 1fr; }
}

/* ---------- Tema toggle ---------- */
.btn-tema {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background .15s;
}
.btn-tema:hover { background: var(--mist); }

/* ---------- Sidebar ghost ---------- */
.btn-sidebar-ghost {
  display: block;
  margin-top: 8px;
  padding: 9px 14px;
  border: 1px solid var(--mist);
  border-radius: 10px;
  text-align: center;
  font-size: .88rem;
  color: var(--sage);
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.btn-sidebar-ghost:hover { border-color: var(--grove); color: var(--grove); }

/* ---------- Assistente widget ---------- */
.assistente-widget {
  position: fixed;
  bottom: 24px;
  right: 40px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.assistente-bubble-wrap {
  position: relative;
  flex-shrink: 0;
}
.assistente-bubble {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  background: var(--grove);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, box-shadow .15s;
}
.assistente-bubble:hover { transform: scale(1.07); box-shadow: 0 6px 20px rgba(0,0,0,.22); }
.assistente-bubble-img { width: 100%; height: 100%; object-fit: cover; }
.assistente-bubble-emoji { font-size: 1.6rem; line-height: 1; }
.assistente-bubble-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e53e3e;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border: 2px solid var(--dew);
  pointer-events: none;
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
.assistente-panel {
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--mist);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: 480px;
}
.assistente-panel.aberto { display: flex; }
.assistente-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--grove);
  color: #fff;
}
.assistente-header-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.35);
  flex-shrink: 0;
}
.assistente-nome { flex: 1; font-weight: 600; font-size: .9rem; }
.assistente-fechar {
  background: none;
  border: none;
  color: rgba(255,255,255,.75);
  cursor: pointer;
  font-size: .95rem;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
}
.assistente-fechar:hover { color: #fff; }
.assistente-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
}
.assistente-msg {
  max-width: 86%;
  padding: 9px 13px;
  border-radius: 14px;
  white-space: normal;
  font-size: .875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.assistente-msg--ia {
  background: var(--dew);
  color: var(--forest);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.assistente-msg--user {
  background: var(--grove);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.assistente-msg strong {
  font-weight: 800;
  color: #111F16;
}
.assistente-msg--erro {
  background: #fdecea;
  color: #b71c1c;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.assistente-loading { opacity: .5; }
.assistente-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--mist);
}
.assistente-input {
  flex: 1;
  border: 1px solid var(--mist);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: .875rem;
  outline: none;
  background: var(--dew);
  color: var(--forest);
  resize: none;
  overflow-y: hidden;
  line-height: 1.4;
  max-height: 120px;
  font-family: inherit;
}
.assistente-input:focus { border-color: var(--grove); }
.assistente-enviar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grove);
  color: #fff;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.assistente-enviar:hover { background: var(--forest); }
@media (max-width: 480px) {
  .assistente-panel { width: calc(100vw - 48px); }
  .assistente-widget { bottom: 16px; right: 16px; }
}

/* ---------- BotÃ£o de grupo (cabeÃ§alho) ---------- */
.btn-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Modais de confirmação e alerta ---------- */
dialog#modal-confirmar,
dialog#modal-alerta {
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(29,58,39,.18);
  padding: 28px 28px 20px;
  max-width: 360px;
  width: calc(100% - 32px);
  background: var(--surface);
  color: var(--forest);
}
dialog#modal-confirmar::backdrop,
dialog#modal-alerta::backdrop {
  background: rgba(29,58,39,.45);
  backdrop-filter: blur(2px);
}
dialog#modal-confirmar p,
dialog#modal-alerta p {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 20px;
  color: var(--forest);
}
dialog#modal-confirmar .modal-actions,
dialog#modal-alerta .modal-actions {
  justify-content: flex-end;
}

/* ---------- Modal de Ã¡udio (dialog nativo) ---------- */
dialog#modal-audio-conexao {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  max-width: 420px;
  width: calc(100% - 32px);
  background: var(--surface);
}
dialog#modal-audio-conexao::backdrop {
  background: rgba(29, 58, 39, 0.55);
}
.modal-inner {
  padding: 36px 32px 28px;
  text-align: center;
}
.modal-inner h2 { font-size: 1.4rem; margin: 0 0 6px; }
.modal-hint { color: var(--sage); font-size: .9rem; margin: 0 0 24px; }
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}
.modal-actions .btn-ghost { flex: 0; }
.mic-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 8px 0 4px;
}
.mic-btn {
  background: var(--dew);
  border: 2px solid var(--mist);
  border-radius: 50%;
  width: 72px; height: 72px;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
}
.mic-btn:hover { background: #d4e8d8; border-color: var(--grove); }
.mic-btn.gravando {
  border-color: #C8612E;
  background: #fbe8e0;
  animation: micPulse 1s ease-in-out infinite;
}
.mic-status { color: var(--sage); font-size: .85rem; }
.modal-inner .field { text-align: left; }
.field-opt { color: var(--sage); font-weight: 400; font-size: .82rem; }


/* =========================================================
   FriendFy Home â€” Redesign (hd-*)
   ========================================================= */

/* Fundo e container */
.content.home-redesign {
  background:
    radial-gradient(circle at top left, rgba(168, 223, 95, .18), transparent 34%),
    radial-gradient(circle at top right, rgba(33, 79, 43, .07), transparent 32%),
    #f7f5ef;
}
.content.home-redesign .container {
  max-width: 1240px;
  padding: 32px 28px 48px;
}

/* Hero header */
.hd-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 20px;
}
.hd-hello h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -1.5px;
  font-weight: 500;
  margin-bottom: 10px;
  font-family: var(--font-display);
}
.hd-hello h1 strong {
  font-weight: 800;
  color: var(--forest);
  border-bottom: 3px solid rgba(29, 58, 39, .2);
}
.hd-hello > p {
  color: var(--sage);
  font-size: 1rem;
  max-width: 620px;
  line-height: 1.5;
  margin: 0;
}
.hd-streak {
  margin: 8px 0 0;
  color: var(--sage);
  font-size: .88rem;
}
.hd-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--mist);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--sage);
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(29, 58, 39, .06);
  flex: none;
}
.hd-date-pill i { width: 16px; height: 16px; }

/* Hero grid */
.hd-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Score card */
.hd-score-card {
  border-radius: 28px;
  background:
    radial-gradient(circle at 15% 45%, rgba(168, 223, 95, .22), transparent 30%),
    linear-gradient(135deg, #173c1f 0%, #23542d 54%, #193e22 100%);
  color: #fff;
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 55px rgba(33, 79, 43, .22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.hd-score-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: .35;
}
.hd-score-info { position: relative; z-index: 1; max-width: 440px; }
.hd-score-info > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .84);
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.hd-score-info > span i { width: 14px; height: 14px; }
.hd-score-info h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 12px;
  color: #fff;
  font-family: var(--font-display);
}
.hd-score-info > p { color: rgba(255,255,255,.72); line-height: 1.5; font-size: .95rem; }

.hd-score-ring {
  position: relative;
  z-index: 1;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}
.hd-score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hd-ring-track  { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 12; }
.hd-ring-progress {
  fill: none;
  stroke: #a8df5f;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 490;
}
.hd-score-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  font-family: var(--font-display);
}

/* Card base */
.hd-card {
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(232, 230, 220, .9);
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(29, 58, 39, .06);
}

/* Daily card */
.hd-daily-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hd-daily-top { display: flex; align-items: flex-start; gap: 16px; }
.hd-soft-icon {
  width: 56px; height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.35rem;
}
.hd-soft-icon i { width: 24px; height: 24px; }
.hd-soft-yellow { background: #fff5dc; color: #9b6e14; }
.hd-soft-green  { background: #eef5ea; color: var(--grove); }
.hd-soft-pink   { background: #fcecef; color: #a7475d; }
.hd-soft-blue   { background: #edf5ff; color: #2f6ea0; }
.hd-eyebrow { font-size: .82rem; color: var(--sage); font-weight: 600; margin-bottom: 6px; }
.hd-daily-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.35;
  letter-spacing: -.3px;
  margin-bottom: 8px;
  color: var(--forest);
}
.hd-daily-card p { color: var(--sage); font-size: .9rem; line-height: 1.5; margin: 0; }

/* Botoes */
.hd-btn {
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, box-shadow .15s;
}
.hd-btn i { width: 16px; height: 16px; }
.hd-btn-primary {
  background: var(--grove);
  color: #fff;
  border-color: var(--grove);
  box-shadow: 0 12px 24px rgba(58, 107, 71, .16);
}
.hd-btn-primary:hover { background: var(--forest); color: #fff; }
.hd-btn-outline {
  background: #fff;
  color: var(--grove);
  border-color: #dfe5d8;
}
.hd-btn-outline:hover { border-color: var(--grove); }

/* Section head comum */
.hd-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.hd-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--forest);
  margin: 0;
}
.hd-section-title i { width: 18px; height: 18px; color: var(--grove); }
.hd-see-all { color: var(--sage); font-weight: 700; font-size: .82rem; text-decoration: none; white-space: nowrap; }
.hd-see-all:hover { color: var(--grove); }
.hd-section-card { padding: 22px; }

/* Dashboard grid */
.hd-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Metricas por tipo */
.hd-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.hd-metric {
  min-height: 100px;
  border: 1px solid var(--mist);
  border-radius: 20px;
  padding: 16px;
  background: #fbfaf6;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hd-metric-icon {
  width: 48px; height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.hd-metric-icon i { width: 22px; height: 22px; }
.hd-metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--forest);
}
.hd-metric span { color: var(--sage); font-weight: 600; font-size: .85rem; }

/* Status card */
.hd-status-card { padding: 22px; }
.hd-status-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.hd-status-table th {
  color: var(--sage); font-weight: 700; text-align: left;
  padding: 0 0 12px; font-size: .8rem;
}
.hd-status-table td { padding: 14px 0; border-top: 1px solid var(--mist); font-weight: 700; }
.hd-status-name { display: flex; align-items: center; gap: 10px; }
.hd-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.hd-dot-green  { background: #65b84a; }
.hd-dot-orange { background: #f3a324; }
.hd-dot-red    { background: #d75261; }

/* Content grid */
.hd-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
.hd-left-col, .hd-right-col { display: grid; gap: 20px; }

/* Friend grid (sugestoes) */
.hd-friend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.hd-friend-card {
  border: 1px solid var(--mist);
  background: #fbfaf6;
  border-radius: 18px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hd-avatar {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--mist) center/cover no-repeat;
  display: grid;
  place-items: center;
  font-size: .85rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--forest);
}
.hd-friend-info { min-width: 0; flex: 1; }
.hd-friend-info strong {
  display: block;
  font-size: .95rem;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--forest);
}
.hd-friend-info span {
  color: var(--sage);
  font-size: .78rem;
  font-weight: 500;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hd-mini-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #dfe5d8;
  background: #fff;
  color: var(--grove);
  font-family: inherit;
  font-weight: 700;
  font-size: .8rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.hd-mini-btn:hover, .hd-mini-btn.done { background: var(--grove); color: #fff; border-color: var(--grove); }

/* Listas (aniversarios e interacoes) */
.hd-birthday-list, .hd-interaction-list { display: grid; gap: 4px; }
.hd-list-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--mist);
  text-decoration: none;
  color: inherit;
}
.hd-list-row:first-child { border-top: none; padding-top: 0; }
.hd-list-row:last-child  { padding-bottom: 0; }
.hd-list-row:hover { color: inherit; }
.hd-date-badge {
  width: 50px; height: 50px;
  border-radius: 16px;
  background: #fcecef;
  color: #a7475d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  line-height: 1;
}
.hd-date-badge strong { font-size: 1.1rem; }
.hd-date-badge span { font-size: .68rem; margin-top: 3px; text-transform: uppercase; }
.hd-row-title strong { display: block; font-size: .93rem; margin-bottom: 3px; color: var(--forest); }
.hd-row-title span   { color: var(--sage); font-size: .8rem; }
.hd-link-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #316aa4;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.hd-link-action i { width: 14px; height: 14px; }

.hd-interaction-icon {
  width: 40px; height: 40px;
  border-radius: 14px;
  background: #eef5ea;
  color: var(--grove);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.hd-interaction-icon i { width: 18px; height: 18px; }
.hd-interaction-date { color: var(--sage); font-weight: 700; font-size: .82rem; white-space: nowrap; }

/* Activity summary */
.hd-activity-card { overflow: hidden; }
.hd-activity-heading {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 22px;
}
.hd-activity-heading .hd-eyebrow {
  display: flex; align-items: center; gap: 6px; margin-bottom: 7px;
}
.hd-activity-heading .hd-eyebrow i { width: 14px; height: 14px; }
.hd-activity-stats { display: flex; gap: 30px; flex-shrink: 0; }
.hd-activity-stats div { text-align: right; }
.hd-activity-stats strong {
  display: block; color: var(--grove); font-family: var(--font-display);
  font-size: 1.55rem; line-height: 1;
}
.hd-activity-stats span { color: var(--sage); font-size: .72rem; }
.hd-activity-map {
  --activity-cell: 13px; --activity-gap: 4px;
  overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin;
}
.hd-activity-months, .hd-activity-weekday {
  display: grid;
  grid-template-columns: 16px repeat(16, var(--activity-cell));
  gap: var(--activity-gap); min-width: max-content;
}
.hd-activity-months { margin-bottom: 5px; }
.hd-activity-months span {
  color: var(--sage); font-size: .62rem; line-height: 1; text-transform: lowercase;
}
.hd-activity-weekday { margin-bottom: var(--activity-gap); align-items: center; }
.hd-weekday-label { color: var(--sage); font-size: .58rem; font-weight: 700; }
.hd-activity-cell {
  width: var(--activity-cell); height: var(--activity-cell); border-radius: 3px;
  background: #e8e8e4; display: block;
}
.hd-activity-cell.level-1 { background: #dcefc5; }
.hd-activity-cell.level-2 { background: #b7dc85; }
.hd-activity-cell.level-3 { background: #78b842; }
.hd-activity-cell.level-4 { background: #32683b; }
.hd-activity-cell.is-future { opacity: .35; }
.hd-activity-legend {
  display: flex; align-items: center; gap: 5px; margin: 10px 0 0 20px;
  color: var(--sage); font-size: .65rem;
}
.hd-activity-legend .hd-activity-cell { --activity-cell: 10px; }
.hd-activity-recent-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 18px 0 14px; padding-top: 18px; border-top: 1px solid var(--mist);
}
.hd-activity-recent-head h3 {
  color: var(--forest); font-family: var(--font-display); font-size: 1rem;
}
.hd-interaction-groups { display: grid; gap: 18px; }
.hd-interaction-group h4 {
  color: var(--forest); font-size: .78rem; font-weight: 800; margin-bottom: 4px;
}
.hd-interaction-group h4 span {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px;
  margin-left: 4px; padding: 0 5px; border-radius: 999px;
  background: var(--dew); color: var(--sage); font-size: .62rem;
}

/* Month card */
.hd-month-card { padding: 22px; }
.hd-month-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hd-chart-box, .hd-rank-box {
  min-height: 180px;
  background: #fbfaf6;
  border: 1px solid var(--mist);
  border-radius: 20px;
  padding: 16px;
}
.hd-chart-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hd-big-number {
  text-align: center;
  color: var(--grove);
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 400;
  letter-spacing: -2px;
  line-height: 1;
}
.hd-big-number span {
  display: block;
  margin-top: 8px;
  font-size: .82rem;
  color: var(--sage);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0;
  font-family: var(--font-body);
}
.hd-rank-box h4 { font-family: var(--font-display); font-size: .95rem; margin-bottom: 14px; color: var(--forest); }
.hd-consist-dots { display: flex; gap: 10px; margin-bottom: 12px; }
.hd-dot-lg {
  width: 16px; height: 16px;
  border-radius: 999px;
  background: rgba(196, 217, 200, .8);
}
.hd-consist-dots[data-count="1"] .hd-dot-lg:nth-child(-n+1),
.hd-consist-dots[data-count="2"] .hd-dot-lg:nth-child(-n+2),
.hd-consist-dots[data-count="3"] .hd-dot-lg:nth-child(-n+3),
.hd-consist-dots[data-count="4"] .hd-dot-lg:nth-child(-n+4),
.hd-consist-dots[data-count="5"] .hd-dot-lg:nth-child(-n+5) { background: var(--grove); }
.hd-mini-insight { color: var(--sage); font-size: .82rem; margin: 0; }

/* Suggestion card */
.hd-suggestion-card { padding: 22px; }
.hd-suggestion-body {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.hd-action-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* Record card */
.hd-record-card { padding: 22px; }
.hd-record-card > p {
  color: var(--sage);
  line-height: 1.55;
  margin-bottom: 18px;
  font-size: .93rem;
}
.hd-record-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Hint vazio */
.hd-hint { color: var(--sage); font-size: .9rem; text-align: center; padding: 16px 8px; }

/* Tema escuro */
[data-theme="escuro"] .content.home-redesign {
  background:
    radial-gradient(circle at top left, rgba(125, 187, 140, .12), transparent 34%),
    radial-gradient(circle at top right, rgba(232, 168, 124, .08), transparent 30%),
    var(--dew);
}
[data-theme="escuro"] .hd-card,
[data-theme="escuro"] .hd-metric,
[data-theme="escuro"] .hd-friend-card,
[data-theme="escuro"] .hd-chart-box,
[data-theme="escuro"] .hd-rank-box {
  background: var(--surface);
  border-color: var(--mist);
}
[data-theme="escuro"] .hd-date-pill { background: var(--surface); }
[data-theme="escuro"] .hd-activity-cell { background: #35423a; }
[data-theme="escuro"] .hd-activity-cell.level-1 { background: #49623d; }
[data-theme="escuro"] .hd-activity-cell.level-2 { background: #638c43; }
[data-theme="escuro"] .hd-activity-cell.level-3 { background: #78ad48; }
[data-theme="escuro"] .hd-activity-cell.level-4 { background: #9dcc63; }

/* Responsivo (breakpoints internos aos cards) */
@media (max-width: 760px) {
  .content.home-redesign .container { padding: 22px 16px 36px; }
  .hd-hero-header { flex-direction: column; align-items: flex-start; }
  .hd-score-card { flex-direction: column; align-items: flex-start; min-height: auto; }
  .hd-score-ring { width: 128px; height: 128px; }
  .hd-score-value { font-size: 2rem; }
  .hd-metrics-grid,
  .hd-friend-grid,
  .hd-month-grid,
  .hd-action-row,
  .hd-record-actions { grid-template-columns: 1fr; }
  .hd-activity-heading { align-items: flex-end; }
  .hd-activity-stats { gap: 16px; }
  .hd-activity-map { --activity-cell: 12px; --activity-gap: 3px; }
}

/* ---------- Painel: versoes de interface ---------- */
.ui-version-picker {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.ui-version-option {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--mist);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 92%, var(--dew));
  cursor: pointer;
}
.ui-version-option:hover,
.ui-version-option.active {
  border-color: var(--grove);
  box-shadow: 0 10px 26px rgba(29, 58, 39, .08);
}
.ui-version-option input { position: absolute; opacity: 0; pointer-events: none; }
.ui-version-code {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 10px;
  background: var(--forest);
  color: #fff;
  font-weight: 800;
  letter-spacing: .04em;
}
.ui-version-option strong { display: block; color: var(--forest); }
.ui-version-option small { display: block; color: var(--sage); font-size: .82rem; margin-top: 2px; }

/* ---------- FriendFy Home V2: health dashboard ---------- */
.content.home-v2 {
  background:
    linear-gradient(180deg, rgba(240,244,238,.72), rgba(255,255,255,0) 420px),
    var(--dew);
}
.content.home-v2 .container {
  max-width: 1220px;
  padding: 30px 28px 56px;
}
.v2-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 156px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 22px;
}
.v2-hero-copy {
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  border-radius: 8px;
  color: #f6fbf5;
  background:
    linear-gradient(135deg, rgba(19, 32, 26, .94), rgba(29, 58, 39, .86)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 1px, transparent 1px 14px);
  box-shadow: 0 18px 40px rgba(29, 58, 39, .18);
  overflow: hidden;
}
.v2-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sage);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.v2-hero-copy .v2-kicker { color: #d7e7d8; }
.v2-hero h1 {
  max-width: 680px;
  margin: 8px 0 10px;
  color: #fff;
  font-size: 2.55rem;
  line-height: 1.02;
}
.v2-hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(246, 251, 245, .78);
  font-weight: 400;
}
.v2-date-card {
  display: grid;
  align-content: center;
  justify-items: center;
  border: 1px solid rgba(58,107,71,.18);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
.v2-date-card i { width: 22px; height: 22px; color: var(--grove); margin-bottom: 10px; }
.v2-date-card strong {
  font-family: var(--font-display);
  font-size: 3.2rem;
  line-height: .9;
  color: var(--forest);
}
.v2-date-card span { color: var(--sage); font-weight: 800; font-size: .8rem; text-transform: uppercase; }

.v2-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 18px;
  margin-bottom: 18px;
}
.v2-vital-card,
.v2-action-card,
.v2-panel,
.v2-stat-tile {
  border: 1px solid rgba(106,138,116,.24);
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 14px 34px rgba(29, 58, 39, .08);
}
.v2-vital-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: center;
  padding: 26px;
}
.v2-vital-copy h2,
.v2-action-card h2,
.v2-panel h2 {
  color: var(--forest);
  line-height: 1.08;
}
.v2-vital-copy h2 { font-size: 2rem; margin-top: 8px; }
.v2-vital-copy p,
.v2-action-card p {
  max-width: 520px;
  margin: 0;
  color: var(--sage);
  font-weight: 500;
}
.v2-score-orbit {
  position: relative;
  width: 168px;
  height: 168px;
}
.v2-score-orbit svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.v2-ring-track,
.v2-ring-main {
  fill: none;
  stroke-width: 12;
}
.v2-ring-track { stroke: #e4ece2; }
.v2-ring-main {
  stroke: var(--warm);
  stroke-linecap: round;
  stroke-dasharray: 427;
  transition: stroke-dashoffset .4s ease;
}
.v2-score-number {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.v2-score-number strong {
  font-family: var(--font-display);
  color: var(--forest);
  font-size: 2.35rem;
  line-height: 1;
}
.v2-score-number span {
  margin-top: 4px;
  color: var(--sage);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.v2-action-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255,246,232,.88), rgba(255,255,255,.86)),
    var(--surface);
}
.v2-action-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #fff0d8;
  color: #9b641b;
}
.v2-action-icon i { width: 23px; height: 23px; }

.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.v2-btn:hover { transform: translateY(-1px); }
.v2-btn i { width: 16px; height: 16px; }
.v2-btn-primary {
  color: #fff;
  background: var(--grove);
  box-shadow: 0 10px 24px rgba(58, 107, 71, .2);
}
.v2-btn-primary:hover { color: #fff; background: var(--forest); }
.v2-btn-light {
  color: var(--grove);
  background: #eef6ef;
  border-color: rgba(58,107,71,.16);
}

.v2-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.v2-stat-tile {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 16px;
}
.v2-stat-tile span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #eef6ef;
  color: var(--grove);
}
.v2-stat-tile:nth-child(2) span { background: #fff0d8; color: #9b641b; }
.v2-stat-tile:nth-child(3) span { background: #f8eaf0; color: #a7475d; }
.v2-stat-tile:nth-child(4) span { background: #eaf2fb; color: #2f6ea0; }
.v2-stat-tile i { width: 21px; height: 21px; }
.v2-stat-tile strong {
  color: var(--forest);
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
}
.v2-stat-tile small {
  color: var(--sage);
  font-weight: 800;
  font-size: .76rem;
}

.v2-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(300px, .72fr);
  gap: 18px;
}
.v2-main-stack,
.v2-side-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}
.v2-panel {
  padding: 22px;
}
.v2-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.v2-panel-head h2 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}
.v2-text-link {
  color: var(--sage);
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.v2-text-link:hover { color: var(--grove); }

.v2-zone-bars {
  display: grid;
  gap: 14px;
}
.v2-zone-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 38px minmax(120px, 1.2fr);
  gap: 14px;
  align-items: center;
}
.v2-zone-row span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--forest);
  font-weight: 800;
}
.v2-zone-row strong {
  color: var(--sage);
  text-align: right;
}
.v2-zone-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.v2-zone-dot.green { background: #60a84d; }
.v2-zone-dot.orange { background: #e49b32; }
.v2-zone-dot.red { background: #d85b62; }
.v2-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2eb;
}
.v2-progress i {
  display: block;
  height: 100%;
  min-width: 5px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--grove), var(--warm));
}

.v2-activity-summary { text-align: right; }
.v2-activity-summary strong {
  display: block;
  color: var(--forest);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}
.v2-activity-summary span {
  color: var(--sage);
  font-size: .74rem;
  font-weight: 800;
}
.v2-activity-map {
  --v2-cell: 13px;
  --v2-gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.v2-activity-months,
.v2-activity-weekday {
  display: grid;
  grid-template-columns: 28px repeat(16, var(--v2-cell));
  gap: var(--v2-gap);
}
.v2-activity-months {
  margin-bottom: 5px;
  color: var(--sage);
  font-size: .6rem;
  font-weight: 800;
}
.v2-activity-weekday {
  align-items: center;
  margin-bottom: var(--v2-gap);
}
.v2-activity-weekday span {
  color: var(--sage);
  font-size: .58rem;
  font-weight: 800;
}
.v2-activity-cell {
  width: var(--v2-cell);
  height: var(--v2-cell);
  border-radius: 4px;
  background: #edf2eb;
}
.v2-activity-cell.level-1 { background: #dcefc5; }
.v2-activity-cell.level-2 { background: #b8df86; }
.v2-activity-cell.level-3 { background: #78b842; }
.v2-activity-cell.level-4 { background: #32683b; }
.v2-activity-cell.is-future { opacity: .35; }

.v2-people-list,
.v2-moment-list {
  display: grid;
  gap: 8px;
}
.v2-person-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.v2-person-row:hover {
  background: #f7faf6;
  border-color: rgba(106,138,116,.18);
}
.v2-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e8f1e4;
  background-size: cover;
  background-position: center;
  color: var(--grove);
  font-weight: 900;
}
.v2-avatar.large {
  width: 72px;
  height: 72px;
  font-size: 1.25rem;
}
.v2-person-copy { min-width: 0; }
.v2-person-copy strong {
  display: block;
  overflow: hidden;
  color: var(--forest);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-person-copy small {
  display: block;
  overflow: hidden;
  color: var(--sage);
  font-weight: 700;
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-mini-action {
  min-width: 68px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(58,107,71,.18);
  border-radius: 8px;
  background: #fff;
  color: var(--grove);
  font: inherit;
  font-size: .78rem;
  font-weight: 900;
  cursor: pointer;
}
.v2-mini-action:hover,
.v2-mini-action.done {
  background: var(--grove);
  color: #fff;
}

.v2-streak-panel {
  background:
    linear-gradient(135deg, rgba(255,255,255,.9), rgba(239,248,241,.9)),
    var(--surface);
}
.v2-streak-panel h2 {
  margin-top: 8px;
  font-size: 1.32rem;
}
.v2-week-dots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.v2-week-dots i {
  height: 12px;
  border-radius: 999px;
  background: #dfe8dc;
}
.v2-week-dots[data-count="1"] i:nth-child(-n+1),
.v2-week-dots[data-count="2"] i:nth-child(-n+2),
.v2-week-dots[data-count="3"] i:nth-child(-n+3),
.v2-week-dots[data-count="4"] i:nth-child(-n+4),
.v2-week-dots[data-count="5"] i:nth-child(-n+5) {
  background: var(--warm);
}
.v2-focus-person {
  display: grid;
  gap: 18px;
}
.v2-focus-body {
  display: grid;
  justify-items: center;
  text-align: center;
}
.v2-focus-body h2 {
  margin: 10px 0 2px;
  font-size: 1.45rem;
}
.v2-focus-body p {
  margin: 0;
  color: var(--sage);
  font-weight: 700;
}
.v2-focus-actions,
.v2-record-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.v2-moment-row {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  color: inherit;
  text-decoration: none;
}
.v2-moment-row span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #f8eadf;
  color: #9a5d2d;
}
.v2-moment-row strong {
  font-family: var(--font-display);
  line-height: .95;
}
.v2-moment-row small {
  font-size: .62rem;
  font-weight: 900;
  text-transform: uppercase;
}
.v2-moment-row em {
  overflow: hidden;
  color: var(--forest);
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-record-panel {
  background: linear-gradient(180deg, #fff, #f7faf6);
}
.v2-record-panel h2 {
  margin: 8px 0 18px;
  font-size: 1.36rem;
}
.v2-empty {
  margin: 0;
  padding: 18px 8px;
  color: var(--sage);
  text-align: center;
  font-weight: 700;
}

[data-theme="escuro"] .content.home-v2 {
  background:
    linear-gradient(180deg, rgba(21,35,28,.78), rgba(19,32,26,0) 420px),
    var(--dew);
}
[data-theme="escuro"] .v2-vital-card,
[data-theme="escuro"] .v2-action-card,
[data-theme="escuro"] .v2-panel,
[data-theme="escuro"] .v2-stat-tile,
[data-theme="escuro"] .v2-date-card {
  background: var(--surface);
  border-color: var(--mist);
}
[data-theme="escuro"] .v2-person-row:hover { background: rgba(255,255,255,.04); }
[data-theme="escuro"] .v2-progress,
[data-theme="escuro"] .v2-ring-track,
[data-theme="escuro"] .v2-activity-cell,
[data-theme="escuro"] .v2-week-dots i { background: #27382e; stroke: #27382e; }
[data-theme="escuro"] .v2-btn-light,
[data-theme="escuro"] .v2-mini-action,
[data-theme="escuro"] .v2-stat-tile span {
  background: #21362a;
}

@media (max-width: 960px) {
  .v2-command-grid,
  .v2-dashboard {
    grid-template-columns: 1fr;
  }
  .v2-stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .content.home-v2 .container { padding: 22px 16px 42px; }
  .v2-hero,
  .v2-vital-card {
    grid-template-columns: 1fr;
  }
  .v2-hero-copy {
    min-height: 220px;
    padding: 24px;
  }
  .v2-hero h1 { font-size: 2.05rem; }
  .v2-date-card {
    min-height: 116px;
    grid-template-columns: 44px 70px 1fr;
    justify-items: start;
    padding: 18px;
    text-align: left;
  }
  .v2-date-card i { margin: 0; }
  .v2-date-card span { align-self: center; }
  .v2-score-orbit {
    width: 144px;
    height: 144px;
  }
  .v2-stats-strip {
    grid-template-columns: 1fr;
  }
  .v2-zone-row {
    grid-template-columns: 1fr 34px;
  }
  .v2-zone-row .v2-progress {
    grid-column: 1 / -1;
  }
  .v2-panel-head {
    align-items: flex-start;
  }
  .v2-focus-actions,
  .v2-record-actions {
    grid-template-columns: 1fr;
  }
  .v2-activity-map {
    --v2-cell: 12px;
    --v2-gap: 3px;
  }
}

/* ============ Feed Amigo (kanban) ============ */
.feed-head { margin-bottom: 22px; }
.feed-head-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.feed-head-top h1 { margin: 0; font-size: 1.9rem; }
.feed-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.feed-filtros { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feed-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--mist); background: var(--surface);
  color: var(--forest); text-decoration: none;
  font-size: .9rem; transition: border-color .15s, background .15s;
}
.feed-chip:hover { border-color: var(--grove); }
.feed-chip.is-active { border-color: var(--grove); background: rgba(58,107,71,.10); color: var(--grove); }
.feed-chip b {
  font-weight: 600; font-size: .8rem;
  background: var(--dew); border-radius: 999px; padding: 1px 8px; min-width: 20px; text-align: center;
}
.feed-chip.is-active b { background: var(--grove); color: #fff; }
.feed-chip-ico { font-size: .95rem; }
.feed-chip-limpar { color: var(--sage); text-decoration: none; font-size: .85rem; }
.feed-chip-limpar:hover { color: var(--grove); }

.feed-board {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start;
}

.kb-col {
  background: var(--dew); border: 1px solid var(--mist);
  border-radius: var(--radius); padding: 14px; --kb-accent: var(--sage);
}
.kb-green  { --kb-accent: #5d8d25; }
.kb-orange { --kb-accent: #c07f1c; }
.kb-red    { --kb-accent: #b24a4a; }

.kb-col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px 12px; border-bottom: 2px solid color-mix(in srgb, var(--kb-accent) 35%, transparent);
  margin-bottom: 12px;
}
.kb-col-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--kb-accent); }
.kb-col-ico { font-size: 1rem; }
.kb-col-count {
  font-size: .82rem; font-weight: 600; color: var(--kb-accent);
  background: color-mix(in srgb, var(--kb-accent) 14%, transparent);
  border-radius: 999px; padding: 2px 10px;
}

.kb-col-body { display: flex; flex-direction: column; gap: 12px; }

.kb-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--mist);
  border-radius: 12px; padding: 14px; text-decoration: none; color: var(--forest);
  box-shadow: 0 2px 8px rgba(29,58,39,.05); transition: box-shadow .15s, transform .15s;
}
.kb-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kb-hidden { display: none; }
.kb-hidden.is-revealed { display: flex; }

.kb-card-top { display: flex; align-items: center; gap: 11px; }
.kb-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: .8rem; font-weight: 600;
}
.kb-card-id { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.kb-card-id strong { font-weight: 600; font-size: .96rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-card-id small { color: var(--sage); font-size: .8rem; }

.kb-metric { display: flex; flex-direction: column; gap: 5px; }
.kb-metric-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.kb-metric-label { font-size: .85rem; color: var(--forest); }
.kb-metric-days { font-size: .82rem; font-weight: 600; color: var(--forest); white-space: nowrap; }
.kb-metric-days.is-muted, .kb-metric-meta.is-muted { color: var(--sage); font-weight: 400; }
.kb-metric-meta { font-size: .74rem; color: var(--sage); }

.kb-bar { height: 6px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.kb-bar i { display: block; height: 100%; border-radius: 999px; background: #5d8d25; }
.kb-bar.is-warn i { background: #c07f1c; }
.kb-bar.is-over i { background: #b24a4a; }

.kb-empty { text-align: center; color: var(--sage); padding: 26px 10px; }
.kb-empty-emoji { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.kb-empty p { margin: 0; font-size: .9rem; }

.kb-mais {
  border: none; background: none; cursor: pointer;
  color: var(--sage); font: inherit; font-size: .85rem; padding: 6px;
  border-radius: 8px; text-align: center;
}
.kb-mais:hover { color: var(--grove); background: color-mix(in srgb, var(--grove) 8%, transparent); }

@media (max-width: 860px) {
  .feed-board { grid-template-columns: 1fr; }
}


/* Entrada de telefone com DDI (país) + número */
.phone-input { display: flex; gap: 8px; align-items: stretch; }
.phone-input .phone-ddi { flex: 0 0 auto; width: auto; min-width: 6.5rem; }
.phone-input input[name="telefone"] { flex: 1 1 auto; min-width: 0; }
