/* Authentication forms: fields, buttons, links, alerts, plan choice. */
.auth-form .mb-3 {
    margin-bottom: 1.1rem;
}

.auth-form .mb-4 {
    margin-bottom: 1.4rem;
}

.auth-form .form-label {
    margin-bottom: 7px;
    color: var(--a-ink);
    font-size: 0.88rem;
    font-weight: 600;
}

.auth-form .required {
    color: var(--a-red);
}

.auth-form .form-control {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--a-line-strong);
    border-radius: 12px;
    background: var(--a-surface);
    color: var(--a-ink);
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-form .form-control::placeholder {
    color: #a39cba;
}

.auth-form .form-control:focus {
    border-color: var(--a-brand);
    box-shadow: var(--a-focus);
    outline: none;
}

.auth-form .form-control:disabled,
.auth-form .form-control[readonly] {
    background: #f6f4fb;
    color: var(--a-ink-2);
}

.auth-form .form-control.is-invalid {
    border-color: var(--a-red);
    background-image: none;
}

.auth-form .form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(217, 71, 90, 0.18);
}

.auth-form .invalid-feedback {
    display: block;
    margin-top: 6px;
    color: #a92b3d;
    font-size: 0.84rem;
    font-weight: 500;
}

.auth-form .form-text {
    display: block;
    margin-top: 6px;
    color: var(--a-muted);
    font-size: 0.82rem;
}

/* Password */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--a-muted);
    transform: translateY(-50%);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.password-toggle:hover {
    background: var(--a-brand-soft);
    color: var(--a-brand-strong);
}

.password-toggle:focus-visible {
    outline: none;
    box-shadow: var(--a-focus);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Remember me and forgot password */
.auth-remember-forgot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.remember-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 9px;
}

.remember-checkbox-input {
    width: 18px;
    height: 18px;
    flex: none;
    border: 1px solid var(--a-line-strong);
    border-radius: 5px;
    accent-color: var(--a-brand);
    cursor: pointer;
}

.remember-checkbox-input:focus-visible {
    outline: none;
    box-shadow: var(--a-focus);
}

.remember-checkbox-label {
    color: var(--a-ink-2);
    font-size: 0.88rem;
    cursor: pointer;
}

.auth-link {
    color: var(--a-brand-strong);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-link:focus-visible {
    outline: none;
    border-radius: 4px;
    box-shadow: var(--a-focus);
}

/* Submit */
.auth-button-wrapper .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 12px;
    background: var(--a-brand);
    box-shadow: 0 10px 24px -12px rgba(111, 66, 193, 0.7);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.auth-button-wrapper .btn:hover {
    background: var(--a-brand-strong);
    color: #fff;
}

.auth-button-wrapper .btn:active {
    transform: translateY(1px);
}

.auth-button-wrapper .btn:focus-visible {
    outline: none;
    box-shadow: var(--a-focus);
}

.auth-link-wrapper {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--a-line);
    color: var(--a-muted);
    font-size: 0.9rem;
    text-align: center;
}

.auth-link-wrapper .auth-link {
    font-size: 0.9rem;
}

/* Alerts */
.auth-content .alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 0.88rem;
}

.auth-content .alert i {
    margin-top: 3px;
}

.auth-content .alert-danger {
    border-color: #f0bcc4;
    background: var(--a-red-soft);
    color: #a92b3d;
}

.auth-content .alert-info {
    border-color: #d8cdf3;
    background: var(--a-brand-soft);
    color: var(--a-brand-strong);
}

.auth-content .alert-success {
    border-color: #b7e8d4;
    background: var(--a-green-soft);
    color: #17724d;
}

.auth-form .row {
    --bs-gutter-x: 14px;
}

/* Registration: which plan the account starts on (free, or the paid one picked on the pricing page) */
.auth-plan-note {
    padding: 12px 14px;
    border: 1px solid var(--a-line);
    border-radius: 12px;
    background: var(--a-brand-soft);
    color: var(--a-ink);
    font-size: 0.86rem;
    line-height: 1.45;
}

.auth-plan-note p {
    margin: 0;
}

.auth-plan-note .auth-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.82rem;
}

@media (max-width: 575.98px) {
    .auth-form .row > .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .auth-remember-forgot {
        flex-wrap: wrap;
    }
}
