:root {
    --login-bg: #07111f;
    --login-bg-soft: #0c192b;
    --login-grid: rgba(148, 163, 184, 0.045);
    --login-text: #f8fafc;
    --login-muted: #b5c0d0;
    --login-accent: #5753c7;
    --login-accent-hover: #4b47b6;
    --login-panel: #fcfbf8;
    --login-panel-border: #d9dde4;
    --login-panel-text: #172033;
    --login-panel-muted: #647185;
    --login-field: #ffffff;
    --login-field-border: #cdd6e1;
    --login-danger: #b42318;
    --login-focus: rgba(87, 83, 199, 0.2);
}

body {
    padding-top: 0;
    background: var(--login-bg);
}

.navbar,
.footer {
    display: none;
}

.public-layout.container,
.public-layout > main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.sl-login-page {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    padding: 96px clamp(32px, 5vw, 80px) 56px;
    overflow-x: hidden;
    overflow-y: auto;
    background:
        radial-gradient(circle at 24% 32%, rgba(79, 70, 229, 0.14), transparent 34%),
        radial-gradient(circle at 74% 76%, rgba(56, 189, 248, 0.055), transparent 32%),
        linear-gradient(145deg, var(--login-bg-soft), var(--login-bg) 62%);
    color: var(--login-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.sl-login-page::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    background-image:
        linear-gradient(var(--login-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--login-grid) 1px, transparent 1px);
    background-size: 48px 48px;
    content: "";
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 84%);
}

.sl-login-page::after {
    position: absolute;
    z-index: -1;
    width: min(800px, 62vw);
    aspect-ratio: 1.85;
    right: -7%;
    bottom: -18%;
    border: 1px solid rgba(129, 140, 248, 0.12);
    border-radius: 50%;
    box-shadow:
        0 0 0 72px rgba(129, 140, 248, 0.04),
        0 0 0 148px rgba(129, 140, 248, 0.025);
    content: "";
    transform: rotate(-8deg);
}

.sl-brand {
    position: absolute;
    top: 32px;
    left: max(clamp(32px, 5vw, 80px), calc((100vw - 1380px) / 2));
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--login-text);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.sl-brand:hover {
    color: #ffffff;
}

.sl-brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.sl-login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 456px;
    align-items: center;
    gap: clamp(56px, 5vw, 80px);
    width: min(1380px, 100%);
    margin: auto;
}

.sl-welcome {
    max-width: 620px;
}

.sl-welcome h2 {
    max-width: 580px;
    margin: 0;
    color: var(--login-text);
    font-size: clamp(46px, 3.8vw, 52px);
    font-weight: 670;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.sl-welcome-copy {
    max-width: 540px;
    margin: 22px 0 0;
    color: var(--login-muted);
    font-size: 18px;
    line-height: 1.62;
}

.sl-value-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    margin: 34px 0 0;
    padding: 0;
    color: #d4dce7;
    font-size: 14px;
    font-weight: 520;
    list-style: none;
}

.sl-value-list li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sl-value-list i {
    color: #8d88ef;
    font-size: 15px;
    font-weight: 400;
}

.sl-auth-card {
    width: 100%;
    max-width: 456px;
    justify-self: end;
    padding: 38px 40px 32px;
    border: 1px solid var(--login-panel-border);
    border-radius: 14px;
    background: var(--login-panel);
    color: var(--login-panel-text);
    box-shadow: 0 22px 56px rgba(1, 8, 20, 0.27), 0 2px 8px rgba(1, 8, 20, 0.08);
}

.sl-auth-card h1 {
    margin: 0;
    color: var(--login-panel-text);
    font-size: 30px;
    font-weight: 680;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.sl-subtitle {
    margin: 9px 0 25px;
    color: var(--login-panel-muted);
    font-size: 14px;
    line-height: 1.5;
}

.sl-socials {
    display: grid;
    gap: 9px;
}

.sl-social-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 0 44px;
    border: 1px solid var(--login-field-border);
    border-radius: 9px;
    background: #ffffff;
    color: #293548;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.sl-social-button--preferred {
    border-color: #b8c2d0;
}

.sl-social-button:hover {
    border-color: #919eb0;
    background: #f7f9fc;
}

.sl-social-button img {
    position: absolute;
    left: 15px;
    width: 18px;
    height: 18px;
}

.sl-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #8792a3;
    font-size: 11px;
}

.sl-divider::before,
.sl-divider::after {
    flex: 1;
    height: 1px;
    background: #e2e7ed;
    content: "";
}

.sl-alert:empty {
    display: none;
}

.sl-alert {
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid #f1b9b4;
    border-radius: 8px;
    background: #fff3f2;
    color: var(--login-danger);
    font-size: 13px;
}

.sl-alert ul {
    margin: 0;
    padding-left: 18px;
}

.sl-field {
    margin-bottom: 15px;
}

.sl-field label {
    display: block;
    margin: 0 0 7px;
    color: #344054;
    font-size: 12px;
    font-weight: 650;
}

.sl-field input {
    width: 100%;
    height: 47px;
    padding: 0 13px;
    border: 1px solid var(--login-field-border);
    border-radius: 9px;
    outline: none;
    background: var(--login-field);
    color: var(--login-panel-text);
    font: inherit;
    font-size: 14px;
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.sl-field input::placeholder {
    color: #98a2b3;
}

.sl-field input:hover {
    border-color: #a9b5c4;
}

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

.sl-field input:disabled {
    background: #f2f4f7;
    color: #98a2b3;
    cursor: not-allowed;
}

.sl-field input.input-validation-error {
    border-color: var(--login-danger);
}

.sl-validation {
    display: block;
    margin-top: 5px;
    color: var(--login-danger);
    font-size: 12px;
}

.sl-validation:empty {
    display: none;
}

.sl-password-wrap {
    position: relative;
}

.sl-password-wrap input {
    padding-right: 48px;
}

.sl-reveal {
    position: absolute;
    top: 2px;
    right: 2px;
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #667085;
    cursor: pointer;
}

.sl-reveal:hover {
    background: #f0f2f5;
    color: #344054;
}

.sl-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 2px 0 20px;
    font-size: 12px;
}

.sl-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #536174;
    cursor: pointer;
}

.sl-remember input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--login-accent);
}

.sl-options a {
    color: var(--login-accent);
    font-weight: 650;
    text-decoration: none;
}

.sl-options a:hover {
    color: var(--login-accent-hover);
    text-decoration: underline;
}

.sl-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--login-accent);
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.sl-submit:hover {
    background: var(--login-accent-hover);
}

.sl-submit:active {
    transform: translateY(1px);
}

.sl-submit:disabled {
    opacity: 0.64;
    cursor: wait;
}

.sl-submit.is-loading::before {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    content: "";
    animation: sl-login-spin 700ms linear infinite;
}

.sl-submit.is-loading i {
    display: none;
}

.sl-social-button:focus-visible,
.sl-reveal:focus-visible,
.sl-submit:focus-visible,
.sl-options a:focus-visible,
.sl-brand:focus-visible {
    outline: 3px solid rgba(129, 140, 248, 0.62);
    outline-offset: 3px;
}

.sl-turnstile {
    margin-bottom: 18px;
}

.sl-security {
    margin: 19px 0 0;
    color: #667285;
    font-size: 12px;
    font-weight: 520;
    text-align: center;
}

.sl-security i {
    margin-right: 6px;
}

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

@media (max-width: 1024px) {
    .sl-login-page {
        padding-inline: 32px;
    }

    .sl-login-shell {
        grid-template-columns: minmax(0, 1fr) 430px;
        gap: 52px;
    }

    .sl-welcome {
        padding-left: 0;
    }

    .sl-value-list {
        display: grid;
        gap: 10px;
    }
}

/* Laptop browsers often provide far less vertical space once browser chrome is visible. */
@media (min-width: 768px) and (max-height: 820px) {
    .sl-login-page {
        padding-top: 76px;
        padding-bottom: 24px;
    }

    .sl-brand {
        top: 22px;
    }

    .sl-login-shell {
        gap: clamp(48px, 4vw, 68px);
    }

    .sl-welcome h2 {
        font-size: clamp(42px, 3.6vw, 48px);
    }

    .sl-welcome-copy {
        margin-top: 17px;
        font-size: 16px;
        line-height: 1.55;
    }

    .sl-value-list {
        margin-top: 25px;
        font-size: 13px;
    }

    .sl-auth-card {
        padding: 28px 36px 22px;
    }

    .sl-auth-card h1 {
        font-size: 28px;
    }

    .sl-subtitle {
        margin: 6px 0 18px;
    }

    .sl-socials {
        gap: 8px;
    }

    .sl-social-button {
        min-height: 44px;
    }

    .sl-divider {
        margin: 14px 0;
    }

    .sl-field {
        margin-bottom: 11px;
    }

    .sl-field label {
        margin-bottom: 5px;
    }

    .sl-field input {
        height: 44px;
    }

    .sl-reveal {
        width: 40px;
        height: 40px;
    }

    .sl-options {
        margin-bottom: 14px;
    }

    .sl-turnstile {
        margin-bottom: 12px;
    }

    .sl-submit {
        min-height: 46px;
    }

    .sl-security {
        margin-top: 12px;
    }
}

@media (max-width: 767px) {
    .sl-login-page {
        display: block;
        min-height: 100svh;
        padding: 84px 20px 28px;
    }

    .sl-brand {
        top: 25px;
        left: 22px;
    }

    .sl-login-shell {
        display: block;
        width: min(456px, 100%);
        margin: 0 auto;
    }

    .sl-welcome {
        display: none;
    }

    .sl-auth-card {
        max-width: none;
        padding: 32px 28px 27px;
    }
}

@media (max-width: 420px) {
    .sl-login-page {
        padding-inline: 12px;
        padding-bottom: 12px;
    }

    .sl-auth-card {
        padding: 28px 20px 24px;
        border-radius: 12px;
    }

    .sl-auth-card h1 {
        font-size: 27px;
    }

    .sl-options {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sl-social-button,
    .sl-field input,
    .sl-submit {
        scroll-behavior: auto;
        transition: none;
    }

    .sl-submit.is-loading::before {
        animation-duration: 1400ms;
    }
}
