/* ============================================
   RESOLUCITY — DaisyUI Custom Theme (oklch)
   ============================================ */

[data-theme="resolucity"] {
  color-scheme: light;
  --p: 0.442 0.103 161;
  --pf: 0.348 0.079 162;
  --pc: 1 0 0;
  --s: 0.270 0.055 173;
  --sf: 0.220 0.040 173;
  --sc: 1 0 0;
  --a: 0.518 0.125 160;
  --af: 0.442 0.103 161;
  --ac: 1 0 0;
  --n: 0.250 0.030 165;
  --nf: 0.200 0.025 165;
  --nc: 0.950 0.005 165;
  --b1: 1 0 0;
  --b2: 0.984 0.019 155;
  --b3: 0.912 0.032 158;
  --bc: 0.270 0.015 165;
  --in: 0.591 0.202 259;
  --inc: 1 0 0;
  --su: 0.536 0.155 150;
  --suc: 1 0 0;
  --wa: 0.766 0.181 70;
  --wac: 0 0 0;
  --er: 0.539 0.206 25;
  --erc: 1 0 0;
  --rounded-box: 1rem;
  --rounded-btn: 0.75rem;
  --rounded-badge: 1.9rem;
  --animation-btn: 0.25s;
  --animation-input: 0.2s;
  --btn-focus-scale: 0.95;
  --border-btn: 1px;
  --tab-border: 1px;
  --tab-radius: 0.5rem;
}

/* ============================================
   Global Styles — Complementary to Tailwind + DaisyUI
   ============================================ */

html,
body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.7; }
}

@keyframes counter {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
  from { opacity: 0; max-height: 0; }
  to   { opacity: 1; max-height: 500px; }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 4s ease-in-out infinite;
}

/* Stagger delay utilities */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ============================================
   FORM VALIDATION STYLES
   (Used by login.js, relatar.js, contato.js)
   ============================================ */

.error {
  color: #DC2626;
  font-size: 0.8rem;
  font-weight: 500;
  display: none;
  margin-top: 4px;
  line-height: 1.4;
}

.error.show {
  display: block;
}

.error-field {
  border-color: #DC2626 !important;
  background-color: #FEF2F2 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.success-field {
  border-color: #16A34A !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1) !important;
}

/* ============================================
   CHART CONTAINERS
   (Used by chart.js / estatisticas page)
   ============================================ */

.chart-box {
  position: relative;
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.chart-box canvas {
  width: 100% !important;
  max-height: 400px;
}

/* ============================================
   MODAL OVERLAY
   (Dynamic modals created by JS)
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: fadeInUp 0.3s ease;
}

/* ============================================
   WAVE SVG TRANSITION (Footer)
   ============================================ */

.wave-divider {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: -1px;
}

.wave-wrapper {
  overflow: hidden;
  line-height: 0;
  margin-bottom: -1px;
}

/* ============================================
   GRADIENT TEXT UTILITY
   ============================================ */

.text-gradient {
  background: linear-gradient(135deg, #146C43, #198754);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   CARD HOVER EFFECTS
   ============================================ */

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
  .chart-box canvas {
    max-height: 300px;
  }
}

/* ============================================
   BOOTSTRAP COMPAT (for login.js d-none toggle)
   ============================================ */

.d-none {
  display: none !important;
}

/* ============================================
   SUCCESS MESSAGE (for relatar.js / contato.js)
   ============================================ */

.success-message {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.success-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: fadeInUp 0.3s ease;
}

.success-content h3 {
  color: #013C31;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.success-content p {
  color: #525960;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.success-content button {
  background: #146C43;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 10px 32px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.success-content button:hover {
  opacity: 0.9;
}

/* ============================================
   DAISYUI ACTIVE STATE — links do menu (navbar)
   DaisyUI não aplica primary ao :active de <a> no menu,
   apenas aos botões. Este override garante consistência.
   ============================================ */

.menu li a:active,
.menu li button:active {
  background-color: oklch(var(--p) / 1);
  color: oklch(var(--pc) / 1);
}

/* ============================================
   NAVBAR — evita flash de conteúdo errado
   Os elementos ficam invisíveis até o JS checar
   o estado de autenticação e renderizar o conteúdo correto.
   ============================================ */

#navbar-center,
#navbar-auth {
  visibility: hidden;
}

/* ============================================
   AOS OVERRIDES (smoother defaults)
   ============================================ */

[data-aos] {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
