/* Self-service password recovery (v3220).
   Uses the shared design tokens so both themes follow the rest of the LMS. */

.pw-recovery-v3220{
  min-height:calc(100vh - 40px);
  display:grid;
  place-items:center;
  padding:32px 18px;
}

.pw-card-v3220{
  width:min(520px,100%);
  padding:clamp(22px,4vw,34px);
  border:1px solid var(--line);
  border-radius:24px;
  background:var(--panel-solid,rgba(15,29,49,.92));
  box-shadow:var(--shadow,0 25px 70px rgba(0,0,0,.35));
}

.pw-brand-v3220{
  display:flex;
  align-items:center;
  gap:11px;
  margin-bottom:22px;
}
.pw-brand-v3220 img{width:38px;height:38px}
.pw-brand-v3220 b{display:block;font-size:.95rem;line-height:1.2}
.pw-brand-v3220 small{color:var(--muted);font-size:.74rem;font-weight:600}

/* Progress ------------------------------------------------------------- */

.pw-steps-v3220{
  display:flex;
  gap:6px;
  margin:0 0 22px;
  padding:0;
  list-style:none;
}
.pw-steps-v3220 li{
  flex:1;
  display:flex;
  align-items:center;
  gap:7px;
  padding:8px 9px;
  border:1px solid var(--line);
  border-radius:11px;
  color:var(--muted);
  font-size:.71rem;
  font-weight:700;
  letter-spacing:.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pw-steps-v3220 li span{
  flex:none;
  width:19px;
  height:19px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--line);
  color:var(--text);
  font-size:.66rem;
  font-weight:800;
}
.pw-steps-v3220 li.current{
  border-color:rgba(23,199,255,.42);
  background:rgba(23,199,255,.07);
  color:var(--text);
}
.pw-steps-v3220 li.current span{
  background:linear-gradient(135deg,#7c5cff,#17c7ff);
  color:#fff;
}
.pw-steps-v3220 li.done{
  border-color:rgba(54,211,153,.32);
  color:var(--text);
}
.pw-steps-v3220 li.done span{
  background:rgba(54,211,153,.9);
  color:#04231a;
}

/* Copy ----------------------------------------------------------------- */

.pw-card-v3220 h1{
  margin:0 0 8px;
  font-size:clamp(1.4rem,3.4vw,1.75rem);
  line-height:1.2;
}
.pw-lead-v3220{
  margin:0 0 20px;
  color:var(--muted);
  line-height:1.6;
  font-size:.88rem;
}

/* Messages. Status is carried by text and icon, never colour alone. ----- */

.pw-alert-v3220{
  margin:0 0 18px;
  padding:11px 13px;
  border-radius:12px;
  font-size:.83rem;
  line-height:1.55;
  border:1px solid var(--line);
}
.pw-alert-v3220.danger{
  border-color:rgba(255,110,110,.34);
  background:rgba(255,110,110,.08);
  color:#ffb4b4;
}
.pw-alert-v3220.danger::before{content:"⚠ ";font-weight:800}
.pw-alert-v3220.success{
  border-color:rgba(54,211,153,.32);
  background:rgba(54,211,153,.08);
  color:#7ce9bd;
}
.pw-alert-v3220.success::before{content:"✓ ";font-weight:800}

:root[data-theme="light"] .pw-alert-v3220.danger{color:#a3272c;background:rgba(220,60,60,.07)}
:root[data-theme="light"] .pw-alert-v3220.success{color:#0f6b4d;background:rgba(20,150,110,.08)}

/* Form ----------------------------------------------------------------- */

.pw-form-v3220{
  display:flex;
  flex-direction:column;
  gap:15px;
}
.pw-form-v3220 label{
  font-size:.78rem;
  color:var(--muted);
  font-weight:700;
}
.pw-form-v3220 input{min-height:44px}
.pw-form-v3220 .btn{margin-top:4px;min-height:46px}

.pw-match-v3220{
  margin:0;
  font-size:.78rem;
  font-weight:700;
}
.pw-match-v3220.ok{color:#6ae6b4}
.pw-match-v3220.ok::before{content:"✓ "}
.pw-match-v3220.bad{color:#ffa8a8}
.pw-match-v3220.bad::before{content:"• "}
:root[data-theme="light"] .pw-match-v3220.ok{color:#0f6b4d}
:root[data-theme="light"] .pw-match-v3220.bad{color:#a3272c}

/* Fallback help -------------------------------------------------------- */

.pw-help-v3220{
  margin-top:22px;
  padding:14px 15px;
  border:1px dashed var(--line);
  border-radius:14px;
  background:rgba(125,150,180,.05);
}
.pw-help-v3220 b{display:block;font-size:.81rem;margin-bottom:5px}
.pw-help-v3220 p{margin:0;color:var(--muted);font-size:.81rem;line-height:1.6}

.pw-back-v3220{
  margin:20px 0 0;
  text-align:center;
  font-size:.82rem;
}
.pw-back-v3220 a{color:#79dcff;text-decoration:none;font-weight:700}
.pw-back-v3220 a:hover{text-decoration:underline}
:root[data-theme="light"] .pw-back-v3220 a{color:#0b6fa6}

/* Dashboard reminder (v3223) --------------------------------------------
   Shown to students who have no security answers stored. Amber rather than
   red: nothing is broken, but the account cannot be self-recovered yet. */

.pw-nudge-v3223{
  position:relative;
  display:flex;
  align-items:center;
  gap:16px;
  margin:0 0 20px;
  padding:16px 52px 16px 18px;
  border:1px solid rgba(249,200,82,.26);
  border-left:3px solid #f5c451;
  border-radius:16px;
  background:linear-gradient(100deg,rgba(249,200,82,.09),rgba(249,200,82,.03));
}

.pw-nudge-icon-v3223{
  flex:none;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:rgba(249,200,82,.13);
  border:1px solid rgba(249,200,82,.2);
  color:#f5c451;
}
.pw-nudge-icon-v3223 .ui-icon{width:21px;height:21px}

.pw-nudge-copy-v3223{flex:1;min-width:0}
.pw-nudge-copy-v3223 b{
  display:block;
  font-size:.94rem;
  font-weight:800;
  letter-spacing:-.01em;
  margin-bottom:3px;
}
.pw-nudge-copy-v3223 span{
  display:block;
  color:var(--muted);
  font-size:.85rem;
  line-height:1.55;
  max-width:62ch;
}

.pw-nudge-cta-v3223{flex:none;white-space:nowrap}

.pw-nudge-close-v3223{
  position:absolute;
  top:12px;
  right:12px;
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--muted);
  font-size:1.25rem;
  line-height:1;
  cursor:pointer;
  transition:background .16s ease-out,color .16s ease-out;
}
.pw-nudge-close-v3223:hover{
  background:rgba(151,177,211,.12);
  color:var(--text);
}

:root[data-theme="light"] .pw-nudge-v3223{
  border-color:rgba(180,120,10,.24);
  background:linear-gradient(100deg,rgba(249,200,82,.16),rgba(249,200,82,.06));
}
:root[data-theme="light"] .pw-nudge-icon-v3223{color:#8a6100}

@media (max-width:640px){
  .pw-nudge-v3223{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
    padding:16px 44px 16px 16px;
  }
  .pw-nudge-cta-v3223{width:100%;text-align:center}
}

/* Roster indicator (v3223) ---------------------------------------------- */

.pw-roster-flag-v3223{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:3px 9px;
  border-radius:999px;
  font-size:.7rem;
  font-weight:750;
  letter-spacing:.01em;
  white-space:nowrap;
}
.pw-roster-flag-v3223.on{
  border:1px solid rgba(54,211,153,.26);
  background:rgba(54,211,153,.08);
  color:#6ae6b4;
}
.pw-roster-flag-v3223.off{
  border:1px solid rgba(249,200,82,.24);
  background:rgba(249,200,82,.07);
  color:#f3ca64;
}
:root[data-theme="light"] .pw-roster-flag-v3223.on{color:#0f6b4d}
:root[data-theme="light"] .pw-roster-flag-v3223.off{color:#8a6100}

/* Sign-in page link ---------------------------------------------------- */

.login-forgot-v3220{
  margin:2px 0 0;
  text-align:center;
  font-size:.81rem;
}
.login-forgot-v3220 a{
  color:#79dcff;
  text-decoration:none;
  font-weight:700;
}
.login-forgot-v3220 a:hover{text-decoration:underline}
:root[data-theme="light"] .login-forgot-v3220 a{color:#0b6fa6}

/* Security question setup, shown inside the profile page --------------- */

.pw-setup-v3220{
  display:flex;
  flex-direction:column;
  gap:15px;
  max-width:620px;
}
.pw-setup-row-v3220{
  display:grid;
  grid-template-columns:1fr;
  gap:9px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(125,150,180,.04);
}
.pw-setup-row-v3220 > b{
  font-size:.74rem;
  color:var(--muted);
  letter-spacing:.05em;
  text-transform:uppercase;
}

.pw-state-v3220{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:7px 11px;
  border-radius:999px;
  border:1px solid var(--line);
  font-size:.76rem;
  font-weight:800;
}
.pw-state-v3220.on{
  border-color:rgba(54,211,153,.32);
  background:rgba(54,211,153,.08);
  color:#6ae6b4;
}
.pw-state-v3220.off{
  border-color:rgba(249,200,82,.3);
  background:rgba(249,200,82,.07);
  color:#f3ca64;
}
:root[data-theme="light"] .pw-state-v3220.on{color:#0f6b4d}
:root[data-theme="light"] .pw-state-v3220.off{color:#8a6100}

@media (max-width:560px){
  .pw-recovery-v3220{padding:18px 12px}
  .pw-steps-v3220{flex-direction:column;gap:5px}
  .pw-steps-v3220 li{white-space:normal}
}
