:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #302d36;
    background: #f4f6fa;
    --primary: #5281bf;
    --primary-dark: #406da8;
    --border: #e7e9eb;
    --muted: #777a83;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    background: #f4f6fa;
}

button, input { font: inherit; }

.authentication-background {
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
}

.authentication-basic-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: .22;
}

.authentication-basic-background::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(145deg, rgba(246, 249, 252, .4), rgba(226, 234, 243, .2));
}

.authentication-basic-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.authentication-shell {
    width: 100%;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.login-card {
    width: min(100%, 500px);
    overflow: hidden;
    border: 1px solid rgba(231, 233, 235, .9);
    border-radius: 12px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 12px 35px rgba(40, 52, 73, .1);
}

.login-card-body { padding: 48px; }

.brand-row {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 26px;
}

.pjm-logo {
    display: block;
    width: auto;
    height: 42px;
    max-width: 210px;
    object-fit: contain;
}

.brand-divider {
    width: 1px;
    height: 36px;
    background: #dfe4eb;
}

.sso-brand {
    display: grid;
    line-height: 1;
    color: #234d7e;
}

.sso-brand span {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: .08em;
}

.sso-brand small {
    margin-top: 5px;
    color: #6f7886;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.login-heading {
    margin-bottom: 26px;
    text-align: center;
}

.login-heading h1 {
    margin: 0 0 7px;
    color: #292d35;
    font-size: 23px;
    line-height: 1.25;
    font-weight: 700;
}

.login-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.form-group { margin-top: 18px; }

label {
    display: block;
    margin-bottom: 8px;
    color: #353942;
    font-size: 14px;
    font-weight: 600;
}

input {
    width: 100%;
    height: 45px;
    padding: 10px 13px;
    border: 1px solid #d8dce3;
    border-radius: 6px;
    background: #fff;
    color: #302d36;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

input::placeholder { color: #a3a8b2; }

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(82, 129, 191, .14);
}

.password-field { position: relative; }
.password-field input { padding-right: 48px; }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 5px;
    width: 40px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #848b98;
    cursor: pointer;
}

.password-toggle:hover { color: var(--primary-dark); }

.password-toggle:focus-visible {
    border-radius: 5px;
    outline: 3px solid rgba(82, 129, 191, .18);
}

.eye-icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.password-help {
    margin: 8px 0 0;
    text-align: right;
}

.password-help button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #a13a3a;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.password-help button:hover { color: #7f2929; }

.password-help button:focus-visible {
    border-radius: 3px;
    outline: 3px solid rgba(161, 58, 58, .16);
    outline-offset: 3px;
}

.login-button,
.button-link {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 24px;
    padding: 10px 18px;
    border: 1px solid var(--primary);
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .12s ease, opacity .2s ease;
}

.login-button:hover,
.button-link:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

.login-button:not(:disabled):active,
.button-link:active { transform: scale(.985); }

.login-button:focus-visible,
.button-link:focus-visible {
    outline: 3px solid rgba(82, 129, 191, .2);
    outline-offset: 2px;
}

.login-button:disabled {
    opacity: .82;
    cursor: wait;
}

.spinner {
    width: 16px;
    height: 16px;
    display: none;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.login-button.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.45;
}

.alert-icon {
    width: 19px;
    height: 19px;
    display: grid;
    flex: 0 0 19px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
}

.alert-danger {
    border-color: #efc9c9;
    background: #fff2f2;
    color: #9b3030;
}

.alert-success {
    border-color: #bfe2cd;
    background: #effaf3;
    color: #286b42;
}

.footnote {
    margin: 24px auto 0;
    max-width: 360px;
    color: #868d98;
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
}

.message-card .login-heading { margin-bottom: 20px; }
.message-card .alert { margin-bottom: 0; }

@media (max-width: 575px) {
    .authentication-shell { padding: 20px 14px; }
    .login-card-body { padding: 34px 24px; }
    .brand-row { gap: 12px; }
    .pjm-logo { height: 36px; max-width: 175px; }
    .brand-divider { height: 32px; }
    .sso-brand span { font-size: 18px; }
}
