.SignIn {
    min-height: 100vh;
    padding: 0;
    display: grid;
    place-items: center;
}

.SessionLoading {
    color: var(--Muted);
    font-size: 14px;
}

.SignInLayout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: var(--Main);
}

.SignInPanel {
    min-width: 0;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.SignInBrand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 500;
}

.SignInContent {
    width: min(384px, 100%);
    margin: auto;
    padding: 64px 0;
}

.SignInContext {
    display: block;
    margin-bottom: 16px;
    color: var(--Muted);
    font-size: 12px;
}

.SignInContent h1 {
    font-size: 28px;
    line-height: 1.3;
    letter-spacing: -0.5px;
    font-weight: 500;
}

.SignInDescription {
    margin-top: 12px;
    color: var(--Muted);
    font-size: 14px;
    line-height: 1.7;
    max-width: 336px;
}

.SignInForm {
    display: grid;
    gap: 24px;
    margin-top: 40px;
}

.SignInForm .FormField {
    gap: 8px;
}

.SignInForm label,
.SignInForm input {
    font-size: 14px;
}

.SignInForm input:not([type="checkbox"]) {
    min-height: 48px;
    padding: 12px;
    background: var(--Sidebar);
}

.PasswordInput {
    position: relative;
}

.PasswordInput input {
    padding-right: 48px !important;
}

.PasswordInput .IconButton {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 40px;
    height: 40px;
    color: var(--Muted);
}

.SignInOptions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.RememberOption {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--Muted);
    cursor: pointer;
}

.RememberOption input {
    position: absolute;
    opacity: 0;
    margin: 0;
    min-height: 0;
    width: 1px;
    height: 1px;
}

.CheckboxMark {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border: 1px solid #ffffff24;
    border-radius: 4px;
    background: var(--Main);
    transition: background-color var(--MotionFast) var(--MotionEase), border-color var(--MotionFast) var(--MotionEase);
}

.CheckboxMark .Icon {
    width: 12px;
    height: 12px;
    opacity: 0;
    color: #28141b;
}

.RememberOption input:checked + .CheckboxMark {
    background: var(--Accent);
    border-color: var(--Accent);
}

.RememberOption input:checked + .CheckboxMark .Icon {
    opacity: 1;
}

.RememberOption input:focus-visible + .CheckboxMark {
    outline: 2px solid var(--Accent);
    outline-offset: 3px;
}

.TextButton {
    background: none;
    color: var(--Text);
    padding: 4px 0;
    font-size: 12px;
    text-underline-offset: 4px;
}

.TextButton:hover {
    text-decoration: underline;
}

.SignInSubmit {
    width: 100%;
    min-height: 48px;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--Text);
    color: var(--Sidebar);
    border: 1px solid var(--Text);
    font-size: 14px;
    font-weight: 500;
}

.SignInSubmit:hover {
    background: #dcd6d8;
    color: var(--Sidebar);
}

.SignInForm .FormError {
    margin: 0;
    font-size: 12px;
}

.SignInHelp {
    margin-top: 24px;
    color: var(--Faint);
    text-align: center;
    font-size: 12px;
}

.SignInFooter {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--Faint);
    font-size: 12px;
}

.SignedInAs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--Border);
    border-radius: 999px;
    color: var(--Muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.PasswordHint {
    color: var(--Faint);
    font-size: 12px;
    line-height: 1.7;
}

.SignInVisual {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px 40px 32px;
    background: var(--Sidebar);
    border-left: 1px solid var(--Border);
}

.ProtocolHeading {
    max-width: 384px;
    margin: auto auto 16px;
    width: 100%;
}

.ProtocolLabel {
    font-size: 12px;
    color: var(--Accent);
}

.ProtocolHeading h2 {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 500;
    line-height: 1.25;
    margin-top: 24px;
    letter-spacing: -0.5px;
}

.ProtocolHeading p {
    color: var(--Muted);
    font-size: 14px;
    line-height: 1.8;
    margin-top: 16px;
    max-width: 320px;
}

.ProtocolDiagram {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 6 / 5;
    margin: 16px auto auto;
}

.ProtocolLines {
    position: absolute;
    width: 100%;
    height: 100%;
    stroke: #403b3d;
    stroke-width: 1;
    stroke-dasharray: 4 5;
}

.ProtocolLines circle {
    fill: #786d71;
    stroke: none;
}

.ProtocolNode {
    position: absolute;
    top: 0;
    display: grid;
    justify-items: center;
    gap: 8px;
    width: 40%;
    color: var(--Muted);
    font-size: 12px;
    background: var(--Sidebar);
    padding: 0 0 16px;
}

.ProtocolNode > .Icon {
    width: 48px;
    height: 48px;
    padding: 12px;
    border: 1px solid var(--Border);
    background: var(--Panel);
    border-radius: 12px;
    color: var(--Text);
}

.ProtocolNode code {
    color: var(--Faint);
    font-size: 11px;
    font-family: "SFMono-Regular", Consolas, monospace;
}

.LicenseNode {
    left: 2%;
}

.DeviceNode {
    right: 2%;
}

.ProtocolCenter {
    position: absolute;
    left: 50%;
    top: 56%;
    transform: translate(-50%, -50%);
    display: grid;
    justify-items: center;
    gap: 12px;
    background: var(--Sidebar);
    padding: 16px;
    white-space: nowrap;
}

.ProtocolCenter strong {
    font-size: 16px;
    font-weight: 500;
}

.ProtocolCenter small {
    color: var(--Faint);
    font-size: 11px;
}

.ProtocolLease {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--Panel);
    border: 1px solid var(--Border);
    border-radius: 12px;
    padding: 16px;
    color: var(--Muted);
    font-size: 12px;
    white-space: nowrap;
}

.ProtocolLease > .Icon {
    color: var(--Accent);
}

.ProtocolLease small {
    display: block;
    margin-top: 4px;
    color: var(--Faint);
    font-size: 11px;
}

.ProtocolFooter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 48px;
    color: var(--Faint);
    font-size: 11px;
}

@media (max-width: 1000px) {
    .SignInPanel {
        padding: 32px;
    }

    .SignInVisual {
        padding: 40px 24px 24px;
    }

    .ProtocolDiagram {
        min-height: 360px;
    }

    .ProtocolNode {
        top: 0;
    }
}

@media (max-width: 900px) {
    .SignIn {
        padding: 0;
    }

    .SignInLayout {
        grid-template-columns: 1fr;
        border: none;
        border-radius: 0;
        min-height: 100vh;
    }

    .SignInPanel {
        padding: 24px;
        min-height: 100vh;
    }

    .SignInContent {
        padding: 48px 0;
    }

    .SignInVisual {
        border-left: none;
        border-top: 1px solid var(--Border);
        padding: 48px 24px 24px;
    }

    .ProtocolHeading {
        margin-bottom: 16px;
    }

    .ProtocolDiagram {
        max-width: 400px;
    }

    .SignInOptions label,
    .SignInFooter {
        font-size: 12px;
    }
}

.SignInFields {
    display: grid;
    gap: 24px;
}

.ProtocolLogo {
    width: 64px;
    height: 64px;
}
