:root { --navy: #233867; --red: #941e27; --ink: #142c4c; --border: #909090; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; color: var(--ink); background: #fff; font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 13px; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.portal-header { min-height: 82px; background: var(--navy); color: #fff; display: flex; align-items: flex-end; }
.portal-nav { width: min(1400px, calc(100% - 48px)); margin: 0 auto; display: flex; gap: 70px; align-items: center; padding: 0 5px 13px; font-size: 15px; }
.portal-nav a { text-decoration: none; line-height: 1.5; }
.portal-nav a:hover { text-decoration: underline; }
.portal-nav a[aria-current="page"] { font-weight: 700; border-bottom: 2px solid currentColor; }
.portal-main { flex: 1; min-width: 0; display: flow-root; }
.portal-footer { min-height: 57px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 30px; }
.portal-footer a { text-decoration: none; }
.portal-footer a:hover { text-decoration: underline; }
.portal-logo { display: block; width: 400px; max-width: 100%; margin: 0 auto; }
.portal-logo img { display: block; width: 100%; height: auto; max-height: 108px; object-fit: contain; }
.page-login .portal-main { display: flex; justify-content: center; align-items: flex-start; padding: 74px 20px 80px; background: #e9edf2; }
.portal-main.has-campus { background: url('../images/aiu-campus.png') center center / cover no-repeat; }
.login-card { background: #fff; width: 474px; padding: 40px 30px 29px; }
.login-card .portal-logo { margin-bottom: 30px; }
.login-input { border: 1px solid #ccc; border-radius: 2px; padding: 8px 12px; margin-bottom: 10px; }
.login-input input { width: 100%; min-height: 36px; padding: 9px 12px; border: 0; border-radius: 3px; background: #e8effc; color: #111; }
.portal-button { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 45px; padding: 10px 14px; background: var(--navy); color: white; border: 0; border-radius: 2px; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.portal-button:hover { filter: brightness(1.12); }
.login-card .portal-button { width: 100%; margin-top: 15px; font-size: 16px; }
.button-red { background: var(--red); }
.button-teal { background: #1a567a; }
.forgot-link { display: inline-block; color: #087abb; margin-top: 17px; font-size: 14px; }
.university-address { font-size: 13px; line-height: 21px; text-align: center; margin: 20px 0 0; }
.university-address strong { font-weight: 500; }
.university-address a { text-decoration: none; white-space: nowrap; }
.reset-panel { width: 460px; max-width: calc(100% - 40px); margin: 160px auto 80px; padding: 30px; background: #fff; text-align: center; }
.reset-panel .portal-logo { margin-bottom: 28px; }
.reset-panel p { line-height: 20px; margin: 0 0 20px; }
.reset-panel .arabic-copy { margin-bottom: 23px; }
.reset-input { width: 100%; border: 1px solid #ccc; border-radius: 0; min-height: 55px; padding: 15px 24px; font-size: 15px; }
.reset-password-form { display: grid; gap: 16px; }
.reset-password-label { display: grid; gap: 7px; color: #16395a; font-size: 14px; font-weight: 600; text-align: left; }
.reset-password-form .reset-input { margin: 0; }
.reset-panel .portal-button { width: 100%; margin-top: 14px; font-size: 16px; }
.wide-page { width: 690px; max-width: calc(100% - 40px); margin: 86px auto 60px; }
.form-panel { border: 1px solid var(--border); border-radius: 3px; padding: 30px 32px 20px; background: #fff; }
.form-panel h1 { font-size: 15px; font-weight: 500; margin: 0 0 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { min-width: 0; }
.field label { display: block; color: #536175; font-size: 12px; line-height: 17px; margin-bottom: 3px; }
.required { color: #dc3545; margin-right: 2px; }
.field input, .field select, .field textarea { display: block; width: 100%; min-width: 0; min-height: 33px; border: 1px solid #858585; border-radius: 3px; padding: 5px 10px; background: #fff; color: #142c4c; }
.field select { padding-right: 28px; }
.field textarea { resize: vertical; min-height: 60px; }
.phone-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2.06fr); gap: 12px; }
.contact-form { display: grid; gap: 11px; }
.contact-form .phone-row { grid-template-columns: minmax(100px, 212px) minmax(0, 1fr); }
.submit-row { display: flex; justify-content: flex-end; margin-top: 17px; }
.submit-row .portal-button { width: 164px; min-height: 32px; padding: 7px 14px; font-weight: 400; }
.contact-form .submit-row { margin-top: 11px; }
.form-panel > .portal-logo { margin: 0 auto 30px; }
.signup-page { width: 690px; max-width: calc(100% - 40px); margin: 86px auto 30px; }
.signup-panel > .portal-logo { width: 380px; }
.signup-panel { padding: 24px 32px; }
.signup-panel h1 { text-align: center; font-size: 19px; margin-bottom: 20px; }
.signup-panel .form-grid { column-gap: 24px; row-gap: 30px; }
.signup-panel .field label { font-size: 12px; }
.signup-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 38px; }
.password-control { position: relative; }
.password-control input { padding-right: 40px; }
.password-toggle { display: flex; align-items: center; justify-content: center; position: absolute; right: 1px; top: 1px; width: 36px; height: calc(100% - 2px); border: 0; border-radius: 3px; background: transparent; color: #707070; cursor: pointer; }
.password-toggle:hover { background: #eef1f6; }
.password-hint { color: #737373; }
.form-feedback { border-left: 3px solid #1a567a; background: #eff5fa; padding: 12px; margin: 18px 0 0; line-height: 1.5; text-align: left; }
.form-feedback[hidden] { display: none; }
:focus-visible { outline: 3px solid #3c89c9; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 5; padding: 12px; background: white; color: var(--navy); }
.skip-link:focus { top: 12px; }
.noscript-message { padding: 16px; text-align: center; }
@media (max-width: 700px) {
    .portal-header { min-height: 70px; align-items: center; }
    .portal-nav { width: 100%; gap: 12px 24px; flex-wrap: wrap; justify-content: center; padding: 16px; font-size: 12px; }
    .portal-footer { padding: 18px 16px; font-size: 12px; flex-wrap: wrap; }
    .page-login .portal-main { align-items: center; padding: 40px 16px; }
    .login-card { padding: 30px 22px; }
    .reset-panel { margin-top: 70px; }
    .wide-page { margin-top: 40px; }
    .form-panel { padding: 24px 18px; }
    .form-grid { grid-template-columns: 1fr; gap: 16px; }
    .signup-page { margin-top: 40px; }
    .signup-panel .form-grid { row-gap: 19px; }
    .signup-actions { gap: 12px; margin-top: 28px; }
    .contact-form .phone-row { grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr); }
    .form-panel > .portal-logo { max-width: 85%; }
    .field input, .field select { min-height: 40px; }
    input, select, textarea { font-size: 16px; }
}
@media (max-width: 380px) { .signup-actions { grid-template-columns: 1fr; } .login-card .portal-button { font-size: 14px; } }
