/* Shared PhageNexus authentication shell. Form behavior stays with Django. */
.auth-page {
    color-scheme: dark;
    --auth-ink: #f0f6ff;
    --auth-muted: #9db7d4;
    --auth-line: #2c4b6b;
    --auth-link: #20b3ff;
    margin: 0;
    min-height: 100vh;
    padding: clamp(0px, 2vw, 28px);
    display: grid;
    place-items: center;
    color: var(--auth-ink);
    background: #081829;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 49fr) minmax(0, 51fr);
    width: min(100%, 1240px);
    min-height: min(760px, calc(100svh - 56px));
    overflow: hidden;
    border: 1px solid #335572;
    border-radius: 20px;
    background: #0c2138;
    box-shadow: 0 24px 80px #00000030;
}
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 650px;
    padding: clamp(30px, 4.5vw, 54px);
    isolation: isolate;
    background: #061a31 url("../branding/phagenexus-auth-background.e5a10a7de966.png") left bottom / 115% auto no-repeat;
}
.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, #061a31 0%, #061a31 25%, #061a31eb 36%, transparent 64%),
        linear-gradient(90deg, #061a31a6, transparent 78%),
        linear-gradient(0deg, #03152ce6, transparent 34%);
    pointer-events: none;
}
.auth-wordmark { display: block; width: min(100%, 310px); height: auto; }
.auth-beta { margin: 18px 0 0; line-height: 1.6; }
.auth-beta-label { color: #b4dcff; font-size: 11px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; }
.auth-tagline { margin: 0; padding-top: 64px; padding-bottom: 196px; color: #fff; font-size: clamp(22px, 2.3vw, 29px); font-weight: 500; letter-spacing: 1px; line-height: 1.5; text-shadow: 0 2px 10px #03152c80; }
.auth-institutions { display: flex; flex-wrap: wrap; gap: 22px 20px; align-items: center; margin-top: auto; }
.auth-institution { display: flex; align-items: center; gap: 12px; }
.auth-institution img { object-fit: contain; flex: 0 0 auto; }
.auth-institution span { font-size: 11px; line-height: 1.6; color: #fff; text-shadow: 0 1px 6px #03152c; }
.auth-institution--iptc { border-left: 1px solid #8aaaca45; padding-left: 20px; min-height: 65px; }
.auth-content { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 60px clamp(28px, 4.5vw, 62px); background: radial-gradient(ellipse at 100% 0%, #13305060, transparent 68%), #0c2036; }
.auth-form-container { width: 100%; max-width: 424px; }
.auth-workspace { display: flex; align-items: center; gap: 10px; margin: 0 0 36px; font-size: 11px; font-weight: 500; line-height: 1.6; letter-spacing: 1.5px; color: #accced; }
.auth-workspace::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #079bff; }
.auth-content h1 { margin: 0 0 var(--auth-title-gap, 48px); font-size: clamp(30px, 3vw, 40px); line-height: 1.2; letter-spacing: -.7px; font-weight: 600; }
.auth-field { min-width: 0; margin-bottom: var(--auth-field-gap, 27px); }
.auth-field label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 500; }
.auth-input-wrap { position: relative; }
.auth-input-wrap > .bi { position: absolute; top: 50%; left: 16px; transform: translateY(-50%); color: #a3c5e8; font-size: 19px; pointer-events: none; }
.auth-input-wrap :is(input, textarea) { width: 100%; min-width: 0; height: var(--auth-input-height, 53px); padding: 0 16px 0 49px; border: 1px solid var(--auth-input-border, var(--auth-line)); border-radius: 10px; background: var(--auth-input-background, #152e48); color: var(--auth-ink); font: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.auth-input-wrap :is(input, textarea)::placeholder { color: #91aecb; opacity: var(--auth-placeholder-opacity, 1); font-size: 14px; }
.auth-input-wrap :is(input, textarea):focus-visible { outline: 2px solid #299fff; outline-offset: 2px; border-color: #5bb6ff; }
.auth-input-wrap--plain :is(input, textarea) { padding-left: 16px; }
.auth-input-wrap textarea { display: block; height: auto; min-height: var(--auth-textarea-min-height, 104px); padding-block: 13px; line-height: 1.6; resize: vertical; }
.auth-input-wrap input:-webkit-autofill { -webkit-text-fill-color: var(--auth-ink); box-shadow: 0 0 0 1000px var(--auth-input-background, #152e48) inset; caret-color: var(--auth-ink); }
.auth-input-wrap--password input { padding-right: 52px; }
.auth-password-toggle { position: absolute; inset: 0 4px 0 auto; width: 44px; padding: 0; border: 0; border-radius: 7px; color: #abc8e5; background: transparent; font-size: 19px; cursor: pointer; }
.auth-password-toggle:hover { color: #fff; }
.auth-page [hidden] { display: none !important; }
.auth-page a { color: var(--auth-link); text-decoration: none; }
.auth-page a:hover { text-decoration: underline; }
.auth-page :is(a, button, summary):focus-visible { outline: 2px solid #8bd4ff; outline-offset: 4px; }
.auth-forgot { display: block; width: fit-content; margin: 10px 0 0 auto; font-size: 13px; }
.auth-page .auth-submit { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 53px; margin-top: var(--auth-submit-gap, 34px); border: 1px solid transparent; border-radius: 10px; background: #0587f8; box-shadow: 0 8px 24px #0083ff12; color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; transition: background-color .15s; }
.auth-page .auth-submit:hover { background: #0877da; text-decoration: none; }
.auth-divider { display: flex; align-items: center; gap: 22px; margin: 36px 0 25px; color: #a3bdd7; font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--auth-line); }
.auth-access { margin: 0; text-align: center; color: var(--auth-muted); font-size: 14px; line-height: 1.8; }
.auth-access a { display: inline-block; margin-left: 7px; font-weight: 500; }
.auth-alert { margin: 0 0 24px; padding: 13px 15px; border: 1px solid #cb717980; border-radius: 8px; background: #712b3733; color: #ffced4; font-size: 14px; line-height: 1.5; }
.auth-alert--warning { border-color: #c6a25c80; background: #72521c33; color: #ffe0a5; }
/* Access requests reuse the sign-in shell and controls, with a compact form. */
.auth-content--request { --auth-title-gap: 12px; --auth-field-gap: 20px; --auth-submit-gap: 22px; --auth-input-height: 49px; --auth-textarea-min-height: 100px; --auth-input-background: #112a43; --auth-input-border: rgba(142, 173, 201, .22); --auth-placeholder-opacity: .5; padding-block: 42px; }
.auth-content--request .auth-workspace { margin-bottom: 24px; }
.auth-intro { margin: 0 0 28px; color: var(--auth-muted); font-size: 15px; line-height: 1.7; }
.auth-field-help { margin-top: 10px; color: var(--auth-muted); font-size: 12px; line-height: 1.6; }
.auth-field-help ul { margin: 0; padding-left: 18px; }
.auth-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.auth-optional { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--auth-muted); }
.auth-note { border-top: 1px solid var(--auth-line); border-bottom: 1px solid var(--auth-line); }
.auth-note summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; color: #b7d3ed; font-size: 13px; cursor: pointer; list-style: none; }
.auth-note summary::-webkit-details-marker { display: none; }
.auth-note summary > span > .bi { margin-right: 8px; font-size: 12px; }
.auth-note summary > .bi { font-size: 11px; }
.auth-note[open] summary > .bi { transform: rotate(180deg); }
.auth-note .auth-field { margin: 0 0 16px; }
.auth-review-note { margin: 15px 0 0; text-align: center; color: var(--auth-muted); font-size: 12px; line-height: 1.8; }
.auth-access--request { margin-top: 25px; padding-top: 21px; border-top: 1px solid var(--auth-line); }
.auth-field--invalid :is(input, textarea) { border-color: #df8894; }
.auth-form .errorlist, .auth-alert .errorlist { list-style: none; margin: 8px 0 0; padding: 0; color: #ffb9c5; font-size: 13px; line-height: 1.5; }
.auth-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.auth-confirmation-icon { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 26px; border: 1px solid #3d927e80; border-radius: 22px; background: #143c424f; color: #80ddbf; font-size: 35px; }
.auth-next-step { display: flex; gap: 15px; padding-top: 25px; border-top: 1px solid var(--auth-line); }
.auth-next-step-icon { color: #65baff; font-size: 22px; }
.auth-next-step h2 { margin: 0 0 8px; color: #d6e7f7; font-size: 15px; font-weight: 500; }
.auth-next-step p { margin: 0; color: var(--auth-muted); font-size: 14px; line-height: 1.8; }
@media (max-width: 1120px) {
    .auth-brand { padding-left: 32px; padding-right: 26px; }
    .auth-institutions { gap: 20px 15px; }
    .auth-institution { gap: 9px; }
    .auth-institution--iptc { padding-left: 15px; }
    .auth-institution--iptc img { width: 75px; }
}
@media (min-width: 761px) and (max-width: 980px) {
    .auth-institutions { flex-direction: column; align-items: flex-start; }
    .auth-institution--iptc { padding-left: 0; border-left: 0; min-height: 34px; }
    .auth-tagline { padding-top: 64px; padding-bottom: 100px; }
}
@media (max-width: 760px) {
    .auth-page { padding: 0; place-items: stretch; }
    .auth-shell { grid-template-columns: minmax(0, 1fr); min-height: 100svh; border: 0; border-radius: 0; }
    .auth-brand { min-height: 0; padding: 30px 26px; background-size: auto 100%; background-position: calc(100% + 70px) bottom; }
    .auth-brand::before { background: linear-gradient(90deg, #061a31f5, #061a31c9 42%, #061a311a), linear-gradient(0deg, #03152ce6, transparent 40%); }
    .auth-wordmark { width: 230px; }
    .auth-tagline { padding: 27px 0 34px; font-size: 19px; }
    .auth-institutions { gap: 16px; }
    .auth-institution--huji img { width: 28px; height: 49px; }
    .auth-institution--iptc { min-height: 49px; }
    .auth-content { padding: 40px 26px 46px; }
    .auth-workspace { margin-bottom: 24px; }
    .auth-content h1 { margin-bottom: var(--auth-title-gap, 30px); }
    .auth-shell--request .auth-tagline { padding-block: 22px; font-size: 17px; }
}
@media (max-width: 420px) { .auth-field-row { grid-template-columns: minmax(0, 1fr); gap: 0; } }
@media (max-width: 390px) {
    .auth-institutions { flex-direction: column; align-items: flex-start; }
    .auth-institution--iptc { padding-left: 0; border-left: 0; min-height: 34px; }
}
@media (prefers-reduced-motion: reduce) { .auth-page * { transition: none !important; } }
