p,
h1,
h2,
h3 {
  margin: 0;
  padding: 0;
}

:root {
  --bg: #1e1e1e;
  --bg-elevated: #272727;
  --bg-card: #2a2a2a;
  --text: #e8e8e8;
  --primary: #3e9e66;
  --warning: #f09824;
  --danger: #ff0c22;
  --border: #3a3a3a;
  --bg-text: #0f6e56;

  --sidebar-width: 250px;
  --sidebar-width-collapsed: 68px;
  --topbar-height: 60px;

  --titulo-h1: "Cormorant Garamond", serif;
  --titulo-h2: "DM Mono", monospace;

  /* Faixa clara fixa (não muda com o tema): usada em seções que já eram claras
     de propósito (módulos, planos, ferramentas), com texto em tons escuros fixos. */
  --secao-clara: #e8e8e8;
}

* {
  box-sizing: border-box;
}

/* Some visualmente mas continua lido por leitor de tela — usado pra manter a ordem
   correta de headings (h1 > h2 > h3...) sem precisar de um título visível extra. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  background: var(--bg-elevated);
  color: var(--text);
  font-family: "DM Sans", "Radio Canada", sans-serif;
  margin: 0;
}
body.body-planos-logado {
  /* Seção de planos sempre clara, de propósito, mesmo com o tema escuro ativo
     (bate com os cards claros dessa seção) — por isso cor fixa, não var(--text). */
  background: #e8e8e8;
  color: #1c1c1a;
}

h1 {
  font-family: var(--titulo-h1);
  font-weight: 400;
  font-size: 2rem;
}

h2 {
  font-family: var(--titulo-h2);
  font-weight: 500;
  padding-bottom: 1rem;
}

@media (max-width: 700px) {
  .card h1 {
    font-size: 2rem;
  }
}

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

/* ---------- Layout com sidebar (usuário autenticado) ---------- */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.18s ease;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar.collapsed {
  width: var(--sidebar-width-collapsed);
}
.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .sidebar-logo-img,
.sidebar.collapsed .sidebar-label {
  display: none;
}
.sidebar.collapsed .sidebar-header {
  justify-content: center;
}
.sidebar.collapsed .sidebar-toggle {
  margin: 0;
}

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  overflow: hidden;
}
.sidebar-logo-mark {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Mono", monospace;
  font-weight: 700;
}
.sidebar-logo-text {
  white-space: nowrap;
}
.sidebar-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  flex-shrink: 0;
}
.sidebar-toggle:hover {
  background: var(--bg-card);
}
.sidebar-toggle-icon {
  font-size: 0.9rem;
}
.sidebar-toggle .sidebar-toggle-icon--open {
  display: none;
}
.sidebar.collapsed .sidebar-toggle-icon--close {
  display: none;
}
.sidebar.collapsed .sidebar-toggle-icon--open {
  display: inline;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 0.6rem;
}
.sidebar-nav-footer {
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-nav a:hover {
  background: var(--bg-card);
}
.sidebar-nav a.active {
  background: var(--primary);
  color: #fff;
}

.sidebar-icon {
  flex-shrink: 0;
  width: 1.2em;
  text-align: center;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.app-main > main {
  flex: 1;
}

.app-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--text);
  border-top: 1px solid var(--border);
}
.app-footer-copy {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.8;
  color: var(--bg-card);
}
.app-footer-links {
  display: flex;
  gap: 1.2rem;
}
.app-footer-links a {
  font-size: 0.8rem;
  color: var(--bg-card);
  opacity: 0.8;
  text-decoration: none;
}
.app-footer-links a:hover {
  opacity: 1;
  color: var(--primary);
}
.footer-link-instagram {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.instagram-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 2rem;
  margin: 2rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(62, 158, 102, 0.14), rgba(15, 110, 86, 0.14));
}
.instagram-callout-text h3 {
  margin: 0 0 0.3rem;
  font-family: "DM Mono", "Radio Canada", sans-serif;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.instagram-callout-text h3 i {
  color: var(--primary);
}
.instagram-callout-text p {
  margin: 0;
  opacity: 0.75;
  font-size: 0.9rem;
}
.instagram-callout .btn {
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .instagram-callout {
    padding: 1.25rem;
  }
  .app-footer {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }
}

.topbar {
  height: var(--topbar-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: end;
  padding: 0 1.5rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.topbar-right {
  display: flex;
  gap: 1.4rem;
  align-items: center;
}
.topbar-right a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.topbar-notificacoes {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 1.1rem;
}
.topbar-notificacoes-badge {
  position: absolute;
  top: -0.5rem;
  right: -0.6rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.2rem 0.35rem;
  border-radius: 999px;
  min-width: 1.1rem;
  text-align: center;
}
.idioma-form {
  margin: 0;
  display: inline-flex;
}
.idioma-form select {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.topbar-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.topbar-right a:hover {
  color: var(--primary);
}

.logout-form {
  margin: 0;
  display: inline-flex;
}
.link-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
}
.link-button:hover {
  color: var(--primary);
}

.exit:hover {
  color: var(--danger);
}

.sidebar-toggle-mobile {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 40;
}
.sidebar-backdrop.visible {
  display: block;
}

/* ---------- Topbar simples (visitante não logado) ---------- */

/* .guest-topbar não leva backdrop-filter/transform diretamente: qualquer um dos dois
   viraria "containing block" dos descendentes position:fixed (ex.: .guest-nav-links no
   mobile), e eles passariam a se posicionar contra a topbar em vez da viewport. O blur
   fica num ::before por baixo do conteúdo. */
.guest-topbar {
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3rem;
}

.guest-topbar .sidebar-logo {
  order: 1;
}

.guest-nav-links {
  order: 2;
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 1.5rem;
}
.guest-nav-links a {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  opacity: 0.8;
}
.guest-nav-links a:hover {
  color: white;
  font-weight: 400;
  background-color: #1c5546;
  opacity: inherit;
}

.guest-topbar .badge-cadastro {
  order: 4;
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  background: var(--bg-text);
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 100px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition:
    background 0.2s,
    transform 0.2s;
  text-decoration: none;
  margin-left: 1.5rem;
}
.guest-topbar > .idioma-form {
  order: 3;
  margin-left: 1rem;
}
.logo-compact {
  display: none;
}

/* ---------- Responsivo: sidebar vira gaveta em telas estreitas ---------- */

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: var(--sidebar-width);
    transform: translateX(-100%);
    transition: transform 0.18s ease;
  }

  .sidebar-nav-footer {
    margin-top: auto;
  }

  .sidebar.collapsed {
    width: var(--sidebar-width);
  } /* botão de colapsar não se aplica no mobile */
  .sidebar.collapsed .sidebar-logo-text,
  .sidebar.collapsed .sidebar-label {
    display: inline;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: none;
  }
  .sidebar-toggle-mobile {
    display: block;
  }

  .topbar {
    justify-content: space-between;
    position: fixed;
    z-index: 10;
    width: 100%;
  }
  .guest-topbar {
    padding: 1rem;
  }
  .logo-full {
    display: none;
  }
  .logo-compact {
    display: block;
  }
  .guest-topbar > .idioma-form {
    order: 2;
    margin-left: auto;
  }
  .guest-topbar .badge-cadastro {
    order: 3;
    margin-left: 0.75rem;
    font-size: 1rem;
    text-decoration: none;
  }

  /* Módulos/Planos/Entrar viram um rodapé fixo, tipo tab bar de app. */
  .guest-nav-links {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    margin-left: 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 1.6rem 1rem;
    justify-content: space-around;
  }
  .guest-nav-links a {
    margin-left: 0;
  }

  /* dá espaço pro rodapé fixo (.guest-nav-links) não cobrir o final do footer */
  .site-footer {
    padding-bottom: calc(1.5rem + 4.5rem);
  }
}

/* ---------- Rodapé (páginas públicas) ---------- */

.site-footer {
  background: var(--text);
  color: var(--bg-elevated);
  padding: 1.5rem 3rem 1.5rem;
}
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.site-footer-logo {
  display: block;
}
.site-footer-logo img {
  height: 8rem;
  width: auto;
  display: block;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.site-footer-links a {
  color: var(--bg-elevated);
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.75;
}
.site-footer-links a:hover {
  opacity: 1;
  color: var(--primary);
}

.site-footer-copy {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.8rem;
  opacity: 0.7;
  text-align: center;
}

@media (max-width: 700px) {
  /* padding-bottom fica de fora aqui de propósito: em telas <=860px o rodapé fixo
     (.guest-nav-links) precisa da folga extra definida ali, e um shorthand "padding"
     aqui a apagaria. */
  .site-footer {
    padding: 0 1rem 6rem;
  }
  .site-footer-inner {
    flex-direction: column;
    gap: 1rem;
  }
  .site-footer-logo img {
    height: 10rem;
  }
  .site-footer-links {
    gap: 1rem;
  }

  .tabela-linha-clicavel {
    flex-wrap: wrap;
    display: flex;
    gap: 1rem;
  }
}

/* ---------- Conteúdo ---------- */

@media (max-width: 700px) {
  .container {
    margin: 1.2rem 0;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid #3e9e666b;
  border-radius: 10px;
  padding: 1.5rem;
}

.principal {
  margin: 2rem 3rem auto;
}

.pesquisar {
  border: none;
  background: none;
  margin: 1rem auto;
  padding: 0 1rem;
  max-width: 900px;
}
.pesquisar input {
  border-radius: 3rem;
  padding: 0 1rem;
  background: #3e9e664a;
  color: var(--text);
}

.pesquisar input::placeholder {
  color: var(--text);
}


/* ---------- Página inicial (home pública) ---------- */

.hero,
.auth-hero,
.page-banner {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 88% 10%,
      rgba(62, 158, 102, 0.22),
      transparent 42%
    ),
    radial-gradient(
      circle at 8% 95%,
      rgba(62, 158, 102, 0.14),
      transparent 45%
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 140px
    ),
    repeating-linear-gradient(
      to right,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 180px
    ),
    var(--bg);
}
.hero {
  text-align: left;
  padding: 5rem;
}

.auth-hero {
  min-height: calc(100vh - var(--topbar-height) - 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
}
.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
}
.auth-decor-card--cliente {
  top: 10%;
  left: 6%;
}
.auth-decor-card--contrato {
  bottom: 12%;
  right: 8%;
}
.auth-decor-card--email {
  top: 14%;
  right: 6%;
}

.page-banner {
  padding: 4rem 2rem 4rem;
  margin-bottom: 2.5rem;
}
.page-banner-title {
  position: relative;
  z-index: 2;
  padding-top: 1.6rem;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 2.1rem;
  line-height: 1.2;
  color: var(--text);
  margin: 0;
}
.page-banner-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1px;
  width: 200px;
  height: 2px;
  background: var(--primary);
}
.page-banner-title::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 220px;
  width: 5px;
  height: 5px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: var(--primary);
  animation: banner-dot-piscar 1.8s ease-in-out infinite;
}
@keyframes banner-dot-piscar {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  .page-banner-title::after {
    animation: none;
  }
}
.page-banner-subtitle {
  position: relative;
  z-index: 2;
  margin: 0.5rem 0 0;
  color: var(--text);
  font-size: 0.9rem;
}
@media (max-width: 700px) {
  .page-banner {
    padding: 5rem 2rem 3rem;
  }

  .container {
    padding: 0 !important;
  }

  .page-banner-title {
    font-size: 1.6rem;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.hero-content h1 {
  font-size: 4rem;
}

.hero h1 {
  font-family: "Cormorant Garamond", serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 1.5rem;
}
.hero h1 span {
  color: var(--primary);
  font-style: italic;
}
.hero-subtitle {
  max-width: 480px;
  color: var(--text);
  margin: 2rem 0;
  opacity: 0.85;
  font-size: 1rem;
  line-height: 1.5;
}
.hero-cta {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-trust {
  margin-top: 1rem;
  font-size: 0.85rem;
  opacity: 0.65;
  color: #30f181;
}

/* Cartões/skeletons decorativos que reproduzem o mock de fundo — sem conteúdo real, ocultos de leitores de tela */
.hero-decor {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-decor-dot {
  position: absolute;
  top: 28%;
  left: 12%;
  width: 10px;
  height: 10px;
  border: 2px solid var(--primary);
  border-radius: 50%;
}
.hero-decor-dot::before {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--primary);
  border-radius: 50%;
}
.hero-decor-line {
  position: absolute;
  top: calc(28% + 4px);
  left: calc(12% + 12px);
  width: 32%;
  border-top: 1px dotted var(--primary);
  opacity: 0.5;
}

.hero-decor-card {
  position: absolute;
  width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.hero-decor-card--gerar {
  top: 4%;
  right: 6%;
  border-color: var(--primary);
}
.hero-decor-card--roteiro {
  bottom: 6%;
  right: 32%;
}
.hero-decor-card--legenda {
  top: 38%;
  right: 4%;
}
.hero-decor-label {
  /* Verde um pouco mais claro que --primary só aqui: o tom padrão fica abaixo de
     4.5:1 de contraste contra o fundo escuro do card (falha WCAG AA). */
  color: #51a775;
  font-family: "DM Mono", monospace;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}
.hero-decor-skel {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  opacity: 0.6;
}
.hero-decor-skel--accent {
  background: var(--primary);
  opacity: 0.8;
}
.hero-decor-pill {
  margin-top: 0.4rem;
  align-self: flex-start;
  background: var(--primary);
  /* Preto puro em vez de --bg-elevated: contraste maior contra o verde do fundo. */
  color: #000;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 100px;
}

@media (max-width: 900px) {
  .hero-decor {
    display: none;
  }
  .creditos-avulsos {
    max-width: 1200px;
    padding: 1rem !important;
    margin: 0 auto;
  }
  .principal {
    margin: 0.5rem;
  }
}

@media (max-width: 700px) {
  .hero {
    padding: 3rem 2rem;
  }
  .hero-content {
    max-width: 100%;
  }

  .hero-content h1 {font-size: 3rem;}

  .hero-cta {
    justify-content: center;
    padding: 1rem 0;
  }
  .hero-trust {
    text-align: center;
  }
  .planos-section {
    padding: 5rem 1rem 0 1rem !important;
  }
}

.beneficios {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--text);
  padding: 3rem;
}
.beneficio-item {
  position: relative;
  background: #f7f7f3;
  padding: 2rem 2.2rem;
  border: 1px solid #e6e6e0;
  border-bottom: none;
  width: 40rem;
}
.beneficio-item:first-child {
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}
.beneficio-item:last-child {
  background: #efefe8;
  border-bottom: 6px solid #9f9f9f52;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}
.beneficio-label {
  display: block;
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  /* Verde mais escuro que --primary só aqui: o tom padrão fica abaixo de 4.5:1 de
     contraste contra o fundo claro do card (falha WCAG AA). */
  color: #2b6e47;
  margin-bottom: 0.7rem;
}
.beneficio-item h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1.2;
  color: #1c1c1a;
  margin: 0 0 0.5rem;
}
.beneficio-item h3 em {
  font-style: italic;
}
.beneficio-subtitulo {
  margin: 0;
  color: #6b6b63;
  font-size: 0.92rem;
}

.tarefa-status-select {
  border-radius: 2rem;
   background: #0000007a;
  color: var(--text);
}

@media (max-width: 700px) {
  .beneficios {
    padding: 3rem 1rem;
  }
  .beneficio-item {
    padding: 1.5rem 1.5rem;
    width: auto;
  }
  .beneficio-item h3 {
    font-size: 1.5rem;
  }
}

.home-section {
  padding: 2rem;
  margin: 0 auto;
}
.home-section h2 {
  text-align: center;
  margin-bottom: 0.4rem;
}

.ferramentas {
  background: var(--secao-clara);
  border-top: 1px solid #cdcdcd;
}

.modulos-section {
  background: var(--secao-clara);
  padding: 3rem 1rem;
  max-width: 1200px;
}
.modulos-header {
  position: relative;
  max-width: 640px;
}
.modulos-label {
  display: block;
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  /* Verde escurecido (só em fundo claro): var(--primary) fica abaixo de 4.5:1 aqui. */
  color: #2b6e47;
  margin-bottom: 0.8rem;
}
.modulos-section h2 {
  text-align: left;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 2.6rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #1c1c1a;
  margin: 0 0 1rem;
}
.modulos-section h2 .accent {
  color: #2b6e47;
}
.modulos-subtitle {
  text-align: left;
  max-width: 520px;
  margin: 0;
  color: #5c5c54;
  line-height: 1.5;
}

.modulos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #c9c9c9;
  border: 1px solid #c9c9c9;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 2.5rem;
}
.modulo-tile {
  background: var(--secao-clara);
  padding: 1.8rem 1.6rem;
}
.modulo-tile h3 {
  margin: 0 0 0.6rem;
  font-family: "DM Sans", "Radio Canada", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1c1c1a;
}
.modulo-tile p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.3;
  color: #5c5c54;
}

@media (max-width: 900px) {
  .modulos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .modulos-grid {
    grid-template-columns: 1fr;
  }
  .modulos-section h2 {
    font-size: 2rem;
  }
}

.como-funciona {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}
.como-funciona-header {
  max-width: 640px;
}
.como-funciona-label {
  display: block;
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  /* Verde clareado (só em fundo escuro): var(--primary) fica abaixo de 4.5:1 aqui. */
  color: #51a775;
  margin-bottom: 0.8rem;
}
.como-funciona h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 2.6rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 1rem;
}
.como-funciona h2 .accent {
  color: var(--primary);
}
.como-funciona-subtitle {
  margin: 0;
  color: var(--text);
  opacity: 0.65;
  font-size: 0.95rem;
}

.como-funciona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.como-funciona-step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.8rem 1.6rem;
}
.como-funciona-step-num {
  display: block;
  font-family: "DM Mono", monospace;
  color: var(--primary);
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}
.como-funciona-step h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--text);
  margin: 0 0 0.6rem;
}
.como-funciona-step p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}
.como-funciona-step p .accent {
  color: var(--primary);
  opacity: 1;
}

.como-funciona-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.como-funciona-footer-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  color: var(--text);
  margin: 0 0 0.3rem;
}
.como-funciona-footer-subtitle {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text);
  opacity: 0.65;
}

@media (max-width: 900px) {
  .como-funciona-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .como-funciona {
    padding: 2.5rem 1.5rem;
  }
  .como-funciona h2 {
    font-size: 2rem;
  }
  .como-funciona-footer {
    text-align: center;
    justify-content: center;
  }
}

.explicacao {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.accordion-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  cursor: pointer;
}
.acc-header-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.acc-emoji {
  font-size: 1.4rem;
  line-height: 1;
}
.acc-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}
.acc-subtitle {
  display: block;
  font-size: 0.82rem;
  color: var(--text);
  opacity: 0.6;
  margin-top: 0.2rem;
}
.acc-icon {
  font-size: 1.3rem;
  line-height: 1;
  color: var(--primary);
  transition: transform 0.2s ease;
}
.accordion-item.open .acc-icon {
  transform: rotate(45deg);
}
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.accordion-item.open .accordion-body {
  max-height: 600px;
}
.acc-body-inner {
  padding: 0 1.5rem 1.5rem;
}
.acc-desc {
  margin: 0 0 1rem;
  color: var(--text);
  opacity: 0.75;
  font-size: 0.92rem;
  line-height: 1.55;
}
.acc-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.8;
}
.acc-benefits li {
  padding-left: 1.3rem;
  position: relative;
  color: var(--text);
  opacity: 0.85;
}
.acc-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
}

.planos-section {
  background: var(--secao-clara);
  padding: 2rem;
}
.planos-header {
  max-width: 1200px;
  margin: 0 auto;
}
.planos-label {
  display: block;
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  /* Verde escurecido (só em fundo claro): var(--primary) fica abaixo de 4.5:1 aqui. */
  color: #2b6e47;
  margin-bottom: 0.8rem;
}
.planos-section h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 2.6rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #1c1c1a;
  margin: 0 0 1rem;
}
.planos-section h2 .accent {
  color: #2b6e47;
}
.planos-subtitle {
  margin: 0;
  color: #5c5c54;
  line-height: 1.5;
}

.creditos_avulsos {
  /* Fundo fixo (não depende de body.body-planos-logado): sem isso, o texto fica
     ilegível quando essa seção herda o fundo claro da página de planos logada. */
  background: var(--bg-elevated);
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 0;
}

.planos-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  max-width: 1200px;
  margin: 2rem auto;
}
.planos-toggle-label {
  font-size: 0.92rem;
  color: #5c5c54;
  cursor: pointer;
  user-select: none;
}
.planos-toggle-label.active {
  color: #1c1c1a;
  font-weight: 600;
}
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 100px;
  background: #d3d3ca;
  cursor: pointer;
}
.toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}
.planos-section.ciclo-anual .toggle-switch {
  background: var(--primary);
}
.planos-section.ciclo-anual .toggle-knob {
  transform: translateX(20px);
}
.planos-toggle-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(62, 158, 102, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}

.planos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.body-planos-logado .planos-grid {
  grid-template-columns: repeat(3, 1fr);
}
.plano-card {
  position: relative;
  background: #fbfbf9;
  border: 1px solid #e2e2da;
  border-radius: 14px;
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
}
.plano-card-destaque {
  border: 2px solid var(--primary);
}
.plano-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  white-space: nowrap;
}
.plano-badge-destaque {
  /* Verde escurecido: var(--primary) com texto branco fica abaixo de 4.5:1 aqui. */
  background: #317e51;
  color: #fff;
}
.plano-badge-premium {
  background: #2f58c0;
  color: #fff;
}
.plano-label {
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  color: #5c5c54;
  margin: 0.4rem 0 0.9rem;
}
.plano-preco {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  color: #1c1c1a;
  margin: 0;
  line-height: 1;
}
.plano-preco small {
  font-size: 0.95rem;
  font-weight: 400;
  color: #5c5c54;
  margin-left: 0.15rem;
}
.preco-anual {
  display: none;
}
.planos-section.ciclo-anual .preco-mensal {
  display: none;
}
.planos-section.ciclo-anual .preco-anual {
  display: inline;
}
.plano-cta-anual {
  display: none;
}
.planos-section.ciclo-anual .plano-cta-mensal {
  display: none;
}
.planos-section.ciclo-anual .plano-cta-anual {
  display: block;
}
.plano-preco-original {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #5c5c54;
}
.plano-nota-inline {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  color: #6b6b63;
}
.plano-callout {
  margin-top: 0.5rem;
  background: #f1eaf7;
  border: 1px solid #e3d5ee;
  color: #5c4a68;
  font-size: 0.7rem;
  line-height: 1.2;
  padding: 0.5rem;
  border-radius: 8px;
}
.plano-modulos {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.85;
}
.plano-modulos li {
  color: #3a3a34;
}
.plano-modulos li.plano-modulo-off {
  color: #6b6b63;
}
.plano-modulo-check {
  color: var(--primary);
  font-weight: 700;
}
.plano-creditos {
  margin: 1rem 0 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1c1c1a;
}
.plano-cta {
  margin-top: auto;
  width: 100%;
  text-align: center;
}

.planos-footnote {
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding: 1.25rem 1.5rem;
  background: #fbfbf9;
  border: 1px solid #e2e2da;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #6b6b63;
}
.planos-footnote strong {
  color: #1c1c1a;
}
.planos-comparativo {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  text-align: center;
}
.planos-comparativo a {
  /* var(--primary) fica abaixo de 4.5:1 no fundo claro desta seção. */
  color: #2b6e47;
}

/* .planos-label reaproveitado dentro de seções de fundo escuro (ver .creditos_avulsos
   e .creditos-avulsos acima): precisa do verde claro, não do escuro usado no resto
   da página de planos (fundo claro). */
.creditos_avulsos .planos-label,
.creditos-avulsos .planos-label {
  color: #51a775;
}

@media (max-width: 1024px) {
  .planos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .planos-grid,
  .body-planos-logado .planos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .planos-grid,
  .body-planos-logado .planos-grid {
    grid-template-columns: 1fr;
  }
  .planos-section h2 {
    font-size: 2rem;
  }
}

.home-cta-final {
  position: relative;
  text-align: center;
  padding: 5rem;
}
.home-cta-final h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 2.8rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 700px;
  margin: 0 auto 2rem;
}
.home-cta-final h2 .accent {
  font-style: italic;
  color: var(--primary);
}
@media (max-width: 700px) {
  .home-cta-final h2 {
    font-size: 2rem;
  }
  .creditos_avulsos tr {
    display: flex;
    justify-content: space-between;
  }
  .creditos_avulsos tr td {
    max-width: 150px;
  }
  .creditos_avulsos {
    padding: 1rem;
  }
}

.grid {
  display: grid;
  gap: 0.5rem;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 700px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.modulo-bloqueado {
  opacity: 0.6;
}
.modulo-bloqueado-aviso {
  font-size: 0.85rem;
  color: var(--warning);
  margin-bottom: 0.6rem;
}

.aviso-gerando {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--primary);
}
.aviso-gerando[hidden] {
  display: none;
}
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinner-girar 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spinner-girar {
  to {
    transform: rotate(360deg);
  }
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: "DM Mono", monospace;
  color: var(--primary);
}
.checklist-primeiros-passos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.checklist-primeiros-passos li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
}
.checklist-primeiros-passos li.checklist-feito {
  opacity: 0.6;
  text-decoration: line-through;
}
.metric-label {
  font-size: 0.85rem;
  opacity: 0.75;
}

.btn {
  font-weight: 500;
  color: var(--text);
  background: var(--bg-text);
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 100px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition:
    background 0.2s,
    transform 0.2s;
  font-size: 1rem;
  text-decoration: none;
}
.btn:hover {
  opacity: 0.9;
}
.btn-danger {
  background: none;
  color: var(--danger);
}
.btn-secondary {
  background: transparent;
  border: 2px solid #24b38f;
  font-weight: 600;
  color: #24b38f;
}
/* #24b38f só tem 4.5:1 de contraste em fundo escuro; nos cards de plano (fundo
   claro) precisa de um tom mais escuro pra continuar acessível. */
.plano-cta.btn-secondary {
  border-color: #1a8269;
  color: #1a8269;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.2rem 0;
  color: var(--border);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  font-weight: 500;
}
.btn-google:hover {
  background: #f7f7f7;
}
.btn-google i {
  color: #4285f4;
  font-size: 1.05rem;
}

.form-group {
  margin-bottom: 1rem;
  margin-left: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  opacity: 0.9;
}
.campo-obrigatorio {
  color: var(--danger);
}
.form-group-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.form-group-checkbox input[type="checkbox"] {
  width: auto;
  flex-shrink: 0;
}
.form-group-checkbox label {
  display: inline;
  margin-bottom: 0;
}
.clearable-file-current {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.clearable-file-clear {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.clearable-file-clear input[type="checkbox"] {
  width: auto;
  flex-shrink: 0;
}
.clearable-file-clear label {
  display: inline;
  margin-bottom: 0;
}
.clearable-file-new {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 0.6rem;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 700px) {
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }
  thead {
    display: none;
  }
  tr {
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0;
  }
  td {
    border: none;
    padding: 0.3rem 0;
    width: 10rem;
  }

   .tabela-linha-clicavel {display: flex;
    justify-content: center;}

  td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    opacity: 0.6;
  }
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--bg-elevated);
}
.badge-plano {
  background: var(--primary);
  color: #fff;
}

/* ---------- Planos ---------- */

.badge-cadastro {
  font-weight: 600;
  background: var(--primary);
  color: var(--text);
}
.badge-cadastro:hover {
  color: #fff !important;
}

.pacote-card {
  text-align: center;
}

.pacote-card p,
.creditos_avulsos .card th,
.creditos_avulsos .card tbody tr td {
  color: var(--text);
}

.pacote-creditos {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.pacote-preco {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: "DM Mono", monospace;
  color: var(--primary) !important;
  margin: 0 0 1rem;
}

.creditos-avulsos {
  /* Fundo fixo (não depende de body.body-planos-logado): sem isso, o texto fica
     ilegível quando essa seção herda o fundo claro da página de planos logada. */
  background: var(--bg-elevated);
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 0;
}

.messages {
  list-style: none;
  padding: 0;
}
.messages li {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}
.messages .success {
  background: rgba(62, 158, 102, 0.2);
  border: 1px solid var(--primary);
  margin-top: 3rem;
}
.messages .error {
  background: rgba(255, 12, 34, 0.15);
  border: 1px solid var(--danger);
}
.messages .warning {
  background: rgba(240, 152, 36, 0.15);
  border: 1px solid var(--warning);
  margin: 1rem;
  max-width: 1200px;
}

/* ---------- Stickers decorativos (ícone + textura de pontinhos, sem imagens) ---------- */

.sticker {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 45% 55% 52% 48% / 48% 45% 55% 52%;
  background:
    radial-gradient(circle, rgba(62, 158, 102, 0.35) 1px, transparent 1.4px) 0 0 / 7px 7px,
    #fdfdfb;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
  color: #1a8269;
  font-size: 1.4rem;
  transform: rotate(var(--sticker-rot, -6deg));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: sticker-float 5s ease-in-out infinite;
  pointer-events: none;
}
.sticker:hover {
  transform: rotate(0deg) scale(1.08);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.26);
}
@keyframes sticker-float {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6px;
  }
}
@media (max-width: 700px) {
  .sticker {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sticker {
    animation: none;
  }
}

/* ---------- Reveal ao rolar a página (leve, sem lib externa) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Micro-interações (hover, transições) ---------- */

a {
  transition: color 0.15s ease, opacity 0.15s ease;
}

.btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(62, 158, 102, 0.35);
  opacity: 1;
}
.btn:active {
  transform: translateY(0);
  box-shadow: none;
}
.btn-secondary {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-secondary:hover {
  background: rgba(36, 179, 143, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(36, 179, 143, 0.2);
}
.btn-danger:hover {
  background: rgba(255, 12, 34, 0.1);
  transform: translateY(-2px);
}

.sidebar-nav a {
  transition: background 0.18s ease, transform 0.18s ease;
}
.sidebar-nav a:hover {
  transform: translateX(3px);
}

/* .modulo-tile e .beneficio-item ficam encostados um no outro (efeito de linhas de
   grade/hairline), então usam só cor no hover — transform/box-shadow quebrariam o
   encaixe ou seriam cortados pelo overflow:hidden do container. */

.container {
  padding-bottom: 2rem;
}

.modulo-tile {
  transition: background 0.2s ease;
}
.modulo-tile:hover {
  background: #f0f0e9;
}
.modulo-tile h3 {
  transition: color 0.2s ease;
}
.modulo-tile:hover h3 {
  color: var(--primary);
}

.card-modulos p {
  font-size: 12px;
}

.beneficio-item {
  transition: background 0.2s ease;
}
.beneficio-item:hover {
  background: #efefe2;
}
.beneficio-item:last-child:hover {
  background: #e9e9dc;
}

.plano-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.plano-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.14);
  border-color: var(--primary);
}

.como-funciona-step {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.como-funciona-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
}

.accordion-item {
  transition: border-color 0.2s ease;
}
.accordion-item:hover {
  border-color: var(--primary);
}
.accordion-header {
  transition: background 0.18s ease;
}
.accordion-header:hover {
  background: var(--bg-card);
}

table tbody tr,
table tr {
  transition: background 0.15s ease;
}
table tbody tr:hover,
table tr:hover {
  background: rgba(255, 255, 255, 0.04);
}
.tabela-linha-clicavel {
  cursor: pointer;
}

/* Cards "vivos" da área logada (módulos, clientes, métricas do dashboard) — o mesmo
   efeito de elevação já usado em .plano-card, só que reaproveitado aqui. */
.card-viva {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card-viva:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
  border-color: var(--primary);
}

.lista-notificacoes {
  list-style: none;
  margin: 0;
  padding: 0;
}
.item-notificacao {
  border-bottom: 1px solid var(--border);
}
.item-notificacao:last-child {
  border-bottom: none;
}
.item-notificacao a {
  display: block;
  padding: 0.9rem 0.5rem;
  color: var(--text);
  text-decoration: none;
}
.item-notificacao a:hover {
  background: rgba(255, 255, 255, 0.04);
}
.item-notificacao.nao-lida {
  position: relative;
}
.item-notificacao.nao-lida a {
  padding-left: 1.1rem;
}
.item-notificacao.nao-lida::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.1rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--primary);
}
.item-notificacao p {
  margin: 0.2rem 0 0;
  opacity: 0.75;
  font-size: 0.9rem;
}
.item-notificacao-data {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  opacity: 0.55;
}

.paginacao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}
.paginacao span {
  opacity: 0.7;
}

/* ---------- Modal (política, termos, suporte) ---------- */

body.modal-open {
  overflow: hidden;
}
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.6);
}
.modal-overlay.visible {
  display: flex;
}
.modal-box {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  color: var(--text);
}
.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}
.modal-close:hover {
  background: var(--bg-card);
}
.modal-box h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.8rem;
  margin: 0 0 1rem;
  padding-right: 2rem;
}
.modal-body h3 {
  font-family: "DM Sans", "Radio Canada", sans-serif;
  font-size: 0.95rem;
  color: var(--primary);
  margin: 1.3rem 0 0.4rem;
}
.modal-body p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.85;
  margin: 0 0 0.6rem;
}
.modal-body ul {
  margin: 0.3rem 0 0.6rem;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.85;
}
.modal-body li {
  margin-bottom: 0.3rem;
}
@media (max-width: 700px) {
  .modal-box {
    padding: 1.5rem;
    max-height: 90vh;
  }
}

/* ---------- Conteúdo gerado pela IA (Markdown -> HTML) ---------- */
.resultado-conteudo {
  line-height: 1.6;
}
.resultado-conteudo p {
  margin: 0 0 1rem;
}

.resultado-conteudo h1 {font-size: 1.3size;}

.resultado-conteudo h1,
.resultado-conteudo h2,
.resultado-conteudo h3,
.resultado-conteudo h4 {
  margin: 1.2rem 0 0.6rem;
  font-family: "DM Sans", "Radio Canada", sans-serif;
  font-weight: 700;
}
.resultado-conteudo h1:first-child,
.resultado-conteudo h2:first-child,
.resultado-conteudo h3:first-child,
.resultado-conteudo h4:first-child {
  margin-top: 0;
}
.resultado-conteudo ul,
.resultado-conteudo ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}
.resultado-conteudo li {
  margin-bottom: 0.3rem;
}
.resultado-conteudo strong {
  color: var(--text);
  font-weight: 700;
}
.resultado-conteudo blockquote {
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--primary);
  opacity: 0.85;
}
.resultado-conteudo code {
  background: var(--bg-card);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: "DM Mono", monospace;
  font-size: 0.9em;
}
.resultado-conteudo pre {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0 0 1rem;
}
.resultado-conteudo pre code {
  background: none;
  padding: 0;
}
.resultado-conteudo table {
  width: 100%;
  margin: 0 0 1rem;
}
.resultado-conteudo hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.2rem 0;
}

/* ---------- Aviso de cookies (LGPD) ---------- */

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.1rem 1.4rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}
.cookie-banner[hidden] {
  /* display:flex acima tem a mesma especificidade do [hidden] do navegador e
     vence por ser regra de autor — sem isso, banner.hidden = true no JS não
     escondia o banner de verdade. */
  display: none;
}
.cookie-banner-texto {
  min-width: 0;
  flex: 1 1 260px;
}
.cookie-banner-texto p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  opacity: 0.9;
  overflow-wrap: break-word;
}
.cookie-banner-acoes {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .cookie-banner {
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.6rem;
    padding: 1rem;
  }
  .cookie-banner-acoes {
    width: 100%;
  }
  .cookie-banner-acoes .btn {
    flex: 1;
  }
}
