/*
 * Login screen styling (NS-208/NS-903, docs/engineering/ui-standards.md).
 *
 * Loaded only by templates/login.html, on top of the shared
 * fragments/head-assets.html (Tabler + tokens.css) -- login.html does
 * not use the shared authenticated shell (templates/layout/authenticated.html),
 * since there is no signed-in identity or tenant context yet at this
 * point. All custom classes here are ps-* prefixed to avoid colliding
 * with Tabler's own (Bootstrap-based) class names, several of which
 * this screen would otherwise reuse generically (e.g. a plain
 * ".status"/".field" collides with real Tabler component classes).
 *
 * Ported from the approved NS-903 mock (mocks/screens/login/login.html),
 * remapped onto the shared PingSorted tokens in tokens.css.
 */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    color: var(--ps-text);
    background: var(--ps-canvas);
}

.ps-login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 42%) 1fr;
}

.ps-brand-panel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, var(--ps-primary), var(--ps-primary-2));
    color: #fff;
    padding: 54px 60px;
    display: flex;
    flex-direction: column;
}

.ps-brand-panel:before, .ps-brand-panel:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .09);
}

.ps-brand-panel:before {
    width: 520px;
    height: 520px;
    right: -290px;
    top: -180px;
}

.ps-brand-panel:after {
    width: 380px;
    height: 380px;
    left: -220px;
    bottom: -190px;
}

.ps-logo-on-dark {
    width: 176px;
    position: relative;
    z-index: 1;
}

.ps-promise {
    margin: auto 0;
    position: relative;
    z-index: 1;
    max-width: 430px;
}

.ps-eyebrow {
    color: #56d8c3;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 18px;
}

.ps-promise h2 {
    font-size: 38px;
    line-height: 1.15;
    letter-spacing: -.035em;
    margin: 0 0 18px;
}

.ps-promise p {
    color: #c5d1df;
    font-size: 16px;
    line-height: 1.65;
    margin: 0;
    max-width: 390px;
}

.ps-trust {
    position: relative;
    z-index: 1;
    color: #aebed0;
    font-size: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.ps-trust svg {
    width: 17px;
    height: 17px;
}

.ps-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.ps-auth-wrap {
    width: 100%;
    max-width: 430px;
}

.ps-mobile-logo {
    display: none;
    width: 156px;
    margin: 0 auto 36px;
}

.ps-auth h1 {
    font-size: 30px;
    letter-spacing: -.03em;
    margin: 0 0 8px;
}

.ps-intro {
    color: var(--ps-text-muted);
    font-size: 14px;
    margin: 0 0 30px;
    line-height: 1.5;
}

.ps-banner {
    gap: 10px;
    align-items: flex-start;
    border-radius: var(--ps-radius);
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.45;
    display: none;
}

.ps-banner.ps-visible {
    display: flex;
}

.ps-banner-info {
    background: #eef4ff;
    border: 1px solid #cbdcff;
    color: #244b82;
}

.ps-banner-danger {
    background: #fff1f1;
    border: 1px solid #efb9b9;
    border-left: 4px solid var(--ps-danger);
    color: #7f2727;
}

.ps-banner svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.ps-banner b {
    display: block;
    margin-bottom: 2px;
    color: #722323;
}

.ps-banner span {
    display: block;
}

.ps-field {
    margin-bottom: 19px;
}

.ps-field-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ps-field label {
    font-size: 13px;
    font-weight: 700;
}

.ps-field input {
    width: 100%;
    height: 48px;
    border: 1px solid #cbd7e2;
    border-radius: 9px;
    background: #fff;
    color: var(--ps-text);
    padding: 0 14px;
    outline: 0;
    font-size: 14px;
}

.ps-field input::placeholder {
    color: #91a0b2;
}

.ps-field input:focus {
    border-color: var(--ps-info);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.ps-password {
    position: relative;
}

.ps-password input {
    padding-right: 50px;
}

.ps-toggle {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ps-toggle svg {
    width: 19px;
    height: 19px;
}

.ps-forgot {
    /* Disabled until NS-803 (password reset) ships a real route --
       muted colour, no pointer/underline, so it visually reads as
       inert rather than an inactive-looking bug (review: this rule
       already existed, prepared for the mock's enabled/blue state,
       but a duplicate .ps-forgot block placed earlier in this file
       was silently shadowed by it -- consolidated into this one). */
    font-size: 12px;
    font-weight: 700;
    color: #9aa7b7;
    text-decoration: none;
    cursor: default;
}

.ps-submit {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 9px;
    background: var(--ps-primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
}

.ps-submit:hover {
    background: #102945;
}

.ps-submit:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.ps-help {
    text-align: center;
    color: var(--ps-text-muted);
    font-size: 12px;
    margin: 24px 0 0;
}

.ps-help a {
    color: var(--ps-info);
    font-weight: 600;
    text-decoration: none;
}

.ps-legal {
    text-align: center;
    color: #8796a8;
    font-size: 11px;
    line-height: 1.5;
    margin-top: 38px;
}

@media (max-width: 900px) {
    .ps-login-page {
        display: block;
    }

    .ps-brand-panel {
        display: none;
    }

    .ps-auth {
        min-height: 100vh;
        padding: 54px 34px;
    }

    .ps-mobile-logo {
        display: block;
    }

    .ps-auth-wrap {
        max-width: 440px;
    }

    .ps-auth h1, .ps-intro {
        text-align: center;
    }
}

@media (max-width: 520px) {
    .ps-auth {
        align-items: flex-start;
        padding: 34px 20px 28px;
    }

    .ps-mobile-logo {
        width: 148px;
        margin-bottom: 38px;
    }

    .ps-auth h1 {
        font-size: 26px;
    }

    .ps-intro {
        font-size: 13px;
        margin-bottom: 26px;
    }

    .ps-banner {
        margin-bottom: 18px;
    }

    .ps-field {
        margin-bottom: 17px;
    }

    .ps-legal {
        margin-top: 30px;
    }
}
