/* Dedicated sign-in layout. */
:root { --login-ink: #1a2a45; --login-red: #df0024; --login-red-hover: #b9001e; --login-muted: #677b92; }
body { margin: 0; min-height: 100svh; background: #fff9f7 url("../img/backgrounds/login-reference.png") center bottom / cover no-repeat fixed; color: var(--login-ink); font-family: 'Inter', sans-serif; }
.login-shell { display: grid; grid-template-columns: 1.08fr 1fr; min-height: 0; height: min(800px, calc(100dvh - 40px)); width: min(1160px, calc(100% - 96px)); margin: 20px auto; background: #ffffffed; border: 1px solid #ffffff; border-radius: 24px; overflow: hidden; box-shadow: 0 24px 80px #65102114; }
.welcome-panel { position: relative; display: flex; flex-direction: column; padding: 44px 46px; overflow: hidden; background: linear-gradient(145deg, #fff9f4ed, #fff0e8d9); color: var(--login-ink); border-right: 1px solid #f0e2df; }
.welcome-panel::after { content: ''; position: absolute; width: 520px; height: 520px; border: 1px solid #df00240a; border-radius: 50%; right: -290px; bottom: -230px; box-shadow: 0 0 0 65px #df002403, 0 0 0 130px #df002403; pointer-events: none; }
.institution { display: flex; align-items: center; gap: 14px; color: var(--login-ink); font-size: 10px; line-height: 1.8; letter-spacing: .55px; }
.institution:hover { color: var(--login-red); }
.institution strong { display: block; font-size: 12px; font-weight: 600; }
.institution-logo { display: grid; place-items: center; flex-shrink: 0; width: 60px; height: 60px; border-radius: 16px; background: #fff; }
.institution-logo img { width: 42px; height: 42px; object-fit: contain; }
.welcome-content { margin: auto 0; padding: 24px 0; position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--login-red); font-size: 10px; font-weight: 600; letter-spacing: 2px; }
.eyebrow>span { width: 6px; height: 6px; border-radius: 50%; background: var(--login-red); }
.welcome-content h1 { margin: 25px 0 20px; font-size: clamp(29px, 2.8vw, 38px); font-weight: 600; line-height: 1.4; letter-spacing: -1.4px; color: var(--login-ink); }
.welcome-content h1 em { font-style: normal; color: var(--login-red); }
.welcome-content>p { max-width: 375px; color: var(--login-muted); font-size: 14px; line-height: 1.9; }
.feature-list { display: grid; gap: 23px; margin-top: 40px; }
.feature-list>div { display: flex; align-items: center; gap: 14px; }
.feature-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #f9dfe3; border-radius: 12px; background: #fff0f2; color: var(--login-red); font-size: 21px; flex-shrink: 0; }
.feature-list strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.feature-list small { display: block; color: var(--login-muted); font-size: 12px; line-height: 1.6; }
.welcome-bottom { display: flex; align-items: center; gap: 13px; font-size: 9px; letter-spacing: 1.7px; color: var(--login-muted); }
.gold-line { width: 28px; height: 1px; background: var(--login-red); }
.signin-panel { background: #fff; display: flex; flex-direction: column; padding: 38px 50px 28px; }
.signin-top { width: 100%; max-width: 360px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.signin-top>span { font-size: 9px; letter-spacing: 1.5px; color: var(--login-muted); font-weight: 600; }
.signin-panel a { color: var(--login-red); }
.signin-panel a:hover { color: var(--login-red-hover); text-decoration: underline; }
.signin-top a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.signin-top i { font-size: 17px; }
.signin-content { width: 100%; max-width: 360px; margin: auto; padding: 24px 0; }
.section-kicker { display: none; color: var(--login-red); font-size: 10px; font-weight: 600; letter-spacing: 1.8px; }
.signin-content h2 { font-size: 28px; color: var(--login-ink); font-weight: 600; letter-spacing: -.6px; margin: 12px 0; }
.signin-description { font-size: 14px; color: var(--login-muted); line-height: 1.8; margin-bottom: 30px; }
.field { margin-bottom: 20px; }
.field label { font-size: 12px; font-weight: 600; color: var(--login-ink); margin-bottom: 9px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.label-row a { font-size: 12px; }
.field-input { display: flex; align-items: center; height: 50px; border: 1px solid #dce2e9; border-radius: 9px; background: #fbfcfd; transition: border-color .15s, box-shadow .15s; }
.field-input:focus-within { border-color: var(--login-red); box-shadow: 0 0 0 3px #df002412; background: #fff; }
.field-input>i { color: #8b9aad; font-size: 19px; margin-left: 15px; }
.field-input input { min-width: 0; width: 100%; border: 0; background: transparent; outline: none; padding: 13px 11px; font: inherit; font-size: 14px; color: var(--login-ink); }
.field-input input::placeholder { color: #98a2ae; }
.password-toggle { border: 0; background: transparent; color: #8090a2; padding: 12px 14px; display: grid; place-items: center; font-size: 19px; cursor: pointer; border-radius: 6px; }
.signin-button, .google-button { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 49px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, box-shadow .15s; }
.signin-button { position: relative; background: var(--login-red); border: 1px solid var(--login-red); color: #fff; box-shadow: 0 3px 8px #df002414; }
.signin-button>i { position: absolute; right: 17px; font-size: 21px; }
.signin-button:hover { background: var(--login-red-hover); border-color: var(--login-red-hover); }
.signin-button:disabled { opacity: .65; cursor: wait; }
.login-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; color: #98a1ac; font-size: 12px; }
.login-divider::before, .login-divider::after { content: ''; height: 1px; flex: 1; background: #e9edf1; }
.google-button { gap: 11px; background: #fff; border: 1px solid #dce2e9; color: var(--login-ink); }
.google-button:hover { background: #f5f7fa; border-color: #aebdcc; }
.register-note { font-size: 12px; text-align: center; color: var(--login-muted); margin: 27px 0 0; }
.register-note a { font-weight: 600; margin-left: 4px; white-space: nowrap; }
.register-note i { transform: rotate(135deg); font-size: 12px; }
.signin-footer { width: 100%; max-width: 360px; margin: 0 auto; padding-top: 12px; border-top: 1px solid #edf0f3; text-align: center; color: var(--login-muted); font-size: 10px; line-height: 1.9; }
.signin-footer>span:last-child { display: block; }
.login-error { background: #fff3f1; border-radius: 7px; padding: 10px 12px; font-size: 12px; color: #b1382c; line-height: 1.6; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--login-red); outline-offset: 4px; }

@media (max-width: 1050px) { .login-shell { width: calc(100% - 48px); } .welcome-panel { padding: 34px 28px; } .signin-panel { padding: 32px 30px 26px; } .welcome-content h1 { font-size: 30px; } }
@media (max-width: 760px) { .login-shell { display: flex; flex-direction: column; width: min(500px, calc(100% - 24px)); height: min(800px, calc(100dvh - 24px)); margin: 12px auto; min-height: 0; border-radius: 18px; } .welcome-panel { padding: 24px; border-right: 0; border-bottom: 1px solid #f0e2df; } .institution { font-size: 9px; } .institution strong { font-size: 10px; } .institution-logo { width: 50px; height: 50px; border-radius: 12px; } .institution-logo img { width: 36px; height: 36px; } .welcome-content, .welcome-bottom { display: none; } .signin-panel { padding: 24px 28px; } .signin-content { padding: 18px 0; } .signin-panel { flex: 1; } .signin-content h2 { font-size: 26px; } }
@media (max-width: 360px) { .signin-panel { padding: 22px 20px; } .desktop-break { display: none; } .institution { gap: 10px; letter-spacing: 0; } }

/* Fit the form to the viewport by reducing space, not scaling the text. */
.login-shell, .login-shell * { box-sizing: border-box; }
.welcome-panel, .signin-panel { min-width: 0; }
.signin-panel { min-height: 0; }
.signin-top, .signin-footer { flex-shrink: 0; }
.signin-content { flex-shrink: 0; }
.feature-list strong { font-size: 15px; }
.field label { font-size: 13px; }
.field-input input::placeholder { color: #778497; }
.login-divider { color: var(--login-muted); }
@media (max-height: 820px) {
  .welcome-panel { padding-top: 28px; padding-bottom: 28px; }
  .signin-panel { padding-top: 22px; padding-bottom: 18px; }
  .signin-content { padding: 16px 0; }
  .signin-description { margin-bottom: 20px; }
  .field { margin-bottom: 15px; }
  .login-divider { margin: 17px 0; }
  .register-note { margin-top: 18px; }
  .feature-list { margin-top: 26px; gap: 18px; }
}
@media (max-height: 700px) {
  .welcome-panel { padding-top: 20px; padding-bottom: 20px; }
  .welcome-content h1 { margin: 16px 0; font-size: 30px; }
  .welcome-content { padding: 16px 0; }
  .signin-content { padding: 10px 0; }
  .signin-content h2 { margin: 8px 0; font-size: 25px; }
  .signin-description { margin-bottom: 14px; line-height: 1.6; }
  .field { margin-bottom: 12px; }
  .field label { margin-bottom: 6px; }
  .field-input { height: 44px; }
  .signin-button, .google-button { min-height: 44px; }
  .login-divider { margin: 12px 0; }
  .register-note { margin-top: 12px; }
  .signin-footer { line-height: 1.5; }
}
@media (max-width: 760px) and (max-height: 820px) {
  .welcome-panel { padding: 14px 24px; flex-shrink: 0; }
  .signin-panel { padding: 16px 24px; }
  .signin-content { padding: 12px 0; }
  .signin-description { margin-bottom: 16px; }
  .field { margin-bottom: 12px; }
  .login-divider { margin: 14px 0; }
  .register-note { margin-top: 14px; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .welcome-panel { padding: 10px 20px; }
  .institution-logo { width: 40px; height: 40px; }
  .institution-logo img { width: 30px; height: 30px; }
  .signin-panel { padding: 12px 20px; }
  .section-kicker { display: none; }
  .signin-content h2 { margin-top: 0; }
  .signin-description { margin-bottom: 12px; }
  .login-divider { margin: 10px 0; }
  .register-note { margin-top: 10px; }
}
/* Keep every control reachable with a keyboard or at high browser zoom. */
@media (max-height: 580px) {
  .login-shell { height: auto; min-height: calc(100dvh - 24px); margin-top: 12px; margin-bottom: 12px; }
}

/* A full-width brand row keeps the institution name on one line. */
.login-shell { grid-template-rows: auto minmax(0, 1fr); }
.login-header { grid-column: 1 / -1; min-width: 0; padding: 14px 30px; background: #fff; border-bottom: 1px solid #f0e2df; flex-shrink: 0; }
.login-header .institution { gap: 14px; min-width: 0; letter-spacing: 0; }
.login-header .institution-logo { width: 44px; height: 44px; }
.login-header .institution-logo img { width: 38px; height: 38px; }
.institution-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(12px, 1.4vw, 16px); font-weight: 600; color: var(--login-ink); line-height: 1.6; }
@media (max-width: 760px) {
  .login-header { padding: 12px 20px; }
  .login-header .institution { gap: 10px; }
  .login-header .institution-logo { width: 36px; height: 36px; }
  .login-header .institution-logo img { width: 32px; height: 32px; }
  .login-shell > .welcome-panel { display: none; }
}
@media (min-width: 761px) and (max-height: 760px) {
  .login-header { padding-top: 8px; padding-bottom: 8px; }
  .signin-panel { padding-top: 12px; padding-bottom: 12px; }
  .signin-content { padding: 8px 0; }
  .signin-description { margin-bottom: 12px; }
  .field { margin-bottom: 12px; }
  .login-divider { margin: 12px 0; }
  .register-note { margin-top: 12px; }
}
