:root {
            color-scheme: light;
            --blue: #2467eb;
            --blue-dark: #0d2458;
            --cyan: #24c5dc;
            --muted: #5b6d8d;
            --line: #c8dcf8;
            --surface: #fff;
            --shadow: 0 22px 54px rgba(33, 82, 154, .13);
        }

        * { box-sizing: border-box; }
        html { min-height: 100%; background: #edf6ff; }
        body {
            min-height: 100vh;
            min-height: 100dvh;
            margin: 0;
            overflow-x: hidden;
            background:
                radial-gradient(circle at 93% 3%, rgba(44, 170, 255, .34), transparent 28rem),
                radial-gradient(circle at 3% 96%, rgba(58, 166, 255, .28), transparent 24rem),
                linear-gradient(145deg, #f8fbff 0%, #eef6ff 47%, #f3f7ff 100%);
            color: var(--blue-dark);
            font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
        }

        button, input { font: inherit; }

        .page {
            width: min(780px, calc(100% - 28px));
            min-height: 100vh;
            min-height: 100dvh;
            margin: 0 auto;
            padding: clamp(18px, 4vh, 42px) 0;
        }

        .topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            min-height: 92px;
            gap: 18px;
            border: 1px solid var(--line);
            border-radius: 26px;
            background: rgba(255, 255, 255, .96);
            padding: 16px 22px;
            box-shadow: var(--shadow);
        }

        .brand {
            display: flex;
            min-width: 0;
            align-items: center;
            gap: 15px;
        }

        .brand-logo {
            display: grid;
            place-items: center;
            flex: 0 0 58px;
            width: 58px;
            height: 58px;
            overflow: hidden;
            border: 1px solid #d3e3f7;
            border-radius: 17px;
            background: #fff;
        }

        .brand-logo img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .brand-copy { min-width: 0; }

        .brand-copy strong,
        .brand-copy span {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .brand-copy strong {
            color: #0b1735;
            font-size: 16px;
            line-height: 1.15;
            letter-spacing: -.025em;
        }

        .brand-copy span {
            margin-top: 4px;
            color: var(--muted);
            font-size: 14px;
            font-weight: 600;
        }

        .secure-badge {
            display: grid;
            place-items: center;
            flex: 0 0 54px;
            width: 54px;
            height: 54px;
            border: 1px solid #a9caf5;
            border-radius: 17px;
            color: var(--blue);
            background: #f8fbff;
        }

        .secure-badge svg { width: 28px; height: 28px; }

        .welcome {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(190px, .48fr);
            align-items: center;
            gap: 18px;
            min-height: 250px;
            padding: 32px 14px 25px;
        }

        .eyebrow {
            margin: 0 0 14px;
            color: var(--blue);
            font-size: 12px;
            font-weight: 900;
            letter-spacing: .11em;
            text-transform: uppercase;
        }

        .welcome h1 {
            margin: 0;
            color: #081331;
            font-size: clamp(42px, 7vw, 58px);
            line-height: .98;
            letter-spacing: -.055em;
        }

        .welcome-copy {
            max-width: 500px;
            margin: 18px 0 0;
            color: var(--muted);
            font-size: 16px;
            line-height: 1.55;
        }

        .welcome-art {
            position: relative;
            display: grid;
            place-items: center;
            align-self: stretch;
            min-height: 205px;
        }

        .welcome-art::before {
            content: "";
            position: absolute;
            width: min(205px, 100%);
            aspect-ratio: 1;
            border-radius: 50%;
            background: linear-gradient(145deg, rgba(221, 238, 255, .88), rgba(238, 247, 255, .3));
            filter: drop-shadow(0 18px 30px rgba(37, 99, 235, .08));
        }

        .welcome-art img {
            position: relative;
            z-index: 1;
            display: block;
            width: min(230px, 120%);
            height: auto;
            filter: drop-shadow(0 16px 20px rgba(20, 72, 153, .16));
        }

        .login-card {
            border: 1px solid var(--line);
            border-radius: 28px;
            background: rgba(255, 255, 255, .97);
            padding: 30px 34px;
            box-shadow: var(--shadow);
        }

        .field label {
            display: block;
            margin-bottom: 9px;
            color: #0b1735;
            font-size: 16px;
            font-weight: 850;
        }

        .input-wrap { position: relative; }

        .input-wrap svg {
            position: absolute;
            top: 50%;
            left: 19px;
            width: 25px;
            height: 25px;
            color: var(--blue);
            transform: translateY(-50%);
            pointer-events: none;
        }

        .field input {
            width: 100%;
            height: 64px;
            border: 1px solid #b8cdeb;
            border-radius: 16px;
            background: #fff;
            padding: 0 18px 0 58px;
            color: #0b1735;
            font-size: 16px;
            font-weight: 750;
            outline: none;
            transition: border-color .16s ease, box-shadow .16s ease;
        }

        .field input::placeholder { color: #8792a7; }

        .field input:focus {
            border-color: var(--blue);
            box-shadow: 0 0 0 4px rgba(36, 103, 235, .13);
        }

        .field input[aria-invalid="true"] {
            border-color: #e5484d;
            box-shadow: 0 0 0 4px rgba(229, 72, 77, .1);
        }

        .error {
            margin: 8px 2px 0;
            color: #bd272d;
            font-size: 12px;
            font-weight: 750;
        }

        .account-alert {
            display: grid;
            grid-template-columns: 38px minmax(0, 1fr);
            align-items: center;
            gap: 12px;
            margin: 0 0 18px;
            border: 1px solid #f2b8bb;
            border-radius: 15px;
            background: #fff4f4;
            padding: 13px 15px;
            color: #9f1f25;
        }

        .account-alert svg { width: 30px; height: 30px; }
        .account-alert strong { display: block; font-size: 14px; }
        .account-alert span { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; }

        .primary-button,
        .secondary-button {
            display: flex;
            width: 100%;
            min-height: 56px;
            align-items: center;
            justify-content: center;
            border-radius: 15px;
            padding: 0 20px;
            font-weight: 850;
            text-decoration: none;
            transition: transform .16s ease, box-shadow .16s ease;
        }

        .primary-button {
            gap: 12px;
            margin-top: 20px;
            border: 0;
            background: linear-gradient(110deg, #2862ed 0%, #1686ed 54%, #28c9dd 100%);
            color: #fff;
            box-shadow: 0 12px 24px rgba(28, 118, 230, .22);
            cursor: pointer;
        }

        .primary-button svg { width: 22px; height: 22px; }

        .secondary-button {
            margin-top: 14px;
            border: 2px solid var(--blue);
            background: #fff;
            color: var(--blue);
        }

        .primary-button:hover,
        .secondary-button:hover {
            transform: translateY(-1px);
            box-shadow: 0 12px 24px rgba(28, 118, 230, .17);
        }

        .primary-button:focus-visible,
        .secondary-button:focus-visible {
            outline: 3px solid rgba(36, 103, 235, .25);
            outline-offset: 3px;
        }

        .privacy {
            display: grid;
            grid-template-columns: 34px minmax(0, 1fr);
            align-items: center;
            gap: 12px;
            margin-top: 18px;
            border-radius: 14px;
            background: linear-gradient(110deg, #f2f7ff, #edf5ff);
            padding: 13px 16px;
            color: #4f6387;
            font-size: 12px;
            line-height: 1.45;
        }

        .privacy svg { width: 32px; height: 32px; color: var(--blue); }

        @media (max-width: 640px) {
            .page {
                width: min(100% - 20px, 780px);
                padding: 10px 0 16px;
            }

            .topbar {
                min-height: 72px;
                border-radius: 20px;
                padding: 10px 13px;
            }

            .brand { gap: 10px; }
            .brand-logo { flex-basis: 46px; width: 46px; height: 46px; border-radius: 14px; }
            .brand-copy strong { font-size: 16px; }
            .brand-copy span { margin-top: 2px; font-size: 12px; }
            .secure-badge { flex-basis: 44px; width: 44px; height: 44px; border-radius: 14px; }
            .secure-badge svg { width: 24px; height: 24px; }

            .welcome {
                grid-template-columns: minmax(0, 1fr) 108px;
                min-height: 190px;
                gap: 4px;
                padding: 24px 7px 17px;
            }

            .eyebrow { margin-bottom: 9px; font-size: 11px; }
            .welcome h1 { font-size: clamp(30px, 8.3vw, 34px); white-space: nowrap; }
            .welcome-copy { margin-top: 12px; font-size: 12px; line-height: 1.5; }
            .welcome-art { min-height: 145px; }
            .welcome-art::before { width: min(145px, 100%); }
            .welcome-art img { width: min(138px, 128%); }

            .login-card {
                border-radius: 20px;
                padding: 20px 18px;
            }

            .field label { margin-bottom: 7px; font-size: 14px; }
            .field input { height: 56px; border-radius: 13px; padding-left: 50px; font-size: 14px; }
            .input-wrap svg { left: 16px; width: 22px; height: 22px; }
            .primary-button, .secondary-button { min-height: 50px; border-radius: 13px; font-size: 14px; }
            .primary-button { margin-top: 16px; }
            .secondary-button { margin-top: 11px; }
            .privacy { grid-template-columns: 28px minmax(0, 1fr); gap: 9px; margin-top: 14px; padding: 11px 12px; font-size: 11px; }
            .privacy svg { width: 27px; height: 27px; }
        }

        @media (max-width: 370px) {
            .welcome { grid-template-columns: minmax(0, 1fr) 94px; }
            .welcome h1 { font-size: 16px; }
            .welcome-copy { font-size: 12px; }
            .welcome-art img { width: 130px; }
        }

        @media (prefers-reduced-motion: reduce) {
            .primary-button, .secondary-button { transition: none; }
        }
