/* Modern UI Theme Variables */
:root {
  --primary-color: #4a90e2;
  --secondary-color: #2ecc71;
  --accent-color: #e74c3c;
  --background-light: #f8f9fa;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* Dark Mode Theme */
[data-theme='dark'] {
  --background-light: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --shadow-sm: 0 2px 4px rgba(255,255,255,0.1);
  --shadow-md: 0 4px 6px rgba(255,255,255,0.1);
  --shadow-lg: 0 10px 15px rgba(255,255,255,0.1);
}

/* Modern Card Styles */
.card {
  background: var(--background-light);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: none;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Enhanced Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin: 1rem;
  transition: var(--transition);
}

[data-theme='dark'] .navbar {
  background: rgba(26, 26, 26, 0.95);
}

/* Modern Button Styles */
.btn {
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  transition: var(--transition);
  border: none;
  font-weight: 500;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: darken(var(--primary-color), 10%);
  transform: translateY(-2px);
}

/* Table Enhancements */
.table {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table thead th {
  background: var(--primary-color);
  color: white;
  font-weight: 500;
  border: none;
}

/* Form Controls */
.form-control {
  border-radius: var(--border-radius);
  border: 1px solid var(--text-secondary);
  padding: 0.75rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.25);
}

/* Modal Improvements */
.modal-content {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: none;
  padding: 1.5rem;
}

.modal-footer {
  border-top: none;
  padding: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

.slide-up {
  animation: slideUp 0.3s ease;
}

.btn-hover-effect {
  transition: all 0.3s ease;
  transform: translateY(0);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 3px;
}

.btn-hover-effect:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.modal-content {
  border: none;
  border-radius: 0.5rem;
}

.input-group-text {
  background-color: #e9ecef;
  border: none;
}

.input-focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  transition: all 0.2s ease-in-out;
}

.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
  padding-top: 1.625rem;
  padding-bottom: 0.625rem;
}

.form-floating > .form-control:-webkit-autofill {
  padding-top: 1.625rem;
  padding-bottom: 0.625rem;
}

.table-responsive {
  border-radius: 0.5rem;
  overflow: hidden;
}

@media (max-width: 768px) {
  .card-footer .btn-lg {
      width: 100%;
      margin-top: 1rem;
  }
}

.animate__animated {
  --animate-duration: 0.4s;
}


/* Animaciones de carga */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  animation: spin 1s linear infinite;
  width: 2rem;
  height: 2rem;
  border: 0.25rem solid rgba(0, 0, 0, 0.1);
  border-top-color: #007bff;
  border-radius: 50%;
}

/* Mejoras para tarjetas de gráficos */
.card-grafico {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
  border: none;
  border-radius: 15px;
}

.card-grafico:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/* Ajustes responsivos */
@media (max-width: 768px) {
  .card-grafico {
    margin-bottom: 1.5rem;
  }
  
  .row.graficos {
    flex-direction: column;
  }
}

/* Mejoras para la tabla */
#validacionestable {
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border-collapse: separate;
  border-spacing: 0 8px;
}

#validacionestable tbody tr {
  background: white;
  transition: background 0.2s ease;
}

#validacionestable tbody tr:hover {
  background: #f8f9fa;
}