:root {
    --page: #eef3f8;
    --surface: #ffffff;
    --surface-muted: #f7f9fc;
    --text: #111a23;
    --muted: #5e6c7b;
    --line: #cbd6e1;
    --line-strong: #9eb0c2;
    --accent: #087ff5;
    --accent-strong: #0068d7;
    --success: #12a66a;
    --danger: #c73030;
    --grid-line: rgba(82, 112, 143, 0.055);
    --focus: rgba(8, 127, 245, 0.18);
    --shadow: 0 22px 64px rgba(28, 54, 82, 0.12);
}

html[data-theme="dark"] {
    --page: #0e151e;
    --surface: #151f2a;
    --surface-muted: #111a24;
    --text: #eef5fc;
    --muted: #9eacba;
    --line: #334454;
    --line-strong: #50657a;
    --accent: #2896ff;
    --accent-strong: #1786ee;
    --success: #28c987;
    --danger: #ff6b6b;
    --grid-line: rgba(154, 184, 214, 0.045);
    --focus: rgba(40, 150, 255, 0.2);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--page);
}

body {
    margin: 0;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.professional-login {
    display: grid;
    grid-template-rows: 64px minmax(0, 1fr);
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 0;
    overflow: hidden;
    color: var(--text);
    background-color: var(--page);
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
        radial-gradient(circle at 8% 76%, rgba(8, 127, 245, 0.1), transparent 29%),
        radial-gradient(circle at 91% 75%, rgba(8, 127, 245, 0.08), transparent 26%);
    background-size: 42px 42px, 42px 42px, auto, auto;
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    -webkit-font-smoothing: antialiased;
}

.professional-login :where(a, button, input, section, article, div) {
    border-radius: 0;
}

.site-header {
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 64px;
    padding: 0 clamp(20px, 3.5vw, 60px);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.site-brand img {
    display: block;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    object-fit: contain;
}

.site-brand-copy {
    display: grid;
    gap: 2px;
}

.site-brand-copy strong {
    font-size: 15px;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.site-brand-copy small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.theme-button {
    min-width: 102px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    color: var(--text);
    background: var(--surface);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.theme-button:hover,
.theme-button:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

.login-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 420px);
    align-items: center;
    gap: clamp(38px, 6vw, 88px);
    width: min(1280px, calc(100% - 56px));
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    padding: clamp(18px, 3vh, 32px) 0;
    overflow: hidden;
}

.platform-overview {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    max-width: 760px;
    max-height: 100%;
}

.platform-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 132px;
    height: 132px;
    margin: 0 0 12px;
}

.platform-logo img {
    display: block;
    width: 132px;
    height: 132px;
    object-fit: contain;
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.25;
    letter-spacing: 0.14em;
}

.platform-overview > .eyebrow {
    margin-bottom: 12px;
}

.platform-overview h1 {
    margin: 0 0 16px;
    color: var(--text);
    font-size: clamp(44px, 4.6vw, 68px);
    font-weight: 760;
    line-height: 0.98;
    letter-spacing: -0.052em;
}

.platform-overview h1 span {
    color: var(--accent);
}

.platform-summary {
    max-width: 690px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: clamp(14px, 1.25vw, 16px);
    line-height: 1.55;
}

.platform-capabilities {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.capability {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
    min-height: 112px;
    padding: 15px 14px;
    background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.capability + .capability {
    border-left: 1px solid var(--line);
}

.capability-number {
    color: var(--accent);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.4;
}

.capability h2 {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
}

.capability p {
    margin: 0;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.45;
}

.platform-controls {
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.12em;
}

.access-panel {
    position: relative;
    align-self: center;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    padding: clamp(26px, 3.6vh, 36px);
    border: 1px solid var(--line-strong);
    border-top: 3px solid var(--accent);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.mobile-identity {
    display: none;
}

.access-heading {
    margin-bottom: 22px;
}

.access-heading .eyebrow {
    margin-bottom: 10px;
}

.access-heading h2 {
    margin: 0 0 9px;
    color: var(--text);
    font-size: clamp(28px, 3.3vh, 34px);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.access-heading > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.login-form {
    display: grid;
    gap: 14px;
}

.form-field {
    display: grid;
    gap: 6px;
}

.form-field label,
.field-label-row > span {
    font-size: 10px;
    line-height: 1.25;
}

.form-field label {
    color: var(--text);
    font-weight: 750;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.field-label-row > span {
    color: var(--muted);
}

.form-field input {
    width: 100%;
    height: 46px;
    min-width: 0;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    outline: none;
    color: var(--text);
    background: var(--surface-muted);
    font-size: 13px;
}

.form-field input::placeholder {
    color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.form-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus);
}

.form-field input:-webkit-autofill,
.form-field input:-webkit-autofill:hover,
.form-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    box-shadow: 0 0 0 1000px var(--surface-muted) inset;
    caret-color: var(--text);
}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 66px;
}

.password-field input {
    border-right: 0;
}

.password-toggle {
    height: 46px;
    padding: 0 8px;
    border: 1px solid var(--line-strong);
    color: var(--accent);
    background: var(--surface-muted);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.05em;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--surface);
    background: var(--accent);
    outline: none;
}

.login-message {
    display: none;
    min-height: 0;
    margin: 0;
    padding: 9px 10px;
    border-left: 3px solid var(--danger);
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 8%, transparent);
    font-size: 11px;
    line-height: 1.4;
}

.login-message:not(:empty) {
    display: block;
}

.login-message.success {
    border-left-color: var(--success);
    color: var(--success);
    background: color-mix(in srgb, var(--success) 8%, transparent);
}

.login-submit {
    width: 100%;
    height: 47px;
    margin-top: 2px;
    border: 1px solid var(--accent-strong);
    color: #ffffff;
    background: var(--accent);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.07em;
}

.login-submit:hover,
.login-submit:focus-visible {
    background: var(--accent-strong);
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.login-submit:disabled {
    cursor: wait;
    opacity: 0.65;
}

.security-statement {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr);
    gap: 11px;
    margin-top: 21px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
}

.security-mark {
    width: 8px;
    height: 8px;
    margin-top: 4px;
    background: var(--success);
}

.security-statement div {
    display: grid;
    gap: 3px;
}

.security-statement strong {
    font-size: 10.5px;
    line-height: 1.3;
}

.security-statement div span {
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.4;
}

.panel-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.2;
}

@media (min-width: 1051px) and (max-height: 760px) {
    .professional-login {
        grid-template-rows: 56px minmax(0, 1fr);
    }

    .site-header {
        height: 56px;
    }

    .site-brand img {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .login-stage {
        padding: 10px 0;
    }

    .platform-logo,
    .platform-logo img {
        width: 92px;
        height: 92px;
    }

    .platform-logo {
        margin-bottom: 7px;
    }

    .platform-overview > .eyebrow {
        margin-bottom: 8px;
    }

    .platform-overview h1 {
        margin-bottom: 10px;
        font-size: clamp(38px, 7vh, 50px);
    }

    .platform-summary {
        margin-bottom: 13px;
        font-size: 13px;
        line-height: 1.45;
    }

    .capability {
        min-height: 90px;
        padding: 11px 10px;
    }

    .platform-controls {
        margin-top: 8px;
    }

    .access-panel {
        padding: 22px 28px;
    }

    .access-heading {
        margin-bottom: 15px;
    }

    .access-heading h2 {
        font-size: 27px;
    }

    .login-form {
        gap: 10px;
    }

    .security-statement {
        margin-top: 13px;
        padding-top: 12px;
    }

    .panel-footer {
        margin-top: 12px;
    }
}

@media (max-width: 1050px) {
    .professional-login {
        grid-template-rows: 58px minmax(0, 1fr);
    }

    .site-header {
        height: 58px;
        padding: 0 16px;
    }

    .site-brand img {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .site-brand-copy small {
        display: none;
    }

    .theme-button {
        min-width: 92px;
        height: 34px;
        padding: 0 10px;
        font-size: 9px;
    }

    .login-stage {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 12px;
    }

    .platform-overview {
        display: none;
    }

    .access-panel {
        width: min(100%, 480px);
        max-width: 480px;
        margin: 0 auto;
        padding: clamp(19px, 4.8vw, 28px);
    }

    .mobile-identity {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--line);
    }

    .mobile-identity img {
        display: block;
        width: 64px;
        height: 64px;
        object-fit: contain;
    }

    .mobile-identity span {
        max-width: 170px;
        color: var(--muted);
        font-size: 10px;
        font-weight: 800;
        line-height: 1.35;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }
}

@media (max-width: 460px) {
    .site-brand-copy strong {
        font-size: 13px;
    }

    .access-panel {
        padding: 18px;
    }

    .mobile-identity {
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    .mobile-identity img {
        width: 54px;
        height: 54px;
    }

    .access-heading {
        margin-bottom: 17px;
    }

    .access-heading h2 {
        font-size: 27px;
    }
}

@media (max-width: 1050px) and (max-height: 650px) {
    .professional-login {
        grid-template-rows: 50px minmax(0, 1fr);
    }

    .site-header {
        height: 50px;
    }

    .site-brand img {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .login-stage {
        padding: 7px 10px;
    }

    .access-panel {
        padding: 14px 18px;
    }

    .mobile-identity,
    .access-heading > p:last-child,
    .security-statement,
    .panel-footer {
        display: none;
    }

    .access-heading {
        margin-bottom: 10px;
    }

    .access-heading .eyebrow {
        margin-bottom: 5px;
    }

    .access-heading h2 {
        margin-bottom: 0;
        font-size: 23px;
    }

    .login-form {
        gap: 8px;
    }

    .form-field input,
    .password-toggle {
        height: 40px;
    }

    .login-submit {
        height: 41px;
    }
}

@media (max-width: 360px) {
    .site-header {
        padding: 0 10px;
    }

    .site-brand {
        gap: 8px;
    }

    .theme-button {
        min-width: 80px;
        padding: 0 7px;
        letter-spacing: 0.04em;
    }

    .login-stage {
        padding-right: 8px;
        padding-left: 8px;
    }
}

html[data-high-contrast="true"] {
    --muted: #344554;
    --line: #8094a6;
    --line-strong: #4e667b;
}

html[data-theme="dark"][data-high-contrast="true"] {
    --muted: #d2dde7;
    --line: #7e93a7;
    --line-strong: #b4c5d4;
}

html[data-font-scale="large"] .site-brand-copy strong,
html[data-font-scale="large"] .platform-summary,
html[data-font-scale="large"] .capability p,
html[data-font-scale="large"] .access-heading > p,
html[data-font-scale="large"] .form-field label,
html[data-font-scale="large"] .form-field input,
html[data-font-scale="large"] .security-statement {
    font-size: 13px;
}

html[data-font-scale="large"] .access-heading h2 {
    font-size: 31px;
}

html[data-density="compact"] .professional-login {
    grid-template-rows: 56px minmax(0, 1fr);
}

html[data-density="compact"] .site-header {
    height: 56px;
}

html[data-density="compact"] .login-stage {
    gap: clamp(26px, 4vw, 58px);
    padding-top: 12px;
    padding-bottom: 12px;
}

html[data-density="compact"] .access-panel {
    padding-top: 22px;
    padding-bottom: 22px;
}

html[data-reduce-motion="true"] *,
html[data-reduce-motion="true"] *::before,
html[data-reduce-motion="true"] *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
}

@media (max-width: 1050px) and (max-height: 650px) {
    html[data-density="compact"] .professional-login {
        grid-template-rows: 50px minmax(0, 1fr);
    }

    html[data-density="compact"] .site-header {
        height: 50px;
    }
}

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