@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Marca */
  --azul: #1079AA;
  --roxo: #8E74C8;
  --rosa: #D281AA;
  --amarelo: #FDB72A;
  --gradiente: linear-gradient(135deg, var(--azul) 0%, var(--roxo) 40%, var(--rosa) 70%, var(--amarelo) 100%);

  /* Superficies */
  --bg: #FFFFFF;
  --card: #FFFFFF;
  --surface: #F7F5FB;
  --surface-2: #EFEBF7;
  --borda: #E7E2F2;

  /* Texto */
  --ink: #1A1B22;
  --muted: #6B6478;
  --muted-2: #8D849C;

  /* Estado */
  --sucesso: #1D9A6C;
  --erro: #D8475C;
  --aviso: var(--amarelo);

  /* Tipografia */
  --fonte-display: 'Sora', sans-serif;
  --fonte-corpo: 'Inter', sans-serif;

  /* Layout */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --sombra: 0 8px 24px rgba(142, 116, 200, 0.12);
  --sombra-sm: 0 2px 8px rgba(26, 27, 34, 0.06);

  --altura-nav: 68px;
  --altura-topbar: 88px;
  --nav-bg: rgba(255,255,255,0.95);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fonte-corpo);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  width: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

h1, h2, h3, h4 {
  font-family: var(--fonte-display);
  margin: 0;
  letter-spacing: -0.02em;
}

p { margin: 0; }

button, input, textarea, select {
  font-family: var(--fonte-corpo);
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--roxo);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- App shell ---------- */

#app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.tela {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--altura-nav) + 16px);
}

.tela--sem-nav {
  padding-bottom: 24px;
}

/* ---------- Blobs de fondo (elemento firma) ---------- */

.aurora {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
}

.aurora::before {
  width: 320px;
  height: 320px;
  top: -100px;
  left: -80px;
  background: linear-gradient(135deg, var(--azul), var(--roxo));
}

.aurora::after {
  width: 280px;
  height: 280px;
  bottom: -60px;
  right: -80px;
  background: linear-gradient(135deg, var(--rosa), var(--amarelo));
}

/* ---------- Topbar ---------- */

.banner-estado {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px; font-size: 12.5px; line-height: 1.35;
}
.banner-estado--leitura { background: #fff6e5; color: #7a5200; border-bottom: 1px solid #f0d9a8; }
.banner-estado--demo { background: #eef0ff; color: #35389a; border-bottom: 1px solid #c9cdf5; justify-content: center; text-align: center; }
.banner-estado__acao {
  flex-shrink: 0; border: none; border-radius: 999px; padding: 6px 14px;
  background: #7a5200; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
}

.topbar {
  height: var(--altura-topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  background: var(--gradiente);
  z-index: 10;
  box-shadow: var(--sombra);
}

.topbar__logo {
  height: 116px;
}

.topbar .avatar {
  border: 2px solid rgba(255,255,255,0.85);
}

.topbar__titulo {
  font-family: var(--fonte-display);
  font-weight: 700;
  font-size: 18px;
  color: white;
}

/* ---------- Bottom nav ---------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--altura-nav);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--borda);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 20;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  transition: color 0.15s ease;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.nav-item.ativo {
  color: var(--roxo);
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  min-width: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  font-family: var(--fonte-corpo);
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primario {
  background: var(--gradiente);
  color: white;
  box-shadow: var(--sombra);
  width: 100%;
}

.btn--secundario {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--borda);
}

.btn--texto {
  background: none;
  color: var(--roxo);
  padding: 8px;
}

.btn--perigo {
  background: var(--erro);
  color: white;
}

.btn--pequeno {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* ---------- Inputs ---------- */

.campo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.campo label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.campo input,
.campo textarea {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--borda);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.campo input:focus,
.campo textarea:focus {
  border-color: var(--roxo);
  outline: none;
  background: var(--card);
}

.campo textarea {
  resize: vertical;
  min-height: 90px;
}

.campo__erro {
  font-size: 12px;
  color: var(--erro);
}

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--sombra-sm);
}

/* ---------- Auth (login/registro) ---------- */

.tela-auth {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 24px;
  position: relative;
  z-index: 1;
}

.tela-auth__logo {
  width: 72px;
  margin: 0 auto 8px;
}

.tela-auth__marca {
  text-align: center;
  font-family: var(--fonte-display);
  font-weight: 800;
  font-size: 26px;
  margin-bottom: 4px;
}

.tela-auth__subtitulo {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.tela-auth__card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--sombra);
  border: 1px solid var(--borda);
}

.tela-auth__rodape {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

.tela-auth__rodape a {
  color: var(--roxo);
  font-weight: 600;
}

/* ---------- Wall / Posts ---------- */

.post {
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--sombra-sm);
}

.post__cabecalho {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradiente);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  object-fit: cover;
}

.post__autor {
  font-weight: 600;
  font-size: 14px;
}

.post__data {
  font-size: 12px;
  color: var(--muted-2);
}

.post__conteudo {
  padding: 0 16px 12px;
  font-size: 15px;
  line-height: 1.5;
}

.post__imagem {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  background: var(--surface);
}

.post__pdf-preview {
  margin-bottom: 4px;
}

.post__pdf-preview iframe {
  width: 100%;
  height: 360px;
  border: none;
  border-top: 1px solid var(--borda);
  border-bottom: 1px solid var(--borda);
  background: var(--surface);
}

.post__pdf-abrir {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--roxo);
}

.post__pdf-abrir svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.badge--novo {
  background: rgba(16, 121, 170, 0.12);
  color: var(--azul);
}

.badge--lido {
  background: var(--surface-2);
  color: var(--muted);
}

.preview-modal iframe,
.preview-modal img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--borda);
}

.preview-modal iframe {
  height: 60vh;
}

.post__acoes {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 1px solid var(--borda);
}

.acao-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 4px;
}

.acao-btn svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.acao-btn.ativo {
  color: var(--rosa);
}

.acao-btn.ativo svg {
  fill: var(--rosa);
}

.post__comentarios {
  padding: 6px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comentario {
  font-size: 13px;
  line-height: 1.4;
}

.comentario strong {
  font-weight: 600;
  margin-right: 6px;
}

.post__form-comentario {
  display: flex;
  gap: 8px;
  padding: 10px 16px 16px;
}

.post__form-comentario input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--borda);
  background: var(--surface);
  font-size: 13px;
}

/* ---------- Propostas ---------- */

.proposta {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--borda);
  overflow: hidden;
}

.proposta--com-cupo::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradiente);
}

.proposta__titulo {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.proposta__descricao {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.proposta__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge--cupo {
  background: rgba(253, 183, 42, 0.15);
  color: #966915;
}

.badge--pendente {
  background: var(--surface-2);
  color: var(--muted);
}

.badge--aceita {
  background: rgba(29, 154, 108, 0.12);
  color: var(--sucesso);
}

.badge--recusada {
  background: rgba(216, 71, 92, 0.1);
  color: var(--erro);
}

.proposta__acoes {
  display: flex;
  gap: 10px;
}

.proposta__acoes .btn {
  flex: 1;
}

/* ---------- Perfil ---------- */

.perfil-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px;
  text-align: center;
}

.perfil-header .avatar {
  width: 88px;
  height: 88px;
  font-size: 28px;
  margin-bottom: 12px;
  box-shadow: var(--sombra);
}

.btn-camera-perfil {
  position: absolute;
  bottom: 12px;
  right: 0;
  background: var(--roxo);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: var(--sombra-sm);
}

.btn-camera-perfil svg {
  width: 15px;
  height: 15px;
  stroke: white;
  fill: none;
  stroke-width: 2;
}

.perfil-header__nome {
  font-size: 19px;
  font-weight: 700;
}

.perfil-header__username {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}

.lista-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
}

.lista-item__label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
}

.lista-item svg {
  width: 20px;
  height: 20px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
}

/* ---------- Genéricos ---------- */

.container {
  padding: 20px;
  position: relative;
  z-index: 1;
}

.secao-titulo {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.vazio {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}

.vazio__icone {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  stroke: var(--muted-2);
  fill: none;
  stroke-width: 1.5;
}

.vazio__titulo {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.toast {
  position: fixed;
  bottom: calc(var(--altura-nav) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.toast.visivel {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.erro {
  background: var(--erro);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: girar 0.7s linear infinite;
}

.spinner--escuro {
  border: 3px solid var(--borda);
  border-top-color: var(--roxo);
}

@keyframes girar {
  to { transform: rotate(360deg); }
}

.carregando-tela {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

/* Modal simples */
.modal-fundo {
  position: fixed;
  inset: 0;
  background: rgba(26,27,34,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
}

.modal {
  background: var(--card);
  width: 100%;
  max-width: 480px;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal__cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal__fechar {
  background: var(--surface);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: var(--muted);
}

.chip-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.chip-toggle button {
  flex: 1;
  min-width: 0;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--borda);
  background: var(--card);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
  white-space: normal;
  overflow-wrap: break-word;
}

.chip-toggle button.ativo {
  border-color: var(--roxo);
  color: var(--roxo);
  background: rgba(142,116,200,0.08);
}

.fab {
  position: fixed;
  bottom: calc(var(--altura-nav) + 20px);
  right: max(20px, calc(50% - 220px));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradiente);
  color: white;
  border: none;
  font-size: 26px;
  box-shadow: var(--sombra);
  cursor: pointer;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge--consulta {
  background: rgba(142, 116, 200, 0.12);
  color: var(--roxo);
}

.evento-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.evento-item__data {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--gradiente);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--fonte-display);
}

.evento-item__data .dia {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.evento-item__data .mes {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.evento-item__titulo {
  font-weight: 700;
  font-size: 14px;
}

.evento-item__hora {
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 2px;
}

.evento-item__descricao {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.evento-item__excluir {
  background: none;
  border: none;
  color: var(--muted-2);
  cursor: pointer;
  font-size: 18px;
  align-self: flex-start;
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.toggle-item__label {
  font-size: 14px;
  font-weight: 600;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch__trilho {
  position: absolute;
  inset: 0;
  background: var(--borda);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.toggle-switch__trilho::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: var(--card);
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: var(--sombra-sm);
}

.toggle-switch input:checked + .toggle-switch__trilho {
  background: var(--roxo);
}

.toggle-switch input:checked + .toggle-switch__trilho::before {
  transform: translateX(18px);
}

.toggle-switch input:disabled + .toggle-switch__trilho {
  opacity: 0.5;
  cursor: not-allowed;
}

.ponto-novidade {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: var(--erro);
  border-radius: 50%;
  border: 2px solid white;
}

.nav-item .ponto-novidade {
  top: 2px;
  right: 18px;
}

.post__pdf-cover {
  display: block;
  position: relative;
}

.post__pdf-cover__label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(26,27,34,0.75);
  color: white;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.post__pdf-cover__label svg {
  width: 14px;
  height: 14px;
  stroke: white;
  fill: none;
  stroke-width: 2;
}

.tag-rapida {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--borda);
  background: var(--card);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  margin: 0 6px 8px 0;
}

.tag-rapida.ativa {
  border-color: var(--roxo);
  color: var(--roxo);
  background: rgba(142,116,200,0.08);
}

/* ---------- Tema escuro (segue a configuração do dispositivo) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131218;
    --card: #1E1C26;
    --surface: #211F2A;
    --surface-2: #29273370;
    --borda: #322F3D;
    --ink: #F2F0F7;
    --muted: #ADA4C2;
    --muted-2: #8B8299;
    --nav-bg: rgba(19,18,24,0.92);
    --sombra: 0 8px 24px rgba(0,0,0,0.5);
    --sombra-sm: 0 2px 10px rgba(0,0,0,0.4);
  }

  .campo input,
  .campo textarea {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--borda);
  }

  .campo input:focus,
  .campo textarea:focus {
    background: var(--card);
  }

  .post__form-comentario input {
    background: var(--surface);
    color: var(--ink);
  }

  .chip-toggle button {
    background: var(--card);
    color: var(--muted);
  }

  .modal__fechar {
    background: var(--surface);
  }

  .vazio__icone svg,
  .vazio__icone {
    stroke: var(--muted-2);
  }

  .badge--pendente { background: var(--surface-2); }
  .badge--lido { background: var(--surface-2); }

  img.post__imagem,
  .avatar img {
    opacity: 0.92;
  }
}

.audio-player {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
}

.audio-play-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.25);
  color: inherit;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.audio-tempo {
  font-size: 12px;
  opacity: 0.85;
  flex: 1;
  font-variant-numeric: tabular-nums;
}

.audio-speed-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.1);
  color: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

.grid-calendario-cabecalho {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-2);
  margin-bottom: 6px;
}

.grid-calendario-dias {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.dia-calendario {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border-radius: 8px;
  position: relative;
  color: var(--ink);
}

.dia-calendario--hoje {
  background: var(--surface);
  font-weight: 700;
}

.dia-calendario--evento::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gradiente);
}

.badge--laranja {
  background: rgba(253, 183, 42, 0.2);
  color: #8A5A0A;
}

.dia-calendario--clicavel {
  cursor: pointer;
  transition: background 0.12s ease;
}

.dia-calendario--clicavel:active {
  background: var(--surface-2);
}

.dia-calendario--selecionado {
  background: var(--gradiente) !important;
  color: white !important;
  font-weight: 700;
}

/* ---------- Stepper de etapas com rótulos em diagonal ---------- */
.stepper {
  display: flex;
  padding: 6px 4px 0;
  min-height: 96px;
}
.stepper__item {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stepper__item::before {
  content: "";
  position: absolute;
  top: 8px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: var(--borda);
  border-radius: 2px;
}
.stepper__item:first-child::before {
  display: none;
}
.stepper__item--feita::before,
.stepper__item--atual::before {
  background: var(--sucesso);
}
.stepper__ponto {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--borda);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.stepper__item--feita .stepper__ponto {
  background: var(--sucesso);
  border-color: var(--sucesso);
}
.stepper__item--atual .stepper__ponto {
  border-color: var(--sucesso);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--sucesso) 25%, transparent);
}
.stepper__rotulo {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: rotate(48deg);
  transform-origin: left top;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted-2);
  white-space: nowrap;
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stepper__item--feita .stepper__rotulo {
  color: var(--muted);
}
.stepper__item--atual .stepper__rotulo {
  color: var(--sucesso);
  font-weight: 800;
}

/* ---------- Banner de proposta alterada ---------- */
.mudanca-banner {
  margin-top: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--amarelo, #FDB72A) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--amarelo, #FDB72A) 55%, transparent);
}
.mudanca-banner__titulo {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
}
.mudanca-banner__texto {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

/* ---------- Visor de galeria com navegação ---------- */
.visor-galeria {
  display: flex;
  flex-direction: column;
}
.visor-galeria img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 14px;
  background: var(--surface);
  user-select: none;
  -webkit-user-drag: none;
}
.visor-galeria__controles {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 10px;
}
.visor-galeria__btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--borda);
  background: var(--surface);
  color: var(--texto, inherit);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.visor-galeria__btn:active {
  background: var(--borda);
}
.visor-galeria__btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.visor-galeria__contador {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

/* Bolita de aviso inline, pegada à palavra (ex: "Minhas métricas ·") */
.ponto-inline {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--erro);
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: super;
  font-size: 0;
}
.lista-item__label {
  display: inline-flex;
  align-items: center;
}

/* Barra de abas com scroll horizontal quando não cabem (ex: 4 abas de propostas) */
.chip-toggle--scroll {
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chip-toggle--scroll::-webkit-scrollbar { display: none; }
.chip-toggle--scroll button { white-space: nowrap; flex: 0 0 auto; }

/* ---------- Calendário: rola junto com a página ---------- */
.calendario-layout {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 0;
}
.calendario-topo {
  flex: none;
  margin-bottom: 8px;
}
.calendario-lista {
  flex: 1 1 auto;
  min-height: 0;
}

/* Dia marcado como indisponível: tachado, tom apagado */
.dia-calendario--indisponivel {
  color: var(--erro);
  opacity: 0.85;
}
.dia-calendario--indisponivel::before {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  top: 50%;
  height: 2px;
  background: var(--erro);
  transform: rotate(-18deg);
  border-radius: 2px;
}
.dia-calendario--indisponivel.dia-calendario--selecionado {
  color: white !important;
}
.dia-calendario--indisponivel.dia-calendario--selecionado::before {
  background: white;
}

/* Eventos já passados: cinza, no fim da lista */
.evento-item--passado {
  opacity: 0.5;
  filter: grayscale(0.6);
}
.calendario-divisor-passado {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted-2);
  margin: 18px 0 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--borda);
}

/* ---------- Robustez em telas pequenas / fonte grande do sistema (#7) ---------- */
/* Avatares e ícones nunca devem "achatar" (virar ovo) quando o flex aperta. */
.avatar, .topbar .avatar, .nav-item svg, .topbar__logo {
  flex-shrink: 0;
}
.avatar { aspect-ratio: 1 / 1; }
/* Rótulos da navegação: não estourar largura; reticências se faltar espaço. */
.nav-item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Botões não encolhem verticalmente com ajuste de fonte do sistema. */
.btn {
  min-height: 44px;
  height: auto;
}
/* Cabeçalho do chat e afins: permitir quebra em vez de cortar texto. */
.chat-cabecalho__nome, .post__autor, .evento-item__titulo, .proposta__titulo {
  overflow-wrap: anywhere;
}

/* ---------- Correções de layout (revisão) ---------- */

/* #5 Todos os inputs ocupam a largura total do campo (o number ficava curto). */
.campo input,
.campo textarea {
  width: 100%;
}
.campo input[type="time"],
.campo input[type="date"] {
  min-height: 48px;
}

/* #10 Logo do cabeçalho um pouco maior e centralizado, avatar à direita. */
.topbar {
  position: relative;
  justify-content: flex-end;
}
.topbar__logo {
  height: 116px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* #2 Miniaturas (circulitos) de quem marcou indisponível, abaixo do número do dia. */
.dia-calendario {
  flex-direction: column;
  gap: 1px;
  justify-content: center;
}
.dia-indisp-avatares {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  margin-top: 1px;
  cursor: pointer;
}
.dia-indisp-avatares img,
.dia-indisp-avatares .dia-indisp-inicial {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--card);
  margin-left: -3px;
  background: var(--surface-2);
  font-size: 7px;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.dia-indisp-avatares .dia-indisp-inicial:first-child,
.dia-indisp-avatares img:first-child { margin-left: 0; }
.dia-indisp-mais {
  font-size: 8px;
  font-weight: 700;
  color: var(--muted);
  margin-left: 2px;
}

/* Cartão de "indisponíveis neste dia" na lista do admin */
.indisp-dia-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.indisp-dia-card__titulo {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
}
.indisp-dia-linha {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.indisp-dia-linha .avatar { width: 32px; height: 32px; font-size: 12px; }

/* #3 Cartão de prévia de link (estilo WhatsApp) */
.post__link-preview {
  display: none;
}
.post__link-preview--pronto {
  display: block;
  margin: 0 16px 12px;
  border: 1px solid var(--borda);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
}
.post__link-preview__img img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}
.post__link-preview__texto {
  padding: 10px 14px;
}
.post__link-preview__site {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 3px;
}
.post__link-preview__titulo {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post__link-preview__desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Onboarding (questionário + contrato) ---------- */
.onboarding {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 24px 18px 40px;
}
.onboarding__topo { margin-bottom: 18px; }
.onboarding__passo {
  font-size: 12px; font-weight: 700; color: var(--roxo);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.onboarding__titulo { font-size: 24px; margin-bottom: 6px; }
.onboarding__sub { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.onboarding__corpo { display: flex; flex-direction: column; gap: 4px; }

.q-input {
  width: 100%; box-sizing: border-box; padding: 11px 12px;
  border: 1px solid var(--borda); border-radius: var(--radius-md);
  background: var(--surface); font-size: 15px;
}
textarea.q-input { min-height: 74px; resize: vertical; }

.q-opcoes { display: flex; flex-wrap: wrap; gap: 8px; }
.q-chip {
  padding: 8px 12px; border-radius: 999px; border: 1px solid var(--borda);
  background: var(--surface); font-size: 13px; cursor: pointer; transition: all .12s;
}
.q-chip.ativo { background: var(--roxo); border-color: var(--roxo); color: #fff; }

.q-foto { display: flex; align-items: center; gap: 12px; }
.q-foto-preview {
  width: 64px; height: 64px; border-radius: 12px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--borda);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.q-foto-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Fotos múltiplas: preview vira uma grade de miniaturas com botão de remover. */
.q-foto--multi { align-items: flex-start; flex-wrap: wrap; }
.q-foto--multi .q-foto-preview {
  width: auto; min-width: 64px; height: auto; min-height: 64px;
  border: none; background: none; border-radius: 0;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start;
}
.q-foto--multi .q-foto-preview:empty { display: none; }
.q-foto-item { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 1px solid var(--borda); }
.q-foto-item img { width: 100%; height: 100%; object-fit: cover; }
.q-foto-remover {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px;
  border: none; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff;
  font-size: 12px; line-height: 1; cursor: pointer; display: flex;
  align-items: center; justify-content: center; padding: 0;
}

.q-rede-linha, .ass-parceria-linha { display: flex; gap: 6px; margin-bottom: 6px; }
.q-rede-tipo { flex: 0 0 110px; padding: 9px; border: 1px solid var(--borda); border-radius: 10px; background: var(--surface); }
.q-rede-arroba { flex: 1; padding: 9px; border: 1px solid var(--borda); border-radius: 10px; background: var(--surface); }
.q-rede-remover { background: none; border: none; color: var(--erro); font-size: 16px; cursor: pointer; }

.contrato-card {
  background: var(--surface); border: 1px solid var(--borda);
  border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.contrato-card__nome { font-weight: 800; font-size: 15px; margin-bottom: 2px; }

/* ---------- Correção de contraste dos botões no modo escuro ---------- */
@media (prefers-color-scheme: dark) {
  .btn--secundario {
    background: #2E2B39;      /* cinza mais claro que o fundo */
    color: var(--ink);        /* texto claro, sempre legível */
    border-color: #413D4F;
  }
  .btn--secundario:active { background: #38344a; }
  .chip-toggle button { color: var(--ink); }        /* inativo legível */
  .chip-toggle button.ativo { color: #fff; }
  .q-chip { color: var(--ink); }
  .q-input { color: var(--ink); }
}

/* ---------- Questionário: parágrafo grande, botão (i), overlay de exemplo ---------- */
.q-input--grande { min-height: 120px; }

.q-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  margin-left: 6px;
  border-radius: 50%;
  border: none;
  background: var(--roxo);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  font-style: italic;
  cursor: pointer;
  vertical-align: middle;
}

.exemplo-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
.exemplo-caixa {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: var(--sombra);
}
.exemplo-titulo { font-weight: 800; font-size: 15px; margin-bottom: 8px; }
.exemplo-texto { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.exemplo-img { width: 100%; border-radius: 10px; border: 1px solid var(--borda); }
.exemplo-dica { font-size: 11px; color: var(--muted-2); margin-top: 10px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Painel admin: nota de idade e distintivo do modelo ---------- */
.nota-idade {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-2);
  background: var(--surface);
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 4px;
  vertical-align: middle;
}
.distintivo-modelo {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--roxo), var(--rosa));
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 4px;
  vertical-align: middle;
}
