/* Theme */
:root {
    --red: #a50511;
    --yellow: #f7d517;
    --ink: #252623;
    --muted: #777970;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #faf9f6;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

/* Page layout */
.topline {
    height: 5px;
    background: linear-gradient(
        90deg,
        var(--red) 0 77%,
        var(--yellow) 77%
    );
}

.page {
    max-width: 1536px;
    min-height: calc(100svh - 5px);
    margin: auto;
    padding: 36px 48px 24px;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    gap: 7%;
    align-items: start;
    padding: 0;
}

/* .main {
    flex: 1;
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    gap: 7%;
    align-items: center;
    padding: 1px 0;
} */

/* University branding */
/* .brand {
    display: flex;
    align-items: center;
    gap: 13px;
} */

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 10px;
}

.monogram {
    width: 49px;
    height: 49px;
    border: 3px solid #f7d517;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-family: Georgia, serif;
    font-weight: bold;
    font-size: 21px;
    display: grid;
    place-items: center;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.brand-caption {
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

/* Image panel */
.visual {
    height: min(665px, 72vh);
    min-height: 490px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    background: #3f3731;
}

.visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 54% center;
}

.visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(26, 22, 17, 0.02) 20%,
        rgba(24, 22, 17, 0.85) 100%
    );
}

.visual-text {
    position: absolute;
    z-index: 1;
    bottom: 48px;
    left: 43px;
    right: 35px;
    color: white;
}

.eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.visual .eyebrow {
    color: var(--yellow);
    display: flex;
    align-items: center;
    gap: 12px;
}

.visual .eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--yellow);
}

h2 {
    margin: 21px 0 17px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 43px;
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -1px;
}

.visual p {
    max-width: 330px;
    margin: 0;
    color: #e5e3de;
    font-size: 13px;
    line-height: 1.8;
}

/* Login form */
.form-wrap {
    max-width: 385px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

.portal-label {
    margin-bottom: 22px;
    color: var(--red);
}

h1 {
    margin: 0 0 15px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 46px;
    font-weight: 400;
    letter-spacing: -1.6px;
    line-height: 1.12;
}

.intro {
    margin: 0 0 36px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

label {
    display: block;
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
}

.field {
    margin-bottom: 23px;
}

.input-wrap {
    position: relative;
}

input {
    width: 100%;
    height: 52px;
    border: 1px solid #dcdcd5;
    border-radius: 6px;
    background: #fff;
    padding: 0 16px;
    color: var(--ink);
    font: 14px Arial, sans-serif;
    transition: border 0.2s, box-shadow 0.2s;
}

input::placeholder {
    color: #a0a09a;
}

input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px #a5051110;
}

#password {
    padding-right: 52px;
}

/* Password visibility button */
.eye {
    position: absolute;
    right: 7px;
    top: 7px;
    height: 38px;
    width: 38px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #7c7d77;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.eye:hover {
    background: #f5f4f0;
}

button:focus-visible {
    outline: 3px solid #d6b700;
    outline-offset: 3px;
}

/* Login button */
.submit {
    width: 100%;
    height: 52px;
    margin-top: 30px;
    border: 0;
    border-radius: 6px;
    background: var(--red);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: background 0.2s, transform 0.2s;
}

.submit:hover {
    background: #84040e;
}

.submit:active {
    transform: translateY(1px);
}

/* Form messages and supporting details */
.status {
    margin: 17px 0 0;
    padding: 12px 14px;
    border-left: 3px solid #e1be00;
    border-radius: 3px;
    background: #fff6d7;
    font-size: 12px;
    line-height: 1.6;
}

.status:empty {
    display: none;
}

.footnote {
    margin: 26px 0 0;
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    color: #8a8b82;
    font-size: 11px;
}

.footnote svg {
    color: #99998e;
}

.rule {
    width: 30px;
    height: 3px;
    margin: 36px auto 0;
    background: var(--yellow);
}

/* Footer */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-top: 8px;
    color: #909188;
    font-size: 10px;
    letter-spacing: 0.15px;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 7px;
}

.dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--red);
}

/* Large screens */
@media (min-width: 1500px) {
    .main {
        gap: 9%;
    }

    .visual {
        height: 690px;
        max-height: 75vh;
    }
}

/* Tablets */
@media (max-width: 950px) {
    .page {
        padding: 28px;
    }

    .main {
        gap: 6%;
    }

    .visual-text {
        left: 28px;
        bottom: 34px;
    }

    h2 {
        font-size: 34px;
    }

    h1 {
        font-size: 40px;
    }

    .brand-name {
        font-size: 13px;
    }
}

/* Mobile devices */
@media (max-width: 700px) {
    .page {
        padding: 24px;
    }

    .main {
        display: block;
        padding: 0 0 28px;
    }

    .visual {
        min-height: 0;
        height: 220px;
        margin-bottom: 36px;
    }

    .visual img {
        object-position: center 45%;
    }

    .visual-text {
        left: 24px;
        bottom: 24px;
    }

    h2 {
        max-width: 280px;
        margin: 12px 0 0;
        font-size: 29px;
    }

    .visual p {
        display: none;
    }

    .form-wrap {
        max-width: 420px;
        padding: 0;
    }

    h1 {
        font-size: 39px;
    }

    .portal-label {
        margin-bottom: 17px;
    }

    .intro {
        margin-bottom: 28px;
    }

    .brand-caption {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .brand-name {
        font-size: 12px;
    }

    .monogram {
        width: 43px;
        height: 43px;
        font-size: 18px;
    }

    footer {
        flex-direction: column;
        gap: 10px;
        padding-bottom: 6px;
        font-size: 9px;
        text-align: center;
    }

    .rule {
        margin-top: 26px;
    }
}

/* Login errors */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 18px;
    color: #85121c;
    background: #fff3f3;
    border: 1px solid #f0c8cc;
    border-left: 4px solid #a50511;
    border-radius: 10px;
}

.login-alert-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.login-alert-content {
    flex: 1;
    min-width: 0;
}

.login-alert-content strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 700;
}

.login-alert-content ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.login-alert-content li + li {
    margin-top: 4px;
}

/* Footer */
.login-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    width: 100%;
    margin-top: auto;
    padding-top: 24px;
    padding-bottom: 8px;
    color: #66685f;
    font-size: 12px;
    line-height: 1.6;
}

.login-footer .copyright {
    display: inline;
    visibility: visible;
    opacity: 1;
    color: #66685f;
}

.login-footer .footer-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #66685f;
}

.login-footer .dot {
    display: inline-block;
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a50511;
}

@media (max-width: 640px) {
    .login-footer {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 8px;
    }
}

/* Compact university header */
.brand {
    gap: 13px;
    margin: 0 0 10px;
    padding: 0;
}

.brand-logo {
    display: block;
    width: 90px;
    height: 90px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Start the image directly below the header gap */
.main {
    padding-top: 0;
    align-items: start;
}

@media (max-width: 700px) {
    .brand-logo {
        width: 64px;
        height: 64px;
    }
}

.forgot-password-link {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 22px;
}

.forgot-password-link button {
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: #a50511;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.forgot-password-link button:hover {
    text-decoration: underline;
}

.forgot-password-modal {
    width: min(460px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: #fff;
    color: #252623;
    box-shadow: 0 24px 80px rgb(0 0 0 / 22%);
    overflow-y: auto;
}

.forgot-password-modal::backdrop {
    background: rgb(20 20 20 / 55%);
    backdrop-filter: blur(4px);
}

.forgot-password-content {
    position: relative;
    padding: 32px;
}

.forgot-password-close {
    position: absolute;
    top: 14px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f4f3f0;
    color: #555;
    font-size: 25px;
    cursor: pointer;
}

.forgot-password-badge {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: #a50511;
    color: #f7d517;
    font-size: 18px;
    font-weight: 800;
}

.forgot-password-content h2 {
    margin: 0 0 10px;
    font-size: 25px;
}

.forgot-password-content > p {
    margin: 0 0 24px;
    color: #777970;
    font-size: 14px;
    line-height: 1.65;
}

.forgot-password-modal .field input {
    width: 100%;
    box-sizing: border-box;
}

.forgot-password-status:empty {
    display: none;
}

.forgot-password-status {
    margin: 0 0 20px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
}

.forgot-password-status[data-state="loading"] {
    border-color: #e7e5e1;
    background: #f7f6f3;
    color: #555;
}

.forgot-password-status[data-state="success"] {
    border-color: #cce8d8;
    background: #edf8f1;
    color: #216340;
}

.forgot-password-status[data-state="error"] {
    border-color: #f0cdd0;
    background: #fff1f2;
    color: #a50511;
}

.forgot-password-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.forgot-password-actions .submit {
    width: auto;
    margin: 0;
    padding: 12px 18px;
    font-size: 13px;
}

.forgot-password-cancel {
    padding: 12px 18px;
    border: 1px solid #deddd7;
    border-radius: 10px;
    background: #fff;
    color: #555;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.forgot-password-actions button:disabled {
    opacity: .65;
    cursor: wait;
}

.forgot-password-modal button:focus-visible,
.forgot-password-link button:focus-visible {
    outline: 3px solid #f7d517;
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .forgot-password-content {
        padding: 28px 22px;
    }
}