/* ============================================================================
   DO MANH MAT KHAU (15/11/2026) — js/pw-strength.js ve khoi .cv-pw duoi o mat
   khau moi. Mau chi lay tu token: --cv-* (trang dang nhap vao / quan tri, sang
   va toi) va --ld-* (trang dang nhap / dang ky nen toi, .au-form).
   ========================================================================== */
.cv-pw {
    --pw-muted: var(--cv-text-muted, currentColor);
    --pw-ok: var(--cv-success, currentColor);
    --pw-bad: var(--cv-danger, currentColor);
    --pw-mid: var(--cv-warning, var(--pw-muted));
    --pw-track: var(--cv-border-strong, var(--cv-border, rgba(127, 127, 127, .25)));
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 400;
}
.au-form .cv-pw {
    --pw-muted: var(--ld-text-2);
    --pw-ok: var(--ld-ok);
    --pw-bad: var(--ld-bad);
    --pw-mid: var(--ld-text-2);
    --pw-track: var(--ld-line);
}
.cv-pw[hidden] { display: none; }

.cv-pw-meter { display: flex; gap: 4px; }
.cv-pw-meter i {
    flex: 1 1 0;
    height: 4px;
    border-radius: 2px;
    background: var(--pw-track);
    transition: background-color .2s ease;
}
.cv-pw[data-score="1"] .cv-pw-meter i:nth-child(-n+1),
.cv-pw[data-score="2"] .cv-pw-meter i:nth-child(-n+2) { background: var(--pw-bad); }
.cv-pw[data-score="3"] .cv-pw-meter i:nth-child(-n+3),
.cv-pw[data-score="4"] .cv-pw-meter i:nth-child(-n+4) { background: var(--pw-mid); }
.cv-pw[data-score="5"] .cv-pw-meter i { background: var(--pw-ok); }

.cv-pw-label { margin: 6px 0 4px; color: var(--pw-muted); min-height: 1em; }

.cv-pw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cv-pw-list li {
    position: relative;
    padding-left: 20px;
    color: var(--pw-muted);
}
/* Dau chua dat: vong tron rong; da dat: dau tich. Ve bang CSS, khong can font icon. */
.cv-pw-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .32em;
    width: 10px;
    height: 10px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    box-sizing: border-box;
}
.cv-pw-list li.is-ok { color: var(--pw-ok); }
.cv-pw-list li.is-ok::before {
    top: .2em;
    left: 4px;
    width: 6px;
    height: 10px;
    border-width: 0 2px 2px 0;
    border-radius: 0;
    transform: rotate(45deg);
}
/* Bam gui khi chua dat: dieu kien con thieu chuyen mau loi. */
.cv-pw.is-checked .cv-pw-list li:not(.is-ok) { color: var(--pw-bad); }

@media (prefers-reduced-motion: reduce) {
    .cv-pw-meter i { transition: none; }
}

/* ==========================================================================
   UI-U2 BEGIN (21/11/2026) — data-pw-place="input": thanh do manh + dieu kien nam
   ngay duoi o MAT KHAU; dieu kien "hai o khop nhau" tach ra nam duoi o nhap lai
   (.cv-pw-match). Trang dang ky / dat lai mat khau (.au-form): chu to va sang hon,
   thanh do day hon, dieu kien xep hai cot.
   ========================================================================== */
.cv-pw-match { margin-top: 6px; }
.au-form .cv-pw {
    --pw-muted: rgba(255, 255, 255, .82);
    --pw-track: rgba(255, 255, 255, .26);
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
}
.au-form .cv-pw-match { margin-top: 8px; }
.au-form .cv-pw-meter { gap: 5px; }
.au-form .cv-pw-meter i { height: 6px; border-radius: 3px; }
.au-form .cv-pw-label { margin: 8px 0 6px; font-weight: 500; color: #fff; }
.au-form .cv-pw-list { gap: 4px 16px; }
.au-form .cv-pw-list li { padding-left: 22px; }
.au-form .cv-pw-list li::before { top: .36em; width: 11px; height: 11px; }
.au-form .cv-pw-list li.is-ok::before { top: .22em; width: 6px; height: 11px; }
@media (min-width: 400px) {
    .au-form .cv-pw:not(.cv-pw-match) .cv-pw-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .au-form .cv-pw-list li[data-rule="special"] { grid-column: 1 / -1; }
}
/* UI-U2 END */
/* AUTHFULL-20261123 BEGIN: the form rong hon; dieu kien mat khau khong ngat chu. */
@media (min-width: 640px) { .au-form { max-width: 520px; } }
.au-form .cv-pw:not(.cv-pw-match) .cv-pw-list { grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); }
.au-form .cv-pw-list li { white-space: nowrap; }
.au-form .cv-pw-list li[data-rule="special"] { grid-column: 1 / -1; white-space: normal; }
/* AUTHFULL-20261123 END */
