@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

/* The login page used to re-declare the design tokens here, pinned to their
   light values. Custom properties inherit, so those local copies beat the
   theme set on <html> and this screen would have stayed light in dark mode.
   The values were byte-identical to the global ones in home.css (which always
   loads first), so they are gone and the page inherits like every other. */
.login_page {
    font-family: var(--font-body);
    color: var(--ink);
    letter-spacing: -0.3px;
}

/* Border-box across the login screen so width:100% controls never spill past their padding. */
.login_page *,
.login_page *::before,
.login_page *::after {
    box-sizing: border-box;
}

/* ---- Full-bleed shell: hide all app chrome, fill the viewport ---- */
#root.pagelogin {
    padding: 0 !important;
}

#root.pagelogin #desktop_menu,
#root.pagelogin #mobile_menu {
    display: none !important;
}

#root.pagelogin #app_container .top_branding {
    display: none;
}

/* Beat saltlight.css's `#app_container { margin-left: var(--sidebar-w) !important }`
   (the reserved sidebar slot) so the login goes truly edge-to-edge. */
#root.pagelogin #app_container {
    margin-left: 0 !important;
    width: 100% !important;
    margin-bottom: 0;
}

#root.pagelogin #app_container #main_content {
    padding: 0;
}

#root.pagelogin #app_container #main_content .login_page {
    max-width: none;
    width: 100%;
    min-height: 100vh;
    background: var(--white);
}

/* ---- Full-screen split: photo left, form right ---- */
.login_card {
    display: grid;
    grid-template-columns: 58% 42%;
    width: 100%;
    min-height: 100vh;
    background: var(--white);
}

/* ---- Photo / testimonial panel (inset + rounded so it floats inside the white) ---- */
.login_media {
    position: relative;
    margin: 10px;
    border-radius: 20px;
    background: var(--chrome);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: clamp(32px, 4vw, 64px);
}

.login_media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.login_media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.25) 45%, transparent 100%);
    border-radius: 20px;
}

.login_testimonial {
    position: relative;
    z-index: 1;
    color: var(--on-media);
    max-width: 760px;
}

.login_testimonial blockquote {
    font-size: clamp(26px, 2.8vw, 44px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 clamp(16px, 1.8vw, 30px);
    letter-spacing: -1px;
}

.login_attribution {
    font-size: clamp(15px, 1.1vw, 19px);
    font-weight: 600;
    color: var(--on-media);
}

.login_attribution span {
    display: block;
    margin-top: 6px;
    font-size: clamp(13px, 0.9vw, 16px);
    font-weight: 400;
    opacity: 0.78;
}

/* ---- Form panel (vertically centered; brand pinned top, help pinned bottom) ---- */
.login_form_panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(40px, 5vw, 80px);
}

.login_brand {
    position: absolute;
    top: clamp(36px, 4vw, 56px);
    left: clamp(40px, 5vw, 64px);
}

.login_brand img {
    height: 32px;
    width: auto;
}

/* The form panel carries the dark-ink wordmark, which disappears once that
   panel goes dark. Swap in the light wordmark the sidebar already uses. */
html[data-theme="dark"] .login_brand img {
    content: url('/images/SaltLightHorizontalWhite.png');
    /* The light wordmark carries more vertical padding, so matching on height
       renders it a third narrower. Match on width so both read the same size. */
    width: 128px;
    height: auto;
}

.login_headline {
    font-family: var(--font-body);
    font-size: clamp(26px, 2.2vw, 32px);
    font-weight: 700;
    letter-spacing: -0.6px;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 8px;
}

.login_subtitle {
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.5;
    margin-bottom: 28px;
    max-width: 400px;
}

/* ---- Form fields ---- */
.login_form {
    display: block;
    width: 100%;
    max-width: 400px;
}

.login_form fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.login_input {
    display: block;
    margin-bottom: 16px;
}

.login_input_label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 8px;
}

.login_input input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink);
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: 12px;
    outline: none;
    letter-spacing: -0.3px;
    transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.login_input input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(232, 115, 42, 0.12);
}

.login_input input::placeholder {
    color: var(--stone);
}

.login_submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--on-media);
    background: var(--brand-fill);
    border: none;
    border-radius: 9999px;
    padding: 15px 28px;
    cursor: pointer;
    transition: background 150ms ease-out;
}

.login_submit:hover {
    background: var(--brand-fill-hover);
}

.login_submit svg {
    width: 18px;
    height: 18px;
}

/* ---- Identity picker ---- */
.login_identity_list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login_identity_item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    width: 100%;
    padding: 15px 16px;
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.login_identity_item:hover {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(232, 115, 42, 0.08);
}

.login_identity_text {
    flex: 1;
}

.login_identity_account {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
}

.login_identity_person {
    font-size: 13px;
    color: var(--ink-soft);
    margin-top: 2px;
}

.login_identity_chevron {
    color: var(--stone);
    flex-shrink: 0;
}

/* ---- Legal / help / errors ---- */
.login_legal {
    font-size: 11px;
    color: var(--stone);
    line-height: 1.5;
    margin-top: 12px;
    max-width: 400px;
}

.login_legal a {
    color: var(--orange-dark);
    text-decoration: none;
}

.login_legal a:hover {
    text-decoration: underline;
}

.login_help {
    position: absolute;
    bottom: clamp(36px, 4vw, 56px);
    left: clamp(40px, 5vw, 64px);
    margin: 0;
    font-size: 12px;
    color: var(--stone);
}

.login_help a {
    color: var(--orange-dark);
    text-decoration: none;
}

.login_form_panel .error-message {
    display: block;
    margin-top: 8px;
    font-size: 12px;
}

/* ---- Mobile: stack — photo band on top, form below ---- */
@media (max-width: 720px) {
    .login_card {
        grid-template-columns: 1fr;
        grid-template-rows: 34vh auto;
        min-height: 100vh;
    }

    .login_media {
        margin: 8px;
        padding: 20px;
        border-radius: 16px;
    }

    .login_testimonial blockquote {
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 8px;
        letter-spacing: -0.2px;
    }

    .login_attribution {
        font-size: 13px;
    }

    .login_attribution span {
        font-size: 11px;
        margin-top: 3px;
    }

    .login_form_panel {
        padding: 28px 24px 40px;
        justify-content: flex-start;
    }

    .login_brand {
        position: relative;
        top: auto;
        left: auto;
        padding-top: 8px;
        margin-bottom: 24px;
    }

    .login_help {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 28px;
    }
}
