/* D — Abstract light. Shared by StudentPortal.Client and LecturerPortal.Client.
   Tenant branding supplies accessible action colours and the artwork accent hue. */
.portal-auth--light {
    --auth-ink: var(--color-text-primary, #303238);
    --auth-muted: var(--color-text-secondary, #666a73);
    --auth-brand: var(--aurelia-brand, #680b0e);
    --auth-font: var(--aurelia-font, "Noto Sans Georgian", "Segoe UI", sans-serif);
    /* Grow the card with both viewport dimensions, retaining laptop proportions. */
    --auth-card-width: clamp(460px, min(32vw, 60dvh), 560px);
    --auth-card-padding: clamp(24px, 3.5dvh, 44px);
    --auth-field-height: clamp(50px, 5.6dvh, 62px);
    --auth-action-height: clamp(52px, 5.8dvh, 64px);
    --auth-field-spacing: clamp(26px, 3.1dvh, 38px);
    --auth-form-spacing: clamp(12px, 1.8dvh, 20px);
    --auth-form-gap: clamp(10px, 1.45dvh, 18px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--auth-ink);
    background: #f6f7f4;
    font-family: var(--auth-font);
    isolation: isolate;
    position: relative;
}
.portal-auth--light *, .portal-auth--light *::before, .portal-auth--light *::after { box-sizing: border-box; }
.portal-auth--light .portal-auth__header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
    padding: 12px clamp(24px, 4.2vw, 80px);
    background: transparent;
}
.portal-auth--light .portal-auth__header::before { content: ""; position: absolute; z-index: -1; inset: 0 50% 0 0; background: #ffffffef; border-bottom-right-radius: 140px 90px; }
.portal-auth--light .portal-auth__brand { display: flex; align-items: center; gap: 22px; min-width: 0; }
.portal-auth--light .portal-auth__logo { display: flex; align-items: center; flex: 0 0 auto; padding: 0; border-radius: 0; background: transparent; }
.portal-auth--light .portal-auth__logo img { display: block; width: auto; max-width: 144px; height: 52px; object-fit: contain; }
.portal-auth--light .portal-auth__monogram { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--auth-brand); color: var(--aurelia-on-brand, #fff); font-size: 19px; font-weight: 600; }
.portal-auth--light .portal-auth__brand-copy { display: grid; gap: 4px; min-width: 0; }
.portal-auth--light .portal-auth__portal-name { font-size: 19px; font-weight: 600; line-height: 1.45; }
.portal-auth--light .portal-auth__university-name { color: var(--auth-muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.portal-auth--light .portal-auth__language { display: flex; flex: 0 0 auto; gap: 3px; padding: 4px; border: 1px solid #e5e9e6; border-radius: 10px; background: #f3f5f3; }
.portal-auth--light .portal-auth__language-option { min-width: 46px; min-height: 32px; padding: 5px 9px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--auth-muted); font: 600 11px/1.5 var(--auth-font); cursor: pointer; transition: background .18s ease, color .18s ease; }
.portal-auth--light .portal-auth__language-option:hover { color: var(--auth-brand); background: #ffffffb0; }
.portal-auth--light .portal-auth__language-option--active { color: var(--auth-brand); background: #fff; border-color: #e9ece9; box-shadow: 0 1px 4px #23382c08; }
.portal-auth--light .portal-auth__experience { position: relative; display: grid; flex: 1; min-width: 0; isolation: isolate; }
.portal-auth--light .portal-auth__art {
    position: absolute;
    z-index: -1;
    inset: 0 0 52px;
    pointer-events: none;
    filter: hue-rotate(calc((var(--brand-h, 358) - 358) * 1deg));
    background: #f6f7f4 url("../images/auth/abstract-light.jpg?v=20261016") center center / cover no-repeat;
}
.portal-auth--light .portal-auth__art::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 42%, #f2f1ef66, #f2f1ef18 38%, transparent 65%),
        radial-gradient(ellipse at 18% 23%, #ffffff80, #ffffff20 27%, transparent 48%),
        linear-gradient(0deg, #f2f1ef24, #f2f1ef08 70%),
        radial-gradient(ellipse at 28% 75%, color-mix(in srgb, var(--auth-brand) 3%, transparent), transparent 55%);
}
.portal-auth--light .portal-auth__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, var(--auth-card-width));
    align-items: start;
    gap: clamp(30px, 4vw, 64px);
    width: min(1680px, 100%);
    margin-inline: auto;
    padding: clamp(24px, 4.8vh, 56px) 3.7vw 28px 5.7vw;
}
.portal-auth--light .portal-auth__identity { min-width: 0; padding-top: 0; }
.portal-auth--light .portal-auth__identity-copy { max-width: 760px; }
.portal-auth--light .portal-auth__identity-rule { display: block; width: 40px; height: 2px; margin-bottom: 22px; background: var(--auth-brand); }
.portal-auth--light .portal-auth__identity-title { margin: 0; color: var(--auth-ink); font: 500 clamp(30px, 3vw, 48px)/1.3 var(--auth-font); letter-spacing: -.7px; text-wrap: balance; }
.portal-auth--light .portal-auth__identity-title > span { display: block; }
.portal-auth--light .portal-auth__identity-slogan { max-width: none; margin: 18px 0 0; color: var(--auth-muted); font-size: clamp(13px, 1vw, 16px); line-height: 1.75; overflow-wrap: anywhere; }
.portal-auth--light .portal-auth__access { min-width: 0; width: 100%; max-width: var(--auth-card-width); justify-self: end; }
.portal-auth--light .portal-auth__access-card {
    padding: var(--auth-card-padding);
    border: 1px solid #e2e3e6;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff, #fffffff9 65%, #fdfdfdf5);
    box-shadow: 0 24px 60px -30px #30323833, 0 4px 16px -8px #30323818, inset 0 1px #fff;
    animation: portal-light-arrive .5s ease-out both;
}
.portal-auth--light .portal-auth__form-eyebrow { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; color: var(--auth-brand); font-size: 11px; font-weight: 500; line-height: 1.6; }
.portal-auth--light .portal-auth__form-eyebrow::before { content: ""; flex: 0 0 30px; height: 2px; background: currentColor; }
.portal-auth--light .portal-auth__headline { max-width: 20ch; margin: 0; color: var(--auth-ink); font: 500 clamp(24px, 1.95vw, 30px)/1.4 var(--auth-font); letter-spacing: -.3px; text-wrap: balance; }
.portal-auth--light .portal-auth__subcopy { margin: 10px 0 0; color: var(--auth-muted); font-size: 14px; line-height: 1.7; }
.portal-auth--light .portal-auth__form { margin-top: var(--auth-form-spacing); }
.portal-auth--light .portal-auth__form > .mud-stack { gap: var(--auth-form-gap); }
.portal-auth--light .portal-auth-input {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: var(--auth-field-height);
    margin-top: var(--auth-field-spacing);
    padding: 0 15px;
    border: 1px solid color-mix(in srgb, var(--auth-ink) 14%, white);
    border-radius: 8px;
    background: #fbfcfb;
    box-shadow: inset 0 1px 2px #26372c03, 0 1px #ffffffb0;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.portal-auth--light .portal-auth-input:hover { border-color: color-mix(in srgb, var(--auth-brand) 30%, #d7dfd9); }
.portal-auth--light .portal-auth-input:focus-within { border-color: var(--tenant-focus-ring, var(--auth-brand)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tenant-focus-ring, var(--auth-brand)) 9%, transparent), 0 2px 8px #26372c06; background: #fff; }
.portal-auth--light .portal-auth-input:has(input.invalid) { border-color: var(--color-danger); }
.portal-auth--light .portal-auth-input:has(input.invalid):focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger) 10%, transparent); }
.portal-auth--light .portal-auth-input__icon { display: grid; place-items: center; flex: 0 0 22px; color: var(--auth-brand); }
.portal-auth--light .portal-auth-input__icon svg { width: 21px; height: 21px; }
.portal-auth--light .portal-auth-input__body { flex: 1; min-width: 0; }
.portal-auth--light .portal-auth-input__label { position: absolute; top: -24px; left: 0; color: var(--auth-ink); font-size: 13px; font-weight: 500; line-height: 1.6; }
.portal-auth--light .portal-auth-input__control { display: block; width: 100%; height: calc(var(--auth-field-height) - 2px); min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; outline: none; background: transparent; color: var(--auth-ink); font: 400 14px/1.5 var(--auth-font); box-shadow: none; }
.portal-auth--light .portal-auth-input__control::placeholder { color: var(--color-text-muted, #70747c); opacity: 1; font-size: 13px; }
.portal-auth--light .portal-auth-input__action { display: grid; place-items: center; width: 36px; height: 40px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--auth-muted); cursor: pointer; }
.portal-auth--light .portal-auth-input__action:hover { color: var(--auth-brand); background: var(--aurelia-wash); }
.portal-auth--light .portal-field-error { color: var(--color-danger); font-size: 12px; line-height: 1.6; }
.portal-auth--light .portal-auth__message {
    --auth-message-accent: var(--color-info, #416a8b);
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--auth-message-accent) 17%, white);
    border-radius: 8px;
    background: color-mix(in srgb, var(--auth-message-accent) 5%, white);
    color: var(--auth-ink);
    box-shadow: none;
    font: 400 12px/1.65 var(--auth-font);
}
.portal-auth--light .portal-auth__message--success { --auth-message-accent: var(--color-success, #19765a); }
.portal-auth--light .portal-auth__message--error { --auth-message-accent: var(--color-danger, #b7384c); }
.portal-auth--light .portal-auth__message--warning { --auth-message-accent: var(--color-warning, #8a631f); }
.portal-auth--light .portal-auth__message .mud-alert-position { align-items: flex-start; }
.portal-auth--light .portal-auth__message .mud-alert-message { min-width: 0; padding: 0; overflow-wrap: anywhere; }
.portal-auth--light .portal-auth__message .mud-alert-icon { margin: 1px 9px 0 0; padding: 0; color: var(--auth-message-accent); }
.portal-auth--light .portal-auth__message .mud-alert-icon svg { width: 18px; height: 18px; }
.portal-auth--light .portal-auth__utility-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 2px 0 4px; }
.portal-auth--light .portal-auth__remember { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: var(--auth-muted); font-size: 12px; cursor: pointer; }
.portal-auth--light .portal-auth__remember-input { appearance: none; width: 18px; height: 18px; flex: 0 0 auto; margin: 0; border: 1px solid #aebcb3; border-radius: 4px; background: #fff; cursor: pointer; }
.portal-auth--light .portal-auth__remember-input:checked { border-color: var(--auth-brand); background: var(--auth-brand); }
.portal-auth--light .portal-auth__remember-input:focus-visible { box-shadow: 0 0 0 3px var(--aurelia-tint); }
.portal-auth--light .portal-auth__remember-indicator { position: absolute; left: 0; display: grid; place-items: center; width: 18px; height: 18px; opacity: 0; color: var(--aurelia-on-brand, #fff); pointer-events: none; }
.portal-auth--light .portal-auth__remember-input:checked + .portal-auth__remember-indicator { opacity: 1; }
.portal-auth--light .portal-auth__remember-indicator svg { width: 14px; height: 14px; }
.portal-auth--light .portal-auth__text-link { min-height: 32px; padding: 4px 0; border: 0; background: transparent; color: var(--auth-brand); font: 500 12px/1.6 var(--auth-font); cursor: pointer; text-underline-offset: 4px; }
.portal-auth--light .portal-auth__text-link:hover { text-decoration: underline; }
.portal-auth--light .portal-auth__text-link:disabled { opacity: .55; cursor: default; }
.portal-auth--light .portal-auth__submit.mud-button-root { min-height: var(--auth-action-height); border: 1px solid var(--auth-brand); border-radius: 8px; color: var(--aurelia-on-brand, #fff); background: linear-gradient(150deg, color-mix(in srgb, var(--auth-brand) 92%, white), var(--auth-brand) 52%, var(--aurelia-brand-dark)); background-size: 150% 150%; background-position: 30% 30%; box-shadow: 0 5px 14px color-mix(in srgb, var(--auth-brand) 16%, transparent), inset 0 1px #ffffff25; font: 500 15px/1.5 var(--auth-font); text-transform: none; letter-spacing: 0; transition: box-shadow .18s ease, background-position .18s ease, transform .18s ease; }
.portal-auth--light .portal-auth__submit.mud-button-root:hover:not(:disabled) { transform: translateY(-1px); background-position: 0 0; box-shadow: 0 8px 20px color-mix(in srgb, var(--auth-brand) 22%, transparent), inset 0 1px #ffffff30; }
.portal-auth--light .portal-auth__submit.mud-button-root:active:not(:disabled) { transform: none; box-shadow: 0 2px 6px color-mix(in srgb, var(--auth-brand) 18%, transparent), inset 0 1px #ffffff20; }
.portal-auth--light .portal-auth__submit.mud-button-root:disabled { opacity: .65; color: var(--aurelia-on-brand, #fff); }
.portal-auth--light .portal-auth__submit-content { display: inline-flex; align-items: center; justify-content: center; gap: 13px; }
.portal-auth--light .portal-auth__submit-content > svg { order: 1; width: 20px; height: 20px; }
.portal-auth--light .portal-auth__submit-arrow { transition: transform .18s ease; }
.portal-auth--light .portal-auth__submit:hover:not(:disabled) .portal-auth__submit-arrow { transform: translateX(3px); }
.portal-auth--light .portal-auth__submit-loader { width: 17px; height: 17px; border: 2px solid #ffffff55; border-top-color: currentColor; border-radius: 50%; animation: portal-light-spin .7s linear infinite; }
.portal-auth--light .portal-auth__library-divider { height: 1px; margin-top: 8px; background: #e3e8e4; }
.portal-auth--light .portal-auth__public-library.mud-button-root { display: flex; margin-top: 4px; min-height: var(--auth-field-height); padding: 10px 15px; border: 1px solid #e6e7ea; border-radius: 8px; background: #ffffff80; color: var(--auth-ink); box-shadow: none; font-family: var(--auth-font); letter-spacing: 0; text-transform: none; transition: border-color .18s ease, background-color .18s ease, color .18s ease; }
.portal-auth--light .portal-auth__public-library.mud-button-root:hover { color: var(--auth-brand); border-color: color-mix(in srgb, var(--auth-brand) 20%, #e5e9e6); background: var(--aurelia-wash); }
.portal-auth--light .portal-auth__library-content { display: flex; align-items: center; gap: 13px; width: 100%; }
.portal-auth--light .portal-auth__public-library .mud-button-label { width: 100%; }
.portal-auth--light .portal-auth__library-icon { display: grid; place-items: center; color: var(--auth-brand); }
.portal-auth--light .portal-auth__library-icon svg { width: 24px; height: 24px; }
.portal-auth--light .portal-auth__library-icon .portal-auth__book-outline { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.portal-auth--light .portal-auth__library-copy { flex: 1; text-align: start; }
.portal-auth--light .portal-auth__library-copy strong { font-size: 14px; font-weight: 500; }
.portal-auth--light .portal-auth__library-arrow { display: grid; place-items: center; color: var(--auth-muted); transition: transform .18s ease; }
.portal-auth--light .portal-auth__public-library:hover .portal-auth__library-arrow { transform: translate(1px, -1px); }
.portal-auth--light .portal-auth__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 10px clamp(24px, 4.2vw, 80px); border-top: 1px solid #e7ebe7; background: #ffffffed; color: var(--auth-muted); font-size: 11px; line-height: 1.7; }
.portal-auth--light .portal-auth__footer-help { flex-shrink: 0; padding: 3px 0 3px 24px; border: 0; border-left: 1px solid #d9e0da; background: transparent; color: var(--auth-muted); font: inherit; cursor: pointer; }
.portal-auth--light .portal-auth__footer-help:hover { color: var(--auth-brand); }
.portal-auth--light :is(button, a, input):focus-visible { outline: 2px solid var(--tenant-focus-ring, var(--auth-brand)); outline-offset: 4px; }
.portal-auth--light .portal-auth-input__control:focus-visible { outline: none; }
@keyframes portal-light-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes portal-light-spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
    .portal-auth--light .portal-auth__content { grid-template-columns: minmax(0, 1fr) minmax(350px, .9fr); gap: 28px; }
    .portal-auth--light .portal-auth__identity-title { font-size: 32px; letter-spacing: -.8px; }
    .portal-auth--light .portal-auth__access-card { padding: 24px; }
}
/* Use the available height on laptop screens without clipping validation or OTP. */
@media (min-width: 801px) and (max-height: 800px) {
    .portal-auth--light { --auth-form-gap: 8px; --auth-field-spacing: 24px; --auth-form-spacing: 10px; }
    .portal-auth--light .portal-auth__content { padding-block: 20px; }
    .portal-auth--light .portal-auth__access-card { padding-block: 18px; }
}
@media (max-width: 800px) {
    .portal-auth--light { --auth-field-height: 50px; --auth-action-height: 52px; --auth-field-spacing: 26px; --auth-form-spacing: 12px; --auth-form-gap: 10px; }
    .portal-auth--light .portal-auth__header::before { right: 0; border-radius: 0; }
    .portal-auth--light .portal-auth__header { min-height: 78px; padding: 14px 22px; gap: 16px; }
    .portal-auth--light .portal-auth__brand { gap: 14px; }
    .portal-auth--light .portal-auth__logo img { max-width: 100px; height: 44px; }
    .portal-auth--light .portal-auth__portal-name { font-size: 16px; }
    .portal-auth--light .portal-auth__university-name { font-size: 11px; }
    .portal-auth--light .portal-auth__content { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 32px 24px 40px; }
    .portal-auth--light .portal-auth__identity { padding: 0; width: min(550px, 100%); margin-inline: auto; }
    .portal-auth--light .portal-auth__identity-rule { width: 30px; margin-bottom: 14px; }
    .portal-auth--light .portal-auth__identity-title { font-size: 27px; line-height: 1.4; }
    .portal-auth--light .portal-auth__identity-title > span { display: inline; }
    .portal-auth--light .portal-auth__identity-slogan { margin-top: 10px; max-width: none; font-size: 13px; }
    .portal-auth--light .portal-auth__access { justify-self: center; }
    .portal-auth--light .portal-auth__art { background-position: 32% center; }
    .portal-auth--light .portal-auth__art::after { background: linear-gradient(#f6f7f4d9, #f6f7f440 50%, #f6f7f4cc); }
    .portal-auth--light .portal-auth__access-card { background: #fffffffa; }
    .portal-auth--light .portal-auth__footer { padding-inline: 24px; }
}
@media (max-width: 480px) {
    .portal-auth--light .portal-auth__header { gap: 10px; padding: 12px 16px; }
    .portal-auth--light .portal-auth__brand { gap: 9px; }
    .portal-auth--light .portal-auth__logo img { max-width: 72px; height: 36px; }
    .portal-auth--light .portal-auth__monogram { width: 36px; height: 36px; font-size: 14px; border-radius: 8px; }
    .portal-auth--light .portal-auth__portal-name { font-size: 13px; }
    .portal-auth--light .portal-auth__university-name { font-size: 10px; line-height: 1.5; }
    .portal-auth--light .portal-auth__language { padding: 3px; gap: 0; }
    .portal-auth--light .portal-auth__language-option { min-width: 35px; padding-inline: 5px; font-size: 10px; }
    .portal-auth--light .portal-auth__content { gap: 22px; padding: 26px 16px 30px; }
    .portal-auth--light .portal-auth__identity-title { font-size: 23px; letter-spacing: -.6px; }
    .portal-auth--light .portal-auth__access-card { padding: 26px 22px; border-radius: 16px; }
    .portal-auth--light .portal-auth__form-eyebrow { gap: 12px; margin-bottom: 16px; font-size: 11px; }
    .portal-auth--light .portal-auth__headline { font-size: 23px; }
    .portal-auth--light .portal-auth__subcopy { font-size: 12px; }
    .portal-auth--light .portal-auth__form { margin-top: 12px; }
    .portal-auth--light .portal-auth__remember, .portal-auth--light .portal-auth__text-link { font-size: 11px; }
    .portal-auth--light .portal-auth__footer { flex-wrap: wrap; padding: 12px 16px; font-size: 10px; }
    .portal-auth--light .portal-auth__footer-help { padding-left: 12px; }
}
@media (pointer: coarse) {
    .portal-auth--light :is(.portal-auth__language-option, .portal-auth-input__action, .portal-auth__remember, .portal-auth__text-link, .portal-auth__footer-help) { min-height: 44px; }
    .portal-auth--light .portal-auth-input__action { min-width: 44px; }
}
/* Keep typed text readable and prevent automatic input zoom on mobile browsers. */
@media (max-width: 800px) and (pointer: coarse) {
    .portal-auth--light .portal-auth-input__control { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .portal-auth--light *, .portal-auth--light *::before, .portal-auth--light *::after { animation: none !important; transition: none !important; }
    .portal-auth--light .portal-auth__submit:hover:not(:disabled) { transform: none; }
    .portal-auth--light .portal-auth__submit:hover:not(:disabled) .portal-auth__submit-arrow,
    .portal-auth--light .portal-auth__public-library:hover .portal-auth__library-arrow { transform: none; }
}
