:root {
    color-scheme: light;
    --auth-navy: #081933;
    --auth-red: #d3224d;
    --auth-muted: #657083;
    --auth-border: #e0e5ec;
}

* { box-sizing: border-box; }

body.auth-page {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 40px clamp(24px, 6vw, 112px);
    background: linear-gradient(90deg, rgb(8 25 51 / 55%) 0%, rgb(8 25 51 / 60%) 48%, rgb(8 25 51 / 70%) 100%), url('../img/campus/campus-image.jpg') center / cover no-repeat;
    background-color: var(--auth-navy);
    color: var(--auth-navy);
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
svg { stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
a:focus-visible, button:focus-visible, input[type='checkbox']:focus-visible { outline: 3px solid var(--auth-red); outline-offset: 5px; }
[hidden] { display: none !important; }

.auth-shell {
    width: 100%;
    max-width: 360px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e8ed;
    border-radius: 24px;
    box-shadow: 0 24px 80px -20px #020b1b80;
}

.auth-panel { display: flex; flex-direction: column; min-width: 0; padding: 22px 24px 20px; text-align: left; }
.auth-brand { align-self: flex-start; display: inline-flex; margin-bottom: 16px; }
.auth-brand img { display: block; width: 150px; max-width: 100%; height: auto; }
.auth-form-content { width: 100%; margin: auto 0; }
.auth-heading { margin-bottom: 16px; }
.auth-portal-label { display: flex; align-items: center; justify-content: flex-start; gap: 8px; margin: 0 0 8px; color: var(--auth-muted); font-size: 10px; font-weight: 600; letter-spacing: .15em; }
.auth-portal-label span { width: 6px; height: 6px; background: var(--auth-red); border-radius: 50%; }
.auth-heading h1 { margin: 0 0 7px; font-size: 28px; font-weight: 600; line-height: 1.3; letter-spacing: -.055em; }
.auth-heading h1 > span { color: var(--auth-red); }
.auth-heading > p:last-child { margin: 0; color: var(--auth-muted); font-size: 12px; }
.auth-field { margin-bottom: 12px; }
.auth-field label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 500; }
.auth-input-wrap { position: relative; }
.auth-field input { display: block; width: 100%; height: 42px; padding: 0 14px 0 42px; border: 1px solid var(--auth-border); border-radius: 9px; background: #fcfcfd; color: var(--auth-navy); font-size: 12px; text-align: left; direction: ltr; transition: border-color .18s, box-shadow .18s; }
.auth-field input::placeholder { color: #8a93a1; opacity: 1; }
.auth-field input:hover { border-color: #b8c1ce; }
.auth-field input:focus { outline: 0; background: #fff; border-color: #61728c; box-shadow: 0 0 0 3px #0819330a; }
.auth-field input[aria-invalid='true'] { border-color: var(--auth-red); }
.auth-field input.auth-password { padding-right: 47px; }
.auth-field-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #8992a0; pointer-events: none; }
.auth-password-toggle { position: absolute; right: 4px; top: 1px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #7a8596; }
.auth-password-toggle:hover { color: var(--auth-navy); background: #eef1f5; }
.auth-password-toggle svg { width: 19px; height: 19px; }
.auth-eye-slash { display: none; }
.auth-password-toggle[aria-pressed='true'] .auth-eye-slash { display: block; }
.auth-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 16px; font-size: 11px; }
.auth-options > a { color: #b51d41; font-weight: 500; }
.auth-options > a:hover, .auth-panel-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.auth-remember { display: inline-flex; align-items: center; gap: 8px; color: #586476; cursor: pointer; }
.auth-remember input { width: 15px; height: 15px; margin: 0; accent-color: var(--auth-navy); cursor: pointer; }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: 13px; width: 100%; min-height: 42px; padding: 8px 20px; border: 1px solid var(--auth-navy); border-radius: 9px; background: var(--auth-navy); color: #fff; font-size: 13px; font-weight: 500; box-shadow: 0 5px 12px #08193312; transition: background .18s, border-color .18s, box-shadow .18s; }
.auth-submit svg { width: 18px; height: 18px; }
.auth-submit:hover { background: #173151; border-color: #173151; box-shadow: 0 7px 18px #08193326; }
.auth-submit:active { background: #030d1d; }
.auth-secure-note { display: flex; justify-content: flex-start; align-items: center; gap: 6px; margin: 12px 0 0; color: #798392; font-size: 10px; }
.auth-secure-note svg { flex-shrink: 0; width: 14px; height: 14px; }
.auth-panel-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 12px; border-top: 1px solid #ecedf0; color: #798392; font-size: 10px; }
.auth-panel-footer a { display: inline-flex; align-items: center; gap: 7px; color: #586476; }
.auth-panel-footer a > span { font-size: 15px; line-height: 1; }
.auth-alert { margin: 0 0 22px; padding: 13px 16px; border: 1px solid; border-radius: 9px; font-size: 12px; overflow-wrap: anywhere; }
.auth-alert p { margin: 0 0 4px; font-weight: 600; }
.auth-alert ul { margin: 0; padding: 0; list-style: none; }
.auth-alert li + li { margin-top: 4px; }
.auth-alert-error { border-color: #f2ccd5; background: #fff5f7; color: #a51e3e; }
.auth-alert-success { border-color: #beded1; background: #f1faf6; color: #23664e; }

@media (max-width: 1023px) {
    body.auth-page { padding: 24px; }
}

@media (max-width: 760px) {
    body.auth-page { padding: 20px; }
    .auth-shell { border-radius: 18px; }
}

@media (max-width: 380px) {
    body.auth-page { padding: 12px; }
    .auth-panel { padding: 20px 20px 18px; }
    .auth-options { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
