 :root {
  /* Colores principales */
  --primary-dark: #1a365d;
  --primary-medium: #2c5282;
  --primary-light: #4299e1;
  --primary-ultralight: #ebf8ff;
  
  /* Escala de grises */
  --gray-900: #1a202c;
  --gray-800: #2d3748;
  --gray-700: #4a5568;
  --gray-600: #718096;
  --gray-500: #a0aec0;
  --gray-400: #cbd5e0;
  --gray-300: #e2e8f0;
  --gray-200: #edf2f7;
  --gray-100: #f7fafc;
  
  /* Colores adicionales */
  --white: #ffffff;
  --black: #000000;
  --success: #38a169;
  --warning: #dd6b20;
  --danger: #e53e3e;
  
  /* Sombras */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Bordes */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-full: 9999px;
  
  /* Transiciones */
  --transition-fast: all 0.15s ease-in-out;
  --transition-normal: all 0.3s ease-in-out;
  --transition-slow: all 0.5s ease-in-out;
  
  /* Tipografía */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --text-base: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
}

/* Reset y estilos base */
body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background-color: var(--gray-100);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Encabezado del perfil */
.profile-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
  color: var(--white);
  padding: 3rem 2rem;
  border-radius: var(--border-radius-xl);
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.profile-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: rgba(255, 255, 255, 0.05);
  transform: rotate(30deg);
  z-index: 0;
}

.profile-header:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* Foto de perfil */
.profile-picture-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
  border-radius: var(--border-radius-full);
  overflow: hidden;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: var(--transition-normal);
  z-index: 1;
}

.profile-picture-container:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.profile-picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

.profile-picture-container:hover .profile-picture {
  transform: scale(1.1);
}

.profile-edit-icon {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.95);
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-medium);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.profile-edit-icon:hover {
  transform: scale(1.1);
  background: var(--white);
  color: var(--primary-dark);
}

/* Tarjetas */
.profile-card {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  border: none;
  transition: var(--transition-normal);
  overflow: hidden;
  background-color: var(--white);
  border: 1px solid var(--gray-200);
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-300);
}

.profile-card .card-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  color: var(--primary-dark);
  font-size: var(--text-xl);
  letter-spacing: -0.025em;
}

.profile-card .card-header i {
  margin-right: 10px;
  color: var(--primary-medium);
}

/* Formularios */
.form-control, .form-select {
  border-radius: var(--border-radius-md);
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  transition: var(--transition-fast);
  font-size: var(--text-base);
  color: var(--gray-700);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.25);
  outline: none;
}

.form-control:disabled, .form-control[readonly] {
  background-color: var(--gray-100);
  opacity: 1;
  color: var(--gray-600);
}

.input-group-text {
  background-color: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
  font-size: var(--text-sm);
}

/* Elementos de información */
.profile-info-item {
  display: flex;
  margin-bottom: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-md);
  transition: var(--transition-fast);
  background-color: var(--gray-50);
}

.profile-info-item:hover {
  background-color: var(--gray-100);
  transform: translateX(3px);
}

.profile-info-item i {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-ultralight);
  color: var(--primary-medium);
  border-radius: var(--border-radius-full);
  font-size: 1rem;
  margin-right: 1rem;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.profile-info-item:hover i {
  background-color: var(--primary-light);
  color: var(--white);
}

.profile-info-label {
  font-weight: 500;
  color: var(--gray-600);
  min-width: 140px;
  font-size: var(--text-sm);
  letter-spacing: 0.025em;
}

.profile-info-value {
  flex-grow: 1;
  font-weight: 600;
  color: var(--gray-800);
  font-size: var(--text-base);
}

/* Botones */
.btn {
  border-radius: var(--border-radius-md);
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  transition: var(--transition-fast);
  letter-spacing: 0.025em;
}

.btn-edit-profile {
  background: linear-gradient(135deg, var(--primary-medium) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: var(--border-radius-full);
  padding: 0.75rem 1.75rem;
  color: var(--white);
  font-weight: 500;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: var(--text-sm);
}

.btn-edit-profile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-medium) 100%);
}

.btn-outline-primary {
  border: 1px solid var(--primary-medium);
  color: var(--primary-medium);
  background-color: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--primary-medium);
  color: var(--white);
  border-color: var(--primary-medium);
}

/* Badges y etiquetas */
.badge {
  font-weight: 600;
  letter-spacing: 0.025em;
  padding: 0.375rem 0.75rem;
  border-radius: var(--border-radius-full);
}

.badge.bg-primary {
  background-color: var(--primary-medium) !important;
}

.security-badge {
  background-color: rgba(56, 161, 105, 0.1);
  border-radius: var(--border-radius-full);
  padding: 0.5rem 1rem;
  font-size: var(--text-xs);
  display: inline-flex;
  align-items: center;
  color: var(--success);
  font-weight: 600;
  letter-spacing: 0.025em;
}

.security-badge i {
  margin-right: 0.5rem;
  color: var(--success);
  font-size: 0.875rem;
}

/* Modales */
.modal-content {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: none;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
}

.modal-header {
  border-bottom: 1px solid var(--gray-200);
  padding: 1.5rem;
  background-color: var(--gray-50);
}

.modal-title {
  color: var(--primary-dark);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.modal-footer {
  border-top: 1px solid var(--gray-200);
  padding: 1.25rem 1.5rem;
  background-color: var(--gray-50);
}

/* Cropper */
#image-cropper-container {
  max-height: 400px;
  overflow: hidden;
  margin: 1rem 0;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--gray-200);
  background-color: var(--gray-50);
}

/* Progress bar */
.progress {
  height: 6px;
  border-radius: var(--border-radius-full);
  background-color: var(--gray-200);
}

.progress-bar {
  border-radius: var(--border-radius-full);
  transition: var(--transition-slow);
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.img-loading {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Responsive design */
@media (max-width: 992px) {
  .profile-header {
    padding: 2.5rem 1.5rem;
  }
  
  .profile-card .card-header {
    font-size: var(--text-lg);
  }
}

@media (max-width: 768px) {
  .profile-header {
    padding: 2rem 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
  }
  
  .profile-picture-container {
    width: 120px;
    height: 120px;
  }
  
  .profile-info-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }
  
  .profile-info-label {
    margin-bottom: 0.5rem;
    min-width: auto;
    width: 100%;
  }
  
  .profile-card .card-header {
    padding: 1rem;
    font-size: var(--text-base);
  }
  
  .modal-dialog {
    margin: 0.5rem;
  }
}

@media (max-width: 576px) {
  .profile-header {
    padding: 1.5rem 1rem;
  }
  
  .profile-picture-container {
    width: 100px;
    height: 100px;
  }
  
  .profile-edit-icon {
    width: 30px;
    height: 30px;
    font-size: 0.875rem;
  }
  
  .btn-edit-profile {
    width: 100%;
    padding: 0.75rem;
  }
  
  .profile-info-item {
    margin-bottom: 0.75rem;
  }
  
  .modal-content {
    border-radius: var(--border-radius-md);
  }
}

.dark-mode .row {background-color: transparent;}
.dark-mode .card-header {background-color: #34373b;}
