:root {
    color: #101828;
    background: #eef4ff;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(100, 116, 255, .2), transparent 34rem),
        radial-gradient(circle at 88% 80%, rgba(22, 187, 155, .14), transparent 30rem),
        #f7f9fc;
}

.identity-shell {
    width: min(1060px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
    align-items: center;
    gap: 88px;
    padding: 56px 0;
}

.brand-mark {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    margin-bottom: 28px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(145deg, #5b5ce2, #3078f0 60%, #12a594);
    box-shadow: 0 16px 42px rgba(48, 90, 210, .28);
    font-size: 27px;
    font-weight: 800;
}

.eyebrow {
    margin: 0 0 10px;
    color: #4d62ca;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
}

.identity-intro h1 {
    max-width: 620px;
    margin: 0;
    font-size: clamp(42px, 5vw, 66px);
    line-height: 1.05;
    letter-spacing: -.045em;
}

.intro-copy {
    max-width: 550px;
    margin: 24px 0 28px;
    color: #475467;
    font-size: 18px;
    line-height: 1.7;
}

.trust-list { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-list span {
    padding: 8px 12px;
    border: 1px solid rgba(71, 84, 103, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .64);
    color: #344054;
    font-size: 12px;
    font-weight: 700;
}

.login-card {
    position: relative;
    overflow: hidden;
    padding: 36px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 28px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 30px 80px rgba(16, 24, 40, .14);
    backdrop-filter: blur(18px);
}

.login-card h2 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.client-context { min-height: 24px; margin: 8px 0 24px; color: #667085; font-size: 14px; }

.qr-mode-trigger {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 76px;
    height: 76px;
    padding: 35px 7px 7px 35px;
    border: 0;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    color: #fff;
    background: linear-gradient(145deg, #6568e8, #3f54ce);
    filter: drop-shadow(-8px -8px 18px rgba(79, 86, 217, .18));
    transition: width .15s, height .15s, filter .15s;
}
.qr-mode-trigger:hover {
    width: 82px;
    height: 82px;
    filter: drop-shadow(-10px -10px 22px rgba(79, 86, 217, .26));
}
.qr-mode-trigger:focus-visible {
    outline: 3px solid rgba(79, 86, 217, .35);
    outline-offset: -3px;
}
.qr-mode-trigger svg { width: 29px; height: 29px; fill: currentColor; }
.qr-mode-trigger[hidden] { display: none; }

.password-mode-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    margin: -8px 0 20px -6px;
    padding: 4px 6px;
    border: 0;
    border-radius: 8px;
    color: #667085;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
}
.password-mode-trigger:hover { color: #4149c7; background: #f2f4ff; }
.password-mode-trigger:focus-visible { outline: 3px solid rgba(91, 92, 226, .18); }
.password-mode-trigger svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.password-mode-trigger[hidden] { display: none; }

.notice {
    margin-bottom: 18px;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}
.notice-error { background: #fff1f0; color: #a93226; }
.notice-success { background: #ecfdf3; color: #067647; }

.password-form { display: grid; gap: 10px; }
.password-form label { color: #344054; font-size: 13px; font-weight: 700; }
.password-form input {
    width: 100%;
    height: 48px;
    margin-bottom: 5px;
    padding: 0 14px;
    border: 1px solid #d0d5dd;
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: #101828;
    font-size: 15px;
    transition: border-color .15s, box-shadow .15s;
}
.password-form input:focus { border-color: #5b5ce2; box-shadow: 0 0 0 4px rgba(91, 92, 226, .12); }

button { font: inherit; cursor: pointer; }
.primary-action, .secondary-action {
    height: 48px;
    border-radius: 11px;
    font-weight: 750;
}
.primary-action { border: 0; color: #fff; background: #4f56d9; box-shadow: 0 10px 24px rgba(79, 86, 217, .24); }
.primary-action:hover { background: #4149c7; }
.primary-action[aria-disabled="true"] { pointer-events: none; cursor: progress; opacity: .84; }
.secondary-action { width: 100%; border: 1px solid #d0d5dd; color: #344054; background: #fff; }

#password-login-section {
    display: grid;
}
.password-login-form-region,
.login-progress {
    grid-area: 1 / 1;
}
#password-login-section[data-state="submitting"] .password-login-form-region {
    visibility: hidden;
    pointer-events: none;
}
.login-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    text-align: center;
}
.login-progress[hidden] { display: none; }
.login-progress-spinner {
    width: 38px;
    height: 38px;
    margin-bottom: 18px;
    border: 3px solid #e4e7ec;
    border-top-color: #4f56d9;
    border-radius: 50%;
    animation: login-progress-spin .8s linear infinite;
}
.login-progress strong { color: #101828; font-size: 18px; }
.login-progress p { margin: 8px 0 0; color: #667085; font-size: 13px; line-height: 1.6; }

@keyframes login-progress-spin { to { transform: rotate(360deg); } }

#password-login-section[hidden], #qr-login-section[hidden] { display: none; }

.qr-panel { min-height: 248px; text-align: center; }
.qr-frame {
    width: 212px;
    height: 212px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border: 1px solid #eaecf0;
    border-radius: 24px;
    background: linear-gradient(180deg, #fff, #f8faff);
    box-shadow: 0 14px 34px rgba(52, 64, 84, .08);
}
.qr-placeholder, .qr-image {
    width: 188px;
    height: 188px;
    grid-area: 1 / 1;
    border-radius: 16px;
}
.qr-placeholder { display: grid; place-items: center; padding: 24px; background: #f8fafc; color: #98a2b3; font-size: 13px; }
.qr-placeholder[hidden], .qr-image[hidden] { display: none; }
.qr-image { padding: 5px; background: #fff; object-fit: contain; }
.qr-retry-state { display: grid; justify-items: center; gap: 13px; color: #344054; }
.qr-retry-state[hidden] { display: none; }
.qr-retry {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    color: #344054;
    background: #fff;
    box-shadow: 0 3px 8px rgba(16, 24, 40, .06);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.qr-retry:hover { border-color: #98a2b3; background: #f9fafb; }
.qr-retry:focus-visible { outline: 3px solid rgba(79, 86, 217, .22); outline-offset: 3px; }
.qr-retry img { width: 18px; height: 18px; }
.qr-retry-state p { max-width: 156px; margin: 0; color: #667085; line-height: 1.55; }
.binding-code { margin: 17px 0 5px; color: #344054; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.login-card footer { margin-top: 22px; color: #98a2b3; font-size: 11px; line-height: 1.6; text-align: center; }

.identity-entry-state {
    min-height: 176px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 0;
}
.identity-entry-state h2,
.identity-entry-state strong { color: #101828; }
.identity-entry-state h2 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.identity-entry-state strong { font-size: 17px; }
.identity-entry-state p { margin: 10px 0 0; color: #667085; font-size: 14px; line-height: 1.7; }
.identity-entry-card .client-context { margin-bottom: 0; }
.identity-portal-list { display: grid; gap: 10px; }
.identity-portal-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid #dbe3f2;
    border-radius: 13px;
    color: #17223b;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}
.identity-portal-list a::after { content: "→"; color: #52627d; font-size: 18px; }
.identity-portal-list a:hover { border-color: #aebcf0; background: #f8faff; }

@media (max-width: 820px) {
    .identity-shell { width: min(480px, calc(100% - 28px)); grid-template-columns: 1fr; gap: 34px; padding: 34px 0; }
    .identity-intro h1 { font-size: 42px; }
    .intro-copy { margin-bottom: 18px; font-size: 16px; }
}

@media (max-width: 480px) {
    .identity-shell { width: 100%; padding: 28px 16px; }
    .identity-intro { padding: 0 8px; }
    .identity-intro h1 { font-size: 36px; }
    .login-card { padding: 28px 22px; border-radius: 22px; }
    .qr-mode-trigger { width: 68px; height: 68px; padding: 31px 6px 6px 31px; }
    .qr-mode-trigger:hover { width: 72px; height: 72px; }
    .qr-mode-trigger svg { width: 27px; height: 27px; }
}

@media (prefers-reduced-motion: reduce) {
    .login-progress-spinner { animation: none; }
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
/* Yuscenda Smart Captcha is an adaptive abuse-control challenge, not an MFA factor. */
.smart-captcha {
    display: grid;
    gap: 10px;
    margin-top: 4px;
    padding: 14px;
    border: 1px solid #dbe3f2;
    border-radius: 14px;
    background: #f8faff;
}

.smart-captcha-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #17223b;
}

.smart-captcha-heading button {
    padding: 2px 0;
    border: 0;
    color: #52627d;
    background: transparent;
    cursor: pointer;
}

.smart-captcha-picture {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 320 / 152;
    border-radius: 12px;
    background: #e8eef9;
}

.smart-captcha-picture img {
    display: block;
    width: 100%;
    height: 100%;
}

.smart-captcha-piece {
    --captcha-position: 0%;
    position: absolute;
    top: 37.5%;
    left: clamp(0px, calc(var(--captcha-position) - 26px), calc(100% - 52px));
    width: 52px;
    height: 52px;
    border: 3px solid #3158f5;
    border-radius: 9px;
    background: rgba(255, 255, 255, .55);
    box-shadow: 0 4px 12px rgba(49, 88, 245, .18);
    pointer-events: none;
}

.smart-captcha-label {
    margin: 0;
    color: #52627d;
    font-size: 13px;
}

.smart-captcha-slider {
    width: 100%;
    accent-color: #3158f5;
}

.smart-captcha-status {
    min-height: 20px;
    margin: 0;
    color: #65738c;
    font-size: 13px;
}

.smart-captcha.is-verified {
    border-color: #8bc9ab;
    background: #f4fbf7;
}

.smart-captcha.is-verified .smart-captcha-status {
    color: #177449;
}

.smart-captcha.is-failed .smart-captcha-status {
    color: #b42318;
}
