/* Inline validation feedback */
.form-control.is-invalid { border-color: #dc3545; }
.invalid-feedback { color: #dc3545; font-size: 13px; margin-top: 4px; }

/* Show/hide password toggle —
   eye is anchored to the input row itself (.password-input-wrap), NOT the outer
   .password-wrap, so when an .invalid-feedback is appended below the input the
   eye does not overlap the error text. */
.password-wrap { position: relative; }
.password-input-wrap { position: relative; }
.password-input-wrap .form-control { padding-right: 44px; }

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #8b95a3;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color .15s ease, background-color .15s ease;
    z-index: 2;
}
.password-toggle:hover { color: #1f2937; background: rgba(0,0,0,0.04); }
.password-toggle:focus { outline: 2px solid rgba(13,110,253,.25); outline-offset: 1px; }
.password-toggle svg { width: 20px; height: 20px; display: block; }
.password-toggle .icon-hide { display: none; }
.password-toggle.is-shown { color: #0d6efd; }
.password-toggle.is-shown .icon-show { display: none; }
.password-toggle.is-shown .icon-hide { display: block; }

/* Error message: full-width, on its own line, never under the eye */
.password-wrap .invalid-feedback { display: block; margin-top: 6px; padding-right: 0; }

/* Button loading state */
button.is-loading { opacity: 0.7; pointer-events: none; position: relative; }
button.is-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
    vertical-align: -2px;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }
