@font-face { font-family: Roboto; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/roboto-400.ttf') format('truetype'); }
@font-face { font-family: Roboto; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/roboto-500.ttf') format('truetype'); }
@font-face { font-family: Roboto; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/roboto-700.ttf') format('truetype'); }
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; font-family: Roboto, sans-serif; font-size: 16px; color: #1c1c1e; background: #e8e8eb; -webkit-font-smoothing: antialiased; }
h1, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.desktop-stage { --ink: #1c1c1e; --muted: #8e8e93; --accent: #287fb4; min-height: 100vh; min-height: 100dvh; color: var(--ink); background: #087af2 url('desktop-waves.svg') center / cover fixed; }
.login-stage { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.login-theme-control { position: absolute; top: 16px; right: 16px; }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid rgb(255 255 255 / 20%); border-radius: 12px; background: rgb(255 255 255 / 15%); color: #fff; font-size: 14px; line-height: 20px; font-weight: 500; }
.theme-toggle > span:first-child { font-size: 16px; line-height: 24px; }
.login-window { width: 410px; max-width: 100%; overflow: hidden; border-radius: 12px; background: rgb(232 232 235 / 90%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 0 20px 4px rgb(0 0 0 / 16%); }
.auth-reference-header { padding: 32px; background: rgb(248 248 250 / 80%); box-shadow: 0 0 8px 1px rgb(0 0 0 / 2%); }
.workspace-brand { display: flex; align-items: center; gap: 16px; }
.workspace-brand strong { display: block; margin-bottom: 2px; font-size: 18px; line-height: 1.35; font-weight: 700; }
.workspace-brand div > span { display: block; color: #636366; font-size: 13px; line-height: 1.4; }
.auth-college-logo { width: 80px; height: 80px; flex-shrink: 0; object-fit: contain; }
.workspace-brand .auth-institution-label { margin-bottom: 5px; color: #287fb4; font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.login-form-panel { padding: 32px; background: rgb(255 255 255 / 10%); }
.login-form-panel h1 { text-align: center; font-size: 23px; font-weight: 500; line-height: 1.2; }
.login-form-panel h1 + p { margin-top: 10px; font-size: 15px; line-height: 1.3; color: #636366; }
.form-heading { margin-bottom: 32px; }
.login-form-panel form { display: flex; flex-direction: column; gap: 0; }
.login-role-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; padding: 3px; margin: 0 0 20px; gap: 3px; border: 0; border-radius: 8px; background: rgb(118 118 128 / 12%); }
.login-role-option { position: relative; cursor: pointer; padding: 8px 4px; text-align: center; border-radius: 6px; font-size: 13px; line-height: 1.5; font-weight: 500; }
.login-role-option:has(:checked) { background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 8%); }
.login-role-option:has(:focus-visible) { outline: 2px solid #007aff; }
.sr-only, .login-role-option input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.login-fields label { display: block; font-size: 13px; line-height: 1.5; font-weight: 500; margin: 0 8px 5px; color: #636366; }
.login-fields input { width: 100%; height: 48px; border: 0; border-radius: 8px; background: rgb(255 255 255 / 40%); box-shadow: none; padding: 4px 16px; font-size: 16px; }
.login-fields input:hover { background: rgb(255 255 255 / 64%); }
.login-fields input:focus { background: white; outline: 2px solid rgb(0 122 255 / 35%); outline-offset: 0; }
.login-fields input::placeholder { color: #8e8e93; }
.field-hint { margin: 8px 8px 0; color: #636366; font-size: 12px; line-height: 1.5; }
.login-form-panel button[type=submit], .primary-link { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 32px; margin-bottom: 16px; min-height: 48px; padding: 10px 16px; border-radius: 8px; background: #007aff; color: white; font-size: 17px; font-weight: 500; text-align: center; }
.login-form-panel button[type=submit]:hover, .primary-link:hover { background: #006ee6; }
.login-form-panel button:disabled { cursor: wait; opacity: .6; }
.login-help { margin: 0; color: #636366; text-align: center; font-size: 13px; line-height: 1.5; }
.back-link { display: block; margin-bottom: 16px; }
.back-link:hover { color: #287fb4; }
.login-access-help { display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; padding: 14px; border-radius: 8px; background: rgb(255 255 255 / 24%); }
.login-access-help > svg { width: 18px; height: 18px; flex-shrink: 0; color: #287fb4; }
.login-access-help strong { display: block; font-size: 13px; line-height: 1.5; font-weight: 500; }
.login-access-help p { margin-top: 5px; color: #636366; font-size: 12px; line-height: 1.55; }
.auth-institution-footer { padding: 15px 24px; border-top: 1px solid rgb(60 60 67 / 7%); color: #636366; text-align: center; font-size: 11px; line-height: 1.5; }
.feedback { margin-bottom: 20px; padding: 14px; border-radius: 8px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.feedback.is-error { background: rgb(215 102 104 / 12%); color: #a33235; }
.feedback.is-success { background: rgb(52 184 134 / 12%); color: #22694d; }
.password-result { padding: 16px; border-radius: 8px; background: rgb(255 255 255 / 40%); overflow-wrap: anywhere; }
.password-result label { display: block; margin: 16px 0 8px; font-size: 13px; }
.password-result input { width: 100%; padding: 12px; border: 1px solid #8e8e9360; border-radius: 8px; background: transparent; font-family: monospace; font-size: 18px; }
.login-form-panel .logout-form button[type=submit] { margin: 8px 0 16px; background: transparent; color: #287fb4; font-size: 13px; }
:is(button, a, input):focus-visible { outline: 2px solid #007aff; outline-offset: 3px; }
.dark { color-scheme: dark; }
html:not(.dark) { color-scheme: light; }
.dark body { background: #000; color: #f2f2f7; }
.dark .desktop-stage { --ink: #f2f2f7; --muted: #8e8e93; --accent: #0a84ff; background-color: #07203e; background-blend-mode: multiply; }
.dark .login-window { background: rgb(10 10 12 / 90%); }
.dark .auth-reference-header { background: rgb(28 28 28 / 67%); }
.dark .workspace-brand div > span, .dark .login-form-panel h1 + p, .dark .login-help { color: #8e8e93; }
.dark .workspace-brand .auth-institution-label { color: #287fb4; }
.dark .login-role-option:has(:checked) { background: #292932; }
.dark .login-fields input { background: #101014; }
.dark .login-fields input:focus { background: #292932; }
.dark .login-access-help { background: rgb(255 255 255 / 4%); }
.dark .login-access-help p, .dark .auth-institution-footer, .dark .field-hint { color: #8e8e93; }
.dark .feedback.is-error { color: #ffa6a8; }
.dark .feedback.is-success { color: #80dcb6; }
@media (max-width: 473px) {
    .login-stage { padding: 0; align-items: flex-start; background: #e8e8eb; }
    .login-window { width: 100%; min-height: 100vh; min-height: 100dvh; border-radius: 0; box-shadow: none; background: #e8e8eb; }
    .login-theme-control { position: fixed; top: auto; bottom: 12px; right: 12px; z-index: 1; }
    .login-theme-control .theme-toggle { font-size: 12px; color: #636366; background: rgb(255 255 255 / 60%); }
    .auth-institution-footer { padding-bottom: 70px; }
}
@media (max-width: 409px) {
    .auth-college-logo { width: 64px; height: 64px; }
    .auth-reference-header .workspace-brand strong { font-size: 16px; }
    .auth-reference-header, .login-form-panel { padding: 24px; }
}
@media (prefers-reduced-motion: no-preference) {
    button, a, input { transition: background-color 160ms ease, color 160ms ease; }
}
