/* copied from the old client portal's sign-in page (index.php), unchanged */

        @font-face {
            font-family: 'Lato';
            src: url('../fonts/Lato/Lato-Regular.ttf') format('truetype');
            font-weight: 400;
            font-style: normal;
            font-display: swap;
        }

        @font-face {
            font-family: 'Lato';
            src: url('../fonts/Lato/Lato-Bold.ttf') format('truetype');
            font-weight: 700;
            font-style: normal;
            font-display: swap;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
            background: linear-gradient(135deg, #955425 0%, #640d2c 20%, #320c3b 40%, #13355c 60%, #22968f 80%, #071429 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            position: relative;
            overflow: hidden;
        }

        body.has-custom-login-bg::before {
            content: "";
            position: fixed;
            inset: 0;
            background-image: url('../img/background.jpg');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            transform: scale(1.06);
            opacity: 0;
            animation: loginBgFadeIn 700ms ease-out forwards;
            filter: blur(5px);   /* Perfex options alr_client_login_bg_blur_enabled = 1, amount 5 */
            z-index: 0;
        }

        body.has-custom-login-bg::after {
            content: "";
            position: fixed;
            inset: 0;
            background: rgba(25, 14, 10, 0.35);
            z-index: 0;
        }

        @keyframes loginBgFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

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

        .login-container {
            background: rgba(255, 255, 255, 0.72);
            border-radius: 12px;
            box-shadow: 0 14px 44px rgba(0,0,0,0.24);
            border: none;
            backdrop-filter: blur(14px) saturate(120%);
            -webkit-backdrop-filter: blur(14px) saturate(120%);
            max-width: 450px;
            width: 100%;
            overflow: hidden;
            position: relative;
            z-index: 1;
            opacity: 0;
            transform: translateY(10px);
            animation: loginCardFadeIn 500ms ease-out 300ms forwards;
        }

        .login-container::before {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0.08));
            pointer-events: none;
            z-index: 0;
        }

        .login-header {
            background: linear-gradient(135deg, #955425 0%, #640d2c 20%, #320c3b 40%, #13355c 60%, #22968f 80%, #071429 100%);
            color: white;
            padding: 30px;
            text-align: center;
            position: relative;
            z-index: 1;
        }

        .login-header h1 {
            margin-bottom: 8px;
        }

        .login-logo {
            display: block;
            width: min(240px, 100%);
            height: auto;
            margin: 0 auto;
            filter: brightness(0) invert(1);
        }

        .login-header p {
            font-size: 14px;
            opacity: 0.9;
        }

        .login-body {
            padding: 28px 24px;
            position: relative;
            z-index: 1;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group input {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            font-size: 15px;
            transition: border-color 0.3s ease;
        }

        .form-group input:focus {
            outline: none;
            border-color: #955425;
        }

        .alert {
            padding: 12px 15px;
            border-radius: 6px;
            margin-bottom: 20px;
            font-size: 14px;
        }

        .alert-danger {
            background: #fee;
            color: #c33;
            border: 1px solid #fcc;
        }

        .alert-success {
            background: #dfd;
            color: #2f7a2f;
            border: 1px solid #cfc;
        }

        .btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #955425 0%, #640d2c 35%, #13355c 70%, #071429 100%);
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn:hover {
            filter: brightness(1.1);
            box-shadow: 0 4px 12px rgba(149, 84, 37, 0.4);
        }

        .helper-links {
            display: flex;
            justify-content: center;
            margin-top: 18px;
            font-size: 14px;
            gap: 12px;
            flex-wrap: wrap;
        }

        .helper-links a {
            color: #955425;
            text-decoration: none;
            font-weight: 600;
        }

        .helper-links a:hover {
            text-decoration: underline;
        }

        .helper-links button.link-button {
            background: none;
            border: 0;
            color: #13355c;
            font-weight: 600;
            cursor: pointer;
            text-decoration: underline;
            padding: 0;
        }

        .auth-email-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: rgba(19, 53, 92, 0.08);
            color: #0f2947;
            border: 1px solid rgba(19, 53, 92, 0.15);
            border-radius: 999px;
            padding: 7px 12px;
            font-size: 13px;
            margin-bottom: 12px;
        }

        .welcome-heading {
            margin: 0 0 14px 0;
            text-align: center;
            font-size: 20px;
            font-weight: 700;
            color: #13355c;
        }

        .auth-viewport {
            overflow: visible;
        }

        .auth-track {
            display: block;
            width: 100%;
        }

        .auth-panel {
            width: 100%;
            display: none;
            padding: 2px;
        }

        .auth-panel.is-active {
            display: block;
        }

        .auth-panel.is-active.dir-forward {
            animation: authPanelSlideInForward 220ms ease;
        }

        .auth-panel.is-active.dir-backward {
            animation: authPanelSlideInBackward 220ms ease;
        }

        @keyframes authPanelSlideInForward {
            from {
                opacity: 0;
                transform: translateX(12px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes authPanelSlideInBackward {
            from {
                opacity: 0;
                transform: translateX(-12px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .step-links {
            margin-top: 10px;
            justify-content: space-between;
            align-items: center;
            width: 100%;
        }

        .step-back {
            background: none;
            border: 0;
            color: #955425;
            font-weight: 600;
            cursor: pointer;
            padding: 0;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 22px;
            line-height: 1;
            padding: 4px 6px;
        }

        .step-back:hover {
            text-decoration: underline;
        }

        .visually-hidden {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            border: 0;
            white-space: nowrap;
        }

        .turnstile-wrap {
            margin: 0 0 18px;
            display: flex;
            justify-content: center;
        }
    