/* Legacy login appearance, scoped to the sign-in page. */
body.portal-login--legacy {
    --auth-primary: #dc3545;
    --auth-hover: #c82333;
    --auth-soft: #f8f9fa;
    --auth-line: #ced4da;
    --auth-muted: #6c757d;
    --portal-text: #212529;
    --portal-ink: #212529;
    --portal-line: #dee2e6;
    --portal-radius: 4px;
    font-family: "Source Sans Pro", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background: #e9ecef;
}
.portal-login--legacy .portal-login__page {
    display: grid;
    place-items: center;
    padding: 24px 0;
}
.portal-login--legacy .portal-login__card {
    display: block;
    width: 360px;
    max-width: 90%;
    margin: 0 auto;
    border: 0;
    border-top: 3px solid #dc3545;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2);
}
.portal-login--legacy .portal-login__logo {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, .125);
    text-align: center;
}
.portal-login--legacy .portal-login__brand { max-width: 100%; vertical-align: middle; }
.portal-login--legacy .portal-login__brand img {
    width: auto;
    max-width: 100%;
    height: 70px;
    max-height: none;
    object-fit: contain;
    border-radius: 4px;
}
.portal-login--legacy .portal-login__content { padding: 20px; }
.portal-login--legacy .portal-login__form { gap: 16px; }
.portal-login--legacy .portal-login__form > .portal-field + .portal-field { margin-top: -8px; }
.portal-login--legacy .portal-login__captcha-image {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.portal-login--legacy .portal-login__captcha-image img {
    display: block;
    max-width: calc(100% - 46px);
    object-fit: contain;
    border: 1px solid #ced4da;
    border-radius: 4px;
}
.portal-login--legacy .portal-login__captcha-image button {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: 1px solid #ced4da;
    border-radius: 4px;
    color: #495057;
    background: #e9ecef;
    cursor: pointer;
}
.portal-login--legacy .portal-login__captcha-image button:hover { background: #dee2e6; }
.portal-login--legacy .portal-login__captcha > label {
    display: block;
    margin-bottom: 6px;
    color: #495057;
    font-size: 14px;
}
/* Keep explicit labels available to assistive technology. */
.portal-login--legacy .portal-field label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.portal-login--legacy .portal-field__control {
    min-height: 38px;
    border-color: #ced4da;
    border-radius: 4px;
}
.portal-login--legacy .portal-field__control input {
    height: 36px;
    padding: 6px 12px;
    border-radius: 4px 0 0 4px;
    color: #495057;
    font-size: 16px;
}
.portal-login--legacy .portal-field__control input::placeholder { color: #6c757d; font-size: 16px; }
.portal-login--legacy .portal-field__control > i {
    display: grid;
    place-items: center;
    align-self: stretch;
    order: 1;
    width: 40px;
    border-left: 1px solid #ced4da;
    border-radius: 0 3px 3px 0;
    color: #495057;
    background: #e9ecef;
    font-size: 16px;
}
.portal-login--legacy .portal-field__control:focus-within {
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, .15);
}
.portal-login--legacy .portal-button,
.portal-login--legacy .portal-login__register a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none;
    box-shadow: none;
}
body.portal-login--legacy .portal-button--primary { margin: 0; color: #fff; background: #dc3545; }
body.portal-login--legacy .portal-button--primary:hover { color: #fff; background: #c82333; }
.portal-login--legacy .portal-login__register { display: block; margin-top: 4px; }
.portal-login--legacy .portal-login__register a { color: #fff; background: #343a40; }
.portal-login--legacy .portal-login__register a:hover { background: #23272b; }
.portal-login--legacy .portal-login__recovery { margin-top: 16px; text-align: center; }
.portal-login--legacy .portal-login__forgot { color: #007bff; font-size: 16px; line-height: 1.5; }
.portal-login--legacy .portal-login__forgot:hover { color: #0056b3; text-decoration: underline; }
.portal-login--legacy .portal-login__footer { margin-top: 16px; padding-top: 16px; border-color: rgba(0, 0, 0, .1); }
.portal-login--legacy .portal-login__website { color: #343a40; font-size: 16px; line-height: 1.5; }
.portal-login--legacy .portal-login__website:hover { color: #121416; text-decoration: underline; }
