#portal-access-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  overflow: auto;
  direction: rtl;
  font-family: Cairo, Tahoma, Arial, sans-serif;
  color: #16343d;
}
#portal-access-overlay *, #portal-access-overlay *::before, #portal-access-overlay *::after { box-sizing: border-box; }
#portal-access-overlay button, #portal-access-overlay input { font: inherit; }
#portal-access-overlay svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portal-gateway-shell { min-height: 100%; position: relative; overflow: hidden; display: grid; place-items: center; padding: 34px; background: radial-gradient(circle at 12% 18%,rgba(15,118,110,.16),transparent 28%),radial-gradient(circle at 88% 82%,rgba(212,160,23,.18),transparent 26%),linear-gradient(145deg,#f4fafb,#eef5f7 55%,#f8faf7); }
.portal-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.portal-orb-one { width: 330px; height: 330px; top: -150px; right: -110px; border: 1px solid rgba(15,118,110,.18); box-shadow: 0 0 0 45px rgba(15,118,110,.035),0 0 0 90px rgba(15,118,110,.025); }
.portal-orb-two { width: 260px; height: 260px; bottom: -120px; left: -85px; border: 1px solid rgba(212,160,23,.19); box-shadow: 0 0 0 40px rgba(212,160,23,.035),0 0 0 80px rgba(212,160,23,.02); }
.portal-gateway-card { width: min(1060px,100%); position: relative; z-index: 1; background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.88); border-radius: 32px; padding: 34px; box-shadow: 0 28px 80px rgba(10,55,68,.14); }
.portal-gateway-header { display: flex; align-items: center; gap: 18px; padding-bottom: 26px; border-bottom: 1px solid #dfe8eb; }
.portal-main-logo { width: 76px; height: 76px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 24px; background: linear-gradient(145deg,#e7f5f2,#fff7df); color: #0f766e; border: 1px solid rgba(15,118,110,.12); overflow: hidden; }
.portal-logo-image { width: 100%; height: 100%; object-fit: contain; display: block; }
.portal-logo-fallback { width: 100%; height: 100%; display: grid; place-items: center; }
.portal-logo-fallback svg { width: 38px!important; height: 38px!important; }
.portal-gateway-header span { color: #0f766e; font-size: 13px; font-weight: 800; }
.portal-gateway-header h1 { margin: 4px 0 5px; font-size: clamp(24px,3vw,37px); color: #16343d; }
.portal-gateway-header p { margin: 0; color: #647b82; }
.portal-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin: 28px 0; }
.portal-choice-card { cursor: pointer; position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; gap: 18px; min-height: 250px; padding: 28px; border-radius: 26px; border: 1px solid #dfe8eb; text-align: right; color: inherit; transition: transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.portal-choice-card::after { content: ''; position: absolute; width: 170px; height: 170px; border-radius: 50%; left: -70px; bottom: -80px; background: rgba(255,255,255,.12); }
.portal-choice-card:hover { transform: translateY(-4px); box-shadow: 0 22px 45px rgba(13,63,73,.14); }
.portal-choice-student { color: #fff; border-color: transparent; background: radial-gradient(circle at 85% 20%,rgba(255,255,255,.15),transparent 28%),linear-gradient(145deg,#0f766e,#0b5662); }
.portal-choice-admin { background: linear-gradient(145deg,#fff,#f5f8fa); border-color: #dce7ea; }
.portal-choice-icon { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 21px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.18); }
.portal-choice-icon svg { width: 34px!important; height: 34px!important; }
.portal-choice-admin .portal-choice-icon { color: #9a6b00; background: #fff7df; border-color: #f0d99c; }
.portal-choice-content { display: flex; flex-direction: column; align-items: flex-start; }
.portal-choice-content small { font-style: normal; font-size: 12px; font-weight: 800; opacity: .78; }
.portal-choice-content strong { margin: 7px 0 8px; font-size: 29px; }
.portal-choice-content em { font-style: normal; line-height: 1.9; opacity: .82; }
.portal-choice-content b { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 22px; font-size: 13px; }
.portal-choice-content b svg { width: 19px!important; height: 19px!important; }
.portal-choice-admin .portal-choice-content em { color: #647b82; }
.portal-choice-admin .portal-choice-content b { color: #0f766e; }
.portal-gateway-footer { display: flex; justify-content: space-between; gap: 16px; color: #647b82; font-size: 12px; }
.portal-gateway-footer span { display: inline-flex; align-items: center; gap: 7px; }

.portal-login-shell { min-height: 100%; display: grid; grid-template-columns: 1.1fr .9fr; background: #f6fafb; }
.portal-login-visual { position: relative; overflow: hidden; padding: 70px 7vw; color: #fff; display: flex; flex-direction: column; justify-content: center; }
.portal-login-student .portal-login-visual { background: radial-gradient(circle at 20% 20%,rgba(255,255,255,.17),transparent 24%),radial-gradient(circle at 80% 70%,rgba(212,160,23,.22),transparent 20%),linear-gradient(140deg,#0f766e,#083f48 72%); }
.portal-login-admin .portal-login-visual { background: radial-gradient(circle at 22% 18%,rgba(255,255,255,.12),transparent 24%),radial-gradient(circle at 82% 76%,rgba(212,160,23,.2),transparent 20%),linear-gradient(140deg,#123b5d,#082c45 72%); }
.portal-login-glow { position: absolute; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); right: -180px; bottom: -170px; box-shadow: 0 0 0 55px rgba(255,255,255,.04),0 0 0 110px rgba(255,255,255,.025); }
.portal-login-brand { display: inline-flex; align-items: center; gap: 12px; color: #d8f3ef; }
.portal-login-brand > img, .portal-login-brand > .portal-logo-fallback { width: 52px; height: 52px; padding: 6px; border-radius: 16px; background: rgba(255,255,255,.12); }
.portal-login-visual h1 { font-size: clamp(34px,5vw,62px); line-height: 1.35; margin: 18px 0; letter-spacing: -1px; }
.portal-login-visual p { max-width: 620px; line-height: 2; color: #d1ece8; }
.portal-login-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.portal-login-tags span { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 999px; padding: 8px 12px; font-size: 11px; }
.portal-login-panel { display: grid; place-items: center; padding: 30px; }
.portal-login-card { width: min(440px,100%); background: #fff; border: 1px solid #dfe8eb; border-radius: 25px; padding: 30px; box-shadow: 0 22px 55px rgba(13,63,73,.13); }
.portal-back-button { cursor: pointer; border: 0; background: transparent; padding: 0; display: inline-flex; align-items: center; gap: 7px; margin-bottom: 20px; color: #647b82; font-size: 12px; font-weight: 800; }
.portal-back-button:hover { color: #0f766e; }
.portal-form-logo { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; margin-bottom: 18px; background: #e7f5f2; color: #0f766e; }
.portal-login-admin .portal-form-logo { background: #eef4f8; color: #123b5d; }
.portal-form-logo svg { width: 30px!important; height: 30px!important; }
.portal-eyebrow { color: #0f766e; font-size: 12px; font-weight: 800; }
.portal-login-card h2 { margin: 4px 0 6px; font-size: 25px; }
.portal-login-card > p { margin: 0 0 20px; color: #647b82; }
#portal-login-form { display: flex; flex-direction: column; gap: 12px; }
.portal-input { display: flex; align-items: center; gap: 9px; border: 1px solid #dfe8eb; border-radius: 13px; padding: 0 12px; color: #647b82; background: #fff; }
.portal-input:focus-within { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15,118,110,.09); }
.portal-input input { width: 100%; min-height: 48px; border: 0; outline: 0; background: transparent; color: #16343d; }
.portal-submit-button { cursor: pointer; min-height: 49px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 13px; color: #fff; background: linear-gradient(145deg,#0f766e,#0b5963); font-weight: 800; box-shadow: 0 10px 24px rgba(15,118,110,.2); }
.portal-login-admin .portal-submit-button { background: linear-gradient(145deg,#123b5d,#0a3049); box-shadow: 0 10px 24px rgba(18,59,93,.2); }
.portal-submit-button:disabled { opacity: .68; cursor: wait; }
.portal-error { margin-bottom: 13px; padding: 11px 13px; border-radius: 11px; border: 1px solid #efc4c4; background: #fff1f1; color: #a52d2d; font-size: 12px; line-height: 1.7; }
.portal-security-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px; text-align: center; color: #647b82; font-size: 11px; line-height: 1.7; }

@media (max-width: 920px) {
  .portal-login-shell { grid-template-columns: 1fr; }
  .portal-login-visual { display: none; }
  .portal-login-panel { min-height: 100vh; }
}
@media (max-width: 820px) {
  .portal-gateway-shell { padding: 18px; }
  .portal-gateway-card { padding: 22px; border-radius: 25px; }
  .portal-choice-grid { grid-template-columns: 1fr; }
  .portal-choice-card { min-height: 220px; }
  .portal-gateway-footer { flex-direction: column; }
}
@media (max-width: 520px) {
  .portal-gateway-header { align-items: flex-start; }
  .portal-main-logo { width: 58px; height: 58px; border-radius: 18px; }
  .portal-choice-card { grid-template-columns: 1fr; padding: 22px; }
  .portal-choice-icon { width: 56px; height: 56px; border-radius: 17px; }
  .portal-choice-content strong { font-size: 25px; }
  .portal-login-panel { padding: 16px; }
  .portal-login-card { padding: 24px 20px; }
}
