:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding-bottom: 2rem;
}

.bg-gradient-primary {
  background: var(--primary-gradient);
}

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navbar mejorado */
.navbar {
  padding: 0.75rem 0;
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-light .navbar-nav .nav-link {
  color: #495057;
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-light .navbar-nav .nav-link:hover {
  background-color: #f8f9fa;
  color: #667eea;
  transform: translateY(-2px);
}

.navbar-light .navbar-nav .nav-link.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.hero-section {
  padding: 5rem 0;
  background: white;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23667eea' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 1;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  color: #212529;
}

.hero-section .lead {
  color: #6c757d;
}

.min-vh-50 {
  min-height: 50vh;
}

.animate-fade-in {
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-illustration {
  position: relative;
}

.illustration-bg {
  position: absolute;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 3s ease-in-out infinite;
}

.hero-illustration i {
  font-size: 10rem;
  color: #667eea;
  opacity: 0.3;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.2;
  }
}

.features-section {
  padding: 5rem 0;
  background: #f8f9fa;
}

.feature-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 1.5rem;
  overflow: hidden;
  position: relative;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-card:hover::after {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.2) !important;
}

.feature-icon {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  transition: all 0.4s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.15) rotate(10deg);
}

.feature-card:hover .feature-icon i {
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.stats-section {
  background: white;
  padding: 4rem 0;
}

.stat-box {
  padding: 2rem;
  transition: all 0.3s ease;
}

.stat-box:hover {
  transform: scale(1.05);
}

.stat-box i {
  transition: all 0.3s ease;
}

.stat-box:hover i {
  transform: rotateY(360deg);
}

/* Tarjetas de estadísticas */
.stat-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.2) !important;
}

.stat-icon {
  font-size: 3rem;
  opacity: 0.3;
  transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
  opacity: 0.5;
  transform: scale(1.1) rotate(10deg);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.bg-gradient-danger {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.bg-gradient-success {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.footer {
  background: #212529;
  margin-top: auto;
}

/* Botones mejorados */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.6rem 1.5rem;
  border: none;
}

.btn-primary {
  background: var(--primary-gradient);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-success {
  background: var(--success-gradient);
  box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

.btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(17, 153, 142, 0.5);
}

.btn-outline-secondary:hover {
  transform: translateY(-2px);
}

/* Badges mejorados */
.badge {
  padding: 0.5rem 1rem;
  font-weight: 500;
  border-radius: 0.5rem;
  letter-spacing: 0.3px;
}

/* Cards mejorados */
.card {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.15) !important;
}

.card-header {
  border-bottom: none;
  font-weight: 600;
  padding: 1rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

.shadow-sm {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08) !important;
}

.shadow-lg {
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0;
  }
  
  .hero-illustration {
    display: none;
  }
  
  .display-3 {
    font-size: 2.5rem;
  }
}

/* Tabla ordenable */
.sortable {
  cursor: pointer;
  user-select: none;
}

.sortable a {
  display: block;
  padding: 0.5rem;
  transition: all 0.2s;
}

.sortable a:hover {
  background-color: rgba(0, 0, 0, 0.03);
  color: var(--primary-color) !important;
}

.sortable i {
  font-size: 0.8rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.sortable:hover i {
  opacity: 1;
}

/* Paginación mejorada */
.pagination .page-link {
  border-radius: 0.5rem;
  margin: 0 0.25rem;
  border: 1px solid #dee2e6;
  color: #667eea;
  transition: all 0.3s;
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.pagination .page-link:hover {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination .page-item.active .page-link {
  background: var(--primary-gradient);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Tablas mejoradas */
.table {
  border-radius: 0.75rem;
  overflow: hidden;
  background: white;
  margin-bottom: 0;
}

.table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.table thead th {
  border: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  padding: 1.2rem 1rem;
  white-space: nowrap;
}

.table tbody tr {
  transition: all 0.3s ease;
  border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
  background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
  box-shadow: inset 4px 0 0 #667eea;
  transform: translateX(2px);
}

.table tbody td {
  vertical-align: middle;
  padding: 1.2rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* Estilos para celdas ordenables */
.sortable a {
  color: white !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.sortable a:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.sortable i {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Formularios mejorados */
.form-control, .form-select {
  border-radius: 0.5rem;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
}

.form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

/* Breadcrumb mejorado */
.breadcrumb {
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  font-size: 1.2rem;
  color: #667eea;
}

.breadcrumb-item a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.breadcrumb-item a:hover {
  color: #764ba2;
  transform: translateX(2px);
}

.breadcrumb-item.active {
  color: #6c757d;
  font-weight: 600;
}
