* { box-sizing: border-box; }

:root {
    --left-panel: #050c16;
    --right-panel: #091526;
    --card-bg-top: rgba(19, 35, 57, 0.9);
    --card-bg-bottom: rgba(15, 30, 49, 0.9);
    --card-border: rgba(92, 125, 161, 0.36);
    --text-main: #edf3fb;
    --text-muted: #9cb0c7;
    --line-subtle: rgba(128, 160, 196, 0.22);
    --cyan: #2cc4f4;
    --focus: #36cfff;
    --input-bg: #09192d;
    --input-border: #2d4766;
    --button-top: #2b7ef2;
    --button-bottom: #2365d8;
}

body.login-page {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--theme-text, var(--text-main));
    background: var(--theme-background, #050d18);
    font-family: Inter, "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

.login-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 44% 56%;
}

.product-panel {
    position: relative;
    overflow: hidden;
    border-right: 1px solid rgba(58, 87, 119, 0.48);
    background:
        radial-gradient(740px 440px at 0% 0%, rgba(20, 65, 110, 0.18), transparent 66%),
        linear-gradient(180deg, #061222 0%, var(--left-panel) 100%);
    padding: clamp(54px, 6vw, 86px) clamp(42px, 5.2vw, 86px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(62, 91, 124, 0.11) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(62, 91, 124, 0.1) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: 0.22;
    pointer-events: none;
}

.product-panel::after {
    content: "";
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -9%;
    height: 38%;
    opacity: 0.4;
    pointer-events: none;
    background-image:
        repeating-radial-gradient(
            ellipse at 24% 90%,
            rgba(34, 187, 243, 0.24) 0 2px,
            transparent 2px 14px
        );
    transform: perspective(500px) rotateX(56deg);
}

.login-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.login-official-logo {
    width: clamp(160px, 16vw, 228px);
    height: auto;
    object-fit: contain;
    object-position: left center;
}

.brand-content {
    position: relative;
    z-index: 1;
    margin-top: 34px;
    max-width: 420px;
}

#productTitle {
    margin: 0;
    color: #f7fbff;
    font-size: clamp(56px, 6.3vw, 72px);
    line-height: 0.95;
    font-weight: 760;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.platform-subtitle {
    margin: 10px 0 0;
    color: #a3b6cb;
    font-size: 23px;
    font-weight: 640;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.platform-promise {
    margin: 18px 0 0;
    max-width: 390px;
    color: #dce8f4;
    font-size: 20px;
    line-height: 1.45;
}

.platform-focus-heading {
    margin: 38px 0 0;
    color: #8ed7ff;
    font-size: 14px;
    font-weight: 720;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.platform-focus {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.platform-focus li {
    display: flex;
    align-items: center;
    min-height: 28px;
    color: #dce8f4;
    font-size: 20px;
    font-weight: 550;
    letter-spacing: 0.01em;
}

.platform-focus li::before {
    content: "✓";
    width: 20px;
    margin-right: 14px;
    color: rgba(42, 205, 249, 0.94);
    font-weight: 760;
}

.authentication-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(36px, 5.2vw, 76px) clamp(22px, 4.8vw, 70px);
    background:
        radial-gradient(620px 360px at 50% 20%, rgba(28, 73, 123, 0.2), transparent 70%),
        linear-gradient(180deg, #081426 0%, var(--right-panel) 100%);
}

.authentication-console {
    width: min(540px, 100%);
}

.authentication-card {
    width: 100%;
    padding: 50px;
    border: 1px solid var(--theme-border, var(--card-border));
    border-radius: 16px;
    background: linear-gradient(180deg, var(--theme-surface, var(--card-bg-top)), var(--card-bg-bottom));
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
}

.card-eyebrow {
    margin: 0 0 12px;
    color: #d6e4f4;
    font-size: 14px;
    font-weight: 720;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.authentication-card h2 {
    margin: 0;
    color: #f7fbff;
    font-size: clamp(52px, 4.3vw, 58px);
    line-height: 1.03;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.authentication-card header > p:last-child {
    margin: 14px 0 26px;
    color: var(--text-muted);
    font-size: 22px;
    line-height: 1.42;
}

.login-error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--theme-danger, #ef4444) 58%, transparent);
    border-radius: 9px;
    color: #ffd1d8;
    background: color-mix(in srgb, var(--theme-danger, #ef4444) 13%, transparent);
    font-size: 13px;
    line-height: 1.45;
}

.login-field {
    display: block;
    margin-top: 12px;
}

.login-field > span:first-child {
    display: block;
    margin-bottom: 9px;
    color: #e1ebf6;
    font-size: 13px;
    font-weight: 660;
}

.login-field input {
    width: 100%;
    min-height: 56px;
    padding: 13px 14px;
    border: 1px solid var(--theme-border, var(--input-border));
    border-radius: 9px;
    outline: none;
    color: var(--theme-text, #f2f7fd);
    background: var(--theme-input, var(--input-bg));
    font-size: 14px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.login-field input::placeholder {
    color: #6f849d;
}

.login-field input:focus {
    border-color: color-mix(in srgb, var(--focus) 72%, #fff);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 24%, transparent);
}

.login-field input[aria-invalid="true"] {
    border-color: #fb7185;
}

.field-message,
.caps-warning {
    display: block;
    min-height: 14px;
    margin-top: 6px;
    color: #fb7185;
    font-size: 10px;
}

.caps-warning {
    color: #f8d382;
}

.password-control {
    position: relative;
    display: block !important;
}

.password-control input {
    padding-right: 70px;
}

.password-control button {
    position: absolute;
    top: 9px;
    right: 9px;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #88d5ff;
    background: transparent;
    font-size: 12px;
    font-weight: 740;
}

.login-help {
    display: flex;
    justify-content: flex-end;
    margin: 2px 0 18px;
}

.link-button {
    padding: 4px 0;
    border: 0;
    color: #8ed7ff;
    background: transparent;
    font-size: 12px;
    font-weight: 630;
}

.password-control button:hover,
.link-button:hover {
    color: #d6eeff;
    text-decoration: underline;
}

.sign-in-button {
    width: 100%;
    min-height: 56px;
    border: 1px solid rgba(74, 141, 230, 0.72);
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(180deg, var(--button-top), var(--button-bottom));
    box-shadow: 0 10px 24px rgba(18, 72, 142, 0.4);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 0.14s ease, filter 0.14s ease;
}

.sign-in-button:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.sign-in-button:active:not(:disabled) {
    transform: translateY(1px);
}

.sign-in-button:disabled {
    opacity: 0.72;
    cursor: wait;
}

.button-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.button-loading i {
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 255, 255, 0.34);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-spin 0.7s linear infinite;
}

.support-message {
    margin: 16px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.46;
    text-align: center;
}

.identity-options {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid var(--theme-border, rgba(92, 125, 161, 0.36));
    border-radius: 10px;
    background: color-mix(in srgb, var(--theme-surface, #0f1e31) 75%, transparent);
}

.identity-eyebrow {
    margin: 0 0 8px;
    color: #c3d4e7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.identity-grid {
    display: grid;
    gap: 8px;
}

.identity-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--theme-border, rgba(92, 125, 161, 0.36));
    border-radius: 8px;
    background: color-mix(in srgb, var(--theme-input, #09192d) 80%, #0c1d30);
    color: var(--theme-text, #e4edf8);
    font-size: 12px;
    font-weight: 650;
    opacity: 0.86;
    cursor: not-allowed;
    padding: 8px 10px;
}

.identity-button span {
    color: #8fb3d5;
    font-size: 11px;
    font-weight: 600;
}

.identity-footnote {
    margin: 0;
    color: #8fb3d5;
    font-size: 12px;
    line-height: 1.45;
}

.login-brand,
#productTitle,
.platform-subtitle,
.platform-promise,
.platform-focus-heading,
.platform-focus,
.authentication-card {
    opacity: 0;
    transform: translateY(8px);
    animation: login-enter 0.5s ease-out forwards;
}

.login-brand { animation-delay: 0.04s; }
#productTitle { animation-delay: 0.1s; }
.platform-subtitle { animation-delay: 0.16s; }
.platform-promise { animation-delay: 0.22s; }
.platform-focus-heading,
.platform-focus { animation-delay: 0.28s; }
.authentication-card { animation-delay: 0.36s; }

.console-footer {
    position: fixed;
    left: 44%;
    right: 0;
    bottom: 12px;
    margin: 0;
    color: #7f95ac;
    font-size: 11px;
    text-align: center;
    letter-spacing: 0.02em;
    pointer-events: none;
}

.login-brand:focus-visible,
.sign-in-button:focus-visible,
.password-control button:focus-visible,
.link-button:focus-visible,
.login-field input:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--focus) 42%, transparent);
    outline-offset: 2px;
}

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

@keyframes login-enter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-brand,
    #productTitle,
    .platform-subtitle,
    .platform-promise,
    .platform-focus-heading,
    .platform-focus,
    .authentication-card {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

@media (max-width: 1280px) {
    .product-panel {
        padding: 54px 48px;
    }

    #productTitle {
        font-size: clamp(50px, 6vw, 64px);
    }

    .platform-subtitle {
        font-size: 20px;
    }

    .platform-focus li {
        font-size: 18px;
    }

    .authentication-card {
        padding: 44px;
    }

    .authentication-card h2 {
        font-size: 52px;
    }

    .authentication-card header > p:last-child {
        font-size: 20px;
    }
}

@media (max-width: 960px) {
    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .authentication-panel {
        order: 1;
        padding: 20px 16px 16px;
    }

    .product-panel {
        order: 2;
        border-right: 0;
        border-top: 1px solid rgba(58, 87, 119, 0.34);
        min-height: 270px;
        padding: 28px 16px 22px;
    }

    .product-panel::after {
        display: none;
    }

    .brand-content {
        margin-top: 20px;
        max-width: none;
    }

    #productTitle {
        font-size: 42px;
    }

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

    .platform-promise {
        margin-top: 12px;
        font-size: 16px;
    }

    .platform-focus-heading {
        margin-top: 20px;
    }

    .platform-focus {
        margin-top: 18px;
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .platform-focus li {
        font-size: 16px;
        min-height: 24px;
    }

    .platform-focus li::before {
        height: 14px;
        margin-right: 10px;
    }

    .authentication-console {
        width: min(560px, 100%);
    }

    .authentication-card {
        padding: 30px 20px;
        border-radius: 14px;
    }

    .authentication-card h2 {
        font-size: 40px;
    }

    .authentication-card header > p:last-child {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .console-footer {
        position: static;
        left: auto;
        right: auto;
        bottom: auto;
        padding: 8px 16px 14px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .platform-focus {
        grid-template-columns: 1fr;
    }

    #productTitle {
        font-size: 36px;
    }

    .platform-subtitle {
        font-size: 12px;
        letter-spacing: 0.12em;
    }

    .platform-focus li {
        font-size: 15px;
    }
}

/* Experience v14: complete login palette for the shared platform light theme. */
html[data-theme="light"] body.login-page {
    color: #142033 !important;
    background: #eef3f8 !important;
}
html[data-theme="light"] .product-panel {
    border-right-color: #cbd8e5;
    background:
        radial-gradient(740px 440px at 0% 0%, rgba(33, 143, 210, .13), transparent 66%),
        linear-gradient(180deg, #ffffff 0%, #eaf2f8 100%);
}
html[data-theme="light"] .product-panel::before {
    background-image:
        linear-gradient(to right, rgba(74, 105, 135, .09) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(74, 105, 135, .08) 1px, transparent 1px);
}
html[data-theme="light"] .product-panel::after {
    opacity: .18;
    background-image: repeating-radial-gradient(
        ellipse at 24% 90%,
        rgba(14, 137, 195, .22) 0 2px,
        transparent 2px 14px
    );
}
html[data-theme="light"] #productTitle { color: #10243a; }
html[data-theme="light"] .platform-subtitle { color: #405a72; }
html[data-theme="light"] .platform-promise,
html[data-theme="light"] .platform-focus li { color: #233b52; }
html[data-theme="light"] .platform-focus-heading { color: #0875ad; }
html[data-theme="light"] .authentication-panel {
    background:
        radial-gradient(620px 360px at 50% 20%, rgba(33, 143, 210, .1), transparent 70%),
        linear-gradient(180deg, #f5f8fb 0%, #e8eff6 100%);
}
html[data-theme="light"] .authentication-card {
    border-color: #c5d3df;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(30, 55, 80, .13);
}
html[data-theme="light"] .card-eyebrow { color: #0875ad; }
html[data-theme="light"] .authentication-card h2 { color: #10243a; }
html[data-theme="light"] .authentication-card header > p:last-child,
html[data-theme="light"] .support-message { color: #526b82; }
html[data-theme="light"] .login-field > span:first-child { color: #233b52; }
html[data-theme="light"] .login-field input {
    border-color: #aebfce !important;
    color: #10243a !important;
    background: #ffffff !important;
}
html[data-theme="light"] .login-field input::placeholder { color: #6b7f92; opacity: 1; }
html[data-theme="light"] .password-control button,
html[data-theme="light"] .link-button { color: #075f96 !important; background: transparent !important; }
html[data-theme="light"] .password-control button:hover,
html[data-theme="light"] .link-button:hover { color: #064f7c; }
html[data-theme="light"] .identity-options {
    border-color: #cbd8e5;
    background: #f1f6fa;
}
html[data-theme="light"] .identity-eyebrow { color: #405a72; }
html[data-theme="light"] .identity-footnote { color: #526b82; }
html[data-theme="light"] .console-footer { color: #526b82; }

@media (prefers-reduced-motion: reduce) {
    .sign-in-button,
    .login-field input,
    .password-control button,
    .link-button {
        transition: none;
    }

    .button-loading i {
        animation: none;
    }
}
