/* === ESTILOS PROFILE === */
.profile-header-card {
  background: white;
  border-radius: 28px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
  padding: 2rem 1.5rem;
  transition: all 0.2s;
  margin-bottom: 2rem;
}

.avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #6c63ff, #ff6584);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: bold;
  color: white;
  margin: 0 auto 1rem auto;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.avatar-large img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.avatar-large:hover img {
  transform: scale(1.04);
}

/* Overlay de edición al pasar sobre el avatar */
.avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  color: white;
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
  letter-spacing: 0.5px;
}

.avatar-overlay i {
  font-size: 20px;
}

.avatar-large:hover .avatar-overlay {
  opacity: 1;
}

.settings-card {
  background: white;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  padding: 1.8rem;
  margin-bottom: 2rem;
  transition: 0.2s;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.settings-card h5 {
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--navy);
  border-left: 4px solid var(--blue);
  padding-left: 12px;
}

.profile-label {
  font-weight: 600;
  color: #1e2a3a;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control-custom {
  border-radius: 60px;
  padding: 0.7rem 1.2rem;
  border: 1px solid #e2e8f0;
  background: #fefefe;
  transition: 0.2s;
}

.form-control-custom:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 117, 255, 0.2);
  outline: none;
}

.btn-primary-custom {
  background: var(--blue);
  border: none;
  border-radius: 60px;
  padding: 0.6rem 1.8rem;
  font-weight: 600;
  transition: 0.2s;
}

.btn-primary-custom:hover {
  background: #005ed6;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 117, 255, 0.3);
}

.btn-outline-custom {
  border-radius: 60px;
  border: 1.5px solid var(--blue);
  background: transparent;
  color: var(--blue);
  font-weight: 600;
  padding: 0.5rem 1.6rem;
}

.btn-outline-custom:hover {
  background: rgba(0, 117, 255, 0.08);
  transform: translateY(-1px);
}

.danger-zone {
  border-top: 1px solid #fee2e2;
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.btn-danger-soft {
  background: #fff5f5;
  color: #e53e3e;
  border-radius: 60px;
  border: none;
  font-weight: 600;
  padding: 0.5rem 1.6rem;
  transition: 0.2s;
}

.btn-danger-soft:hover {
  background: #fed7d7;
  color: #c53030;
  transform: translateY(-2px);
}

.alert-custom {
  border-radius: 20px;
  font-size: 0.9rem;
}

.profile-breadcrumb {
  font-size: 0.85rem;
  color: #5a6e85;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .settings-card { padding: 1.2rem; }
  .avatar-large { width: 100px; height: 100px; }
}

/* Badge demo */
.demo-badge {
  background: #f0f2f5;
  border-radius: 40px;
  font-size: 0.7rem;
  padding: 0.2rem 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #4a5b6e;
}

.readonly-info {
  font-size: 0.75rem;
  color: #6c86a3;
  margin-top: 0.5rem;
  text-align: center;
  background: #f8fafc;
  border-radius: 60px;
  padding: 0.3rem 1rem;
  display: inline-block;
}

/* Mejoras táctiles y animaciones responsive */
.navbar-toggler { transition: all 0.2s; }
.navbar-toggler:active { transform: scale(0.96); }
.btn-primary-custom:active, .btn-outline-custom:active { transform: scale(0.97); }
.settings-card, .profile-header-card {
  transition: transform 0.2s ease, box-shadow 0.25s ease, opacity 0.3s;
}

@media (max-width: 576px) {
  .settings-card { padding: 1rem; }
  .profile-label { font-size: 0.75rem; }
  .btn-primary-custom, .btn-outline-custom {
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
  }
  .demo-badge { font-size: 0.6rem; }
}

/* Glass en cards */
.settings-card, .profile-header-card {
  backdrop-filter: blur(0px);
  background: rgba(255,255,255,0.98);
}

.user-avatar-circle-static {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
  cursor: default;
}

.user-avatar-circle-static:hover { transform: scale(1.03); }
.user-avatar-circle-static img { width: 100%; height: 100%; object-fit: cover; }

/* Botón gradiente */
.btn-gradient {
  background: linear-gradient(135deg, #6a5af9, #8e6dfd);
  border: none;
  color: white;
  padding: 12px 30px;
  border-radius: 20px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.btn-gradient:hover {
  background: linear-gradient(135deg, #5a4ae3, #7b5df0);
  transform: scale(1.03);
  color: white;
}
.btn-gradient:active {
  background: linear-gradient(135deg, #4a3bd1, #6a4ce0);
  transform: scale(0.98);
}
.btn-gradient:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Botón Eliminar Cuenta */
.delete-account-btn {
  background: #6a4ce0;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  font-weight: 500;
  transition: 0.3s;
}
.delete-account-btn:hover { background: #dc3545; color: white; }
.delete-account-btn:active { background: #ff6b6b; }

/* Modal: eliminar cuenta */
.custom-modal { border-radius: 20px; }
.delete-title { color: red; font-weight: bold; }

.cancel-btn {
  background: #f7931e;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  transition: 0.2s;
}
.cancel-btn:hover { background: #e67e00; color: white; }

.confirm-delete-btn {
  background: red;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  transition: 0.2s;
}
.confirm-delete-btn:hover { background: darkred; color: white; }
.confirm-delete-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Modal: Términos y condiciones */
.terms-modal { border-radius: 20px; }
.terms-box {
  max-height: 200px;
  overflow-y: auto;
  background: #f5f5f5;
  padding: 15px;
  border-radius: 10px;
  font-size: 14px;
}

/* Toast de notificaciones */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  min-width: 260px;
  max-width: 340px;
  background: #1e2a3a;
  color: white;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.toast-notification.success { border-left: 4px solid #4ade80; }
.toast-notification.error   { border-left: 4px solid #f87171; }
.toast-notification.info    { border-left: 4px solid #60a5fa; }

/* Input de archivo de foto oculto */
#avatarFileInput { display: none; }

/* Spinner inline en botones */
.btn-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Indicador de carga de foto */
.avatar-uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}