/* =========================================================
   Tema claro — sobrescreve as variáveis e cores fixas do tema
   escuro padrão. Só é carregado quando o admin ativa "Claro"
   em Configurações. Escopado em body.theme-light pra nunca
   vazar pro tema escuro.
   ========================================================= */

body.theme-light{
  --bg: #F5F6FA;
  --panel: #FFFFFF;
  --panel-2: #F0F1F6;
  --line: #E1E3EC;
  --muted: #6B7086;
  --text: #171923;
  color: var(--text);
}

/* texto que era branco/claro por padrão no tema escuro precisa virar escuro */
body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light h4,
body.theme-light h5,
body.theme-light h6,
body.theme-light .text-white,
body.theme-light .navbar-brand,
body.theme-light strong{
  color: #171923 !important;
}

/* EXCEÇÃO: títulos em cima de foto com degradê escuro (cards da home, Premium)
   continuam brancos nos dois temas — o fundo ali é sempre escuro (a própria
   foto), então virar preto deixa o texto invisível em cima da imagem */
body.theme-light .listing-card h3,
body.theme-light .premium-overlay h3,
body.theme-light .card-overlay h3{
  color: #fff !important;
}

body.theme-light .lede,
body.theme-light p{
  color: #4B5063;
}

body.theme-light .text-secondary,
body.theme-light .text-white-50{
  color: #6B7086 !important;
}

/* navbar e cards já usam var(--panel)/var(--line), só precisam de sombra mais suave */
body.theme-light .navbar{
  background: rgba(255,255,255,.9);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
body.theme-light .listing-card,
body.theme-light .premium-card,
body.theme-light .related-card,
body.theme-light .panel-card,
body.theme-light .stat-card,
body.theme-light .card-panel,
body.theme-light .search-card,
body.theme-light .filters-bar,
body.theme-light .contact-box,
body.theme-light .plan-card,
body.theme-light .page-content,
body.theme-light .auth-card{
  box-shadow: 0 4px 16px rgba(20,22,40,.06);
}
body.theme-light .listing-card:hover,
body.theme-light .premium-card:hover,
body.theme-light .related-card:hover{
  box-shadow: 0 16px 34px rgba(20,22,40,.1);
}

/* formulários */
body.theme-light .form-control,
body.theme-light .form-select,
body.theme-light textarea{
  background: var(--panel-2) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}
body.theme-light .form-control::placeholder{ color: #9AA0B4; }
body.theme-light .form-control:focus,
body.theme-light .form-select:focus{
  background: #fff !important;
}

/* botões outline, que assumiam texto claro sobre fundo escuro */
body.theme-light .btn-outline-accent,
body.theme-light .btn-outline-light{
  color: var(--text) !important;
  border-color: var(--line) !important;
}
body.theme-light .btn-outline-accent:hover,
body.theme-light .btn-outline-light:hover{
  background: var(--panel-2) !important;
  color: var(--text) !important;
}

/* placeholders de foto (sem imagem enviada ainda) */
body.theme-light .card-photo-placeholder,
body.theme-light .card-photo-wrap,
body.theme-light .premium-card-placeholder,
body.theme-light .premium-card-photo-wrap,
body.theme-light .gallery-placeholder,
body.theme-light .listing-thumb-placeholder,
body.theme-light .avatar-lg,
body.theme-light .gallery-item{
  background: var(--panel-2);
}

/* footer, hero e outras seções com fundo levemente diferente do body */
body.theme-light footer,
body.theme-light .premium-section,
body.theme-light .filters-bar{
  background: var(--panel);
}

/* selos de confiança do hero */
body.theme-light .badge-trust{
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
}
body.theme-light .badge-trust b{ color: var(--text) !important; }

/* textos e valores que ficavam brancos "chapados" em cards/painéis sobre fundo claro
   (photos com overlay escuro — cards Premium, cards de anúncio da home, lightbox de
   zoom — ficam de fora de propósito: aquele fundo continua escuro nos dois temas) */
body.theme-light .navbar-brand{ color: #171923 !important; }
body.theme-light .nav-link-custom:hover{ color: #171923 !important; }
body.theme-light .btn-outline-accent:hover{ color: var(--text) !important; }
body.theme-light .stat-card .value,
body.theme-light .listing-info .title,
body.theme-light .plan-price,
body.theme-light .price-tag,
body.theme-light .related-card h3,
body.theme-light .related-card-price,
body.theme-light .doc-file-name,
body.theme-light .empty-state h4,
body.theme-light .category-card-name,
body.theme-light .price-type-name,
body.theme-light .conv-name{
  color: #171923 !important;
}
body.theme-light .row-actions button:hover,
body.theme-light .row-actions a:hover,
body.theme-light .quick-link:hover{
  color: #171923 !important;
}
body.theme-light .quick-link{ color: var(--text); }
body.theme-light .field label{ color: #4B5063; }
body.theme-light .field input,
body.theme-light .btn-secondary{
  background: var(--panel-2) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}
body.theme-light .field input::placeholder{ color: #9AA0B4; }
body.theme-light .row-actions button,
body.theme-light .row-actions a{
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--text);
}

/* textos cinza-claro (tom "quase branco") usados sobre painéis — ficavam
   ilegíveis em cima do fundo claro dos cards */
body.theme-light .btn-outline-accent,
body.theme-light .payment-badge,
body.theme-light .listing-description,
body.theme-light .plan-features li,
body.theme-light .page-content p,
body.theme-light .page-content li,
body.theme-light label.form-label,
body.theme-light .input-group-text,
body.theme-light .doc-drop-empty span{
  color: #4B5063 !important;
}

/* inputs de código/monospace, se aparecerem em alguma página pública */
body.theme-light code{
  background: var(--panel-2);
  color: #C0392B;
}
