:root { --auth-green:#0b5d3b; --auth-dark:#073c28; --auth-gold:#d6ad2d; --auth-cream:#fbf8ee; }
* { box-sizing:border-box; }
body.auth-page { margin:0; color:#1f332a; background:#f7faf8; font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif; }
.auth-layout { min-height:100vh; display:grid; grid-template-columns:minmax(360px, .9fr) minmax(520px, 1.1fr); }
.auth-story { position:relative; display:flex; flex-direction:column; padding:2.2rem 3rem; color:#fff; overflow:hidden; background:linear-gradient(145deg,rgba(5,53,33,.9),rgba(11,93,59,.78)),url('../../uploads/school_assets/bg_images/school_hero_section_bg_1.jpg') center/cover; }
.auth-story::after { content:''; position:absolute; width:420px; height:420px; border:1px solid rgba(255,255,255,.12); border-radius:50%; right:-180px; bottom:-160px; box-shadow:0 0 0 70px rgba(255,255,255,.025),0 0 0 140px rgba(214,173,45,.035); }
.auth-brand { display:inline-flex; align-items:center; gap:.85rem; color:#fff; text-decoration:none; position:relative; z-index:1; }
.auth-brand img { width:54px; height:54px; object-fit:contain; padding:.25rem; border-radius:.75rem; background:#fff; }
.auth-brand span { display:grid; }.auth-brand strong { font-size:1rem; }.auth-brand small { color:rgba(255,255,255,.68); }
.auth-story-copy { margin:auto 0; max-width:560px; position:relative; z-index:1; }.auth-kicker,.auth-step-label { color:var(--auth-gold); text-transform:uppercase; letter-spacing:.12em; font-size:.73rem; font-weight:800; }
.auth-story h1 { font-size:clamp(2.4rem,4vw,4.6rem); line-height:1.03; margin:1rem 0 1.2rem; }.auth-story-copy>p { font-size:1.08rem; color:rgba(255,255,255,.78); max-width:500px; }
.auth-story ul { list-style:none; padding:0; margin:2rem 0 0; display:grid; gap:.8rem; }.auth-story li { display:flex; gap:.7rem; align-items:center; }.auth-story li i { color:var(--auth-gold); }.auth-story-foot { position:relative; z-index:1; color:rgba(255,255,255,.65); font-size:.84rem; }
.auth-workspace { padding:2rem clamp(1.4rem,6vw,6rem); display:flex; flex-direction:column; justify-content:center; position:relative; }.auth-back { position:absolute; top:2rem; left:clamp(1.4rem,6vw,6rem); text-decoration:none; color:#52635b; font-size:.9rem; }
.auth-card { width:100%; max-width:520px; margin:auto; background:#fff; border:1px solid #e3ebe7; border-radius:1.25rem; padding:clamp(1.6rem,4vw,3rem); box-shadow:0 1.2rem 3.4rem rgba(18,63,43,.09); }.auth-card h2 { margin:.45rem 0 .5rem; font-weight:750; }.auth-card .form-control,.auth-card .input-group-text,.auth-card .btn { min-height:48px; }.auth-card .form-control { border-color:#dce5e0; }.auth-card .input-group-text { background:#f6f9f7; color:var(--auth-green); border-color:#dce5e0; }.auth-submit { font-weight:700; }.auth-divider { display:flex; align-items:center; gap:1rem; margin:1.3rem 0; color:#87928c; font-size:.8rem; }.auth-divider::before,.auth-divider::after { content:''; height:1px; background:#e2e8e5; flex:1; }.auth-code { letter-spacing:.32em; font-weight:800; }.auth-change-account { min-height:auto!important; }.auth-help { text-align:center; color:#718078; font-size:.82rem; margin:1.2rem auto 0; }
@media(max-width:900px){.auth-layout{display:block}.auth-story{min-height:250px;padding:1.5rem}.auth-story-copy{margin:3rem 0 1rem}.auth-story h1{font-size:2.3rem}.auth-story ul,.auth-story-foot{display:none}.auth-workspace{padding:5rem 1rem 2rem}.auth-back{top:1.5rem;left:1rem}.auth-card{padding:1.5rem}}

/* "Maintained by AngiSoft Technologies" — fixed, unobtrusive footer note. */
.auth-soft { position:fixed; bottom:.85rem; right:1.15rem; margin:0; color:rgba(255,255,255,.62); font-size:.78rem; z-index:3; }
.auth-soft a { color:#f5d873; text-decoration:none; }
.auth-soft a:hover { color:#fff0ad; }

/* Immersive authentication shell shared by password, OTP and passkey states. */
body.auth-page { color:#fff; background:#031c13; }
.auth-layout {
  position:relative;
  display:block;
  min-height:100svh;
  isolation:isolate;
  background:
    linear-gradient(90deg,rgba(2,21,14,.82) 0%,rgba(3,33,22,.67) 36%,rgba(3,34,22,.13) 62%,rgba(2,15,10,.16) 100%),
    url('../../uploads/school_assets/bg_images/kingsway-auth-dashboard-v1.png') center/cover no-repeat;
}
.auth-layout::after { content:''; position:absolute; z-index:-1; inset:0; background:linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.28)); pointer-events:none; }
.auth-story { position:absolute; z-index:2; inset:0; min-height:0; padding:2rem clamp(2rem,5vw,5rem); background:none; pointer-events:none; }
.auth-story::after { display:none; }
.auth-brand { width:max-content; pointer-events:auto; }
.auth-brand img { width:48px; height:48px; }
.auth-story-foot { margin-top:auto; margin-bottom:0; }
.auth-workspace { z-index:1; width:min(50%,720px); min-height:100svh; padding:7.5rem clamp(2rem,7vw,7rem) 4rem; justify-content:center; }
.auth-back { display:none; }
.auth-card { width:100%; max-width:500px; margin:auto 0; padding:0; color:#fff; background:transparent; border:0; border-radius:0; box-shadow:none; }
.auth-card h2 { margin:.55rem 0 .55rem; color:#fff; font-size:clamp(2rem,3.2vw,3rem); font-weight:700; letter-spacing:-.035em; }
.auth-card .auth-intro,.auth-card .text-muted { color:rgba(255,255,255,.72)!important; }
.auth-step-label { color:var(--auth-gold); }
.auth-card .form-label { color:rgba(255,255,255,.84); font-size:.88rem; }
.auth-card a,.auth-card .btn-link { color:#f5d873; text-decoration:none; }
.auth-card a:hover,.auth-card .btn-link:hover { color:#fff0ad; }
.auth-card .input-group { border:1px solid rgba(255,255,255,.58); border-radius:.55rem; overflow:hidden; background:rgba(0,0,0,.13); }
.auth-card .input-group:focus-within { border-color:var(--auth-gold); box-shadow:0 0 0 .2rem rgba(214,173,45,.14); }
.auth-card .input-group-text,.auth-card .input-group .form-control,.auth-password-toggle { color:#fff; background:transparent!important; border:0!important; box-shadow:none!important; }
.auth-card .form-control::placeholder { color:rgba(255,255,255,.52); }
.auth-card .form-check-label { color:rgba(255,255,255,.7); }
.auth-card .form-check-input { background-color:transparent; border-color:rgba(255,255,255,.55); }
.auth-card .form-check-input:checked { background-color:var(--auth-gold); border-color:var(--auth-gold); }
.auth-submit { color:#123c29!important; background:var(--auth-gold)!important; border-color:var(--auth-gold)!important; }
.auth-submit:hover { background:#e6bf43!important; border-color:#e6bf43!important; }
.auth-divider { color:rgba(255,255,255,.55); }
.auth-divider::before,.auth-divider::after { background:rgba(255,255,255,.2); }
#authPasswordless,#authVerifyPasskey { color:#fff; border-color:rgba(255,255,255,.62); background:rgba(0,0,0,.12); }
#authPasswordless:hover,#authVerifyPasskey:hover { color:#183c2a; border-color:#fff; background:#fff; }
.auth-help { display:none; }
.auth-otp-grid { display:grid; grid-template-columns:repeat(6,minmax(46px,1fr)); gap:clamp(.55rem,1.4vw,1rem); margin:2rem 0 1rem; }
.auth-otp-cell { width:100%; min-width:0; aspect-ratio:1/1; color:#fff; text-align:center; font-size:1.65rem; font-weight:700; caret-color:var(--auth-gold); background:rgba(0,0,0,.16); border:1px solid rgba(255,255,255,.75); border-radius:.65rem; outline:0; }
.auth-otp-cell:focus { border-color:var(--auth-gold); box-shadow:0 0 0 .2rem rgba(214,173,45,.16); }
.auth-otp-cell.is-complete { border-color:rgba(214,173,45,.9); background:rgba(214,173,45,.1); }
.auth-auto-status { min-height:1.3rem; margin:.6rem 0 0; color:rgba(255,255,255,.6); font-size:.8rem; }
.auth-auto-status i { color:var(--auth-gold); }
.auth-card .alert { border:0; }

@media(max-width:900px){
  .auth-layout { background-position:62% center; }
  .auth-layout::before { content:''; position:absolute; inset:0; background:rgba(2,24,16,.76); }
  .auth-story { min-height:0; padding:1.25rem; }
  .auth-story-foot { display:none; }
  .auth-workspace { width:100%; min-height:100svh; padding:6.5rem 1.25rem 2rem; }
  .auth-card { max-width:520px; margin:auto; padding:1.35rem; border:1px solid rgba(255,255,255,.16); border-radius:1rem; background:rgba(1,22,14,.72); backdrop-filter:blur(12px); }
}
@media(max-width:480px){ .auth-otp-grid{gap:.38rem}.auth-otp-cell{font-size:1.25rem;border-radius:.5rem}.auth-card h2{font-size:1.8rem} }

/* Password recovery and invitation screens share the immersive sign-in shell. */
.auth-recovery-page .site-nav,.auth-recovery-page .site-footer,.auth-recovery-page .news-ticker,.auth-recovery-page .ticker-bar{display:none!important}
.auth-recovery-page{min-height:100svh;background:#031c13!important;color:#fff}
.auth-recovery-page .reset-hero,.auth-recovery-page .setup-page{
  min-height:100svh!important;padding:7.5rem clamp(2rem,7vw,7rem) 4rem!important;display:flex;align-items:center;position:relative;overflow:hidden;
  background:linear-gradient(90deg,rgba(2,25,17,.97) 0%,rgba(3,35,23,.88) 38%,rgba(3,35,23,.2) 61%,rgba(2,24,16,.08) 100%),url('../../uploads/school_assets/bg_images/kingsway-auth-dashboard-v1.png') center/cover no-repeat!important
}
.auth-recovery-page .reset-hero::before,.auth-recovery-page .reset-hero::after,.auth-recovery-page .setup-page::before,.auth-recovery-page .setup-page::after{display:none!important}
.auth-recovery-brand{position:absolute!important;z-index:5;left:clamp(2rem,5vw,5rem);top:2rem}
.auth-recovery-page .reset-shell{width:min(50%,720px);max-width:none;margin:0;position:relative;z-index:2;padding:0}
.auth-recovery-page .reset-shell>.row{display:block;margin:0}
.auth-recovery-page .reset-shell>.row>.col-lg-6{display:none}
.auth-recovery-page .reset-shell>.row>.col-lg-5{width:100%;max-width:500px;margin:0;padding:0}
.auth-recovery-page .reset-card{color:#fff;background:transparent;border:0;border-radius:0;box-shadow:none;overflow:visible}
.auth-recovery-page .reset-card-header,.auth-recovery-page .reset-form{padding:0;background:none;border:0}
.auth-recovery-page .reset-card-header{margin-bottom:1.6rem}
.auth-recovery-page .reset-card-icon{width:auto;height:auto;margin:0 0 .8rem;border:0;border-radius:0;background:none;box-shadow:none;color:var(--auth-gold);font-size:1.35rem}
.auth-recovery-page .reset-card h2{color:#fff;font-size:clamp(2rem,3.2vw,3rem);letter-spacing:-.035em;margin:.2rem 0 .55rem}
.auth-recovery-page .reset-card p,.auth-recovery-page .strength-copy{color:rgba(255,255,255,.68)}
.auth-recovery-page .reset-form .form-label{color:rgba(255,255,255,.84);text-transform:none;letter-spacing:0;font-size:.88rem}
.auth-recovery-page .reset-input-wrap{border:1px solid rgba(255,255,255,.58);border-radius:.55rem;background:rgba(0,0,0,.16);overflow:hidden}
.auth-recovery-page .reset-input-wrap:focus-within{border-color:var(--auth-gold);box-shadow:0 0 0 .2rem rgba(214,173,45,.14)}
.auth-recovery-page .reset-input-wrap>i{color:var(--auth-gold)}
.auth-recovery-page .reset-input-wrap .form-control{color:#fff;background:transparent;border:0;border-radius:0;box-shadow:none!important}
.auth-recovery-page .reset-input-wrap .form-control::placeholder{color:rgba(255,255,255,.5)}
.auth-recovery-page .password-toggle{color:rgba(255,255,255,.8)}
.auth-recovery-page .password-toggle:hover{color:#fff;background:rgba(255,255,255,.1)}
.auth-recovery-page .btn-kw-primary,.auth-recovery-page .btn-school{display:flex;align-items:center;background:var(--auth-gold)!important;border:0!important;color:#123c29!important;border-radius:.3rem;font-weight:800;min-height:50px}
.auth-recovery-page .reset-secondary-link{color:#f5d873}.auth-recovery-page .reset-secondary-link:hover{color:#fff0ad}
.auth-recovery-page .strength-meter{background:rgba(255,255,255,.16)}
/* First-time/default-password setup keeps its steps, but uses the same left auth panel. */
.auth-recovery-page .setup-page>.container{width:min(50%,720px);max-width:none;margin:0;padding:0;position:relative;z-index:2}
.auth-recovery-page .setup-shell{display:block;max-width:500px;margin:0;background:transparent;border:0;border-radius:0;box-shadow:none}
.auth-recovery-page .setup-aside{display:none}
.auth-recovery-page .setup-form{width:100%;padding:0;color:#fff}
.auth-recovery-page .setup-form h3{color:#fff!important;font-size:clamp(2rem,3.2vw,3rem);letter-spacing:-.035em}
.auth-recovery-page .setup-form .text-muted,.auth-recovery-page .password-rule{color:rgba(255,255,255,.68)!important}
.auth-recovery-page .setup-form .form-label{color:rgba(255,255,255,.84)}
.auth-recovery-page .setup-form .form-control,.auth-recovery-page .setup-form .input-group .btn{color:#fff;background:rgba(0,0,0,.16);border-color:rgba(255,255,255,.58)}
.auth-recovery-page .setup-form .form-control:focus{border-color:var(--auth-gold);box-shadow:0 0 0 .2rem rgba(214,173,45,.14)}
.auth-recovery-page .setup-form .alert-light{color:rgba(255,255,255,.78);background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.16)!important}
.auth-recovery-page .password-rule.ok{color:#f5d873!important}
@media(max-width:900px){
  .auth-recovery-page .reset-hero,.auth-recovery-page .setup-page{padding:6.5rem 1.25rem 2rem!important;background-position:62% center!important}
  .auth-recovery-page .reset-hero::before,.auth-recovery-page .setup-page::before{display:block!important;content:'';position:absolute;inset:0;background:rgba(2,24,16,.76)!important}
  .auth-recovery-page .reset-shell,.auth-recovery-page .setup-page>.container{width:100%}
  .auth-recovery-page .reset-card,.auth-recovery-page .setup-shell{max-width:520px;margin:auto;padding:1.35rem;border:1px solid rgba(255,255,255,.16);border-radius:1rem;background:rgba(1,22,14,.72);backdrop-filter:blur(12px)}
  .auth-recovery-brand{left:1.25rem;top:1.25rem}
}

/* ─────────────────────────────────────────────────────────────────────────
   Verification stage — the two-factor step of the staff sign-in page.
   Scoped to the verification screen only: the shell, the campus background
   image and the password step above it are deliberately untouched.
   ───────────────────────────────────────────────────────────────────────── */

/* Progress rail — password accepted, verification in progress. */
.auth-rail { display:flex; align-items:center; gap:.7rem; list-style:none; padding:0; margin:0 0 1.5rem; }
.auth-rail-step { display:flex; align-items:center; gap:.5rem; color:rgba(255,255,255,.45); font-size:.76rem; font-weight:600; letter-spacing:.02em; white-space:nowrap; }
.auth-rail-mark { display:grid; place-items:center; width:1.55rem; height:1.55rem; border-radius:50%; font-size:.72rem; font-weight:700; color:rgba(255,255,255,.5); border:1px solid rgba(255,255,255,.26); }
.auth-rail-step.is-done { color:rgba(255,255,255,.7); }
.auth-rail-step.is-done .auth-rail-mark { color:var(--auth-gold); border-color:rgba(214,173,45,.5); background:rgba(214,173,45,.14); }
.auth-rail-step.is-active { color:#fff; }
.auth-rail-step.is-active .auth-rail-mark { color:#123c29; background:var(--auth-gold); border-color:var(--auth-gold); }
.auth-rail-sep { flex:0 0 2rem; height:1px; background:rgba(255,255,255,.2); }
.auth-rail-sep.is-done { background:linear-gradient(90deg,rgba(214,173,45,.5),rgba(255,255,255,.18)); }

/* Active method — icon, name and the masked destination the code went to. */
.auth-method-card { display:flex; align-items:center; gap:.85rem; margin:1.5rem 0 0; padding:.8rem .9rem; border-radius:.85rem; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.13); box-shadow:inset 0 1px 0 rgba(255,255,255,.06); }
.auth-method-icon { display:grid; place-items:center; flex:0 0 auto; width:2.5rem; height:2.5rem; border-radius:.7rem; font-size:1.1rem; color:var(--auth-gold); background:rgba(214,173,45,.12); border:1px solid rgba(214,173,45,.22); }
.auth-method-text { display:grid; gap:.1rem; flex:1 1 auto; min-width:0; }
.auth-method-text strong { color:#fff; font-size:.92rem; font-weight:650; }
.auth-method-text small { color:rgba(255,255,255,.58); font-size:.79rem; line-height:1.35; overflow-wrap:anywhere; }
.auth-method-change { flex:0 0 auto; padding:.25rem .45rem; font-size:.82rem; font-weight:600; color:var(--auth-gold); text-decoration:none; }
.auth-method-change:hover { color:#fff0ad; }
.auth-method-change::after { content:''; }

/* Inline method list — every enrolled factor, switched in place. */
.auth-method-list { display:grid; gap:.35rem; margin-top:.5rem; padding:.45rem; border-radius:.85rem; background:rgba(0,0,0,.22); border:1px solid rgba(255,255,255,.1); animation:auth-methods-in .18s ease-out; }
@keyframes auth-methods-in { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }
.auth-method-option { display:flex; align-items:center; gap:.7rem; width:100%; padding:.55rem .6rem; border:1px solid transparent; border-radius:.6rem; background:transparent; color:#fff; text-align:left; transition:background .15s ease,border-color .15s ease; }
.auth-method-option:hover { background:rgba(255,255,255,.07); }
.auth-method-option[aria-checked="true"] { background:rgba(214,173,45,.1); border-color:rgba(214,173,45,.42); }
.auth-method-option-icon { display:grid; place-items:center; flex:0 0 auto; width:1.95rem; height:1.95rem; border-radius:.5rem; font-size:.92rem; color:rgba(255,255,255,.75); background:rgba(255,255,255,.08); }
.auth-method-option[aria-checked="true"] .auth-method-option-icon { color:var(--auth-gold); background:rgba(214,173,45,.14); }
.auth-method-option-label { display:grid; gap:.05rem; flex:1 1 auto; min-width:0; }
.auth-method-option-label strong { font-size:.87rem; font-weight:600; }
.auth-method-option-label small { font-size:.75rem; color:rgba(255,255,255,.5); overflow-wrap:anywhere; }
.auth-method-option-check { flex:0 0 auto; color:var(--auth-gold); font-size:.95rem; opacity:0; }
.auth-method-option[aria-checked="true"] .auth-method-option-check { opacity:1; }
.auth-method-empty { padding:.7rem .75rem; color:rgba(255,255,255,.6); font-size:.82rem; }

/* Quiet action row under the code entry. */
.auth-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin-top:1.5rem; padding-top:1.1rem; border-top:1px solid rgba(255,255,255,.1); }
.auth-actions .btn-outline-light { color:rgba(255,255,255,.82); border-color:rgba(255,255,255,.3); background:transparent; }
.auth-actions .btn-outline-light:hover { color:#183c2a; background:#fff; border-color:#fff; }
.auth-help-link { margin-left:auto; color:rgba(255,255,255,.58)!important; font-size:.82rem; text-decoration:none; }
.auth-help-link:hover { color:#fff!important; }

/* Recovery-code entry: one word, not six boxes. */
.auth-code { min-height:56px!important; text-align:center; text-transform:uppercase; letter-spacing:.24em; font-weight:700; font-size:1.25rem!important; color:#fff!important; background:rgba(0,0,0,.16)!important; border:1px solid rgba(255,255,255,.58)!important; border-radius:.55rem; }
.auth-code:focus { border-color:var(--auth-gold)!important; box-shadow:0 0 0 .2rem rgba(214,173,45,.14); }
.auth-code::placeholder { color:rgba(255,255,255,.4); letter-spacing:.1em; }

/* Verification notices, kept quiet so they do not shout over the code boxes. */
#verifyError,#verifySuccess { border:0!important; border-radius:.7rem; font-size:.86rem; padding:.7rem .85rem; margin-top:1rem; }
#verifyError { color:#ffd9dd!important; background:rgba(220,53,69,.16)!important; }
#verifySuccess { color:#f7e3a6!important; background:rgba(214,173,45,.12)!important; }

/* Keyboard focus stays visible against the photograph. */
.auth-page :focus-visible { outline:2px solid var(--auth-gold); outline-offset:2px; }
.auth-page .form-control:focus-visible,.auth-page .btn:focus-visible { outline:2px solid var(--auth-gold); outline-offset:2px; box-shadow:none; }

@media(max-width:480px){
  .auth-rail-sep { flex:0 0 1.4rem; }
  .auth-method-change { padding:.25rem .3rem; font-size:.8rem; }
  .auth-help-link { margin-left:0; width:100%; text-align:left; padding-left:0; }
}
@media(max-width:380px){
  .auth-rail-text { display:none; }
}

@media(prefers-reduced-motion:reduce){
  .auth-page *,.auth-page *::before,.auth-page *::after { animation-duration:.001ms!important; animation-iteration-count:1!important; transition-duration:.001ms!important; }
}
