/* =============================================
   PARAÍSO NATURAL — perfil.css
   Estilos para la página de perfil de usuario
============================================= */

/* ---- Variables ---- */
:root {
  --green:        #2d7a3e;
  --green-light:  #4a9d5f;
  --gold:         #c9a961;
  --dark:         #2c3e50;
  --orange:       #f5a623;
}

/* ---- Reset base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: #f3f4f6;
}

/* =====================
   TABS
===================== */
.tab-btn {
  color: #6b7280;
  border-bottom: 3px solid transparent;
  background: transparent;
  cursor: pointer;
}

.tab-btn:hover {
  color: var(--green);
  background-color: #f0fdf4;
}

.tab-btn.active {
  color: var(--green);
  border-bottom-color: var(--green);
  background-color: #f0fdf4;
  font-weight: 700;
}

.tab-content {
  animation: fadeInTab 0.25s ease;
}

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================
   INPUTS
===================== */
.input-field {
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 122, 62, 0.15);
}

.input-field:disabled,
.input-field[readonly] {
  background-color: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
}

/* =====================
   AVATAR
===================== */
#avatarPreview {
  transition: transform 0.3s ease;
}

#avatarPreview:hover {
  transform: scale(1.05);
}

/* =====================
   INDICADOR FUERZA CONTRASEÑA
===================== */
.strength-weak   { background-color: #ef4444 !important; }
.strength-fair   { background-color: #f97316 !important; }
.strength-good   { background-color: #eab308 !important; }
.strength-strong { background-color: #22c55e !important; }

/* =====================
   REQUISITOS CONTRASEÑA
===================== */
.req-ok   .req-icon { color: #22c55e; }
.req-fail .req-icon { color: #ef4444; }
.req-ok   { color: #16a34a; }

/* =====================
   TOAST NOTIFICATIONS
===================== */
.toast {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 260px;
  max-width: 380px;
  animation: slideInToast 0.35s ease forwards;
  transition: opacity 0.3s ease;
}

.toast-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.toast-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.toast-warning {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.toast-info {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.fade-out {
  opacity: 0;
  transform: translateX(60px);
}

/* =====================
   BADGE DE ROL
===================== */
.badge-cliente     { background-color: var(--green);   color: #fff; }
.badge-vendedor    { background-color: var(--gold);    color: #1a1a1a; }
.badge-admin       { background-color: #7c3aed;        color: #fff; }
.badge-superadmin  { background-color: #dc2626;        color: #fff; }

/* =====================
   CAMPOS SOLO LECTURA (sistema)
===================== */
.readonly-field {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: #6b7280;
  user-select: none;
}

/* =====================
   RESPONSIVE AJUSTES
===================== */
@media (max-width: 640px) {
  .tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
  }
}

/* =====================
   ANIMACIÓN PULSE AVATAR
===================== */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(45, 122, 62, 0.4); }
  70%  { box-shadow: 0 0 0 10px rgba(45, 122, 62, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 122, 62, 0); }
}

#avatarPreview {
  animation: pulse-ring 3s infinite;
  border-radius: 9999px;
}

/* =====================
   SCROLLBAR PERSONALIZADO
===================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-light); }