/**
 * Authentication Pages Styles
 * Login, Register, and other auth pages
 */

/* Page shell — same spirit as contact-page (soft gradient + orbs) */
.auth-page {
    position: relative;
    min-height: calc(100vh - 76px);
    overflow: hidden;
}

.auth-page__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(148, 163, 184, 0.18), transparent 55%),
        radial-gradient(ellipse 90% 60% at 100% 45%, rgba(203, 213, 225, 0.14), transparent 50%),
        radial-gradient(ellipse 80% 50% at 0% 85%, rgba(226, 232, 240, 0.12), transparent 45%),
        linear-gradient(165deg, #ffffff 0%, #f8fafc 45%, #f1f5f9 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 200% 200%;
    animation: auth-bg-shift 22s ease-in-out infinite;
}

.auth-page__bg::before,
.auth-page__bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.42;
    pointer-events: none;
    animation: auth-orb-float 18s ease-in-out infinite;
}

.auth-page__bg::before {
    width: min(420px, 55vw);
    height: min(420px, 55vw);
    top: -8%;
    right: -5%;
    background: rgba(37, 99, 235, 0.28);
    animation-delay: -4s;
}

.auth-page__bg::after {
    width: min(320px, 45vw);
    height: min(320px, 45vw);
    bottom: 5%;
    left: -8%;
    background: rgba(13, 148, 136, 0.22);
    animation-delay: -9s;
}

.auth-page--register .auth-page__bg {
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(226, 232, 240, 0.22), transparent 55%),
        radial-gradient(ellipse 90% 60% at 100% 40%, rgba(203, 213, 225, 0.18), transparent 50%),
        radial-gradient(ellipse 80% 55% at 0% 90%, rgba(241, 245, 249, 0.18), transparent 46%),
        linear-gradient(165deg, #ffffff 0%, #f8fafc 40%, #f1f5f9 100%);
}

.auth-page--register .auth-page__bg::before {
    background: rgba(203, 213, 225, 0.28);
}

.auth-page--register .auth-page__bg::after {
    background: rgba(226, 232, 240, 0.26);
}

@keyframes auth-bg-shift {
    0%,
    100% {
        background-position:
            0% 0%,
            0% 0%,
            0% 0%,
            0% 50%;
    }
    50% {
        background-position:
            0% 0%,
            0% 0%,
            0% 0%,
            100% 80%;
    }
}

@keyframes auth-orb-float {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-12px, 18px) scale(1.05);
    }
    66% {
        transform: translate(10px, -10px) scale(0.98);
    }
}

.auth-page__inner {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Legacy wrapper (if reused elsewhere) */
.auth-page-wrapper {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(165deg, #f8fafc 0%, #e0f2fe 40%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

.auth-page-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(13, 148, 136, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.auth-container--login {
    max-width: 450px;
}

.auth-container--register {
    max-width: 640px;
}

/* Auth Card */
.auth-card {
    background: #ffffff;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow:
        0 4px 6px rgba(15, 23, 42, 0.04),
        0 24px 48px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(226, 232, 240, 0.85) inset;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.6s ease-out;
}

.auth-card--register {
    border-radius: 22px;
}

@media (max-width: 576px) {
    .auth-card--register {
        border-radius: 18px;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Background Decorations */
.auth-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    animation: float 20s infinite ease-in-out;
}

.auth-circle-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.auth-circle-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    animation-delay: 5s;
}

.auth-circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: -75px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

/* Card Header */
.auth-brand-link {
    display: inline-block;
    margin-bottom: 1rem;
    line-height: 0;
}

.auth-brand-logo {
    width: auto;
    max-width: min(220px, 80vw);
    height: 52px;
    object-fit: contain;
}

.auth-card-header {
    padding: 3rem 2rem 2rem;
    text-align: center;
    position: relative;
}

.auth-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
    }
}

.auth-main-icon {
    font-size: 2rem;
    color: #fff;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 1rem;
    color: #718096;
    margin: 0;
    max-width: 36rem;
    margin-inline: auto;
    line-height: 1.55;
}

.auth-trust-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.auth-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.auth-trust-pill i {
    font-size: 0.75rem;
    color: #2563eb;
    opacity: 0.9;
}

.auth-page--register .auth-trust-pill i {
    color: #7c3aed;
}

.auth-card-header--register {
    padding-bottom: 1.75rem;
}

.auth-card-body--register {
    padding-top: 0.25rem;
}

.auth-icon-wrapper--register {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 10px 32px rgba(37, 99, 235, 0.3);
    animation: pulse-register 2.4s ease-in-out infinite;
}

@keyframes pulse-register {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 32px rgba(37, 99, 235, 0.28);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 14px 40px rgba(37, 99, 235, 0.36);
    }
}

/* Card Body */
.auth-card-body {
    padding: 0 2rem 3rem;
}

/* Form Styles */
.auth-form {
    margin-bottom: 1.5rem;
}

.auth-form-group {
    margin-bottom: 1.5rem;
}

.auth-form-group--compact {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .auth-form-group--compact {
        margin-bottom: 0;
    }
}

.auth-field-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.4;
}

.auth-register-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0.25rem 0 1.25rem;
    padding: 1rem 1rem 1rem 1.1rem;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

/* Login — remember me row + switch */
.auth-remember-me {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 0.25rem 0 1.25rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.auth-remember-me__leading {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(79, 70, 229, 0.16));
    color: #4f46e5;
    font-size: 1.05rem;
}

.auth-remember-me__copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.auth-remember-me__title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.auth-remember-me__hint {
    display: block;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.38;
}

.auth-remember-me__switch {
    position: relative;
    flex-shrink: 0;
    width: 2.875rem;
    height: 1.625rem;
    margin: 0;
    margin-inline-start: auto;
    cursor: pointer;
}

.auth-remember-me__checkbox {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.auth-remember-me__slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background 0.2s ease;
    pointer-events: none;
}

.auth-remember-me__slider::after {
    content: "";
    position: absolute;
    width: 1.2rem;
    height: 1.2rem;
    top: 50%;
    left: 0.2rem;
    transform: translateY(-50%);
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
    transition: left 0.22s ease, background 0.2s ease;
}

.auth-remember-me__checkbox:checked + .auth-remember-me__slider {
    background: #4f46e5;
}

.auth-remember-me__checkbox:checked + .auth-remember-me__slider::after {
    left: calc(100% - 1.2rem - 0.2rem);
}

.auth-remember-me__checkbox:focus-visible + .auth-remember-me__slider {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.35);
}

.auth-form-check {
    margin-bottom: 0;
}

.auth-form-check .form-check-input {
    margin-top: 0.35em;
    border-radius: 0.35em;
    border-color: #cbd5e1;
}

.auth-form-check .form-check-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.2);
}

.auth-form-check .form-check-label {
    font-size: 0.9rem;
    line-height: 1.45;
    color: #475569;
}

.auth-form-check .form-check-label a {
    font-weight: 600;
}

.was-validated.auth-form--register .auth-form-group:has(.auth-form-input:invalid) > .invalid-feedback,
.was-validated.auth-form--register .auth-form-group:has(.auth-input-wrapper .auth-form-input:invalid) > .invalid-feedback {
    display: block;
}

.was-validated.auth-form--register .auth-form-check:has(.form-check-input:invalid) > .invalid-feedback {
    display: block;
}

.auth-form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.auth-label-icon {
    font-size: 1rem;
    color: #2563eb;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    padding-right: 3rem;
    font-size: 1rem;
    color: #2d3748;
    background: #ffffff;
    border: 2px solid #dbe4ee;
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

/* Password row: lock icon left, toggle stays right — avoids overlap */
.auth-input-wrapper:has(.auth-toggle-password) .auth-form-input {
    padding-right: 3.25rem;
    padding-left: 2.75rem;
}

.auth-input-wrapper:has(.auth-toggle-password) .auth-input-icon {
    left: 1rem;
    right: auto;
}

[dir='rtl'] .auth-input-wrapper:has(.auth-toggle-password) .auth-form-input {
    padding-left: 3.25rem;
    padding-right: 2.75rem;
}

[dir='rtl'] .auth-input-wrapper:has(.auth-toggle-password) .auth-input-icon {
    right: 1rem;
    left: auto;
}

[dir='rtl'] .auth-toggle-password {
    right: auto;
    left: 0.35rem;
}

.auth-form-input:focus {
    background: #fff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.auth-form-input:focus + .auth-input-icon {
    color: #2563eb;
}

.auth-input-icon {
    position: absolute;
    right: 1rem;
    color: #a0aec0;
    font-size: 1rem;
    transition: color 0.3s ease;
    pointer-events: none;
}

.auth-input-focused .auth-input-icon {
    color: #2563eb;
}

/* Password Toggle Button */
.auth-toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.auth-toggle-password:hover {
    color: #2563eb;
}

.auth-toggle-password:focus {
    outline: none;
}

.auth-toggle-active {
    transform: scale(1.1);
}

/* Error Messages */
.auth-error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fff5f5;
    border-left: 3px solid #fc8181;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #c53030;
}

.auth-error-message i {
    font-size: 1rem;
}

.auth-invalid-feedback {
    display: none;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #c53030;
}

.was-validated .auth-form-group:has(.auth-form-input:invalid) > .auth-invalid-feedback {
    display: block;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.auth-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-submit-btn--register {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.38);
}

.auth-submit-btn--register:hover:not(:disabled) {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}

.auth-btn-text,
.auth-btn-loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-btn-loading {
    pointer-events: none;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
}

.auth-divider span {
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.98);
    color: #718096;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Footer */
.auth-footer {
    text-align: center;
}

.auth-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2563eb;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-link-btn:hover {
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.auth-link-btn--secondary {
    color: #334155;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.auth-link-btn--secondary:hover {
    color: #1e293b;
    background: #f8fafc;
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

/* Security Badge */
.auth-security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 12px;
    font-size: 0.875rem;
    color: #2563eb;
}

.auth-security-badge i {
    font-size: 1rem;
}

@media (prefers-reduced-motion: reduce) {
    .auth-page__bg,
    .auth-page__bg::before,
    .auth-page__bg::after {
        animation: none !important;
    }

    .auth-card {
        animation: none;
    }

    .auth-icon-wrapper,
    .auth-icon-wrapper--register {
        animation: none !important;
    }

    .auth-circle {
        animation: none !important;
    }
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-page__inner,
    .auth-page-wrapper {
        padding: 1rem 0.5rem;
    }

    .auth-container {
        max-width: 100%;
    }

    .auth-card {
        border-radius: 16px;
    }

    .auth-card-header {
        padding: 2rem 1.5rem 1.5rem;
    }

    .auth-card-body {
        padding: 0 1.5rem 2rem;
    }

    .auth-title {
        font-size: 1.75rem;
    }

    .auth-icon-wrapper {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem;
    }

    .auth-main-icon {
        font-size: 1.75rem;
    }

    .auth-form-group {
        margin-bottom: 1.25rem;
    }

    .auth-trust-row {
        margin-top: 1rem;
    }

    .auth-register-options {
        padding: 0.85rem 0.85rem 0.85rem 0.95rem;
    }

    .auth-remember-me {
        padding: 0.8rem 0.85rem;
        gap: 0.65rem;
    }

    .auth-remember-me__leading {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1rem;
    }
}

/* Animation for form validation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.was-validated .auth-form-input:invalid {
    border-color: #fc8181;
    animation: shake 0.5s;
}

.was-validated .auth-form-input:invalid:focus {
    box-shadow: 0 0 0 4px rgba(252, 129, 129, 0.1);
}

/* Success state */
.auth-form-input:valid {
    border-color: #48bb78;
}

.auth-form-input:valid:focus {
    box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.1);
}

/* Loading spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Additional utility classes */
.auth-text-center {
    text-align: center;
}

.auth-mt-1 {
    margin-top: 0.5rem;
}

.auth-mt-2 {
    margin-top: 1rem;
}

.auth-mb-0 {
    margin-bottom: 0;
}

/* Forgot password — split layout, warm accent on dark mesh */
.auth-page--forgot {
    min-height: calc(100vh - 76px);
}

.auth-page--forgot .auth-page__bg {
    background:
        radial-gradient(ellipse 100% 70% at 80% 10%, rgba(245, 158, 11, 0.12), transparent 55%),
        radial-gradient(ellipse 90% 55% at 10% 90%, rgba(59, 130, 246, 0.1), transparent 50%),
        radial-gradient(ellipse 70% 50% at 50% 50%, rgba(15, 23, 42, 0.04), transparent 60%),
        linear-gradient(168deg, #f8fafc 0%, #e2e8f0 38%, #f1f5f9 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 200% 200%;
}

.auth-page--forgot .auth-page__bg::before {
    background: rgba(245, 158, 11, 0.22);
    opacity: 0.38;
}

.auth-page--forgot .auth-page__bg::after {
    background: rgba(30, 58, 138, 0.2);
    opacity: 0.35;
}

.auth-page__inner--forgot {
    width: 100%;
    max-width: 1100px;
    margin-inline: auto;
    padding: 2rem 1.25rem;
}

.auth-forgot-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.75rem;
    width: 100%;
}

@media (min-width: 992px) {
    .auth-forgot-layout {
        flex-direction: row;
        align-items: stretch;
        gap: 2rem;
    }

    [dir='rtl'] .auth-forgot-layout {
        flex-direction: row-reverse;
    }
}

.auth-forgot-aside {
    display: none;
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    min-height: 0;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 42%, #0f172a 100%);
    box-shadow:
        0 24px 48px rgba(15, 23, 42, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

@media (min-width: 992px) {
    .auth-forgot-aside {
        display: flex;
        flex: 1 1 42%;
        max-width: 460px;
        min-height: 520px;
        align-items: center;
        justify-content: center;
    }
}

.auth-forgot-aside__mesh {
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.35) 0%, transparent 42%),
        radial-gradient(circle at 85% 75%, rgba(59, 130, 246, 0.25) 0%, transparent 40%);
    pointer-events: none;
}

.auth-forgot-aside__grid {
    position: absolute;
    inset: 0;
    opacity: 0.07;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.55) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.auth-forgot-aside__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    opacity: 0.55;
}

.auth-forgot-aside__orb--1 {
    width: min(280px, 50vw);
    height: min(280px, 50vw);
    top: -12%;
    left: -8%;
    background: rgba(245, 158, 11, 0.55);
    animation: auth-forgot-orb 14s ease-in-out infinite;
}

.auth-forgot-aside__orb--2 {
    width: min(220px, 42vw);
    height: min(220px, 42vw);
    bottom: -6%;
    right: -4%;
    background: rgba(59, 130, 246, 0.4);
    animation: auth-forgot-orb 18s ease-in-out infinite reverse;
}

@keyframes auth-forgot-orb {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(12px, -16px) scale(1.06);
    }
}

.auth-forgot-aside__icon-stack {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-forgot-aside__glyph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(120px, 28vw);
    height: min(120px, 28vw);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.22), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(245, 158, 11, 0.15) inset;
    color: rgba(253, 230, 138, 0.95);
    font-size: clamp(2.25rem, 5vw, 3rem);
}

.auth-forgot-main {
    flex: 1 1 58%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.auth-container--forgot {
    max-width: 440px;
    width: 100%;
}

.auth-card--forgot {
    border-radius: 26px;
    box-shadow:
        0 4px 6px rgba(15, 23, 42, 0.05),
        0 28px 56px rgba(15, 23, 42, 0.12),
        0 0 0 1px rgba(226, 232, 240, 0.9) inset;
}

.auth-card__accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d97706 0%, #f59e0b 35%, #2563eb 100%);
    z-index: 2;
    pointer-events: none;
}

.auth-circle--forgot {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(37, 99, 235, 0.1));
}

.auth-card-header--forgot {
    padding-top: 2.75rem;
}

.auth-icon-wrapper--forgot {
    background: linear-gradient(135deg, #d97706 0%, #b45309 55%, #1e40af 160%);
    box-shadow: 0 12px 36px rgba(217, 119, 6, 0.35);
    animation: auth-forgot-pulse 3.2s ease-in-out infinite;
}

@keyframes auth-forgot-pulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 12px 36px rgba(217, 119, 6, 0.32);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 16px 44px rgba(217, 119, 6, 0.42);
    }
}

.auth-title--forgot {
    font-size: clamp(1.65rem, 4vw, 2.05rem);
    color: #0f172a;
    letter-spacing: -0.03em;
}

.auth-subtitle--forgot {
    color: #475569;
    font-size: 1.02rem;
    line-height: 1.6;
}

.auth-trust-row--forgot {
    margin-top: 1.35rem;
}

.auth-trust-pill--forgot {
    background: rgba(255, 251, 235, 0.95);
    border-color: rgba(251, 191, 36, 0.35);
    color: #78350f;
}

.auth-trust-pill--forgot i {
    color: #d97706;
}

.auth-card-body--forgot {
    padding-top: 0.25rem;
}

.auth-label-icon--forgot {
    color: #d97706;
}

.auth-form-input--forgot {
    border-color: #cbd5e1;
    border-radius: 14px;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.auth-form-input--forgot:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

[dir='rtl'] .auth-input-wrapper:not(:has(.auth-toggle-password)) .auth-input-icon {
    right: auto;
    left: 1rem;
}

[dir='rtl'] .auth-input-wrapper:not(:has(.auth-toggle-password)) .auth-form-input {
    padding-right: 1rem;
    padding-left: 3rem;
}

.auth-submit-btn--forgot {
    border-radius: 14px;
    padding: 1.05rem 1rem;
    background: linear-gradient(135deg, #d97706 0%, #b45309 45%, #1d4ed8 130%);
    box-shadow: 0 6px 22px rgba(217, 119, 6, 0.38);
}

.auth-submit-btn--forgot:hover:not(:disabled) {
    box-shadow: 0 10px 28px rgba(217, 119, 6, 0.48);
}

.auth-footer--forgot {
    margin-top: 1.75rem;
}

.auth-link-btn--forgot {
    color: #b45309;
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(245, 158, 11, 0.28);
}

.auth-link-btn--forgot:hover {
    color: #fff;
    background: linear-gradient(135deg, #d97706 0%, #1d4ed8 120%);
    border-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
    .auth-forgot-aside__orb--1,
    .auth-forgot-aside__orb--2 {
        animation: none !important;
    }

    .auth-icon-wrapper--forgot {
        animation: none !important;
    }
}

/* Force white theme for auth pages across OS preferences */



/* ==========================================================================
   Modern Auth Redesign (login/register only)
   ========================================================================== */

.auth-page:not(.auth-page--forgot) .auth-page__bg {
    background:
        radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.26), transparent 44%),
        radial-gradient(circle at 82% 18%, rgba(14, 165, 233, 0.2), transparent 42%),
        radial-gradient(circle at 50% 92%, rgba(99, 102, 241, 0.18), transparent 46%),
        linear-gradient(145deg, #f8fbff 0%, #eef4ff 42%, #f7f9ff 100%);
    background-size: 140% 140%, 130% 130%, 140% 140%, 200% 200%;
    animation: auth-modern-bg-pan 14s ease-in-out infinite;
}

.auth-page:not(.auth-page--forgot) .auth-page__bg::before {
    width: min(460px, 62vw);
    height: min(460px, 62vw);
    top: -14%;
    right: -10%;
    background: rgba(79, 70, 229, 0.25);
    filter: blur(70px);
    animation: auth-modern-orb-1 15s ease-in-out infinite;
}

.auth-page:not(.auth-page--forgot) .auth-page__bg::after {
    width: min(360px, 52vw);
    height: min(360px, 52vw);
    bottom: -8%;
    left: -10%;
    background: rgba(14, 165, 233, 0.24);
    filter: blur(70px);
    animation: auth-modern-orb-2 17s ease-in-out infinite;
}

@keyframes auth-modern-bg-pan {
    0%,
    100% {
        background-position: 0% 0%, 0% 0%, 0% 0%, 0% 45%;
    }
    50% {
        background-position: 8% 6%, -8% 8%, 6% -6%, 100% 55%;
    }
}

@keyframes auth-modern-orb-1 {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(-16px, 20px, 0) scale(1.05);
    }
}

@keyframes auth-modern-orb-2 {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(16px, -14px, 0) scale(1.04);
    }
}

.auth-page:not(.auth-page--forgot) .auth-container {
    max-width: 520px;
}

.auth-page--register .auth-container--register {
    max-width: 720px;
}

.auth-page:not(.auth-page--forgot) .auth-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 26px 70px rgba(37, 99, 235, 0.18),
        0 10px 26px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.72) inset;
    animation: auth-modern-card-in 620ms cubic-bezier(.2, .8, .2, 1);
}

.auth-page:not(.auth-page--forgot) .auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(125deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.08) 55%, rgba(255, 255, 255, 0.18)),
        radial-gradient(circle at 18% -12%, rgba(99, 102, 241, 0.14), transparent 36%);
    mix-blend-mode: screen;
}

@keyframes auth-modern-card-in {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-page:not(.auth-page--forgot) .auth-card-header {
    padding: 2.7rem 2.1rem 1.85rem;
}

.auth-page:not(.auth-page--forgot) .auth-card-body {
    padding: 0 2.1rem 2.2rem;
}

.auth-page:not(.auth-page--forgot) .auth-brand-link {
    transition: transform 280ms ease;
}

.auth-page:not(.auth-page--forgot) .auth-brand-link:hover {
    transform: translateY(-2px);
}

.auth-page:not(.auth-page--forgot) .auth-icon-wrapper {
    width: 84px;
    height: 84px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.08) 50%),
        linear-gradient(135deg, #2563eb 0%, #4f46e5 56%, #7c3aed 100%);
    box-shadow:
        0 14px 32px rgba(79, 70, 229, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.22) inset;
    animation: auth-modern-icon-pulse 3.8s ease-in-out infinite;
}

@keyframes auth-modern-icon-pulse {
    0%,
    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 14px 32px rgba(79, 70, 229, 0.33), 0 0 0 1px rgba(255, 255, 255, 0.22) inset;
    }
    50% {
        transform: translateY(-3px) scale(1.03);
        box-shadow: 0 20px 38px rgba(79, 70, 229, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.24) inset;
    }
}

.auth-page:not(.auth-page--forgot) .auth-title {
    color: #0f172a;
    font-size: clamp(1.8rem, 2.9vw, 2.25rem);
    letter-spacing: -0.035em;
}

.auth-page:not(.auth-page--forgot) .auth-subtitle {
    color: #475569;
}

.auth-page:not(.auth-page--forgot) .auth-trust-pill {
    background: rgba(255, 255, 255, 0.56);
    border-color: rgba(148, 163, 184, 0.24);
    color: #334155;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.auth-page:not(.auth-page--forgot) .auth-form-label {
    color: #1e293b;
}

.auth-page:not(.auth-page--forgot) .auth-label-icon {
    color: #4f46e5;
}

.auth-page:not(.auth-page--forgot) .auth-form-input {
    border: 1px solid rgba(148, 163, 184, 0.42);
    background: rgba(255, 255, 255, 0.84);
    border-radius: 14px;
    transition:
        border-color 250ms ease,
        box-shadow 250ms ease,
        background-color 250ms ease,
        transform 250ms ease;
}

.auth-page:not(.auth-page--forgot) .auth-form-input:hover {
    border-color: rgba(99, 102, 241, 0.45);
}

.auth-page:not(.auth-page--forgot) .auth-form-input:focus {
    border-color: rgba(79, 70, 229, 0.88);
    box-shadow:
        0 0 0 4px rgba(79, 70, 229, 0.14),
        0 10px 22px rgba(79, 70, 229, 0.09);
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-1px);
}

.auth-page:not(.auth-page--forgot) .auth-input-icon {
    color: #94a3b8;
}

.auth-page:not(.auth-page--forgot) .auth-input-focused .auth-input-icon,
.auth-page:not(.auth-page--forgot) .auth-form-input:focus + .auth-input-icon {
    color: #4f46e5;
}

.auth-page:not(.auth-page--forgot) .auth-toggle-password {
    color: #94a3b8;
    border-radius: 10px;
}

.auth-page:not(.auth-page--forgot) .auth-toggle-password:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.08);
}

.auth-page:not(.auth-page--forgot) .auth-register-options {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
}

.auth-page:not(.auth-page--forgot) .auth-remember-me {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
}

.auth-page:not(.auth-page--forgot) .auth-remember-me__title {
    color: #1e293b;
}

.auth-page:not(.auth-page--forgot) .auth-remember-me__hint {
    color: #64748b;
}

.auth-page:not(.auth-page--forgot) .auth-remember-me__leading {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(79, 70, 229, 0.2));
    color: #4f46e5;
}

.auth-page:not(.auth-page--forgot) .auth-form-check .form-check-input {
    border-color: #94a3b8;
}

.auth-page:not(.auth-page--forgot) .auth-form-check .form-check-input:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.auth-page:not(.auth-page--forgot) .auth-form-check .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.2);
    border-color: #4f46e5;
}

.auth-page:not(.auth-page--forgot) .auth-submit-btn {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(130deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
    box-shadow:
        0 12px 24px rgba(79, 70, 229, 0.26),
        0 4px 10px rgba(37, 99, 235, 0.25);
    transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.auth-page:not(.auth-page--forgot) .auth-submit-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.3) 44%, transparent 68%);
    transform: translateX(-150%);
    transition: transform 620ms ease;
}

.auth-page:not(.auth-page--forgot) .auth-submit-btn:hover:not(:disabled)::before {
    transform: translateX(150%);
}

.auth-page:not(.auth-page--forgot) .auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow:
        0 18px 30px rgba(79, 70, 229, 0.32),
        0 7px 14px rgba(37, 99, 235, 0.24);
    filter: saturate(1.06);
}

.auth-page:not(.auth-page--forgot) .auth-submit-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.auth-page:not(.auth-page--forgot) .auth-link-btn {
    border-radius: 12px;
}

.auth-page:not(.auth-page--forgot) .auth-link-btn:hover {
    box-shadow: 0 10px 18px rgba(79, 70, 229, 0.24);
}

.auth-page:not(.auth-page--forgot) .auth-security-badge {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: #4338ca;
}

.auth-page:not(.auth-page--forgot) .auth-divider span {
    background: rgba(255, 255, 255, 0.75);
}

@media (max-width: 576px) {
    .auth-page:not(.auth-page--forgot) .auth-card {
        border-radius: 20px;
    }

    .auth-page:not(.auth-page--forgot) .auth-card-header {
        padding: 2.1rem 1.25rem 1.35rem;
    }

    .auth-page:not(.auth-page--forgot) .auth-card-body {
        padding: 0 1.25rem 1.6rem;
    }

    .auth-page:not(.auth-page--forgot) .auth-icon-wrapper {
        width: 74px;
        height: 74px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page:not(.auth-page--forgot) .auth-page__bg,
    .auth-page:not(.auth-page--forgot) .auth-page__bg::before,
    .auth-page:not(.auth-page--forgot) .auth-page__bg::after,
    .auth-page:not(.auth-page--forgot) .auth-card,
    .auth-page:not(.auth-page--forgot) .auth-icon-wrapper {
        animation: none !important;
    }

    .auth-page:not(.auth-page--forgot) .auth-submit-btn::before {
        transition: none;
    }
}
