/* Shared auth shell (sign-in, sign-up, reset, verify, allauth) */
.sign-page {
    background: var(--c2b-canvas);
}

.sign-page .card .card-body h1,
.sign-page .title_group h1,
.sign-page h1.h2 {
    color: var(--c2b-navy);
}

.sign-page .allready-acc span {
    color: var(--c2b-muted);
    font-weight: 500;
    font-size: 0.94rem;
}

.sign-page span.error {
    color: #dc3545;
    font-size: 0.8125rem;
    font-weight: 500;
}

.sign-page .ajax-form .error {
    font-size: 0.8125rem;
    color: #dc3545;
    font-weight: 500;
}

.sign-page .form-check .form-check-label {
    font-size: 0.82rem;
}

.sign-page .form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--c2b-navy);
}

.sign-page .auth-logo {
    height: 38px;
    width: auto;
    max-width: none;
}

.sign-page .sign-in-google-btn {
    width: 100%;
    background-color: #fff !important;
    color: #3e5171 !important;
    border-color: #d9dee7 !important;
    border-radius: 0.75rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.sign-page .sign-in-google-btn:hover,
.sign-page .sign-in-google-btn:focus-visible {
    background-color: #fff !important;
    border-color: var(--c2b-blue) !important;
    color: #3e5171 !important;
}

.sign-page--signup {
    background-color: var(--c2b-canvas);
    background-image:
        radial-gradient(circle at 15% 85%, rgba(47, 94, 234, 0.06) 0%, transparent 42%),
        radial-gradient(circle at 85% 15%, rgba(47, 94, 234, 0.05) 0%, transparent 38%);
}

.sign-page--signup .signup-card {
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.sign-page--signup .signup-subtitle {
    color: var(--c2b-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.sign-page--signup .divider {
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.sign-page--signup .divider::before,
.sign-page--signup .divider::after {
    border-bottom-color: #e2e8f0;
}

.sign-page .signup_form .sign-in-input-wrap {
    display: block;
}

.sign-page .signup_form .sign-in-input.is-invalid {
    background-image: none;
    padding-right: 1rem;
    border-color: #dc3545;
}

.sign-page .signup_form .sign-in-input-wrap + .error,
.sign-page .signup_form .sign-in-input-wrap .error {
    display: block;
    margin-top: 0.35rem;
    line-height: 1.35;
}

.sign-page .signup_form .sign-in-input {
    height: auto !important;
    min-height: 3rem;
    font-size: 1rem !important;
    font-weight: 400;
    box-shadow: none;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #334155;
}

.sign-page .signup_form .sign-in-input:focus {
    border-color: var(--c2b-blue);
    box-shadow: 0 0 0 0.2rem rgba(47, 94, 234, 0.12);
}

.sign-page .signup_form .form-check-input.is-invalid {
    border-color: #dc3545;
    box-shadow: none;
}

.sign-page .signup_form .signup-terms {
    text-align: left;
}

.sign-page .signup_form .signup-terms .form-check {
    padding-left: 0;
    justify-content: flex-start;
    margin-bottom: 0;
}

.sign-page .signup_form .form-check {
    align-items: flex-start;
    gap: 0.625rem;
}

.sign-page .signup_form .form-check-input {
    margin-top: 0.2rem;
    margin-left: 0;
}

.sign-page .signup_form .form-check-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: #475569;
    line-height: 1.45;
}

.sign-page .signup_form .form-check-label a {
    color: var(--c2b-blue);
    font-weight: 600;
    text-decoration: none;
}

.sign-page .signup_form .form-check-label a:hover {
    text-decoration: underline;
}

.sign-page--signup .signup-recaptcha {
    display: flex;
    justify-content: center;
}

.sign-page--signup .signup-recaptcha > .mb-4 {
    margin-bottom: 0 !important;
}

.sign-page--signup .signup-footer-link {
    color: var(--c2b-blue);
    font-weight: 600;
    text-decoration: none;
}

.sign-page--signup .signup-footer-link:hover {
    text-decoration: underline;
}

.sign-page #emailSignInForm .form-control {
    height: auto !important;
    font-size: 1rem !important;
    font-weight: 500;
    box-shadow: none;
}

.sign-in-input {
    min-height: 3rem;
    padding-inline: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    background: #fff;
    color: #334155;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sign-in-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.sign-in-input:focus {
    border-color: var(--c2b-blue);
    background: #fff;
    box-shadow: 0 0 0 0.2rem rgba(47, 94, 234, 0.12);
}

.sign-in-input-wrap {
    display: flex;
    align-items: center;
}

.sign-in-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}

.sign-in-input--with-icon {
    width: 100%;
    padding-left: 2.75rem;
}

.sign-in-input--email {
    padding-right: 2.5rem;
}

.sign-in-input--code {
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

.sign-in-input-status {
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 1rem;
    height: 1rem;
    transform: translateY(-50%);
    border-radius: 999px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sign-in-input-status.is-loading {
    opacity: 1;
    border: 2px solid rgba(62, 81, 113, 0.18);
    border-top-color: #3e5171;
    animation: sign-in-status-spin 0.8s linear infinite;
}

.sign-in-input-status.is-ready {
    opacity: 1;
    background: var(--c2b-blue);
    box-shadow: 0 0 0 4px rgba(47, 94, 234, 0.15);
}

.sign-in-verification {
    animation: sign-in-rise 0.28s ease;
}

.sign-in-verification--otp #loginOtpGroup {
    margin-bottom: 0 !important;
}

.sign-page .sign-in-otp-notice {
    margin: 0 0 0.85rem;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.45;
    text-align: left;
}

/* Shared auth option cards (sign-in passkey + post-signup setup) */
.sign-page .sign-auth-option {
    box-sizing: border-box;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    padding: 1rem 1.125rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.875rem;
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.sign-page .sign-auth-option--featured {
    border-color: #bfd0ff;
    background: var(--c2b-blue-light);
}

.sign-page .sign-auth-option:hover,
.sign-page .sign-auth-option:focus-visible {
    border-color: #bfdbfe;
    background: #f1f5f9;
    box-shadow: 0 4px 14px rgba(62, 81, 113, 0.08);
    outline: none;
}

.sign-page .sign-auth-option--featured:hover,
.sign-page .sign-auth-option--featured:focus-visible {
    border-color: #60a5fa;
    background: #e8f2ff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}

.sign-page .sign-auth-option.is-loading {
    pointer-events: none;
}

.sign-page .sign-auth-option.is-loading .sign-auth-option__content,
.sign-page .sign-auth-option.is-loading .sign-auth-option__icon,
.sign-page .sign-auth-option.is-loading .sign-auth-option__chevron {
    opacity: 0;
}

.sign-page .sign-auth-option__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.625rem;
    background: #f1f5f9;
    color: #64748b;
}

.sign-page .sign-auth-option__icon--featured {
    background: #dbeafe;
    color: #1e40af;
}

.sign-page .sign-auth-option__content {
    flex: 1;
    min-width: 0;
}

.sign-page .sign-auth-option__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.sign-page .sign-auth-option__title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.sign-page .sign-auth-option__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.sign-page .sign-auth-option--featured .sign-auth-option__badge {
    background: #dbeafe;
    color: #2563eb;
}

.sign-page .sign-auth-option__desc {
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #64748b;
}

.sign-page .sign-auth-option__chevron {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    color: #94a3b8;
    transition: opacity 0.2s ease;
}

.sign-page .sign-auth-option__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid rgba(62, 81, 113, 0.18);
    border-top-color: #3e5171;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
    animation: sign-in-spin 0.75s linear infinite;
}

.sign-page .sign-auth-option.is-loading .sign-auth-option__loader {
    opacity: 1;
}

.sign-page .setup-sign-in__title {
    color: var(--c2b-navy);
}

.sign-page .setup-sign-in__subtitle {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.sign-page .setup-sign-in__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
    color: #94a3b8;
    font-size: 0.84rem;
    font-weight: 500;
}

.sign-page .setup-sign-in__footer-icon {
    display: inline-flex;
    align-items: center;
    color: #3b82f6;
}

.sign-in-submit {
    min-height: 3rem;
    border: 0;
    border-radius: 999px !important;
    color: #fff;
    background-color: var(--c2b-blue) !important;
    box-shadow: 0 8px 20px rgba(47, 94, 234, 0.28);
    transition: opacity 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.sign-page #signInSubmit.btn:hover:not(:disabled):not(.is-loading),
.sign-page #signInSubmit.btn:focus-visible:not(:disabled):not(.is-loading),
.sign-page .sign-in-submit.btn-c2b:hover:not(:disabled) {
    background-color: var(--c2b-blue-dark) !important;
    box-shadow: 0 8px 20px rgba(34, 71, 196, 0.28);
    transform: translateY(-1px);
}

#signInSubmit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#signInSubmit.is-loading {
    pointer-events: none;
}

#signInSubmit.is-loading #signInSubmitLabel {
    opacity: 0;
}

#signInSubmitLabel {
    transition: opacity 0.2s ease;
}

.sign-in-submit__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
    animation: sign-in-spin 0.75s linear infinite;
}

#signInSubmit.is-loading .sign-in-submit__loader {
    opacity: 1;
}

.ctb-resend-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
    color: #6b7280;
    font-size: 0.84rem;
}

.ctb-resend-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(62, 81, 113, 0.16);
    border-radius: 999px;
    background: #fff;
    color: #3e5171;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.ctb-resend-btn:hover:not(:disabled),
.ctb-resend-btn:focus-visible:not(:disabled) {
    border-color: #2db5fa;
    color: #2db5fa;
    background: rgba(45, 181, 250, 0.08);
}

.ctb-resend-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sign-page .ctb-resend-btn {
    background: #fff !important;
    border: 1px solid rgba(62, 81, 113, 0.16) !important;
    box-shadow: none;
}

.sign-page .ctb-resend-btn:hover:not(:disabled),
.sign-page .ctb-resend-btn:focus-visible:not(:disabled) {
    background: rgba(45, 181, 250, 0.08) !important;
}

#signInResendTimer {
    color: #7f7f7f;
    font-size: 0.82rem;
    font-weight: 500;
}

#signInResendTimer:not(:empty)::before {
    content: '\00b7';
    margin: 0 0.35rem;
}

@keyframes sign-in-status-spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

@keyframes sign-in-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes sign-in-rise {
    from {
        opacity: 0;
        transform: translateY(0.35rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
