/* EscolaFlow - Sistema de Controle Financeiro Escolar */
/* Custom CSS Styles */

/* Animações personalizadas */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Classes utilitárias */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

/* Botões de tab */
.tab-button {
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  color: #6b7280;
}

.tab-button:hover {
  color: #3b82f6;
  border-bottom-color: #93c5fd;
}

.tab-button.active {
  color: #3b82f6 !important;
  border-bottom-color: #3b82f6 !important;
}

/* Cards com hover effect */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Gradientes personalizados */
.gradient-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.gradient-green {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.gradient-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

/* Loading spinner customizado */
.loading-spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Inputs com foco melhorado */
input:focus, select:focus, textarea:focus {
  outline: none;
  ring: 2px;
  ring-color: #3b82f6;
  border-color: #3b82f6;
}

/* Tabelas responsivas */
.table-responsive {
  min-height: 200px;
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
}

.table-responsive th,
.table-responsive td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.table-responsive th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.table-responsive tr:hover {
  background-color: #f9fafb;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background-color: #dcfce7;
  color: #166534;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-error {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background-color: #dbeafe;
  color: #1e40af;
}

/* Charts container */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .table-responsive {
    overflow-x: auto;
  }
  
  .table-responsive table {
    min-width: 600px;
  }
  
  .grid-responsive {
    grid-template-columns: 1fr;
  }
  
  .text-responsive {
    font-size: 1.25rem;
  }
}

/* Dark mode support (para futuro) */
@media (prefers-color-scheme: dark) {
  .dark-mode-support {
    background-color: #1f2937;
    color: #f9fafb;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-full-width {
    width: 100% !important;
  }
}

/* Accessibility improvements */
.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;
}

/* Focus indicators */
button:focus,
a:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Custom scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Logo styles - Correção para remover fundo preto */
.logo-container img {
  /* Remove fundo preto e ajusta contraste */
  filter: 
    contrast(150%) 
    brightness(1.2) 
    saturate(120%);
  
  /* Usa mix-blend-mode screen para remover fundos escuros */
  mix-blend-mode: screen;
  
  /* Adiciona um fundo branco sutil para garantir boa visualização */
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 4px;
  
  /* Transição suave */
  transition: all 0.3s ease;
}

/* Alternativa com fundo branco sólido para casos extremos */
.logo-alt {
  background: white !important;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

/* Logo no header principal - versão mais limpa */
.header-logo {
  background: white;
  border-radius: 6px;
  padding: 6px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

/* Para tela de loading - fundo branco para contraste */
#loading .logo-container img {
  filter: none;
  background: white;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Hover effect no logo */
.logo-container:hover img {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Versão para remover fundo completamente - usar se necessário */
.logo-no-background {
  /* Remove fundos escuros completamente */
  filter: 
    invert(1) 
    brightness(0) 
    contrast(100%);
  background: transparent !important;
}

/* Logo responsivo */
@media (max-width: 768px) {
  .logo-container img {
    max-width: 120px;
    height: auto;
  }
}