:root {
            --brand: #4f46e5;
            --brand-dark: #3730a3;
            --ink: #172033;
            --muted: #758198;
            --line: #e4e9f3;
        }

        * { box-sizing: border-box; }

        html, body { min-height: 100%; }

        body.login-page {
            margin: 0;
            min-height: 100vh;
            padding: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow-x: hidden;
            font-family: "Source Sans 3", sans-serif;
            color: var(--ink);
            background:
                radial-gradient(circle at 12% 8%, rgba(99,102,241,.14), transparent 28%),
                radial-gradient(circle at 92% 90%, rgba(56,189,248,.14), transparent 30%),
                #f5f7fc;
        }

        .auth-shell {
            width: min(1120px, 100%);
            min-height: 650px;
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(390px, .88fr);
            overflow: hidden;
            border: 1px solid rgba(255,255,255,.85);
            border-radius: 30px;
            background: rgba(255,255,255,.82);
            box-shadow: 0 30px 90px rgba(35, 49, 90, .13);
            position: relative;
            z-index: 1;
            backdrop-filter: blur(18px);
        }

        /* Left branding panel */
        .brand-panel {
            position: relative;
            isolation: isolate;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 44px 48px 34px;
            color: #fff;
            background: linear-gradient(145deg, #242a72 0%, #4338ca 48%, #6d5dfc 100%);
        }

        .brand-panel {
            background-size: 180% 180%;
            animation: brandGradient 14s ease-in-out infinite;
        }

        @keyframes brandGradient {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        .flowchart-art {
            position: absolute;
            inset: 0;
            z-index: -1;
            overflow: hidden;
            opacity: .56;
            pointer-events: none;
        }

        .flow-node {
            position: absolute;
            width: 42px;
            height: 42px;
            display: grid;
            place-items: center;
            border: 1px solid rgba(255,255,255,.30);
            border-radius: 13px;
            color: rgba(255,255,255,.92);
            background: rgba(255,255,255,.10);
            box-shadow: 0 8px 25px rgba(15,23,42,.10);
            backdrop-filter: blur(5px);
            animation: nodeFloat 7s ease-in-out infinite;
        }

        .node-one { right: 12%; top: 23%; }
        .node-two { right: 26%; top: 39%; animation-delay: -2s; }
        .node-three { right: 8%; top: 53%; animation-delay: -4s; }

        .flow-line {
            position: absolute;
            height: 1px;
            transform-origin: left center;
            background: rgba(255,255,255,.30);
        }

        .line-one { width: 125px; right: 12%; top: 30%; transform: rotate(135deg); }
        .line-two { width: 110px; right: 17%; top: 46%; transform: rotate(24deg); }
        .line-three { width: 145px; right: -1%; top: 60%; transform: rotate(-55deg); }

        @keyframes nodeFloat {
            0%, 100% { translate: 0 0; }
            50% { translate: 0 -8px; }
        }

        .brand-panel::before,
        .brand-panel::after {
            content: "";
            position: absolute;
            z-index: -1;
            border-radius: 50%;
            pointer-events: none;
        }

        .brand-panel::before {
            width: 440px;
            height: 440px;
            right: -210px;
            top: -160px;
            border: 1px solid rgba(255,255,255,.17);
            box-shadow: 0 0 0 42px rgba(255,255,255,.035),
                        0 0 0 86px rgba(255,255,255,.025);
        }

        .brand-panel::after {
            width: 330px;
            height: 330px;
            left: -190px;
            bottom: -190px;
            background: rgba(147,197,253,.13);
        }

        .brand-topline {
            display: flex;
            align-items: center;
            gap: 12px;
            color: rgba(255,255,255,.82);
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 2px;
            text-transform: uppercase;
        }

        .brand-topline .brand-mark {
            width: 34px;
            height: 34px;
            display: grid;
            place-items: center;
            border: 1px solid rgba(255,255,255,.25);
            border-radius: 11px;
            background: rgba(255,255,255,.12);
            font-size: 17px;
        }

        .brand-hero {
            max-width: 480px;
            padding: 38px 0 50px;
        }

        .logo-wrap {
            width: 225px;
            min-height: 130px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 13px 20px;
            margin-bottom: 30px;
            border: 1px solid rgba(255,255,255,.26);
            border-radius: 22px;
            background: rgba(255,255,255,.96);
            box-shadow: 0 16px 38px rgba(15,23,42,.15);
        }

        .brand-logo {
            display: block;
            width: 100%;
            max-height: 115px;
            object-fit: contain;
        }

        .brand-eyebrow {
            margin: 0 0 12px;
            color: #c7d2fe;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 2.2px;
            text-transform: uppercase;
        }

        .brand-heading {
            max-width: 460px;
            margin: 0 0 16px;
            color: #fff;
            font-size: clamp(34px, 3.6vw, 48px);
            font-weight: 700;
            line-height: 1.08;
            letter-spacing: -.8px;
        }

        .brand-description {
            max-width: 390px;
            margin: 0;
            color: rgba(255,255,255,.78);
            font-size: 16px;
            line-height: 1.7;
        }

        .brand-features {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 28px;
        }

        .feature-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 9px 12px;
            border: 1px solid rgba(255,255,255,.18);
            border-radius: 999px;
            color: rgba(255,255,255,.9);
            background: rgba(255,255,255,.09);
            font-size: 12px;
            font-weight: 600;
        }

        .feature-pill i { color: #a5f3fc; }

        .brand-bottom {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            color: rgba(255,255,255,.65);
            font-size: 12px;
        }

        .secure-label {
            display: inline-flex;
            align-items: center;
            gap: 7px;
        }

        .secure-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #86efac;
            box-shadow: 0 0 0 4px rgba(134,239,172,.12);
        }

        /* Right login panel */
        .form-panel {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 50px clamp(28px, 5vw, 64px);
            background: rgba(255,255,255,.9);
        }

        .form-inner {
            width: 100%;
            max-width: 380px;
        }

        .mobile-brand {
            display: none;
            text-align: center;
            margin-bottom: 28px;
        }

        .mobile-brand img {
            width: 145px;
            height: 86px;
            object-fit: contain;
        }

        .form-kicker {
            margin: 0 0 8px;
            color: var(--brand);
            font-size: 12px;
            font-weight: 800;
            letter-spacing: 1.8px;
            text-transform: uppercase;
        }

        .form-heading {
            margin: 0;
            color: var(--ink);
            font-size: 31px;
            font-weight: 700;
            line-height: 1.2;
            letter-spacing: -.5px;
        }

        .form-subtitle {
            margin: 10px 0 30px;
            color: var(--muted);
            font-size: 15px;
            line-height: 1.6;
        }

        .alert {
            border: 0;
            border-radius: 12px;
            padding: 12px 14px;
            font-size: 14px;
        }

        .field-block { margin-bottom: 20px; }

        .form-label {
            display: block;
            margin-bottom: 8px;
            color: #344054;
            font-size: 13px;
            font-weight: 700;
        }

        .field-shell {
            height: 54px;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 0 15px;
            border: 1px solid var(--line);
            border-radius: 13px;
            background: #fbfcff;
            transition: border-color .2s, box-shadow .2s, background .2s;
        }

        .field-shell:focus-within {
            border-color: #818cf8;
            background: #fff;
            box-shadow: 0 0 0 4px rgba(99,102,241,.10);
        }

        .field-icon {
            flex: 0 0 auto;
            color: #7c88a2;
            font-size: 18px;
        }

        .login-input {
            width: 100%;
            min-width: 0;
            height: 100%;
            padding: 0;
            border: 0;
            outline: 0;
            background: transparent;
            color: #1f2937;
            font-family: inherit;
            font-size: 14px;
            box-shadow: none !important;
        }

        .login-input::placeholder { color: #a0aabd; }

        .password-toggle {
            flex: 0 0 auto;
            width: 32px;
            height: 36px;
            display: grid;
            place-items: center;
            padding: 0;
            border: 0;
            border-radius: 8px;
            color: #7c88a2;
            background: transparent;
            cursor: pointer;
            font-size: 18px;
        }

        .password-toggle:hover {
            color: var(--brand);
            background: #eef2ff;
        }

        .password-toggle:focus-visible {
            outline: 2px solid #818cf8;
            outline-offset: 1px;
        }

        .form-options {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin: 2px 0 25px;
        }

        .remember-label {
            display: inline-flex;
            align-items: center;
            gap: 9px;
            color: #667085;
            font-size: 13px;
            cursor: pointer;
        }

        .remember-label input {
            width: 16px;
            height: 16px;
            margin: 0;
            accent-color: var(--brand);
        }

        .signin-btn {
            width: 100%;
            min-height: 54px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            border: 0;
            border-radius: 13px;
            color: #fff;
            background: linear-gradient(110deg, #625cf6 0%, #4338ca 100%);
            box-shadow: 0 12px 24px rgba(79,70,229,.23);
            font-family: inherit;
            font-size: 15px;
            font-weight: 700;
            transition: transform .2s, box-shadow .2s, filter .2s;
        }

        .signin-btn:hover {
            color: #fff;
            filter: brightness(1.04);
            transform: translateY(-1px);
            box-shadow: 0 15px 28px rgba(79,70,229,.28);
        }

        .signin-btn:active { transform: translateY(0); }

        .signin-btn:disabled {
            cursor: wait;
            opacity: .82;
            transform: none;
        }

        .signin-btn .spinner-border {
            width: 17px;
            height: 17px;
            border-width: 2px;
        }

        .field-shell.field-invalid {
            border-color: #ef4444;
            background: #fffafa;
            box-shadow: 0 0 0 3px rgba(239,68,68,.08);
        }

        .field-error {
            margin-top: 6px;
            color: #dc2626;
            font-size: 12px;
            line-height: 1.4;
        }

        .signin-btn i {
            font-size: 17px;
            transition: transform .2s;
        }

        .signin-btn:hover i { transform: translateX(3px); }

        .form-help {
            margin-top: 22px;
            text-align: center;
            color: var(--muted);
            font-size: 13px;
        }

        .form-help a {
            color: var(--brand);
            font-weight: 700;
            text-decoration: none;
        }

        .form-help a:hover { text-decoration: underline; }

        .form-footer {
            margin-top: 35px;
            color: #98a2b3;
            font-size: 11px;
            text-align: center;
        }

        @media (max-width: 900px) {
            body.login-page { padding: 18px; }

            .auth-shell {
                max-width: 520px;
                min-height: auto;
                grid-template-columns: 1fr;
                border-radius: 25px;
            }

            .brand-panel { display: none; }

            .form-panel { padding: 38px 30px; }

            .mobile-brand { display: block; }

            .form-heading { font-size: 29px; }

            .form-subtitle { margin-bottom: 26px; }

            .form-footer { margin-top: 27px; }
        }

        @media (max-width: 480px) {
            body.login-page { padding: 12px; }

            .auth-shell { border-radius: 20px; }

            .form-panel { padding: 28px 21px; }

            .mobile-brand { margin-bottom: 22px; }

            .mobile-brand img {
                width: 135px;
                height: 78px;
            }

            .form-heading { font-size: 26px; }

            .form-subtitle { font-size: 14px; }

            .field-shell { height: 51px; }

            .signin-btn { min-height: 51px; }
        }

        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation: none !important;
                transition: none !important;
                scroll-behavior: auto !important;
            }
        }
