:root {
    --feu-green: #0f5a3d;
    --feu-green-dark: #073d2c;
    --feu-green-soft: #e8f1ec;
    --feu-gold: #f2b51d;
    --ink: #16231d;
    --copy: #52635a;
    --muted: #6b7770;
    --line: #d9e2dc;
    --surface: #ffffff;
    --canvas: #f5f7f5;
    --danger: #9f3535;
    --danger-soft: #fff1ef;
    --success: #175c3d;
    --success-soft: #edf6ef;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 0;
    background: var(--canvas);
}

body {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font: 14px/1.5 Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

svg {
    display: block;
}

.auth-page {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(410px, .75fr);
    min-height: 100vh;
    min-height: 100svh;
    background: var(--surface);
}

.auth-visual {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background: #315d4b url("/images/feu-campus-hero.png") center / cover no-repeat;
}

.auth-visual-shade {
    position: absolute;
    inset: 0;
    background: rgba(5, 48, 33, .13);
}

.auth-divider-wave {
    position: fixed;
    inset-block: 0;
    left: calc(62.5% - 34px);
    z-index: 3;
    width: 68px;
    pointer-events: none;
}

.auth-divider-wave svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.auth-divider-wave path {
    fill: none;
    stroke-linecap: round;
}

.wave-green {
    stroke: var(--feu-green);
    stroke-width: 4;
}

.wave-gold {
    stroke: var(--feu-gold);
    stroke-width: 2;
}

.auth-panel {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 48px clamp(32px, 5vw, 76px);
    background: var(--surface);
}

.auth-panel-inner {
    width: min(100%, 430px);
    margin: auto;
}

.auth-heading {
    margin-bottom: 28px;
}

.auth-system-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.auth-system-brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.auth-system-brand span {
    display: grid;
    gap: 2px;
    line-height: 1.15;
}

.auth-system-brand strong {
    color: var(--feu-green-dark);
    font-size: 18px;
    letter-spacing: .055em;
}

.auth-system-brand small {
    color: var(--copy);
    font-size: 14px;
    font-weight: 600;
}

.auth-form-heading {
    margin-top: 25px;
}

.auth-role-label {
    display: block;
    margin-bottom: 5px;
    color: var(--feu-green);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.auth-form-heading h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(25px, 3vw, 31px);
    font-weight: 680;
    letter-spacing: -.035em;
    line-height: 1.2;
}

.auth-alert,
.access-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 11px 13px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 13px;
}

.auth-alert svg,
.access-notice svg {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.auth-alert-danger {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #ebc8c3;
}

.auth-alert-danger svg {
    fill: var(--danger);
}

.auth-alert-success {
    color: var(--success);
    background: var(--success-soft);
    border-color: #c4ddcc;
}

.auth-alert-success svg {
    fill: var(--success);
}

.access-notice {
    color: #664c0b;
    background: #fff8e5;
    border-color: #ead28d;
}

.access-notice svg {
    fill: #8b6810;
}

.access-notice span {
    display: grid;
    gap: 2px;
}

.access-notice strong {
    font-size: 12px;
}

.access-notice small {
    color: #765f25;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.form-group {
    margin: 0;
}

.form-group > label,
.form-label-row label {
    display: block;
    margin-bottom: 7px;
    color: #293a31;
    font-size: 13px;
    font-weight: 650;
}

.form-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
}

.form-label-row a {
    color: var(--feu-green);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.form-label-row a:hover {
    text-decoration: underline;
}

.input-shell {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 13px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: #718078;
    pointer-events: none;
}

.form-control {
    width: 100%;
    min-height: 46px;
    padding: 11px 44px 11px 42px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cbd7d0;
    border-radius: 7px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.form-control::placeholder {
    color: #89938d;
}

.form-control:focus {
    border-color: var(--feu-green);
    box-shadow: 0 0 0 3px rgba(15, 90, 61, .11);
}

.form-control[aria-invalid="true"] {
    border-color: var(--danger);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    transform: translateY(-50%);
    color: #66746d;
    background: transparent;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
}

.password-toggle:hover {
    background: #f0f3f1;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

.remember-option {
    display: flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    color: var(--copy);
    font-size: 13px;
    cursor: pointer;
}

.remember-option input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--feu-green);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
    color: #fff;
    background: var(--feu-green);
    border: 1px solid var(--feu-green);
    border-radius: 7px;
    font-weight: 650;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.btn-primary:hover {
    background: var(--feu-green-dark);
    border-color: var(--feu-green-dark);
}

.btn-primary > svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.button-loader {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}

.auth-form.is-submitting .button-loader {
    display: block;
}

.auth-form.is-submitting .btn-primary > svg {
    display: none;
}

.auth-form.is-submitting .button-label {
    opacity: .85;
}

.auth-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--feu-green);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.auth-secondary-link svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.auth-secondary-link:hover {
    text-decoration: underline;
}

.auth-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    margin-top: 34px;
    padding-top: 18px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 11px;
}

:is(a, button, input):focus-visible {
    outline: 3px solid rgba(15, 90, 61, .28);
    outline-offset: 2px;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
    .auth-page {
        grid-template-columns: minmax(260px, .75fr) minmax(390px, 1fr);
    }

    .auth-divider-wave {
        left: calc(42.85% - 34px);
    }
}

@media (max-width: 720px) {
    .auth-page {
        display: block;
        min-height: 100svh;
    }

    .auth-visual,
    .auth-divider-wave {
        display: none;
    }

    .auth-panel {
        min-height: 100svh;
        padding: 34px 22px;
    }

    .auth-panel-inner {
        max-width: 440px;
    }
}

@media (max-width: 420px) {
    .auth-panel {
        padding-inline: 18px;
    }

    .auth-system-brand img {
        width: 50px;
        height: 50px;
    }

    .auth-system-brand strong {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

.otp-password-policy {
    display: block;
    margin-top: 8px;
    line-height: 1.5;
    color: #53615b;
}

.otp-form .form-control {
    padding-left: 14px;
    padding-right: 14px;
}

.otp-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 18px;
}

.otp-resend .auth-secondary-link {
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
    min-height: 44px;
}

.otp-resend .auth-secondary-link:disabled {
    opacity: 0.65;
    cursor: default;
}

/* Campus split layout retained from the original login experience. */
.auth-page {
    display: block;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    position: relative;
}

.auth-visual {
    background-color: #366451;
    background-image: url("/images/feu-campus-hero.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: #ffffff;
    inset: 0;
    min-height: 100%;
    overflow: hidden;
    padding: clamp(28px, 4vw, 58px) clamp(28px, 5vw, 76px);
    position: absolute;
}

.auth-visual-shade {
    background:
        linear-gradient(90deg, rgba(3, 34, 23, 0.38), rgba(5, 45, 31, 0.14) 39%, rgba(8, 42, 29, 0.02) 66%),
        linear-gradient(180deg, rgba(7, 34, 25, 0.08), rgba(7, 40, 28, 0.01) 42%, rgba(4, 30, 21, 0.34));
}

.auth-brand,
.auth-visual-note {
    position: relative;
    z-index: 1;
}

.auth-brand {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(7, 35, 25, 0.19);
    color: var(--feu-green-dark);
    display: inline-flex;
    gap: 12px;
    padding: 10px 17px 10px 12px;
}

.auth-brand-tamaraw {
    height: 48px;
    object-fit: contain;
    width: 40px;
}

.auth-brand-divider {
    background: rgba(21, 82, 57, 0.22);
    height: 38px;
    width: 1px;
}

.auth-brand-seal {
    height: 48px;
    object-fit: contain;
    width: 48px;
}

.auth-brand-copy {
    display: grid;
    line-height: 1.12;
}

.auth-brand-copy small {
    color: #54645c;
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.13em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.auth-brand-copy strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    white-space: nowrap;
}

.auth-visual-note {
    align-items: center;
    bottom: clamp(28px, 4.5vw, 62px);
    display: flex;
    gap: 12px;
    left: clamp(28px, 5vw, 76px);
    position: absolute;
}

.auth-visual-note-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    display: flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.auth-visual-note-icon svg {
    fill: var(--feu-gold);
    height: 22px;
    width: 22px;
}

.auth-visual-note > span:last-child {
    display: grid;
}

.auth-visual-note strong {
    font-size: 0.88rem;
}

.auth-visual-note small {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
}

.auth-panel {
    align-items: stretch;
    background: rgba(251, 252, 249, 0.90);
    clip-path: polygon(47% 0, 100% 0, 100% 100%, 0 100%);
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    padding: 0;
    position: relative;
    width: 65%;
    z-index: 2;
}

.auth-panel::before {
    background: var(--feu-gold);
    content: "";
    display: none;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 5px;
}

.auth-diagonal-accent {
    /* Extended endpoints preserve the panel's 65.55%-to-35% diagonal beyond both edges. */
    --auth-accent-top: 66.161%;
    --auth-accent-bottom: 34.389%;
    --auth-accent-line-width: 4px;
    --auth-accent-gap: 5px;
    --auth-accent-green: #00573f;
    --auth-accent-gold: #dcae24;
    --auth-accent-green-speed: 6.2s;
    --auth-accent-gold-speed: 6.8s;
    --auth-accent-gold-delay: 0.65s;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    z-index: 3;
}

.auth-diagonal-line {
    inset: 0;
    position: absolute;
}

.auth-diagonal-line::after {
    content: "";
    height: 24%;
    left: 0;
    opacity: 0.9;
    position: absolute;
    top: 38%;
    transform-origin: center;
    will-change: top, opacity, transform;
    width: 100%;
}

.auth-diagonal-line-green {
    background: var(--auth-accent-green);
    clip-path: polygon(
        var(--auth-accent-top) -2%,
        calc(var(--auth-accent-top) + var(--auth-accent-line-width)) -2%,
        calc(var(--auth-accent-bottom) + var(--auth-accent-line-width)) 102%,
        var(--auth-accent-bottom) 102%
    );
    filter: drop-shadow(0 0 2px rgba(0, 87, 63, 0.24));
}

.auth-diagonal-line-green::after {
    animation: auth-accent-travel var(--auth-accent-green-speed) ease-in-out infinite alternate;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(65, 232, 218, 0.18) 14%,
        rgba(82, 243, 255, 0.52) 31%,
        rgba(179, 251, 255, 0.96) 44%,
        #ffffff 50%,
        rgba(179, 251, 255, 0.96) 56%,
        rgba(82, 243, 255, 0.52) 69%,
        rgba(65, 232, 218, 0.18) 86%,
        transparent 100%
    );
    filter: drop-shadow(0 0 8px rgba(85, 244, 255, 0.92));
}

.auth-diagonal-line-gold {
    background: var(--auth-accent-gold);
    clip-path: polygon(
        calc(var(--auth-accent-top) + var(--auth-accent-line-width) + var(--auth-accent-gap)) -2%,
        calc(var(--auth-accent-top) + var(--auth-accent-line-width) + var(--auth-accent-gap) + var(--auth-accent-line-width)) -2%,
        calc(var(--auth-accent-bottom) + var(--auth-accent-line-width) + var(--auth-accent-gap) + var(--auth-accent-line-width)) 102%,
        calc(var(--auth-accent-bottom) + var(--auth-accent-line-width) + var(--auth-accent-gap)) 102%
    );
    filter: drop-shadow(0 0 2px rgba(220, 174, 36, 0.22));
}

.auth-diagonal-line-gold::after {
    animation: auth-accent-travel var(--auth-accent-gold-speed) ease-in-out var(--auth-accent-gold-delay) infinite alternate;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 135, 62, 0.2) 14%,
        rgba(255, 167, 66, 0.56) 31%,
        rgba(255, 225, 151, 0.96) 44%,
        #ffffff 50%,
        rgba(255, 225, 151, 0.96) 56%,
        rgba(255, 167, 66, 0.56) 69%,
        rgba(255, 135, 62, 0.2) 86%,
        transparent 100%
    );
    filter: drop-shadow(0 0 8px rgba(255, 153, 62, 0.94));
}

@keyframes auth-accent-travel {
    0% {
        opacity: 0.72;
        top: -18%;
        transform: scaleY(0.82);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.12);
    }
    100% {
        opacity: 0.8;
        top: 94%;
        transform: scaleY(0.88);
    }
}

.auth-panel-inner {
    align-self: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 clamp(26px, 4vw, 64px) 0 0;
    max-width: 500px;
    min-height: 100vh;
    min-height: 100svh;
    padding: 34px 0 24px;
    position: relative;
    width: min(42vw, 500px);
    z-index: 1;
}

.auth-mobile-brand {
    display: none;
}

.auth-heading {
    align-items: center;
    display: grid;
    gap: 0 18px;
    grid-template-columns: 64px 1fr;
    margin-bottom: 20px;
}

.auth-heading-mark {
    align-items: center;
    display: flex;
    height: 66px;
    justify-content: center;
    width: 64px;
}

.auth-heading-mark img {
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.auth-role-label {
    color: var(--feu-green);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    margin: 0 0 4px;
}

.auth-heading h2 {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 2.55vw, 2.55rem);
    letter-spacing: -0.035em;
    line-height: 1.03;
    margin: 0;
    white-space: nowrap;
}

.auth-description {
    color: var(--muted);
    font-size: 0.98rem;
    grid-column: 1 / -1;
    line-height: 1.62;
    margin: 11px 0 0;
}

.auth-form {
    gap: 16px;
}

.form-control {
    background: rgba(255, 255, 255, 0.93);
    border-radius: 10px;
    font-size: 0.98rem;
    height: 56px;
    padding: 0 46px;
}

.btn-primary {
    background: var(--feu-green);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(10, 58, 40, 0.20);
    font-size: 0.98rem;
    height: 56px;
    transition: box-shadow 180ms ease, transform 180ms ease;
}

.btn-primary:hover {
    background: var(--feu-green-dark);
    box-shadow: 0 16px 30px rgba(10, 58, 40, 0.28);
    transform: translateY(-1px);
}

.auth-footer {
    border-top: 0;
    justify-content: center;
    margin-top: 26px;
    padding-top: 0;
}

/* Narrow screens and portrait tablets use the stacked campus banner. */
@media (max-width: 959px), (max-width: 1440px) and (orientation: portrait) {
    .auth-page {
        background: var(--surface);
        overflow: visible;
    }

    .auth-visual {
        background-position: center 43%;
        display: block;
        height: 240px;
        inset: auto;
        min-height: 0;
        padding: 24px;
        position: relative;
    }

    .auth-brand {
        padding: 8px 14px 8px 9px;
    }

    .auth-brand-tamaraw,
    .auth-brand-seal {
        height: 39px;
        width: 39px;
    }

    .auth-visual-note {
        display: none;
    }

    .auth-panel {
        background: var(--surface);
        border-radius: 30px 30px 0 0;
        clip-path: none;
        display: block;
        margin: -34px 0 0;
        min-height: auto;
        overflow: visible;
        width: 100%;
    }

    .auth-diagonal-accent {
        display: none;
    }

    .auth-panel::before {
        display: block;
        height: 5px;
        left: 30px;
        right: 30px;
        top: 0;
        width: auto;
    }

    .auth-panel-inner {
        margin: 0 auto;
        max-width: 560px;
        min-height: auto;
        padding: 42px 24px 27px;
        width: 100%;
    }
}

@media (min-width: 561px) and (max-width: 1200px) {
    .auth-heading { grid-template-columns: 56px minmax(0, 1fr); }
    .auth-heading-mark { width: 56px; height: 58px; }
    .auth-heading h2 { font-size: 30px; white-space: normal; overflow-wrap: anywhere; }
    .form-control { font-size: 16px; }
}

/* Landscape tablets and on-screen keyboards keep the form naturally scrollable. */
@media (min-width: 561px) and (max-width: 1200px) and (max-height: 850px) {
    .auth-visual { height: 160px; }
    .auth-panel-inner { padding-top: 28px; }
}

@media (max-width: 560px) {
    .auth-visual {
        background-position: center 41%;
        height: 188px;
        padding: 17px 18px;
    }

    .auth-brand {
        border-radius: 11px;
        gap: 8px;
        padding: 7px 11px 7px 8px;
    }

    .auth-brand-tamaraw,
    .auth-brand-seal {
        height: 32px;
        width: 32px;
    }

    .auth-brand-divider {
        height: 28px;
    }

    .auth-brand-copy small {
        font-size: 0.55rem;
        letter-spacing: 0.08em;
        margin-bottom: 3px;
    }

    .auth-brand-copy strong {
        font-size: 0.88rem;
    }

    .auth-panel {
        margin-top: -24px;
    }

    .auth-panel-inner {
        padding: 34px 20px 23px;
    }

    .auth-heading {
        gap: 0 13px;
        grid-template-columns: 45px 1fr;
        margin-bottom: 23px;
    }

    .auth-heading-mark {
        height: 48px;
        width: 43px;
    }

    .auth-heading h2 {
        font-size: 1.7rem;
        white-space: normal;
    }

    .auth-description {
        font-size: 0.84rem;
        margin-top: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-diagonal-line::after {
        animation: none !important;
    }
}

/* Landscape tablet composition: clip decoration, never interactive content. */
@media (min-width: 960px) and (max-width: 1440px) and (orientation: landscape) {
    .auth-page {
        --tablet-diagonal-top: 54%;
        --tablet-diagonal-bottom: 28%;
        --tablet-gutter: clamp(24px, 3vw, 40px);
        overflow: visible;
    }
    .auth-visual {
        position: absolute; inset: 0; height: auto; min-height: 100%;
        display: block; padding: var(--tablet-gutter);
        background-position: center;
    }
    .auth-brand { gap: 9px; padding: 9px 13px; }
    .auth-brand-tamaraw, .auth-brand-seal { width: 38px; height: 42px; }
    .auth-brand-copy strong { font-size: 18px; }
    .auth-brand-copy small { font-size: 10px; }
    .auth-visual-note { display: flex; left: var(--tablet-gutter); bottom: 28px; max-width: 25%; gap: 8px; }
    .auth-visual-note-icon { flex: 0 0 34px; width: 34px; height: 34px; }
    .auth-visual-note strong { font-size: 12px; }
    .auth-visual-note small { font-size: 11px; }
    .auth-panel {
        display: flex; justify-content: flex-end; width: 100%; margin: 0;
        min-height: 100svh; background: transparent; border-radius: 0;
        clip-path: none; overflow: visible;
    }
    .auth-panel::before {
        display: block; inset: 0; width: 100%; height: 100%; z-index: 0;
        background: rgba(251, 252, 249, .94);
        clip-path: polygon(var(--tablet-diagonal-top) 0, 100% 0, 100% 100%, var(--tablet-diagonal-bottom) 100%);
    }
    .auth-diagonal-accent {
        display: block;
        --auth-accent-top: var(--tablet-diagonal-top);
        --auth-accent-bottom: var(--tablet-diagonal-bottom);
        --auth-accent-line-width: 2px;
        --auth-accent-gap: 3px;
    }
    .auth-diagonal-line-green { clip-path: polygon(var(--auth-accent-top) 0, calc(var(--auth-accent-top) + var(--auth-accent-line-width)) 0, calc(var(--auth-accent-bottom) + var(--auth-accent-line-width)) 100%, var(--auth-accent-bottom) 100%); }
    .auth-diagonal-line-gold { clip-path: polygon(calc(var(--auth-accent-top) + var(--auth-accent-line-width) + var(--auth-accent-gap)) 0, calc(var(--auth-accent-top) + 2 * var(--auth-accent-line-width) + var(--auth-accent-gap)) 0, calc(var(--auth-accent-bottom) + 2 * var(--auth-accent-line-width) + var(--auth-accent-gap)) 100%, calc(var(--auth-accent-bottom) + var(--auth-accent-line-width) + var(--auth-accent-gap)) 100%); }
    .auth-panel-inner {
        flex: 0 0 auto; width: min(44vw, 500px); max-width: 500px;
        margin: 0 var(--tablet-gutter) 0 0; min-height: 100svh;
        padding: 32px 0; justify-content: center;
    }
    .auth-heading { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; margin-bottom: 22px; }
    .auth-heading-mark { width: 52px; height: 58px; }
    .auth-heading h2 { font-size: clamp(30px, 2.5vw, 36px); white-space: normal; overflow-wrap: anywhere; }
    .auth-form { gap: 16px; }
    .form-control, .btn-primary { height: 52px; min-height: 48px; font-size: 16px; }
    .auth-footer { margin-top: 22px; }
}
@media (min-width: 960px) and (max-width: 1440px) and (orientation: landscape) and (max-height: 650px) {
    .auth-panel-inner { padding-block: 20px; }
    .auth-heading { grid-template-columns: 42px minmax(0, 1fr); margin-bottom: 14px; }
    .auth-heading-mark { width: 42px; height: 46px; }
    .auth-heading h2 { font-size: 30px; }
    .auth-form { gap: 12px; }
    .form-control, .btn-primary { height: 48px; }
    .auth-footer, .otp-links { margin-top: 16px; }
    .auth-visual-note { display: none; }
}

/* Stacked login: scoped widths take precedence over shared responsive resets. */
@media (max-width: 959px), (max-width: 1440px) and (orientation: portrait) {
    .auth-shell .auth-page {
        background: var(--surface);
        min-height: 100svh;
        padding-bottom: max(32px, env(safe-area-inset-bottom));
        overflow: visible;
    }
    .auth-shell .auth-visual {
        height: 200px; min-height: 0; padding: 24px;
        position: relative; inset: auto;
        background: #366451 url("/images/feu-campus-hero.png") center / cover no-repeat;
    }
    .auth-shell .auth-visual-shade { display: block; }
    .auth-shell .auth-panel {
        width: 100%; max-width: 100%;
        margin: 0; min-height: 0;
        border: 0; border-radius: 0;
        background: var(--surface);
        box-shadow: none;
        overflow: visible;
    }
    .auth-shell .auth-panel::before {
        height: 3px; left: 0; right: 0; top: 0;
        width: 100%; border-radius: 0;
    }
    .auth-shell .auth-panel-inner {
        width: 100%; max-width: 560px; min-height: 0;
        margin: 0 auto; padding: 32px;
    }
    .auth-shell .auth-heading { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
    .auth-shell .auth-heading-mark { width: 48px; height: 52px; }
    .auth-shell .auth-heading h2 { white-space: normal; overflow-wrap: anywhere; font-size: 30px; }
    .auth-shell .form-label-row { flex-wrap: wrap; gap: 4px 12px; }
    .auth-shell .form-control { font-size: 16px; min-height: 48px; }
    .auth-shell .btn-primary { min-height: 48px; height: auto; padding-block: 14px; }
    .auth-shell .auth-brand { max-width: 100%; }
    .auth-shell .auth-brand-copy { min-width: 0; }
    .auth-shell .auth-brand-copy strong { white-space: normal; overflow-wrap: anywhere; }
    .auth-shell .auth-footer { margin-top: 24px; }
}
@media (max-width: 560px) {
    .auth-shell .auth-visual { height: 160px; padding: 16px; }
    .auth-shell .auth-panel { width: 100%; }
    .auth-shell .auth-panel-inner { padding: 24px; }
    .auth-shell .auth-heading { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
    .auth-shell .auth-heading-mark { width: 40px; height: 46px; }
    .auth-shell .auth-heading h2 { font-size: 27px; }
}

/* Shared input hierarchy across desktop, landscape, and stacked layouts. */
.auth-shell .auth-heading { margin-bottom: 24px; }
.auth-shell .auth-form { gap: 20px; }
.auth-shell .form-group > label,
.auth-shell .form-label-row label { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.auth-shell .form-control { font-size: 16px; min-height: 48px; }
.auth-shell .auth-options-row { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; }
.auth-shell .auth-recovery-link { display: inline-flex; font-size: 13px; color: var(--feu-green); text-decoration: none; }
.auth-shell .auth-recovery-link:hover { text-decoration: underline; }
.auth-shell [data-auth-refresh][hidden] { display: none !important; }
.auth-shell [data-auth-form] [data-auth-feedback][hidden],
.auth-shell [data-auth-form] .auth-field-error[hidden] { display: none !important; }
.auth-shell [data-auth-form] .auth-submit-feedback { display: grid; grid-template-columns: 18px minmax(0, 1fr); margin: 0; }
.auth-shell [data-auth-form] .auth-feedback-copy { min-width: 0; overflow-wrap: anywhere; }
.auth-shell [data-auth-form] .auth-feedback-copy [data-auth-refresh] { display: flex; width: fit-content; max-width: 100%; margin-top: 6px; }
.auth-shell [data-auth-form] .auth-field-error { margin: 6px 0 0; color: var(--danger); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.auth-shell [data-auth-form] .form-control[aria-invalid="true"] { border-color: var(--danger); }
.auth-shell [data-auth-form] .form-control:focus-visible { outline: 2px solid var(--feu-green); outline-offset: 2px; }
.auth-shell [data-auth-form] .auth-submit-feedback:focus-visible { outline: 2px solid var(--feu-green); outline-offset: 2px; }
.auth-shell .otp-links { margin-top: 20px; }
@media (min-width: 960px) and (max-width: 1440px) and (orientation: landscape) and (max-height: 650px) {
    .auth-shell .auth-heading { margin-bottom: 14px; }
    .auth-shell .auth-form { gap: 12px; }
    .auth-shell .otp-links { margin-top: 16px; }
}
