Files
IT_Ticket_System/app/static/css/password-strength.css
T
2026-07-02 14:36:06 -04:00

55 lines
2.3 KiB
CSS

/*
* Shared password-strength UI: show/hide toggle, strength meter, rule
* checklist, and confirm-match indicator. Used on the register, profile,
* admin create/edit user, and password reset forms.
*
* Relies on the --bg, --border, --border2, --muted, --success, --danger,
* --accent CSS custom properties already defined by each page's theme
* (see base.html for admin/auth pages, or the page's own :root block for
* the standalone auth pages).
*/
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 42px; }
.pw-toggle {
position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
background: none; border: none; color: var(--muted); cursor: pointer;
font-size: 16px; padding: 4px; line-height: 1; transition: color .15s;
}
.pw-toggle:hover { color: var(--accent); }
.pw-strength-wrap { margin-top: 8px; }
.pw-strength-track {
height: 4px; background: var(--border); border-radius: 2px;
overflow: hidden; margin-bottom: 6px;
}
.pw-strength-fill {
height: 100%; border-radius: 2px; width: 0%;
transition: width .3s ease, background .3s ease;
}
.pw-strength-label {
font-size: 11px; font-weight: 600; letter-spacing: .3px;
display: flex; align-items: center; gap: 5px; transition: color .3s;
}
.pw-rules {
margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px;
background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
padding: 10px 12px;
}
.pw-rule { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); transition: color .2s; }
.pw-rule .ri { font-size: 13px; width: 14px; text-align: center; transition: color .2s, transform .15s; }
.pw-rule.met { color: var(--success); }
.pw-rule.met .ri { color: var(--success); transform: scale(1.1); }
.pw-rule.unmet .ri { color: var(--border2); }
.pw-match {
font-size: 11.5px; margin-top: 6px; display: flex; align-items: center; gap: 5px;
font-weight: 600; letter-spacing: .2px; min-height: 18px; transition: color .2s;
}
.pw-match.ok { color: var(--success); }
.pw-match.fail { color: var(--danger); }
.pw-input.valid { border-color: var(--success) !important; box-shadow: 0 0 0 3px rgba(5,150,105,.08) !important; }
.pw-input.invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(220,38,38,.08) !important; }