/* Campo contraseña con toggle ver/ocultar — ver regla .cursor/rules/password-toggle.mdc */

.password-field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field__inner {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.password-field__input {
  width: 100%;
  padding-right: 48px;
}

.password-field__toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.password-field__toggle:hover {
  color: var(--primary);
  background: rgba(11, 61, 145, 0.06);
}

.password-field__toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.password-field__glyph {
  width: 20px;
  height: 20px;
  position: relative;
  display: block;
}

.password-field__glyph--hide {
  display: none;
}

.password-field__toggle[aria-pressed="true"] .password-field__glyph--show {
  display: none;
}

.password-field__toggle[aria-pressed="true"] .password-field__glyph--hide {
  display: block;
}

/* Ojo abierto (mostrar) */
.password-field__glyph--show::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 14px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.password-field__glyph--show::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Ojo tachado (ocultar) */
.password-field__glyph--hide::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 14px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.password-field__glyph--hide::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 16px;
  height: 2px;
  background: currentColor;
  transform: rotate(-35deg);
  border-radius: 1px;
}

/* Login premium: icono candado + toggle */
.auth-field.password-field .auth-field__control.password-field--auth {
  position: relative;
}

.auth-field.password-field .auth-field__control.password-field--auth .password-field__inner {
  flex: 1;
  min-width: 0;
}

.auth-field.password-field .auth-field__control.password-field--auth .password-field__input {
  padding-left: 44px;
}

.auth-field.password-field .auth-field__control.password-field--auth .password-field__toggle {
  right: 4px;
}

/* Formulario panel genérico */
.form-group.password-field .password-field__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-group.password-field {
  margin-bottom: 18px;
}
