/* Isolated to the staff sign-in page; patient and medical portals keep their styles. */
:root {
    color-scheme: light;
    --login-ink: #111111;
    --login-muted: #334155;
    --login-blue: #245585;
    --login-paper: #f8fafc;
}

* { box-sizing: border-box; }
body.admin-login {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-width: 0;
    min-height: 100vh;
    min-height: 100svh;
    background: var(--login-paper);
    color: var(--login-ink);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--login-blue); text-underline-offset: 5px; }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid #4382b3;
    outline-offset: 4px;
}
.skip-link {
    position: absolute;
    left: 20px;
    top: 12px;
    z-index: 10;
    padding: 12px 18px;
    background: white;
    transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.brand-header { flex-shrink: 0; background: #fff; border-bottom: 1px solid #e9e7e2; }
.header-inner {
    width: min(1180px, 100%);
    min-height: 114px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.login-logo { display: block; width: 226px; height: auto; max-width: 100%; }
.portal-links { display: flex; flex-wrap: wrap; column-gap: 32px; }
.portal-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.portal-links a:hover { text-decoration: underline; }
.portal-links span { font-size: 18px; font-weight: 400; }
.login-main {
    position: relative;
    isolation: isolate;
    flex: 1;
    display: grid;
    grid-template-rows: 1fr;
    width: 100%;
    padding: 48px 24px 22px;
}
.login-layout {
    position: relative;
    width: min(100%, 460px);
    margin: auto;
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 20px;
    box-shadow: 0 22px 64px -24px rgba(32, 47, 58, .32);
}
.lab-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: #d3cdbf;
    pointer-events: none;
}
.lab-photo {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 46%;
}
.lab-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(246, 243, 238, .48), rgba(246, 243, 238, .58) 65%, rgba(246, 243, 238, .94));
    pointer-events: none;
}
.login-panel { min-width: 0; padding: 43px 42px; }
.login-form-wrap { width: 100%; max-width: 370px; margin: 0 auto; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(26px, 3vw, 32px); font-weight: 400; line-height: 1.2; letter-spacing: .015em; }
.login-intro { margin: 17px 0 32px; font-size: 15px; line-height: 1.65; color: var(--login-muted); }
.form-group { margin: 0 0 22px; }
label { display: block; margin: 0 0 9px; font-size: 14px; font-weight: 600; }
.input-wrap { position: relative; }
.input-wrap svg { position: absolute; top: 17px; left: 16px; width: 20px; height: 20px; color: #758494; pointer-events: none; }
input {
    display: block;
    width: 100%;
    height: 54px;
    padding: 12px 14px 12px 47px;
    border: 1px solid #94a3b8;
    border-radius: 9px;
    background: #fff;
    color: var(--login-ink);
    font: inherit;
    font-size: 16px;
}
input:hover { border-color: #9babba; }
input:focus { border-color: var(--login-blue); background: white; }
.login-submit {
    display: flex;
    width: 100%;
    min-height: 54px;
    margin-top: 29px;
    padding: 13px 20px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--login-blue);
    border-radius: 9px;
    background: var(--login-blue);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.login-submit span { font-size: 23px; line-height: 1; font-weight: 400; }
.login-submit:hover { background: #183e65; border-color: #183e65; }
.staff-note { display: flex; align-items: flex-start; gap: 9px; margin: 27px 0 0; color: var(--login-muted); font-size: 12px; line-height: 1.6; }
.staff-note svg { flex: 0 0 17px; width: 17px; height: 20px; }
.error { margin: 0 0 23px; padding: 13px 15px; border: 1px solid #e4b8b0; border-radius: 8px; color: #903c31; background: #fff4f1; font-size: 14px; line-height: 1.5; }

@media (min-width: 801px) and (max-height: 820px) {
    .login-main { padding-top: 30px; }
    .login-panel { padding-top: 32px; padding-bottom: 32px; }
}
@media (max-width: 800px) {
    .header-inner { gap: 8px; padding: 12px 24px; }
    .login-logo { width: 195px; }
    .portal-links { column-gap: 20px; justify-content: flex-end; }
    .portal-links a { font-size: 13px; }
    .login-main { padding: 32px 20px 22px; }
    .login-layout { border-radius: 18px; }
    .login-panel { padding: 36px 32px; }
    .lab-photo { object-position: 47% center; }
}
@media (max-width: 480px) {
    .header-inner { flex-direction: column; align-items: center; padding: 10px 16px 6px; }
    .login-logo { width: 190px; }
    .portal-links { width: 100%; justify-content: center; column-gap: 22px; }
    .portal-links a { gap: 5px; font-size: 12px; }
    .login-main { padding: 28px 16px 20px; }
    .login-panel { padding: 32px 22px; }
    .login-intro { margin-bottom: 26px; }
    .staff-note { font-size: 11px; }
}
