/* auth page styles */

.page-auth .auth-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(186, 230, 253, 0.9);
    box-shadow: var(--shadow-sm);
}

.page-auth .form-inline-tight {
    gap: 8px;
    align-items: center;
}

.page-auth .dial-code-field {
    max-width: 90px;
    text-align: center;
    background: #f5f5f5;
}

/* Migrated from template/auth.html */
body.auth-merged-page {
            background:
                radial-gradient(circle at 12% 8%, rgba(var(--site-primary-rgb), 0.22), transparent 34%),
                radial-gradient(circle at 88% 0%, rgba(var(--site-secondary-rgb), 0.14), transparent 30%),
                radial-gradient(circle at 50% 100%, rgba(var(--site-highlight-rgb), 0.2), transparent 42%),
                linear-gradient(180deg, var(--site-accent) 0%, #f7f2eb 100%);
        }

        .auth-merged-main {
            min-height: calc(100vh - 240px);
            padding: 12px 0 72px;
        }

        .auth-stage {
            width: min(1060px, calc(100% - 32px));
            margin: 0 auto;
            position: relative;
            border-radius: 26px;
            overflow: hidden;
            background: rgba(255, 255, 255, 0.92);
            border: 1px solid rgba(213, 226, 240, 0.96);
            box-shadow: 0 26px 64px rgba(14, 41, 79, 0.14);
            min-height: 680px;
        }

        .forms-pane {
            width: 50%;
            min-height: 680px;
            position: relative;
            z-index: 2;
            background: rgba(255, 255, 255, 0.94);
            transition: transform 0.65s cubic-bezier(.22, .61, .36, 1);
        }

        .auth-stage.register-active .forms-pane {
            transform: translateX(100%);
        }

        .auth-form-panel {
            position: absolute;
            inset: 0;
            padding: 46px 56px 56px;
            transition: transform 0.65s cubic-bezier(.22, .61, .36, 1), opacity 0.42s ease, z-index 0s linear 0.32s;
        }

        .login-form-panel {
            opacity: 1;
            transform: translateX(0);
            z-index: 2;
            pointer-events: auto;
        }

        .register-form-panel {
            opacity: 0;
            transform: translateX(18%);
            z-index: 1;
            pointer-events: none;
        }

        .auth-stage.register-active .login-form-panel {
            opacity: 0;
            transform: translateX(-16%);
            z-index: 1;
            pointer-events: none;
        }

        .auth-stage.register-active .register-form-panel {
            opacity: 1;
            transform: translateX(0);
            z-index: 2;
            pointer-events: auto;
        }

        .auth-logo {
            height: 46px;
            width: auto;
            display: block;
            margin: 0 auto;
        }

        .auth-title {
            text-align: center;
            margin: 18px 0 0;
            font-size: clamp(1.6rem, 1.4rem + 0.7vw, 2rem);
            color: var(--heading-color);
            font-weight: 700;
            letter-spacing: -0.01em;
        }

        .auth-subtitle {
            text-align: center;
            margin-top: 8px;
            color: var(--text-light);
            font-size: 0.95rem;
        }

        .auth-form {
            margin-top: 10px;
        }

        .auth-form .form-group {
            margin-bottom: 16px;
        }

        .auth-form label {
            font-size: 0.9rem;
            font-weight: 700;
            color: var(--heading-color);
            margin-bottom: 8px;
        }

        .auth-form .form-control {
            height: 46px;
            line-height: 30px;
            border-radius: 12px;
            border: 1px solid rgba(199, 213, 229, 0.95);
            background: rgba(255, 255, 255, 0.98);
            color: var(--text-color);
            transition: border-color 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease;
        }

        .auth-form .form-control:focus {
            border-color: var(--site-primary);
            box-shadow: 0 0 0 3px rgba(31, 95, 169, 0.16);
            background: #fff;
        }

        .auth-form .dial-code-field {
            max-width: 92px;
            justify-content: center;
            display: inline-flex;
            align-items: center;
            background: rgba(237, 244, 252, 0.96);
            color: var(--heading-color);
            border-color: rgba(199, 213, 229, 0.95);
        }

        .password-field {
            position: relative;
        }

        .password-toggle {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            border: none;
            background: transparent;
            color: var(--text-light);
            font-size: 1rem;
            cursor: pointer;
            width: 30px;
            height: 30px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.2s ease, color 0.2s ease;
        }

        .password-toggle:hover {
            background: rgba(237, 244, 252, 0.96);
            color: var(--primary-hover);
        }

        .input-hint {
            display: block;
            margin-top: 6px;
            color: var(--text-light);
            font-size: 0.82rem;
        }

        .auth-submit-btn {
            margin-top: 10px;
            margin-bottom: 60px;
            height: 46px;
            border-radius: 12px;
            font-size: 0.96rem;
            font-weight: 700;
        }

        .agree-row {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-size: 0.9rem;
            color: var(--text-light);
            line-height: 1.45;
        }

        .agree-row input {
            margin-top: 3px;
        }

        .agree-row a {
            color: var(--primary-color);
            font-weight: 700;
        }

        .forgot-link {
            display: inline-flex;
            margin-top: 2px;
            color: var(--text-light);
            font-size: 0.86rem;
            text-decoration: none;
        }

        .forgot-link:hover {
            color: var(--primary-color);
        }

        .overlay-pane {
            position: absolute;
            top: 0;
            right: 0;
            width: 50%;
            height: 100%;
            z-index: 4;
            transition: transform 0.65s cubic-bezier(.22, .61, .36, 1);
            background:
                radial-gradient(circle at 82% 18%, rgba(var(--site-primary-rgb), 0.24), transparent 38%),
                radial-gradient(circle at 14% 85%, rgba(255, 255, 255, 0.1), transparent 40%),
                linear-gradient(145deg, #0b0f17 0%, #171717 52%, var(--site-primary) 100%);
            color: #edf4fc;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 44px;
        }

        .auth-stage.register-active .overlay-pane {
            transform: translateX(-100%);
        }

        .overlay-copy {
            width: 100%;
            max-width: 360px;
            text-align: center;
            transition: opacity 0.42s ease, transform 0.5s ease;
        }

        .overlay-copy h3 {
            font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
            margin-bottom: 12px;
            color: #ffffff;
        }

        .overlay-copy p {
            color: rgba(237, 244, 252, 0.88);
            line-height: 1.65;
            font-size: 0.95rem;
            margin-bottom: 26px;
        }

        .overlay-btn {
            min-width: 168px;
            border: 1px solid rgba(220, 233, 249, 0.55);
            color: #ffffff;
            background: transparent;
            border-radius: 999px;
            height: 42px;
            font-weight: 700;
            transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.2s ease;
        }

        .overlay-btn:hover {
            background: rgba(237, 244, 252, 0.14);
            border-color: rgba(220, 233, 249, 0.82);
            transform: translateY(-1px);
        }

        .overlay-login {
            position: absolute;
            opacity: 1;
            transform: translateX(0);
            pointer-events: auto;
        }

        .overlay-register {
            position: absolute;
            opacity: 0;
            transform: translateX(24px);
            pointer-events: none;
        }

        .auth-stage.register-active .overlay-login {
            opacity: 0;
            transform: translateX(-24px);
            pointer-events: none;
        }

        .auth-stage.register-active .overlay-register {
            opacity: 1;
            transform: translateX(0);
            pointer-events: auto;
        }

        @media (max-width: 980px) {
            .auth-stage {
                min-height: unset;
                display: block;
                border-radius: 20px;
            }

            .forms-pane {
                width: 100%;
                min-height: 0;
                transform: none !important;
            }

            .auth-form-panel {
                position: relative;
                inset: auto;
                padding: 30px 22px 26px;
                transform: none;
                max-height: 0;
                opacity: 0;
                overflow: hidden;
                pointer-events: none;
                transition: max-height 0.5s ease, opacity 0.35s ease, padding 0.45s ease;
            }

            .auth-stage:not(.register-active) .login-form-panel,
            .auth-stage.register-active .register-form-panel {
                max-height: 1600px;
                opacity: 1;
                pointer-events: auto;
            }

            .auth-stage:not(.register-active) .register-form-panel,
            .auth-stage.register-active .login-form-panel {
                max-height: 0;
                opacity: 0;
                pointer-events: none;
                padding-top: 0;
                padding-bottom: 0;
            }

            .overlay-pane {
                position: relative;
                width: 100%;
                right: auto;
                top: auto;
                min-height: 250px;
                transform: none !important;
                border-top: 1px solid rgba(213, 226, 240, 0.72);
                border-radius: 0;
                padding: 30px 22px;
            }

            .overlay-copy {
                max-width: 100%;
            }

            .overlay-copy p {
                margin-bottom: 20px;
            }
        }


