/* Componentes CSS reutilizables para CASYM */

/* Componente: Header de sección */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-toggle {
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.section-toggle:hover {
  color: var(--primary-hover);
}

/* Componente: Formulario de sección */
.section-form {
  background-color: var(--bg-secondary);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.section-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.section-form-full {
  grid-column: 1 / -1;
}

/* Componente: Campo de formulario */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.form-field input:disabled,
.form-field select:disabled,
.form-field textarea:disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.dark .form-field input:disabled,
.dark .form-field select:disabled,
.dark .form-field textarea:disabled {
  background-color: #374151;
  color: #6b7280;
}

/* Componente: Campo con icono */
.form-field-with-icon {
  position: relative;
}

.form-field-with-icon input {
  padding-left: 2.5rem;
}

.form-field-with-icon .icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

/* Componente: Botones de acción */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.action-buttons .btn {
  min-width: 100px;
}

/* Componente: Tarjeta de proyecto */
.project-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease-in-out;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.project-card-icon.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.project-card-icon.purple {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.project-card-icon.green {
  background: linear-gradient(135deg, #10b981, #059669);
}

.project-card-icon.yellow {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.project-card-icon.red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.project-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.project-card-subtitle {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.project-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-card-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.project-card-detail-label {
  color: #6b7280;
  font-weight: 500;
}

.project-card-detail-value {
  color: #1f2937;
  font-weight: 600;
}

.project-card-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Componente: Estadísticas */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.stat-icon.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-icon.green {
  background: linear-gradient(135deg, #10b981, #059669);
}

.stat-icon.purple {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-icon.yellow {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-content {
  flex: 1;
}

.stat-label {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.stat-value {
  color: #1f2937;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Componente: Navegación por tabs */
.tabs-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  overflow: hidden;
}

.tabs-header {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-primary);
}

.tabs-nav {
  display: flex;
  gap: 0;
}

.tab-item {
  flex: 1;
  padding: 1rem 1.5rem;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tab-item:hover {
  color: var(--text-primary);
  background-color: rgba(0, 0, 0, 0.05);
}

.dark .tab-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.tab-item.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background-color: var(--bg-secondary);
}

.tab-badge {
  background-color: var(--border-color);
  color: var(--text-secondary);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tab-item.active .tab-badge {
  background-color: var(--primary-color);
  color: white;
}

.tabs-content {
  padding: 1.5rem;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Componente: Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal-dialog {
  background-color: var(--bg-secondary);
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Componente: Lista de elementos */
.list-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-item {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease-in-out;
}

.list-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.list-item-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.list-item-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.list-item-icon.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.list-item-icon.purple {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.list-item-icon.green {
  background: linear-gradient(135deg, #10b981, #059669);
}

.list-item-icon.yellow {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.list-item-icon.red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.list-item-text {
  flex: 1;
}

.list-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.list-item-subtitle {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.list-item-meta {
  color: #9ca3af;
  font-size: 0.75rem;
}

.list-item-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Componente: Estado vacío */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
}

.empty-state-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  color: var(--border-color);
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.empty-state-description {
  margin-bottom: 1.5rem;
}

/* Componente: Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 0.25rem;
}

.dark .skeleton {
  background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  background-size: 200% 100%;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
  margin-bottom: 0;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.medium {
  width: 80%;
}

.skeleton-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
}

.skeleton-button {
  height: 2.5rem;
  width: 6rem;
  border-radius: 0.375rem;
}

/* Componente: Tooltip */
.tooltip-container {
  position: relative;
  display: inline-block;
}

.tooltip-content {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--text-primary);
  color: var(--bg-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 10;
}

.tooltip-container:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text-primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .section-form-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tabs-nav {
    flex-direction: column;
  }
  
  .tab-item {
    border-bottom: none;
    border-left: 2px solid transparent;
  }
  
  .tab-item.active {
    border-left-color: var(--primary-color);
    border-bottom-color: transparent;
  }
  
  .list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .list-item-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100vw - 1rem);
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .action-buttons .btn {
    width: 100%;
  }
}

/* Transiciones suaves */
.view-transition {
  transition: all 0.3s ease-in-out;
  opacity: 0;
  transform: translateY(20px);
}

.view-transition.show {
  opacity: 1;
  transform: translateY(0);
}

/* Estados de carga */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(2px);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-content {
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Notificaciones mejoradas */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 500;
  z-index: 10001;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  max-width: 400px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.notification.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification.warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.notification.info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Botones mejorados */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-primary.btn-loading {
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary.btn-loading .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

.btn-primary.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.btn-primary.btn-success:hover {
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Formularios mejorados */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s ease-in-out;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Mensajes de error */
.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.error-message::before {
  content: "⚠";
  font-size: 1rem;
}

/* Navegación mejorada */
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
  margin-bottom: 1rem;
}

.nav-back:hover {
  color: #3b82f6;
}

.nav-back::before {
  content: "←";
  font-size: 1.2rem;
}

/* Cards mejoradas */
.card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Estados de validación en tiempo real */
.input-validating {
  border-color: #f59e0b;
  background: #fffbeb;
}

.input-valid {
  border-color: #10b981;
  background: #f0fdf4;
}

.input-invalid {
  border-color: #ef4444;
  background: #fef2f2;
}

/* Animaciones de entrada */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

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

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

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Responsive improvements */
@media (max-width: 768px) {
  .notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .card {
    padding: 1rem;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-danger {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .card {
    background: #1f2937;
    border-color: #374151;
  }
  
  .form-input {
    background: #374151;
    border-color: #4b5563;
    color: white;
  }
  
  .form-label {
    color: #d1d5db;
  }
  
  .loading-content {
    background: #1f2937;
    color: white;
  }
}

/* ===== ESTILOS ESPECÍFICOS PARA PROYECTOS ===== */

/* Badges */
.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

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

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

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

/* Modal de proyecto */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(2px);
}

.modal-dialog {
  background: white;
  border-radius: 0.75rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

.modal-close {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease-in-out;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

/* Dark mode para proyectos */
@media (prefers-color-scheme: dark) {
  .project-card,
  .stat-card,
  .list-item {
    background: #1f2937;
    border-color: #374151;
  }
  
  .project-card-title,
  .stat-value,
  .list-item-title {
    color: #f9fafb;
  }
  
  .project-card-subtitle,
  .stat-label,
  .list-item-subtitle {
    color: #d1d5db;
  }
  
  .project-card-detail-label,
  .list-item-meta {
    color: #9ca3af;
  }
  
  .project-card-detail-value {
    color: #f9fafb;
  }
  
  .modal-dialog {
    background: #1f2937;
  }
  
  .modal-title {
    color: #f9fafb;
  }
  
  .modal-header,
  .modal-footer {
    border-color: #374151;
  }
}

/* --- PANEL DE ADMINISTRACIÓN --- */

.admin-panel {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.admin-header {
  text-align: center;
  margin-bottom: 3rem;
}

.admin-title {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.admin-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--bg-secondary);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.stat-icon.users { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-icon.pending { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-icon.projects { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.stat-icon.system { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-primary);
  margin: 0;
}

.stat-label {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.9rem;
}

.admin-actions {
  display: grid;
  gap: 2rem;
}

.action-group {
  background: var(--bg-secondary);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-group-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- TABLAS DE ADMINISTRACIÓN --- */

.admin-section {
  padding: 1rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secondary);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  background: var(--bg-primary);
  font-weight: 600;
  color: var(--text-primary);
}

.admin-table tr:hover {
  background: var(--bg-hover);
}

/* --- BADGES DE ROLES Y ESTADOS --- */

.role-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-admin {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
}

.role-moderator {
  background: linear-gradient(135deg, #feca57, #ff9ff3);
  color: white;
}

.role-verified_professional {
  background: linear-gradient(135deg, #48dbfb, #0abde3);
  color: white;
}

.role-basic_professional {
  background: linear-gradient(135deg, #1dd1a1, #10ac84);
  color: white;
}

.role-guest {
  background: linear-gradient(135deg, #a8e6cf, #88d8c0);
  color: white;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-active {
  background: #d4edda;
  color: #155724;
}

.status-inactive {
  background: #f8d7da;
  color: #721c24;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

/* --- INFORMACIÓN DE USUARIO --- */

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  transition: transform 0.2s ease;
}

.user-info:hover .user-avatar {
  transform: scale(1.1);
}

.user-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.95rem;
  line-height: 1;
}

.user-role {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1;
  font-weight: 500;
}

/* --- BOTONES DE ACCIÓN --- */

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
}

/* --- RESPONSIVE --- */

@media (max-width: 768px) {
  .admin-panel {
    padding: 1rem;
  }
  
  .admin-stats {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .admin-table {
    font-size: 0.9rem;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.5rem;
  }
  
  .section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
}

/* --- ENLACES DE ADMINISTRACIÓN Y MODERACIÓN --- */

.nav-link-admin, .nav-link-moderator {
  padding: 0.5rem 1.1rem !important;
  font-size: 0.92rem !important;
  border-radius: 0.7rem !important;
  box-shadow: none !important;
  background: linear-gradient(135deg, #ff6b6b 80%, #ee5a24 100%) !important;
  color: #fff !important;
  min-width: unset !important;
  margin: 0 0.1rem !important;
}

.nav-link-moderator {
  background: linear-gradient(135deg, #feca57 80%, #ff9ff3 100%) !important;
  color: #fff !important;
}

.nav-link-admin .nav-icon, .nav-link-moderator .nav-icon {
  width: 1.1rem !important;
  height: 1.1rem !important;
}

.nav-link-admin span, .nav-link-moderator span {
  font-weight: 500 !important;
  letter-spacing: 0.01em;
}

@media (max-width: 900px) {
  .nav-link-admin, .nav-link-moderator {
    padding: 0.4rem 0.7rem !important;
    font-size: 0.85rem !important;
    border-radius: 0.5rem !important;
  }
  .nav-link-admin .nav-icon, .nav-link-moderator .nav-icon {
    width: 1rem !important;
    height: 1rem !important;
  }
}

.nav-link-admin::before,
.nav-link-moderator::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.nav-link-admin:hover::before,
.nav-link-moderator:hover::before {
  left: 100%;
}

.nav-link-admin:hover,
.nav-link-moderator:hover {
  filter: brightness(1.1);
}

/* --- INFORMACIÓN DE USUARIO EN NAVEGACIÓN --- */

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border: 1px solid #d1d5db;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.user-info:hover {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  border-color: #9ca3af;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  transition: transform 0.2s ease;
}

.user-info:hover .user-avatar {
  transform: scale(1.1);
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.95rem;
  line-height: 1;
}

.user-role {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1;
  font-weight: 500;
}

/* --- RESPONSIVE PARA NAVEGACIÓN --- */

@media (max-width: 768px) {
  .nav-user {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .user-info {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    padding: 0.5rem;
  }
  
  .nav-link-admin,
  .nav-link-moderator {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Estilos adicionales para el Tablero de Control de administración */

/* Métricas y gráficos */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.metric-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  text-align: center;
}

.metric-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1rem;
}

.metric-chart {
  position: relative;
  height: 100px;
  background: #f3f4f6;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: end;
  justify-content: center;
  overflow: hidden;
}

.chart-bar {
  width: 60%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 0.25rem 0.25rem 0 0;
  transition: height 0.3s ease;
  min-height: 10px;
}

.metric-chart span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
}

.metric-card p {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

/* Filtros y búsqueda */
.filters-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filters-bar .form-input {
  flex: 1;
  min-width: 200px;
}

/* Tabla de administración */
.admin-table-container {
  overflow-x: auto;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

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

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

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

/* Notificaciones */
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notification-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.notification-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}

.notification-message {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.notification-time {
  color: #9ca3af;
  font-size: 0.75rem;
}

/* Configuración */
.settings-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Métricas del sistema */
.system-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: white;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.metric-label {
  font-weight: 500;
  color: #374151;
}

.metric-value {
  font-weight: 600;
  color: #3b82f6;
}

/* Estadísticas de moderación */
.moderation-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

/* Cambios en estadísticas */
.stat-change {
  font-size: 0.75rem;
  color: #10b981;
  margin-top: 0.25rem;
}

/* Estados vacíos */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.empty-state-description {
  font-size: 0.875rem;
}

/* Botones pequeños */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .filters-bar {
    flex-direction: column;
  }
  
  .filters-bar .form-input {
    min-width: auto;
  }
  
  .admin-table-container {
    font-size: 0.875rem;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.5rem;
  }
  
  .settings-form {
    grid-template-columns: 1fr;
  }
  
  .system-metrics {
    grid-template-columns: 1fr;
  }
  
  .moderation-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
  .metric-card,
  .notification-item,
  .metric-item {
    background: #1f2937;
    border-color: #374151;
  }
  
  .metric-card h3,
  .notification-title,
  .metric-label {
    color: #f9fafb;
  }
  
  .metric-card p,
  .notification-message {
    color: #d1d5db;
  }
  
  .notification-time {
    color: #9ca3af;
  }
  
  .metric-value {
    color: #60a5fa;
  }
  
  .admin-table {
    background: #1f2937;
  }
  
  .admin-table th {
    background: #111827;
    color: #f9fafb;
  }
  
  .admin-table td {
    border-color: #374151;
    color: #f9fafb;
  }
  
  .admin-table tr:hover {
    background: #111827;
  }
  
  .metric-chart {
    background: #374151;
  }
  
  .metric-chart span {
    color: #f9fafb;
  }
}

/* --- NAVEGACIÓN PRINCIPAL --- */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.5rem;
  color: #1f2937;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: #3b82f6;
  filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
}

.logo-text {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  color: #6b7280;
  text-decoration: none;
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover {
  color: #1f2937;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-link.active {
  color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.2s ease;
}

.nav-link:hover .nav-icon {
  transform: scale(1.1);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Dark mode para navegación */
@media (prefers-color-scheme: dark) {
  nav {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-bottom-color: #374151;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  }
  
  .logo {
    color: #f9fafb;
  }
  
  .nav-link {
    color: #d1d5db;
  }
  
  .nav-link:hover {
    color: #f9fafb;
    background: linear-gradient(135deg, #374151, #4b5563);
    border-color: #6b7280;
  }
  
  .nav-link.active {
    color: #60a5fa;
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    border-color: #60a5fa;
  }
  
  .btn-outline {
    background: linear-gradient(135deg, #374151, #4b5563);
    color: #d1d5db;
    border-color: #6b7280;
  }
  
  .btn-outline:hover {
    background: linear-gradient(135deg, #4b5563, #6b7280);
    color: #f9fafb;
    border-color: #9ca3af;
  }
  
  .user-info {
    background: linear-gradient(135deg, #374151, #4b5563);
    border-color: #6b7280;
  }
  
  .user-info:hover {
    background: linear-gradient(135deg, #4b5563, #6b7280);
    border-color: #9ca3af;
  }
  
  .user-name {
    color: #f9fafb;
  }
  
  .user-role {
    color: #d1d5db;
  }
}

/* Responsive para navegación */
@media (max-width: 768px) {
  nav {
    padding: 0.75rem 1rem;
  }
  
  .nav-links {
    gap: 0.25rem;
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .nav-link span {
    display: none;
  }
  
  .nav-link .nav-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .user-info {
    padding: 0.5rem;
  }
  
  .user-details {
    display: none;
  }
  
  .user-avatar {
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
  }
  
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .btn span {
    display: none;
  }
  
  .btn .btn-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* --- BOTONES DE NAVEGACIÓN --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border-color: #3b82f6;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.btn-outline {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  color: #6b7280;
  border-color: #d1d5db;
}

.btn-outline:hover {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  color: #1f2937;
  border-color: #9ca3af;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.btn-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.2s ease;
}

.btn:hover .btn-icon {
  transform: scale(1.1);
}

/* --- SECCIONES Y COMPONENTES --- */

/* --- ANIMACIÓN RIPPLE --- */

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* --- NAVEGACIÓN POR TECLADO --- */

.keyboard-navigation .nav-link:focus,
.keyboard-navigation .btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.keyboard-navigation .nav-link.focused,
.keyboard-navigation .btn.focused {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* --- MEJORAS EN TRANSICIONES DE NAVEGACIÓN --- */

nav {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* --- MEJORAS EN BOTONES CON RIPPLE --- */

.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Efecto de carga para botones */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* --- MEJORAS EN NAVEGACIÓN --- */

nav {
  transition: all 0.3s ease;
}

/* Efecto de scroll */
nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Indicador de página activa */
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  border-radius: 2px;
  animation: pulse 2s infinite;
}

/* --- MEJORAS EN INFORMACIÓN DE USUARIO --- */

.user-info {
  position: relative;
  cursor: pointer;
}

.user-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.user-info:hover::before {
  opacity: 1;
}

/* Badge de notificaciones */
.user-notifications {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse 2s infinite;
}

/* --- MEJORAS EN LOGO --- */

.logo {
  position: relative;
  overflow: hidden;
}

.logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
  transition: left 0.6s ease;
}

.logo:hover::before {
  left: 100%;
}

.logo-icon {
  transition: all 0.3s ease;
}

.logo:hover .logo-icon {
  transform: rotate(5deg) scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.4));
}

/* --- MEJORAS EN ENLACES ESPECIALES --- */

.nav-link-admin,
.nav-link-moderator {
  position: relative;
  overflow: hidden;
}

.nav-link-admin::before,
.nav-link-moderator::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.nav-link-admin:hover::before,
.nav-link-moderator:hover::before {
  left: 100%;
}

/* Efecto de brillo en hover */
.nav-link-admin:hover,
.nav-link-moderator:hover {
  filter: brightness(1.1);
}

/* --- MEJORAS EN RESPONSIVE --- */

@media (max-width: 768px) {
  nav {
    padding: 0.75rem 1rem;
  }
  
  .nav-links {
    gap: 0.25rem;
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .nav-link span {
    display: none;
  }
  
  .nav-link .nav-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .user-info {
    padding: 0.5rem;
  }
  
  .user-details {
    display: none;
  }
  
  .user-avatar {
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
  }
  
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .btn span {
    display: none;
  }
  
  .btn .btn-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
}

@media (max-width: 480px) {
  nav {
    padding: 0.5rem;
  }
  
  .logo-text {
    font-size: 1.25rem;
  }
  
  .logo-icon {
    width: 2rem;
    height: 2rem;
  }
  
  .nav-links {
    gap: 0.125rem;
  }
  
  .nav-link {
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* --- MEJORAS EN DARK MODE --- */

@media (prefers-color-scheme: dark) {
  nav.scrolled {
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
  
  .nav-link.active::after {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
  }
  
  .logo::before {
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.2), transparent);
  }
  
  .logo:hover .logo-icon {
    filter: drop-shadow(0 4px 8px rgba(96, 165, 250, 0.4));
  }
  
  .user-info::before {
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  }

  .keyboard-navigation .nav-link:focus,
  .keyboard-navigation .btn:focus {
    outline-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
  }

  .keyboard-navigation .nav-link.focused,
  .keyboard-navigation .btn.focused {
    box-shadow: 0 8px 25px rgba(96, 165, 250, 0.3);
  }
}

/* --- MEJORAS EN ACCESIBILIDAD --- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .nav-link,
  .user-info {
    animation: none;
  }
}

/* Focus visible para mejor accesibilidad */
.nav-link:focus-visible,
.btn:focus-visible,
.user-info:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* --- MEJORAS EN ESTADOS DE CARGA --- */

.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

@media (prefers-color-scheme: dark) {
  .loading-skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  }
}

/* --- MEJORAS EN TOOLTIPS --- */

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #1f2937;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #1f2937 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* --- MEJORAS EN BADGES --- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.badge.badge-success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.badge.badge-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.badge.badge-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

/* --- SECCIONES Y COMPONENTES --- */

/* --- ESPACIADO MEJORADO EN NAVEGACIÓN Y BOTONES --- */

nav {
  padding: 1.25rem 3rem;
}

.nav-links {
  gap: 1.25rem;
}

.nav-link {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
  border-radius: 1.25rem;
  margin: 0 0.15rem;
}

.nav-link-admin,
.nav-link-moderator {
  border-radius: 1.25rem !important;
}

.nav-user {
  gap: 1.5rem;
}

.user-info {
  padding: 1rem 1.5rem;
  border-radius: 1.25rem;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 1.25rem;
  font-size: 1.05rem;
}

/* Ajustes para que los íconos no se vean tan grandes */
.logo-icon, .nav-icon, .btn-icon {
  width: 1.6rem;
  height: 1.6rem;
}

/* Responsive: solo reducir gap en móviles */
@media (max-width: 900px) {
  nav {
    padding: 1rem 0.5rem;
  }
  .nav-links {
    gap: 0.5rem;
  }
  .nav-link, .btn {
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }
  .user-info {
    padding: 0.7rem 1rem;
  }
}

.nav-user .btn {
  padding: 0.5rem 1.1rem !important;
  font-size: 0.92rem !important;
  border-radius: 0.7rem !important;
  box-shadow: none !important;
  min-width: unset !important;
  margin: 0 0.1rem !important;
}

.nav-user .btn .btn-icon {
  width: 1.1rem !important;
  height: 1.1rem !important;
}

@media (max-width: 900px) {
  .nav-user .btn {
    padding: 0.4rem 0.7rem !important;
    font-size: 0.85rem !important;
    border-radius: 0.5rem !important;
  }
  .nav-user .btn .btn-icon {
    width: 1rem !important;
    height: 1rem !important;
  }
}

/** MINIMAL NAV BUTTONS **/

.nav-link-admin, .nav-link-moderator, .nav-user .btn {
  padding: 0.45rem 0.7rem !important;
  font-size: 1rem !important;
  border-radius: 0.5rem !important;
  background: rgba(255,255,255,0.08) !important;
  color: #fff !important;
  box-shadow: none !important;
  border: none !important;
  min-width: unset !important;
  margin: 0 0.08rem !important;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  transition: background 0.2s;
}

.nav-link-admin .nav-icon, .nav-link-moderator .nav-icon, .nav-user .btn .btn-icon {
  width: 1.15rem !important;
  height: 1.15rem !important;
  margin-right: 0 !important;
}

.nav-link-admin span, .nav-link-moderator span, .nav-user .btn span {
  display: none;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
  margin-left: 0.2rem;
}

.nav-link-admin:hover span, .nav-link-moderator:hover span, .nav-user .btn:hover span {
  display: inline;
  background: none;
}

.nav-link-admin:hover, .nav-link-moderator:hover, .nav-user .btn:hover {
  background: rgba(255,255,255,0.18) !important;
  color: #fff !important;
}

@media (max-width: 900px) {
  .nav-link-admin span, .nav-link-moderator span, .nav-user .btn span {
    display: inline;
  }
  .nav-link-admin, .nav-link-moderator, .nav-user .btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.95rem !important;
    border-radius: 0.7rem !important;
  }
  .nav-link-admin .nav-icon, .nav-link-moderator .nav-icon, .nav-user .btn .btn-icon {
    width: 1.1rem !important;
    height: 1.1rem !important;
  }
}

.btn-xs {
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
  border-radius: 0.45rem;
  min-width: 0;
  height: 32px;
  line-height: 1.1;
  margin-right: 0.2rem;
  margin-bottom: 0.1rem;
}
.btn-xs:last-child { margin-right: 0; }

.acciones {
  display: flex;
  flex-direction: row;
  gap: 0.3rem;
  align-items: center;
  justify-content: flex-start;
}
  
/* ===== MEJORAS DE NAVEGACIÓN ===== */

/* Breadcrumbs */
.breadcrumbs-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem 1rem;
  z-index: 40;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.breadcrumb-item {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-item:hover {
  color: #3b82f6;
  text-decoration: underline;
}

.breadcrumb-item.current {
  color: #374151;
  font-weight: 500;
}

.breadcrumb-separator {
  width: 1rem;
  height: 1rem;
  color: #9ca3af;
}

/* Menú Móvil */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease;
}

.mobile-menu-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.hamburger-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* Navegación Responsive */
@media (max-width: 768px) {
  .nav-content {
    position: relative;
    flex-wrap: wrap;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    z-index: 50;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .nav-links.mobile-open {
    display: flex;
  }
  
  .nav-link {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
  }
  
  .nav-link:hover {
    background-color: #f3f4f6;
  }
  
  .nav-link.active {
    background-color: #3b82f6;
    color: white;
  }
  
  .nav-user {
    margin-left: auto;
  }
  
  .user-info {
    display: none;
  }
  
  .breadcrumbs-container {
    position: static;
    background: transparent;
    border: none;
    padding: 0.25rem 0;
  }
  
  .breadcrumbs {
    font-size: 0.75rem;
  }
}

/* Estados de navegación optimizados */
.nav-link[data-view] {
  position: relative;
}

.nav-link[data-view].active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 1rem;
  height: 2px;
  background-color: #3b82f6;
  border-radius: 1px;
}

/* Animaciones de transición */
.nav-links {
  transition: all 0.3s ease;
}

.nav-link {
  transition: all 0.2s ease;
}

/* Mejoras de accesibilidad */
.nav-link:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.mobile-menu-toggle:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Estados de carga */
.nav-content.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Indicadores de estado */
.nav-link .status-indicator {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  background-color: #10b981;
  border-radius: 50%;
  border: 1px solid white;
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
  .breadcrumbs-container {
    background: rgba(31, 41, 55, 0.95);
    border-bottom-color: #374151;
  }
  
  .breadcrumb-item {
    color: #9ca3af;
  }
  
  .breadcrumb-item:hover {
    color: #60a5fa;
  }
  
  .breadcrumb-item.current {
    color: #f3f4f6;
  }
  
  .breadcrumb-separator {
    color: #6b7280;
  }
  
  .nav-links {
    background: #1f2937;
    border-color: #374151;
  }
  
  .nav-link:hover {
    background-color: #374151;
  }
  
  .mobile-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

/* Barra de navegación elegante y sticky para CASYM */

nav {
  width: 100%;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s;
}

.navbar-sticky {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.06);
  backdrop-filter: blur(6px);
}

.dark .navbar-sticky {
  background: rgba(23,37,84,0.92);
  box-shadow: 0 2px 12px 0 rgba(23,37,84,0.18);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1e293b;
  user-select: none;
  pointer-events: none;
}
.dark .nav-title {
  color: #e0e7ef;
}

.nav-links, .nav-auth-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn, .btn-outline, .btn-primary {
  font-size: 1rem;
  border-radius: 0.5rem;
  padding: 0.5rem 1.2rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn-outline {
  background: transparent;
  color: #2563eb;
  border: 1.5px solid #2563eb;
}
.btn-outline:hover {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.10);
}

.btn-primary {
  background: linear-gradient(90deg, #2563eb 0%, #6366f1 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(99,102,241,0.10);
}
.btn-primary:hover {
  background: linear-gradient(90deg, #1e40af 0%, #6366f1 100%);
  color: #fff;
}

@media (max-width: 700px) {
  .nav-content {
    padding: 0 0.5rem;
  }
  .nav-title {
    font-size: 1.1rem;
  }
}

/* Ajuste para barra lateral admin alineada con barra sticky */
.admin-sidebar {
  padding-top: 64px; /* Altura de la barra superior sticky */
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 2px 0 12px rgba(0,0,0,0.07);
  border-top: 1.5px solid #e5e7eb;
}

.dark .admin-sidebar {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 2px 0 12px rgba(23,37,84,0.10);
  border-top: 1.5px solid #334155;
}

@media (max-width: 900px) {
  .admin-sidebar {
    padding-top: 64px;
    flex-direction: row;
    width: 100vw;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-top: 1.5px solid #e5e7eb;
  }
}

/* Barra de navegación sticky CASYM */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #0f172a;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  border-bottom: 1.5px solid #1e293b;
}

.navbar .navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f1f5f9;
  user-select: none;
  pointer-events: none;
  margin-right: auto;
}

.navbar .navbar-actions {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.navbar .navbar-actions button,
.navbar .navbar-actions a {
  background: #334155;
  color: #f1f5f9;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.navbar .navbar-actions button:hover,
.navbar .navbar-actions a:hover {
  background: #64748b;
  color: #fff;
}

@media (max-width: 600px) {
  .navbar {
    padding: 0 0.5rem;
    height: 56px;
  }
  .navbar .navbar-brand {
    font-size: 1.1rem;
  }
  .navbar .navbar-actions button,
  .navbar .navbar-actions a {
    padding: 0.4rem 0.7rem;
    font-size: 0.95rem;
  }
}

/* Sidebar admin moderna y elegante */
.admin-sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  width: 260px;
  height: calc(100vh - 64px);
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 2px 0 12px rgba(0,0,0,0.07);
  border-top: 1.5px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  padding: 2rem 0.5rem 1.5rem 0.5rem;
  z-index: 900;
  overflow: hidden;
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #e0e7ef;
  margin-bottom: 2rem;
  padding-left: 1.2rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}

.sidebar-title-icon {
  font-size: 1.3em;
  opacity: 0.8;
}

.sidebar-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100%;
  padding-right: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.9em;
  color: #f1f5f9;
  padding: 0.85rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: none;
  border: none;
}

.sidebar-link-icon {
  font-size: 1.15em;
  opacity: 0.85;
}

.sidebar-link.active,
.sidebar-link:focus,
.sidebar-link:hover {
  background: #334155;
  color: #fff;
  box-shadow: 0 2px 8px rgba(51,65,85,0.08);
}

.sidebar-link:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .admin-sidebar {
    position: static;
    width: 100vw;
    height: auto;
    flex-direction: row;
    padding: 0.5rem 0.5rem;
    border-top: 1.5px solid #e5e7eb;
  }
  .sidebar-title {
    display: none;
  }
  .sidebar-nav {
    flex-direction: row;
    gap: 0.5rem;
    width: 100%;
    justify-content: space-around;
    padding-right: 0;
  }
  .sidebar-link {
    font-size: 1rem;
    padding: 0.7rem 0.7rem;
    justify-content: center;
  }
}

/* Botón elegante de volver */
.btn-volver-elegante {
  position: absolute;
  top: -15px;
  right: -15px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  z-index: 10;
  overflow: hidden;
}

.btn-volver-elegante::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-volver-elegante:hover::before {
  left: 100%;
}

.btn-volver-elegante:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb, #1e40af);
}

.btn-volver-elegante:active {
  transform: translateY(0) scale(0.98);
}

.btn-volver-elegante .btn-text {
  transition: transform 0.2s ease;
}

.btn-volver-elegante:hover .btn-text {
  transform: translateX(-2px);
}

.btn-volver-elegante svg {
  transition: transform 0.2s ease;
}

.btn-volver-elegante:hover svg {
  transform: translateX(-3px);
}

/* Responsive para el botón elegante */
@media (max-width: 768px) {
  .btn-volver-elegante {
    top: -10px;
    right: -10px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .btn-volver-elegante .btn-text {
    display: none;
  }
  
  .btn-volver-elegante svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* Dark mode para el botón elegante */
@media (prefers-color-scheme: dark) {
  .btn-volver-elegante {
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
    box-shadow: 0 4px 15px rgba(29, 78, 216, 0.4);
  }
  
  .btn-volver-elegante:hover {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    box-shadow: 0 8px 25px rgba(29, 78, 216, 0.5);
  }
}

/* Botón de volver en navegación */
.nav-btn-volver {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  margin: 0.5rem;
}

.nav-btn-volver:hover {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  color: #1f2937;
  border-color: #9ca3af;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-btn-volver:active {
  transform: translateY(0);
}

.nav-btn-volver svg {
  transition: transform 0.2s ease;
}

.nav-btn-volver:hover svg {
  transform: translateX(-2px);
}

/* Dark mode para el botón de navegación */
@media (prefers-color-scheme: dark) {
  .nav-btn-volver {
    background: linear-gradient(135deg, #374151, #4b5563);
    color: #f9fafb;
    border-color: #6b7280;
  }
  
  .nav-btn-volver:hover {
    background: linear-gradient(135deg, #4b5563, #6b7280);
    color: #ffffff;
    border-color: #9ca3af;
  }
}

/* Responsive para el botón de navegación */
@media (max-width: 768px) {
  .nav-btn-volver {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .nav-btn-volver span {
    display: none;
  }
  
  .nav-btn-volver svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* Animaciones para notificaciones */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Estilos adicionales para el modal de usuario */
.usuario-modal-form {
  display: grid;
  gap: 2rem;
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.usuario-modal-form::-webkit-scrollbar {
  width: 8px;
}

.usuario-modal-form::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.usuario-modal-form::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.usuario-modal-form::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Secciones del modal */
.modal-section {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  background: #fafafa;
  transition: all 0.2s ease;
}

.modal-section:hover {
  background: #f8fafc;
  border-color: #d1d5db;
}

.modal-section h4 {
  margin: 0 0 1rem 0;
  color: #374151;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal-section-grid-triple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.modal-section-full {
  grid-column: 1 / -1;
}

/* Responsive para modal */
@media (max-width: 768px) {
  .modal-section-grid,
  .modal-section-grid-triple {
    grid-template-columns: 1fr;
  }
  
  .usuario-modal-form {
    gap: 1rem;
  }
  
  .modal-section {
    padding: 1rem;
  }
}

/* Dark mode para modal */
@media (prefers-color-scheme: dark) {
  .modal-section {
    background: #1f2937;
    border-color: #374151;
  }
  
  .modal-section:hover {
    background: #111827;
    border-color: #4b5563;
  }
  
  .modal-section h4 {
    color: #f3f4f6;
  }
}
  