/* ============ AUTH SHELL ============ */
.auth-shell{
  position:relative;
  min-height:calc(100vh - 320px);
  padding:4.5rem 0;
  overflow:hidden;
  display:flex;
  align-items:center;
}
.auth-shell-bg{
  position:absolute; inset:0;
  background:var(--paper-2);
  z-index:-2;
}
.auth-shell-bg::before{
  content:"";
  position:absolute; inset:0;
  background-image:
    radial-gradient(circle at 12% 15%, rgba(214,160,63,.10), transparent 38%),
    radial-gradient(circle at 90% 85%, rgba(43,25,104,.08), transparent 42%);
  z-index:-1;
}

/* ============ CARD ============ */
.auth-card{
  position:relative;
  background:#fff;
  border-radius:18px;
  padding:2.6rem 2.4rem 2.4rem;
  box-shadow:0 30px 70px -24px rgba(23,13,59,.22);
  isolation:isolate;
}
.auth-corner-seal{
  position:absolute;
  top:-24px; right:-24px;
  width:76px; height:76px;
  z-index:2;
}
.auth-corner-seal .stamp-ring{
  animation:spin 40s linear infinite;
  transform-origin:50% 50%;
}
@media (prefers-reduced-motion: reduce){
  .auth-corner-seal .stamp-ring{ animation:none; }
}

.auth-eyebrow{ color:var(--emerald-700); }
.auth-title{
  font-family:'Fraunces', serif;
  font-weight:600;
  font-size:1.9rem;
  margin:.35rem 0 .5rem;
  color:var(--ink);
}
.auth-subtitle{
  color:#6A6480;
  font-size:.95rem;
  line-height:1.6;
  max-width:26rem;
  margin-bottom:0;
}
.auth-card .rule{ margin:1.3rem 0 1.6rem; }

.auth-helper{ font-size:.9rem; color:#6A6480; margin-bottom:1.2rem; }
.auth-helper a{ color:var(--indigo-800); font-weight:600; }

.auth-alert{
  border-radius:10px;
  border:1px solid var(--line);
  font-size:.9rem;
}

/* ============ SOCIAL LOGIN ============ */
.auth-social-list{
  list-style:none; margin:0 0 1rem; padding:0;
  display:flex; flex-wrap:wrap; gap:.6rem;
}
.auth-social-list li a{
  display:inline-flex; align-items:center; gap:.5rem;
  border:1px solid var(--line);
  border-radius:100px;
  padding:.5rem 1.1rem;
  font-size:.86rem;
  font-weight:600;
  color:var(--ink);
  transition:border-color .15s ease, background .15s ease;
}
.auth-social-list li a:hover{ border-color:var(--gold-500); background:var(--paper-2); }
.auth-divider{
  position:relative;
  text-align:center;
  margin:.4rem 0 1.4rem;
  color:#A39DB0;
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.auth-divider::before,
.auth-divider::after{
  content:"";
  position:absolute; top:50%;
  width:calc(50% - 1.6rem);
  height:1px;
  background:var(--line);
}
.auth-divider::before{ left:0; }
.auth-divider::after{ right:0; }
.auth-divider span{ background:#fff; padding:0 .6rem; position:relative; }

/* ============ FORM FIELDS (django-bootstrap4 output) ============ */
.auth-form .form-group{ margin-bottom:1.2rem; }
.auth-form label{
  font-family:'IBM Plex Mono', monospace;
  font-size:.72rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#6A6480;
  margin-bottom:.4rem;
  display:block;
}
.auth-form .form-control{
  border:1px solid var(--line);
  border-radius:10px;
  padding:.7rem .9rem;
  font-size:.98rem;
  font-family:'Public Sans', sans-serif;
  color:var(--ink);
  background:var(--paper);
  transition:border-color .15s ease, box-shadow .15s ease;
  height:auto;
}
.auth-form .form-control:focus{
  border-color:var(--gold-500);
  box-shadow:0 0 0 3px rgba(214,160,63,.16);
  outline:none;
}
.auth-form .form-text{ font-size:.8rem; color:#8A8499; margin-top:.35rem; }
.auth-form .invalid-feedback,
.auth-form .alert-danger{ font-size:.84rem; }
.auth-form .form-check{ font-size:.9rem; color:#5B5670; }

/* Password field + eye toggle (injected by JS) */
.auth-form .pw-wrap{ position:relative; }
.auth-form .pw-wrap .form-control{ padding-right:2.8rem; }
.pw-toggle{
  position:absolute;
  top:50%; right:.75rem;
  transform:translateY(-50%);
  background:none; border:none;
  color:#8A8499;
  font-size:1.05rem;
  cursor:pointer;
  padding:.2rem;
  line-height:1;
}
.pw-toggle:hover{ color:var(--indigo-800); }
.pw-toggle:focus-visible{ outline:2px solid var(--gold-500); outline-offset:2px; border-radius:4px; }

/* ============ CAPTCHA ============ */
.captcha-box{
  background:var(--paper-2);
  border:1px solid var(--line);
  border-radius:12px;
  padding:1.1rem 1.2rem;
  margin:1.4rem 0 1.6rem;
}
.captcha-label{
  font-family:'IBM Plex Mono', monospace;
  font-size:.72rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#6A6480;
  display:block;
  margin-bottom:.6rem;
}
.captcha-row{ display:flex; align-items:center; gap:.7rem; }
.captcha-expr{
  font-family:'IBM Plex Mono', monospace;
  font-size:1.15rem;
  font-weight:500;
  color:var(--indigo-800);
  display:flex; gap:.4rem;
  min-width:5.5rem;
}
.captcha-input{
  width:5rem;
  border:1px solid var(--line);
  border-radius:8px;
  padding:.5rem .7rem;
  font-family:'IBM Plex Mono', monospace;
  font-size:1rem;
  text-align:center;
  background:#fff;
}
.captcha-input:focus{
  border-color:var(--gold-500);
  box-shadow:0 0 0 3px rgba(214,160,63,.16);
  outline:none;
}
.captcha-input.is-valid{ border-color:var(--emerald-700); }
.captcha-input.is-invalid{ border-color:#B3453E; }
.captcha-refresh{
  background:none; border:1px solid var(--line);
  border-radius:8px;
  width:2.4rem; height:2.4rem;
  display:flex; align-items:center; justify-content:center;
  color:#6A6480;
  cursor:pointer;
  transition:border-color .15s ease, color .15s ease;
}
.captcha-refresh:hover{ border-color:var(--gold-500); color:var(--indigo-800); }
.captcha-feedback{
  font-size:.8rem;
  margin-top:.55rem;
  min-height:1.1rem;
}
.captcha-feedback.ok{ color:var(--emerald-700); }
.captcha-feedback.bad{ color:#B3453E; }

/* ============ ACTIONS ============ */
.auth-actions{
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:1rem;
  margin-top:.4rem;
}
.auth-forgot{
  font-size:.88rem; font-weight:600;
  color:var(--indigo-800);
}
.auth-forgot:hover{ color:var(--gold-600); }
.auth-submit{
  border:1px solid var(--gold-500);
  cursor:pointer;
}
.auth-submit:disabled{
  background:var(--line);
  border-color:var(--line);
  color:#9A94A8;
  cursor:not-allowed;
}
.auth-submit:disabled:hover{ transform:none; background:var(--line); }

.auth-submit-full{
  width:100%;
  justify-content:center;
  display:inline-flex;
  align-items:center;
  margin-top:.4rem;
}

.verify-icon{
  width:88px; height:88px;
  margin:0 auto 1.2rem;
  display:block;
}

/* Generic inline field feedback (valid/invalid state) — used wherever a
   page needs it without pulling in the full signup-page stylesheet. */
.field-feedback{
  font-size:.8rem;
  margin-top:.35rem;
  min-height:1.1rem;
  text-align:left;
}
.field-feedback.ok{ color:var(--emerald-700); }
.field-feedback.bad{ color:#B3453E; }

/* Generic "wide, top-aligned" variants for longer forms (institution
   signup, applicant signup) — kept here so any page needing them doesn't
   have to load a differently-scoped stylesheet just for this layout. */
.auth-shell-wide-form{
  align-items:flex-start;
  padding-top:3.5rem;
  padding-bottom:4rem;
}
.auth-card-wide{ max-width:none; }

/* Generic small mono field label, used wherever a field needs a custom
   label outside django-bootstrap4's own (e.g. show_label="skip" fields). */
.signup-tel-label{
  font-family:'IBM Plex Mono', monospace;
  font-size:.72rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#6A6480;
  margin-bottom:.4rem;
  display:block;
}

.auth-footnote{
  text-align:center;
  font-size:.82rem;
  color:#8A8499;
  margin-top:1.4rem;
}
.auth-footnote i{ color:var(--gold-600); margin-right:.3rem; }

@media (max-width: 575px){
  .auth-card{ padding:2rem 1.5rem 1.8rem; }
  .auth-actions{ flex-direction:column; align-items:stretch; }
  .auth-submit{ width:100%; justify-content:center; }
}

/* ============ SIGNUP: ACCOUNT TYPE CHOICE ============ */
.auth-shell-wide{
  align-items:center;
  min-height:0;
  padding:1.6rem 0;
  overflow-y:auto;
}

.auth-title-lg{
  font-family:'Fraunces', serif;
  font-weight:600;
  font-size:clamp(1.8rem, 3vw, 2.4rem);
  margin-top:.4rem;
  color:var(--ink);
}
.auth-shell-wide .auth-subtitle{
  max-width:34rem;
  margin-left:auto; margin-right:auto;
  margin-top:.6rem;
}

.choice-card{
  position:relative;
  background:#fff;
  border-radius:18px;
  border:1px solid var(--line);
  padding:1.7rem 1.8rem 1.6rem;
  height:100%;
  display:flex;
  flex-direction:column;
  box-shadow:0 24px 55px -26px rgba(23,13,59,.18);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.choice-card:hover{
  transform:translateY(-4px);
  box-shadow:0 30px 65px -24px rgba(23,13,59,.26);
}
.choice-card--gold:hover{ border-color:var(--gold-500); }
.choice-card--indigo:hover{ border-color:var(--indigo-700); }

.choice-icon{
  width:2.9rem; height:2.9rem;
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:1.3rem;
  margin-bottom:.8rem;
}
.choice-card--gold .choice-icon{ background:rgba(214,160,63,.14); color:var(--gold-600); }
.choice-card--indigo .choice-icon{ background:rgba(43,25,104,.1); color:var(--indigo-800); }

.choice-tag{ margin-bottom:.4rem; }
.choice-card--gold .choice-tag{ color:var(--gold-600); }
.choice-card--indigo .choice-tag{ color:var(--indigo-700); }

.choice-title{
  font-family:'Fraunces', serif;
  font-weight:600;
  font-size:1.2rem;
  margin-bottom:.5rem;
  color:var(--ink);
}
.choice-desc{
  font-size:.9rem;
  line-height:1.55;
  color:#5B5670;
  margin-bottom:.8rem;
}
.choice-facts{
  list-style:none; margin:0 0 1.1rem; padding:.8rem 0 0;
  border-top:1px solid var(--line);
  display:flex; flex-direction:column; gap:.45rem;
}
.choice-facts li{
  display:flex; align-items:flex-start; gap:.55rem;
  font-size:.87rem; color:#5B5670;
}
.choice-card--gold .choice-facts i{ color:var(--gold-600); margin-top:.15rem; }
.choice-card--indigo .choice-facts i{ color:var(--indigo-700); margin-top:.15rem; }

.choice-cta{
  margin-top:auto;
  text-align:center;
  justify-content:center;
  display:inline-flex;
  align-items:center;
}

.auth-footnote a{ color:var(--indigo-800); font-weight:600; }
.auth-footnote a:hover{ color:var(--gold-600); }
