/* Student Login / Register popup (partials/auth-modal). Scoped to
   #exampleModal so the site-wide .modal-* rules in style.css don't leak in. */
#exampleModal, .ea-page {
  --ea-navy: #1a2434;
  --ea-navy-2: #2a3a56;
  --ea-orange: #ff7a4f;
  --ea-orange-dark: #e85d2f;
  --ea-text: #1f2937;
  --ea-muted: #5b6577;
  --ea-border: #dfe3ea;
  --ea-field: #f7f8fb;
  --ea-focus: rgba(255, 122, 79, .22);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* Above the fixed mobile header (bsfismenu .wsmobileheader, z-index 10002)
   so the close button is never hidden; backdrop gets .ea-backdrop from JS. */
#exampleModal { z-index: 10060; }
.modal-backdrop.ea-backdrop { z-index: 10050; background-color: #0b1220; }
.modal-backdrop.ea-backdrop.show { opacity: .6 !important; }
#exampleModal .modal-dialog { max-width: 880px; }
#exampleModal .ea-card {
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(16, 24, 40, .28);
}
#exampleModal .ea-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 34px; height: 34px; padding: 0; border-radius: 50%;
  background-color: #f1f3f7; background-size: 11px; opacity: .8;
}
#exampleModal .ea-close:hover, #exampleModal .ea-close:focus { opacity: 1; background-color: #e7eaf0; }

#exampleModal .ea-grid { display: grid; grid-template-columns: 330px 1fr; min-height: 560px; }

/* Brand panel */
#exampleModal .ea-side {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px 32px;
  color: #fff;
  background: linear-gradient(155deg, var(--ea-navy) 0%, var(--ea-navy-2) 100%);
}
#exampleModal .ea-side::before,
#exampleModal .ea-side::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
#exampleModal .ea-side::before {
  width: 280px; height: 280px; right: -110px; top: -110px;
  background: radial-gradient(circle, rgba(255, 122, 79, .45), rgba(255, 122, 79, 0) 70%);
}
#exampleModal .ea-side::after {
  width: 220px; height: 220px; left: -90px; bottom: -90px;
  background: radial-gradient(circle, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 70%);
}
#exampleModal .ea-side > * { position: relative; z-index: 1; }
#exampleModal .ea-side__logo {
  width: 168px; height: auto; margin-bottom: 28px;
  background: #fff; border-radius: 10px; padding: 8px 12px; box-sizing: content-box;
}
#exampleModal .ea-side__title {
  font-size: 1.5rem; line-height: 1.3; font-weight: 700; color: #fff; margin: 0 0 24px;
}
#exampleModal .ea-side__list { list-style: none; margin: 0; padding: 0; }
#exampleModal .ea-side__list li {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 0 0 16px; font-size: .95rem; line-height: 1.45; color: rgba(255, 255, 255, .88);
}
#exampleModal .ea-side__list li::after { content: none; }
#exampleModal .ea-side__list i {
  flex: 0 0 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 122, 79, .18); color: #ffb08f; font-size: 1rem;
}
#exampleModal .ea-side__list span { padding-top: 6px; }

/* Form panel */
#exampleModal .ea-main { padding: 36px 40px 24px; background: #fff; color: var(--ea-text); }
#exampleModal .ea-main__logo { display: none; }
#exampleModal .ea-head { margin-bottom: 18px; padding-right: 32px; }
:is(#exampleModal, .ea-page) .ea-title { font-size: 1.6rem; font-weight: 700; color: var(--ea-navy); margin: 0 0 4px; }
:is(#exampleModal, .ea-page) .ea-sub { margin: 0; color: var(--ea-muted); font-size: .95rem; }

#exampleModal .ea-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin-bottom: 18px;
  background: #f1f3f7; border-radius: 12px;
}
#exampleModal .ea-tab {
  border: 0; background: transparent; border-radius: 9px;
  padding: 9px 12px; font-weight: 600; font-size: .95rem; color: var(--ea-muted);
  transition: background-color .15s, color .15s, box-shadow .15s;
}
#exampleModal .ea-tab:hover { color: var(--ea-navy); }
#exampleModal .ea-tab.active { background: #fff; color: var(--ea-navy); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
#exampleModal .ea-tab:focus-visible { outline: 2px solid var(--ea-orange); outline-offset: 2px; }

:is(#exampleModal, .ea-page) .ea-msg {
  border-radius: 10px; padding: 10px 14px; margin-bottom: 14px;
  font-size: .9rem; line-height: 1.45;
}
:is(#exampleModal, .ea-page) .ea-msg[hidden] { display: none; }
:is(#exampleModal, .ea-page) .ea-msg.is-error { background: #fdecec; color: #a61b1b; border: 1px solid #f7caca; }
:is(#exampleModal, .ea-page) .ea-msg.is-success { background: #e9f7ef; color: #146c43; border: 1px solid #bfe5cf; }
:is(#exampleModal, .ea-page) .ea-msg.is-info { background: #eef3fc; color: #24456f; border: 1px solid #cfdcf3; }

/* Google */
#exampleModal .ea-google__btn {
  display: flex; justify-content: center; min-height: 44px;
}
#exampleModal .ea-google__loading { align-self: center; font-size: .85rem; color: var(--ea-muted); }
#exampleModal .ea-google.is-busy { opacity: .55; pointer-events: none; }
#exampleModal .ea-or {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 14px; color: #8a93a3; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
}
#exampleModal .ea-or::before, #exampleModal .ea-or::after { content: ""; flex: 1; height: 1px; background: var(--ea-border); }

/* Fields */
:is(#exampleModal, .ea-page) .ea-field { margin-bottom: 14px; min-width: 0; }
:is(#exampleModal, .ea-page) .ea-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
:is(#exampleModal, .ea-page) .form-label { font-size: .85rem; font-weight: 600; color: #344054; margin-bottom: 6px; }
:is(#exampleModal, .ea-page) .ea-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
:is(#exampleModal, .ea-page) .ea-input { position: relative; display: flex; align-items: center; }
:is(#exampleModal, .ea-page) .ea-input > i {
  position: absolute; left: 14px; color: #8a93a3; font-size: 1rem; pointer-events: none;
}
:is(#exampleModal, .ea-page) .ea-input .form-control {
  height: 46px; padding: 10px 14px 10px 40px;
  border: 1px solid var(--ea-border); border-radius: 10px;
  background: var(--ea-field); color: var(--ea-text); font-size: .95rem;
  box-shadow: none; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
:is(#exampleModal, .ea-page) .ea-input .form-control::placeholder { color: #9aa3b2; }
:is(#exampleModal, .ea-page) .ea-input .form-control:focus {
  border-color: var(--ea-orange); background: #fff; box-shadow: 0 0 0 4px var(--ea-focus); outline: 0;
}
:is(#exampleModal, .ea-page) .ea-input:focus-within > i { color: var(--ea-orange-dark); }
#exampleModal #loginPassword, #exampleModal #password, #exampleModal #password_confirmation { padding-right: 46px; }
:is(#exampleModal, .ea-page) .ea-eye {
  position: absolute; right: 6px; width: 36px; height: 36px;
  border: 0; border-radius: 8px; background: transparent; color: #6b7485;
  display: inline-flex; align-items: center; justify-content: center;
}
:is(#exampleModal, .ea-page) .ea-eye:hover { background: #eceff4; color: var(--ea-navy); }
:is(#exampleModal, .ea-page) .ea-eye:focus-visible { outline: 2px solid var(--ea-orange); }
:is(#exampleModal, .ea-page) .ea-input--phone .form-control { padding-left: 54px; }
:is(#exampleModal, .ea-page) .ea-prefix {
  position: absolute; left: 1px; top: 1px; bottom: 1px; width: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--ea-border); border-radius: 10px 0 0 10px;
  font-size: .9rem; font-weight: 600; color: #475467; pointer-events: none;
}
:is(#exampleModal, .ea-page) .ea-hint { margin: -6px 0 14px; font-size: .8rem; color: #8a93a3; }

/* Buttons and links */
:is(#exampleModal, .ea-page) .ea-btn {
  position: relative; display: block; width: 100%;
  height: 48px; border: 0; border-radius: 12px;
  font-weight: 600; font-size: 1rem; letter-spacing: .01em;
  transition: background-color .15s, box-shadow .15s, transform .05s;
}
:is(#exampleModal, .ea-page) .ea-btn--primary { background: var(--ea-orange); color: #fff; box-shadow: 0 6px 16px rgba(255, 122, 79, .35); }
:is(#exampleModal, .ea-page) .ea-btn--primary:hover { background: var(--ea-orange-dark); }
:is(#exampleModal, .ea-page) .ea-btn--primary:active { transform: translateY(1px); }
:is(#exampleModal, .ea-page) .ea-btn:focus-visible { outline: 3px solid var(--ea-focus); outline-offset: 2px; }
:is(#exampleModal, .ea-page) .ea-btn:disabled { cursor: progress; }
:is(#exampleModal, .ea-page) .ea-btn.is-busy { color: transparent; }
:is(#exampleModal, .ea-page) .ea-btn.is-busy::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%;
  animation: ea-spin .7s linear infinite;
}
@keyframes ea-spin { to { transform: rotate(360deg); } }
:is(#exampleModal, .ea-page) .ea-link { color: var(--ea-orange-dark); font-weight: 600; text-decoration: none; font-size: .88rem; }
:is(#exampleModal, .ea-page) .ea-link:hover, :is(#exampleModal, .ea-page) .ea-link:focus { text-decoration: underline; color: #c94a1f; }
:is(#exampleModal, .ea-page) .ea-switch { text-align: center; margin: 14px 0 0; font-size: .9rem; color: var(--ea-muted); }
:is(#exampleModal, .ea-page) .ea-switch .ea-link { font-size: .9rem; }
#exampleModal .ea-legal { margin: 18px 0 0; text-align: center; font-size: .75rem; color: #98a2b3; }
#exampleModal .ea-legal a { color: #667085; text-decoration: underline; }

/* Google sign-up step 2 */
#exampleModal .ea-gcard {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 16px;
  border: 1px solid var(--ea-border); border-radius: 12px; background: var(--ea-field);
}
#exampleModal .ea-gcard__icon {
  flex: 0 0 36px; height: 36px; border-radius: 50%; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 2px rgba(16, 24, 40, .1);
}
#exampleModal .ea-gcard__text { display: flex; flex-direction: column; min-width: 0; font-size: .85rem; color: var(--ea-muted); }
#exampleModal .ea-gcard__text strong { color: var(--ea-navy); font-size: .95rem; }
#exampleModal .ea-gcard__text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tablet: narrower brand panel */
@media (max-width: 860px) {
  #exampleModal .ea-grid { grid-template-columns: 260px 1fr; }
  #exampleModal .ea-side { padding: 32px 24px; }
  #exampleModal .ea-main { padding: 32px 28px 20px; }
}
/* Phone-ish: no brand panel, single column */
@media (max-width: 720px) {
  #exampleModal .modal-dialog { max-width: 480px; }
  #exampleModal .ea-grid { grid-template-columns: 1fr; min-height: 0; }
  #exampleModal .ea-side { display: none; }
  #exampleModal .ea-main__logo { display: block; width: 130px; height: auto; margin-bottom: 18px; }
  :is(#exampleModal, .ea-page) .ea-row { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  #exampleModal .ea-card { border-radius: 0; }
  #exampleModal .modal-dialog { max-width: none; }
  #exampleModal .ea-main { padding: 22px 16px 24px; }
  :is(#exampleModal, .ea-page) .ea-title { font-size: 1.4rem; }
  :is(#exampleModal, .ea-page) .ea-input .form-control { font-size: 16px; } /* no iOS zoom on focus */
}
@media (prefers-reduced-motion: reduce) {
  :is(#exampleModal, .ea-page) .ea-btn.is-busy::after { animation-duration: 2s; }
}

/* ---------- Full-page account screens (layouts/auth-page) ---------- */
.ea-page {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 104px);
  padding: 64px 16px 80px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 70%),
    linear-gradient(150deg, #141c2b 0%, #1a2434 38%, #22304a 70%, #2b3b58 100%);
}
/* Dot grid, faded towards the edges */
.ea-page::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .11) 1px, transparent 1.4px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 20%, transparent 80%);
          mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 20%, transparent 80%);
}
/* Large thin ring behind the card */
.ea-page::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 760px; height: 760px; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 90px rgba(255, 255, 255, .015), 0 0 0 180px rgba(255, 255, 255, .012);
}
.ea-page__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ea-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.ea-orb--1 { width: 420px; height: 420px; left: -120px; top: -140px; background: #ff7a4f; opacity: .35; animation: ea-drift 18s ease-in-out infinite alternate; }
.ea-orb--2 { width: 380px; height: 380px; right: -110px; bottom: -150px; background: #3d6bd8; opacity: .32; animation: ea-drift 22s ease-in-out infinite alternate-reverse; }
.ea-orb--3 { width: 220px; height: 220px; right: 18%; top: 8%; background: #ffb08f; opacity: .16; animation: ea-drift 26s ease-in-out infinite alternate; }
.ea-float { position: absolute; color: rgba(255, 255, 255, .09); font-size: 2.6rem; animation: ea-bob 9s ease-in-out infinite; }
.ea-float--1 { left: 9%;  top: 18%; transform: rotate(-12deg); }
.ea-float--2 { left: 15%; bottom: 16%; font-size: 3.4rem; animation-delay: -3s; }
.ea-float--3 { left: 27%; top: 9%; font-size: 1.9rem; animation-delay: -6s; }
.ea-float--4 { right: 10%; top: 20%; font-size: 3rem; animation-delay: -1.5s; }
.ea-float--5 { right: 24%; bottom: 10%; font-size: 2.1rem; animation-delay: -4.5s; }
.ea-float--6 { right: 7%; bottom: 26%; font-size: 2.4rem; animation-delay: -7s; }
@keyframes ea-drift { to { transform: translate(40px, 30px) scale(1.08); } }
@keyframes ea-bob { 50% { translate: 0 -10px; } }
@media (prefers-reduced-motion: reduce) {
  .ea-orb, .ea-float { animation: none; }
}
@media (max-width: 991.98px) {
  .ea-page { min-height: calc(100vh - 54px); }
  .ea-float--3, .ea-float--5 { display: none; }
}
.ea-page__wrap { position: relative; width: 100%; max-width: 460px; margin: 0 auto; }
.ea-page__card {
  position: relative;
  background: #fff; border-radius: 20px; padding: 36px 36px 28px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 30px 80px rgba(4, 10, 24, .45), 0 0 0 1px rgba(255, 255, 255, .08);
  color: var(--ea-text); text-align: left;
}
.ea-page__icon {
  width: 56px; height: 56px; border-radius: 16px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
  background: #fff1eb; color: var(--ea-orange-dark); font-size: 1.6rem;
}
.ea-page__icon--ok { background: #e9f7ef; color: #198754; }
.ea-page__icon--warn { background: #fff6e0; color: #b7791f; }
#main-content.ea-page .ea-title { margin-bottom: 6px; }
#main-content.ea-page .ea-sub { margin-bottom: 22px; }
#main-content.ea-page .ea-sub--small { font-size: .88rem; margin: -4px 0 18px; }
#main-content.ea-page .ea-input--pw .form-control { padding-right: 46px; }
#main-content.ea-page .ea-btn--link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
#main-content.ea-page .ea-btn--link:hover, #main-content.ea-page .ea-btn--link:focus { color: #fff; }
#main-content.ea-page .ea-btn--ghost { background: #fff; color: var(--ea-navy); border: 1px solid var(--ea-border); box-shadow: none; }
#main-content.ea-page .ea-btn--ghost:hover, #main-content.ea-page .ea-btn--ghost:focus { background: #f5f7fb; color: var(--ea-navy); }
#main-content.ea-page .ea-msg { margin-bottom: 18px; }
.ea-page__help { text-align: center; margin: 20px 0 0; font-size: .88rem; color: rgba(255, 255, 255, .7); }
.ea-page__help a { color: #ffb08f; font-weight: 600; }
.ea-page__help a:hover, .ea-page__help a:focus { color: #fff; }
@media (max-width: 575.98px) {
  .ea-page { padding: 28px 12px 44px; align-items: flex-start; }
  .ea-float { display: none; }
  .ea-page::after { width: 520px; height: 520px; }
  .ea-page__card { padding: 26px 20px 22px; border-radius: 16px; }
  #main-content.ea-page .ea-input .form-control { font-size: 16px; }
}
