.password-visibility-field {
  position: relative;
  width: 100%;
}

.password-visibility-field > input {
  width: 100%;
  padding-inline-end: 52px !important;
}

.password-visibility-toggle {
  position: absolute;
  z-index: 2;
  inset-inline-end: 8px;
  top: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #315d4d;
  font-size: 0.94rem;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible,
.password-visibility-toggle[aria-pressed='true'] {
  border-color: rgba(22, 128, 93, 0.18);
  background: #e8f3ee;
  color: #126449;
  outline: none;
}

.password-visibility-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(22, 128, 93, 0.13);
}

.password-checklist {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 2px;
  padding: 16px;
  border: 1px solid rgba(27, 90, 71, 0.16);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(245, 250, 247, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 12px 28px rgba(18, 61, 48, 0.07);
  direction: rtl;
}

.password-checklist__head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.password-checklist__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e3f0ea;
  color: #176248;
  font-size: 1.05rem;
}

.password-checklist__head strong,
.password-checklist__head small {
  display: block;
}

.password-checklist__head strong {
  color: #153f32;
  font-size: 0.88rem;
}

.password-checklist__head small {
  margin-top: 3px;
  color: #6b7e75;
  font-size: 0.68rem;
}

.password-checklist__count {
  min-width: 52px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf5f1;
  color: #315d4d;
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
}

.password-checklist__progress {
  height: 5px;
  display: block;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce9e2;
}

.password-checklist__progress > span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #c99635, #16805d);
  transition: width 0.24s ease;
}

.password-checklist__rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.password-checklist__rules li {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #61766d;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.55;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.password-rule__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  color: #94a49d;
  font-size: 0.78rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.password-rule__label {
  overflow-wrap: anywhere;
  text-decoration-color: transparent;
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color 0.2s ease, opacity 0.2s ease;
}

.password-checklist__rules li.is-met {
  color: #167454;
}

.password-checklist__rules li.is-met .password-rule__icon {
  color: #16805d;
  transform: scale(1.08);
}

.password-checklist__rules li.is-met .password-rule__label {
  opacity: 0.72;
  text-decoration-line: line-through;
  text-decoration-color: currentColor;
}

.password-checklist__rules li.is-checking .password-rule__icon {
  color: #b58532;
}

.password-checklist.is-complete {
  border-color: rgba(22, 128, 93, 0.38);
  background: linear-gradient(145deg, rgba(236, 249, 242, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 14px 30px rgba(22, 128, 93, 0.1);
}

.password-checklist.is-complete .password-checklist__count {
  background: #16805d;
  color: #fff;
}

html[data-theme='dark'] .password-checklist {
  border-color: rgba(224, 178, 87, 0.2);
  background: linear-gradient(145deg, rgba(12, 40, 31, 0.96), rgba(8, 29, 23, 0.98));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

html[data-theme='dark'] .password-visibility-toggle {
  color: #d7e2dd;
}

html[data-theme='dark'] .password-visibility-toggle:hover,
html[data-theme='dark'] .password-visibility-toggle:focus-visible,
html[data-theme='dark'] .password-visibility-toggle[aria-pressed='true'] {
  border-color: rgba(224, 178, 87, 0.25);
  background: rgba(224, 178, 87, 0.11);
  color: #efc36d;
}

html[data-theme='dark'] .password-checklist__mark {
  background: rgba(224, 178, 87, 0.12);
  color: #e0b257;
}

html[data-theme='dark'] .password-checklist__head strong {
  color: #f1f8f4;
}

html[data-theme='dark'] .password-checklist__head small,
html[data-theme='dark'] .password-checklist__rules li {
  color: #adbbb4;
}

html[data-theme='dark'] .password-checklist__count {
  background: rgba(255, 255, 255, 0.08);
  color: #e8f0ec;
}

html[data-theme='dark'] .password-checklist__progress {
  background: rgba(255, 255, 255, 0.1);
}

html[data-theme='dark'] .password-checklist__rules li.is-met {
  color: #73d4ad;
}

html[data-theme='dark'] .password-checklist.is-complete {
  border-color: rgba(77, 196, 145, 0.4);
  background: linear-gradient(145deg, rgba(11, 49, 36, 0.98), rgba(8, 31, 24, 0.98));
}

@media (max-width: 575.98px) {
  .password-checklist {
    padding: 14px 12px;
  }

  .password-checklist__head {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .password-checklist__mark {
    width: 38px;
    height: 38px;
  }

  .password-checklist__rules {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .password-checklist *,
  .password-checklist *::before,
  .password-checklist *::after {
    transition: none !important;
  }
}
