/* ============================================
   Prime DB — Improvements (2026 Refactor)
   @layer improvements
   Features extras não cobertas pelo main.css/tokens.css
   ============================================ */

@layer improvements {

/* ── Dark mode: JS-driven structural overrides ── */
/* (light-dark() em tokens.css cobre cores base, mas fundos
    hardcoded em classes .bg-white / .bg-light precisam de override) */
[data-theme="dark"] .bg-white { background: #0f172a !important; }
[data-theme="dark"] .bg-light { background: #1e293b !important; }

[data-theme="dark"] .site-header { background: rgba(15,23,42,0.95); }
[data-theme="dark"] .site-header.scrolled { background: rgba(15,23,42,0.98) !important; }

[data-theme="dark"] .case-card {
  background: linear-gradient(165deg, #1e293b 0%, #1a2740 100%) !important;
  border-color: #334155 !important;
}
[data-theme="dark"] .service-card,
[data-theme="dark"] .ai-card,
[data-theme="dark"] .why-item {
  background: #1e293b !important;
  border-color: #334155 !important;
}
[data-theme="dark"] .ai-card h3,
[data-theme="dark"] .service-card h3,
[data-theme="dark"] .why-item h4,
[data-theme="dark"] .case-card h3,
[data-theme="dark"] .process-step h4 {
  color: #e2e8f0 !important;
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}
[data-theme="dark"] .contact-form .form-group:has(input) label,
[data-theme="dark"] .contact-form .form-group:has(textarea) label {
  background: #1e293b;
}
[data-theme="dark"] .hero { background: #0b1a30 !important; }
[data-theme="dark"] .metrics-section { background: #0f172a !important; }
[data-theme="dark"] .metrics-section .metric-card__label { color: rgba(255,255,255,0.55) !important; }
[data-theme="dark"] .cta-section { background: linear-gradient(135deg, #0f172a, #1e293b) !important; }
[data-theme="dark"] .ai-card__icon {
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(34,211,238,0.12)) !important;
  border-color: rgba(59,130,246,0.2) !important;
  color: #60a5fa !important;
}
[data-theme="dark"] .ai-card h3 { color: #e2e8f0 !important; }
[data-theme="dark"] .ai-card p { color: #a8b8cc !important; }

/* ── Count-up hook (JS) ── */
.count-up {
  /* hook class for JS — no visual override */
}

} /* /@layer improvements */

/* ── Dark mode: background fixes for elements using --brand-blue-dark ── */
[data-theme="dark"] .site-footer { background: #020617; }
[data-theme="dark"] .process-step__num { background: #1e293b; }
[data-theme="dark"] .page-transition-overlay { background: #020617; }

/* ── Theme-toggle: always visible ── */
.header-actions { display: flex !important; gap: 0.5rem; align-items: center; }

.theme-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  transition: background .2s, border-color .2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}
[data-theme="light"] .theme-toggle {
  border-color: rgba(0,0,0,0.2);
}
[data-theme="light"] .theme-toggle:hover {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
  .header-actions .btn-primary { font-size: 0.8rem; padding: 0.5rem 1rem; }
}
[data-theme="dark"] .page-hero { background: linear-gradient(135deg, #0b1a30, #0f172a) !important; }
