/* Shared show/hide password field */
.password-field {
    position: relative;
    display: block;
}

.password-field > input {
    padding-right: 2.75rem !important;
    width: 100%;
}

/*
 * Bootstrap/AdminLTE paints an invalid/valid status SVG in the same right
 * gutter as our show/hide toggle. Drop that background icon here — feedback
 * text under the field already communicates validation state.
 */
.password-field > .form-control.is-invalid,
.password-field > .form-control.is-valid,
.was-validated .password-field > .form-control:invalid,
.was-validated .password-field > .form-control:valid {
    background-image: none !important;
}

/* Hide native browser password reveal controls that compete with our toggle */
.password-field > input::-ms-reveal,
.password-field > input::-ms-clear,
.password-field > input::-webkit-credentials-auto-fill-button,
.password-field > input::-webkit-strong-password-auto-fill-button {
    display: none !important;
}

.password-field__toggle {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    z-index: 2;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

.password-field__toggle:hover,
.password-field__toggle:focus-visible {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.06);
    outline: none;
}

.password-field__toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.28);
}

.password-field__icon svg {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
}

/* Keep toggle centered when bootstrap invalid feedback follows the field */
.password-field + .invalid-feedback,
.password-field + .form-text,
.password-field + .text-xs,
.password-field + p {
    position: relative;
}

/* Super Admin dark shell */
.sa-app .password-field__toggle {
    color: #94a3b8;
}

.sa-app .password-field__toggle:hover,
.sa-app .password-field__toggle:focus-visible {
    color: #f8fafc;
    background: rgba(148, 163, 184, 0.12);
}
