* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --verde: #2E7D6E;
  --verde-claro: #E8F5F2;
  --verde-escuro: #1B5E50;
  --rosa: #F8E8EE;
  --rosa-escuro: #C2185B;
  --texto: #2C2C2C;
  --texto-suave: #666;
  --borda: #E0E0E0;
  --branco: #FFFFFF;
  --sombra: 0 2px 8px rgba(0,0,0,0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--texto);
  background: #F5F5F5;
  line-height: 1.6;
}

.hidden { display: none !important; }

/* BOAS-VINDAS */
.boas-vindas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.bv-conteudo {
  background: var(--branco);
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.bv-conteudo h1 {
  font-size: 1.5rem;
  color: var(--verde-escuro);
  margin-bottom: 0.5rem;
}

.bv-autor {
  color: var(--verde);
  font-weight: 500;
  margin-bottom: 1rem;
}

.bv-desc {
  color: var(--texto-suave);
  margin-bottom: 1.5rem;
}

.bv-itens {
  text-align: left;
  margin-bottom: 1.5rem;
}

.bv-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--borda);
  font-size: 0.9rem;
}

.bv-aviso {
  font-size: 0.8rem;
  color: var(--texto-suave);
  margin-top: 1rem;
}

/* HEADER */
.header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: var(--verde);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  z-index: 100;
  box-shadow: var(--sombra);
}

.header-titulo {
  font-weight: 600;
  font-size: 1rem;
}

.btn-menu, .btn-busca-icon {
  background: none;
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* MENU LATERAL */
.menu {
  position: fixed;
  top: 0; left: 0;
  width: 280px;
  height: 100%;
  background: var(--branco);
  z-index: 200;
  box-shadow: 4px 0 16px rgba(0,0,0,0.2);
  overflow-y: auto;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--verde);
  color: white;
  font-weight: 600;
}

.menu-header button {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}

.menu-lista {
  list-style: none;
  padding: 0.5rem 0;
}

.menu-lista li a {
  display: block;
  padding: 0.85rem 1.25rem;
  color: var(--texto);
  text-decoration: none;
  border-bottom: 1px solid var(--borda);
  font-size: 0.95rem;
  transition: background 0.2s;
}

.menu-lista li a:hover {
  background: var(--verde-claro);
}

.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 150;
}

/* MAIN */
main {
  margin-top: 56px;
  min-height: calc(100vh - 56px - 60px);
}

.pagina {
  padding: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
}

.pagina.ativa { display: block; }
.pagina.hidden { display: none; }

.pagina-titulo {
  font-size: 1.3rem;
  color: var(--verde-escuro);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--verde-claro);
}

.pagina-desc {
  color: var(--texto-suave);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* MENSAGEM DO DIA */
.mensagem-dia {
  background: var(--verde);
  color: white;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  font-style: italic;
  line-height: 1.7;
}

.mensagem-dia-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.8;
  margin-bottom: 0.5rem;
  font-style: normal;
}

.mensagem-dia-texto {
  font-size: 0.95rem;
}

.mensagem-dia-compartilhar {
  margin-top: 0.75rem;
  font-style: normal;
}

.btn-compartilhar-msg {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
}

/* INÍCIO */
.inicio-apresentacao {
  background: var(--branco);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--sombra);
}

.inicio-apresentacao h2 {
  font-size: 1.4rem;
  color: var(--verde-escuro);
  margin-bottom: 0.25rem;
}

.inicio-autor {
  color: var(--verde);
  font-weight: 500;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.inicio-premissa {
  color: var(--texto-suave);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.inicio-botoes {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* BOTÕES */
.btn-primario {
  background: var(--verde);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-primario:hover { background: var(--verde-escuro); }

.btn-secundario {
  background: var(--verde-claro);
  color: var(--verde-escuro);
  border: 1px solid var(--verde);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 500;
}

.btn-voltar {
  background: none;
  border: none;
  color: var(--verde);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  font-weight: 500;
}

.btn-link {
  display: inline-block;
  background: var(--verde-claro);
  color: var(--verde-escuro);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  margin: 0.25rem;
}

/* CONTADOR */
.contador-acessos {
  text-align: center;
  color: var(--texto-suave);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* PIX */
.pix-bloco {
  background: var(--verde-claro);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
  border: 1px solid var(--verde);
}

.pix-bloco h3 {
  color: var(--verde-escuro);
  margin-bottom: 0.75rem;
}

.pix-bloco p {
  color: var(--texto-suave);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.qrcode {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  margin: 0.75rem auto;
  display: block;
  border: 4px solid white;
}

.btn-pix {
  background: var(--verde);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.pix-copiado {
  display: inline-block;
  color: var(--verde-escuro);
  font-weight: 500;
  margin-left: 0.5rem;
}

/* CAPÍTULOS */
.lista-capitulos {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.capitulo-card {
  background: var(--branco);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--sombra);
  cursor: pointer;
  transition: transform 0.2s;
  border-left: 4px solid var(--verde);
}

.capitulo-card:hover { transform: translateX(4px); }

.capitulo-numero {
  font-size: 0.75rem;
  color: var(--verde);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.capitulo-titulo {
  font-size: 1rem;
  font-weight: 500;
  color: var(--texto);
  margin: 0.25rem 0;
}

.capitulo-topicos {
  font-size: 0.8rem;
  color: var(--texto-suave);
}

/* TÓPICOS */
.topicos-lista {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.topico-item {
  background: var(--branco);
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  border: 1px solid var(--borda);
  transition: border-color 0.2s;
}

.topico-item:hover { border-color: var(--verde); }

.topico-numero {
  font-size: 0.75rem;
  color: var(--texto-suave);
}

.topico-titulo {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--texto);
}

/* CONTEÚDO DO TÓPICO */
.topico-header {
  margin-bottom: 1.5rem;
}

.topico-cap-label {
  font-size: 0.75rem;
  color: var(--verde);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.topico-titulo-grande {
  font-size: 1.3rem;
  color: var(--verde-escuro);
  margin: 0.25rem 0 1rem;
  line-height: 1.4;
}

.bloco-secao {
  margin-bottom: 1.5rem;
}

.bloco-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--verde);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.bloco-texto {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--texto);
}

.bloco-dica {
  background: #E8F5E9;
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.9rem;
  color: #2E7D32;
  line-height: 1.6;
  margin: 1rem 0;
}

.bloco-palavra {
  background: var(--rosa);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.9rem;
  color: #880E4F;
  line-height: 1.6;
  font-style: italic;
  margin: 1rem 0;
}

.video-container {
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
}

.video-label {
  font-size: 0.75rem;
  color: var(--verde);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.video-container iframe {
  width: 100%;
  height: 220px;
  border: none;
}

/* COMPARTILHAR */
.topico-compartilhar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--borda);
}

.btn-compartilhar {
  background: var(--verde-claro);
  color: var(--verde-escuro);
  border: 1px solid var(--verde);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* BUSCA */
.busca-campo {
  margin-bottom: 1rem;
}

.busca-campo input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--borda);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.busca-campo input:focus { border-color: var(--verde); }

.resultado-item {
  background: var(--branco);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  border: 1px solid var(--borda);
  transition: border-color 0.2s;
}

.resultado-item:hover { border-color: var(--verde); }

.resultado-cap {
  font-size: 0.75rem;
  color: var(--verde);
  font-weight: 600;
}

.resultado-titulo {
  font-size: 0.95rem;
  color: var(--texto);
  font-weight: 500;
}

/* CHECKLISTS */
.checklists-lista {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.checklist-card {
  background: var(--branco);
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  box-shadow: var(--sombra);
  border-top: 3px solid var(--verde);
  transition: transform 0.2s;
}

.checklist-card:hover { transform: translateY(-2px); }

.checklist-card h3 {
  font-size: 0.95rem;
  color: var(--verde-escuro);
  margin-bottom: 0.25rem;
}

.checklist-card p {
  font-size: 0.8rem;
  color: var(--texto-suave);
}

.checklist-conteudo {
  margin-top: 1rem;
  background: var(--branco);
  border-radius: 12px;
  padding: 1.25rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--borda);
}

.checklist-item input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--verde);
  flex-shrink: 0;
}

.checklist-item label {
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1.5;
}

.checklist-item input:checked + label {
  text-decoration: line-through;
  color: var(--texto-suave);
}

/* DEPOIMENTOS */
.aviso-depoimento {
  background: #FFF8E1;
  border: 1px solid #F9A825;
  border-radius: 8px;
  padding: 0.85rem;
  font-size: 0.85rem;
  color: #5D4037;
  margin-bottom: 1.25rem;
}

.form-depoimento {
  background: var(--branco);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--sombra);
}

.form-campo {
  margin-bottom: 1rem;
}

.form-campo label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--texto);
  margin-bottom: 0.4rem;
}

.form-campo input,
.form-campo textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--borda);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-campo input:focus,
.form-campo textarea:focus { border-color: var(--verde); }

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-label input {
  width: auto !important;
}

.form-info {
  font-size: 0.8rem;
  color: var(--texto-suave);
  margin-top: 0.75rem;
  text-align: center;
}

/* COMO USAR */
.como-usar-item {
  background: var(--branco);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--sombra);
}

.como-usar-item h3 {
  color: var(--verde-escuro);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.como-usar-item p {
  font-size: 0.9rem;
  color: var(--texto-suave);
  line-height: 1.6;
}

/* SOBRE */
.sobre-conteudo {
  background: var(--branco);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--sombra);
}

.sobre-conteudo p {
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.sobre-frase {
  font-style: italic;
  color: var(--verde-escuro);
  font-weight: 500;
  text-align: center;
  font-size: 1rem !important;
}

.sobre-links {
  margin: 1rem 0;
  text-align: center;
}

/* RODAPÉ */
.rodape {
  background: var(--verde-escuro);
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  line-height: 1.8;
}

/* IMPRIMIR */
@media print {
  .header, .menu, .rodape, .btn-voltar,
  .topico-compartilhar, .pix-bloco,
  .btn-imprimir { display: none !important; }

  .pagina { padding: 0; }

  .bloco-dica { border: 1px solid #ccc; }

  body::after {
    content: "Manual do Familiar Cuidador de Alzheimer — Dr. Pelegrino, Geriatra — alzheimer.drpelegrino.com.br";
    display: block;
    text-align: center;
    font-size: 10px;
    color: #666;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ccc;
  }
}

/* MODO NOTURNO */
@media (prefers-color-scheme: dark) {
  :root {
    --texto: #F0F0F0;
    --texto-suave: #AAAAAA;
    --borda: #444;
    --branco: #1E1E1E;
  }
  body { background: #121212; }
  .header { background: #1B5E50; }
}

/* RESPONSIVO */
@media (max-width: 480px) {
  .inicio-botoes { flex-direction: column; }
  .checklists-lista { grid-template-columns: 1fr; }
}