/* 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);
}

* { box-sizing: border-box; }

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); }

/* ---------- 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; }

.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 a { margin-left: 18px; color: var(--sage); text-decoration: none; font-size: .92rem; }
.topbar nav a:hover { color: var(--grove); }

.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(200px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.conexao-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform .12s, box-shadow .12s;
}
.conexao-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(29,58,39,.12); }
.conexao-card .avatar { margin-bottom: 6px; }
.conexao-card small { color: var(--sage); }
.conexao-card .tags { margin-top: 6px; }

/* ---------- 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-id { flex: 1; }
.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; }

.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; }
.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; }

/* ---------- 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; }

/* ---------- 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-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; }

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

/* ---------- 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); }

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

/* ---------- 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; }
