/* ============================================================
   PassMark — Authentication (login, forgot, OTP, reset)
   loaded after styles.css (reuses pm-* tokens + components)
   ============================================================ */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 440px 1fr; background: var(--bg); }

/* side panel — reuses .pm-side */
.auth-side { padding: 40px 38px; }
.pm-side-top { position: relative; z-index: 1; }
.auth-points { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.auth-points li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.4; color: rgba(255,255,255,.9); font-weight: 500; }
.auth-points li svg { flex: 0 0 auto; margin-top: 1px; color: var(--lime); }

/* ---- branded (white-label) side panel ---- */
.auth-side-brand .pm-side-top { display: flex; align-items: center; gap: 12px; }
.auth-side-school { font-family: var(--display-font); font-weight: 800; font-size: 17px; color: #fff; letter-spacing: -.01em; }
.auth-brandmark { display: inline-grid; place-items: center; border-radius: 11px; color: #fff; font-family: var(--display-font); font-weight: 800; overflow: hidden; flex: 0 0 auto; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.auth-brandmark.has-img { background: #fff; }
.auth-brandmark img { width: 100%; height: 100%; object-fit: contain; }
.auth-side-tagline { color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.5; margin: 4px 0 8px; max-width: 42ch; }
.auth-side-powered { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.72); font-size: 13px; font-weight: 600; }
.auth-side-powered span { letter-spacing: .01em; }
.auth-foot-brand { color: var(--ink-3); }
.auth-foot-brand + .auth-powered { margin-top: 14px; }
.auth-powered { display: flex; align-items: center; justify-content: center; gap: 9px; padding-top: 16px; border-top: 1px solid var(--line); }
.auth-powered > span { font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: var(--ink-3); text-transform: none; }
.auth-powered .pm-logo { transform: translateY(-1px); }
.auth-logo-sm .auth-brandmark { box-shadow: none; }

/* main */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; opacity: 1; position: relative; }
/* full mascot at the page's top-right corner (matches Notepass) — static */
.auth-corner-mascot { position: fixed; top: 18px; right: 22px; width: 132px; height: auto; z-index: 5; pointer-events: none;
  filter: drop-shadow(0 14px 22px rgba(11,41,38,.20)); }
@media (max-width: 560px) { .auth-corner-mascot { width: 92px; top: 12px; right: 12px; } }
@media (prefers-reduced-motion: no-preference) {
  .auth-card { animation: authIn .4s cubic-bezier(.2,.7,.3,1); }
}
@keyframes authIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.auth-logo-sm { display: none; margin-bottom: 22px; }
@media (max-width: 860px) { .auth-logo-sm .auth-brandmark { display: inline-grid; } }
.auth-head { margin-bottom: 26px; }
.auth-badge { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 15px;
  background: color-mix(in oklab, var(--brand) 12%, var(--card)); color: var(--brand); margin-bottom: 16px; }
.auth-title { font-family: var(--display-font); font-weight: 800; font-size: clamp(26px, 3vw, 32px); letter-spacing: -.03em; line-height: 1.08; color: var(--ink); }
.auth-sub { margin-top: 9px; color: var(--ink-3); font-size: 15.5px; line-height: 1.5; text-wrap: pretty; }
.auth-sub b { color: var(--ink-2); font-weight: 700; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-pw-field { position: relative; }
.auth-forgot { position: absolute; top: 0; right: 0; border: none; background: none; font-family: inherit; font-size: 13px; font-weight: 700; color: var(--brand); padding: 0; cursor: pointer; }
.auth-forgot:hover { text-decoration: underline; }

/* remember me */
.auth-remember { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; user-select: none; }
.auth-remember input { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center; color: #fff; transition: all .15s; flex: 0 0 auto; }
.auth-check svg { opacity: 0; }
.auth-remember input:checked + .auth-check { background: var(--brand); border-color: var(--brand); }
.auth-remember input:checked + .auth-check svg { opacity: 1; }
.auth-remember input:focus-visible + .auth-check { box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 22%, transparent); }

/* divider + social */
.auth-divider { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-social { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-family: inherit; font-weight: 700; font-size: 14.5px; padding: 13px; border-radius: 12px; transition: all .15s; }
.auth-social:hover { border-color: var(--ink-3); background: var(--field-focus); }

/* footers / links */
.auth-foot { margin-top: 24px; text-align: center; color: var(--ink-3); font-size: 14.5px; }
.auth-foot a { font-weight: 700; color: var(--brand); }
.auth-backlink { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink-3); padding: 0; margin-bottom: 22px; cursor: pointer; }
.auth-backlink:hover { color: var(--brand); }

/* OTP */
.auth-otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.auth-otp-box { aspect-ratio: 1; width: 100%; text-align: center; font-family: var(--display-font); font-weight: 800; font-size: 26px; color: var(--ink); background: var(--field); border: 1.5px solid var(--line); border-radius: 13px; transition: all .15s; }
.auth-otp-box:focus { outline: none; border-color: var(--brand); background: var(--field-focus); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 14%, transparent); }
.auth-otp.is-error .auth-otp-box { border-color: #ef4444; }
.auth-otp-err { margin-top: -6px; }
.auth-resend { text-align: center; font-size: 13.5px; color: var(--ink-3); margin-top: 2px; }
.auth-resend b { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.auth-resend-btn { border: none; background: none; font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--brand); cursor: pointer; }
.auth-resend-btn:hover { text-decoration: underline; }

/* password strength */
.auth-strength { display: flex; align-items: center; gap: 11px; margin-top: -6px; }
.auth-strength-bars { display: flex; gap: 4px; flex: 1; }
.auth-strength-bars i { flex: 1; height: 5px; border-radius: 999px; background: var(--line); transition: background .2s; }
.auth-strength span { font-size: 12.5px; font-weight: 700; color: var(--ink-3); min-width: 56px; text-align: right; }
.auth-strength.s1 .auth-strength-bars i:nth-child(1) { background: #ef4444; }
.auth-strength.s1 span { color: #dc2626; }
.auth-strength.s2 .auth-strength-bars i:nth-child(-n+2) { background: #f59e0b; }
.auth-strength.s2 span { color: #d97706; }
.auth-strength.s3 .auth-strength-bars i:nth-child(-n+3) { background: #eab308; }
.auth-strength.s3 span { color: #a16207; }
.auth-strength.s4 .auth-strength-bars i { background: var(--success); }
.auth-strength.s4 span { color: var(--success-on); }

/* success */
.auth-success { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.auth-success-burst { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, var(--brand), color-mix(in oklab, var(--brand) 55%, #000));
  box-shadow: 0 0 0 10px color-mix(in oklab, var(--brand) 13%, transparent); margin-bottom: 4px;
  animation: authPop .5s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes authPop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.auth-success .pm-btn { margin-top: 10px; }

/* mobile brand bar — shown inside auth-main only on small screens in branded mode */
.auth-mobile-brand { display: none; }

/* responsive */
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-logo-sm { display: block; }
  /* column layout so brand bar stacks above card */
  .auth-main { flex-direction: column; align-items: center; justify-content: flex-start; padding: 28px 20px 40px; }
  .auth-card { width: 100%; max-width: 440px; margin-top: 0; }

  /* Compact brand header visible at top of the login form on mobile/tablet */
  .auth-mobile-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    max-width: 440px;
    padding: 0 0 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }
  .auth-mobile-brand-school {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .auth-mobile-brand-school .auth-side-school {
    font-size: 15px;
    color: var(--ink);
    font-weight: 800;
    font-family: var(--display-font);
    letter-spacing: -.01em;
  }
  .auth-mobile-brand-pm {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-3);
    letter-spacing: .01em;
  }
}
@media (max-width: 480px) {
  .auth-main { padding: 20px 16px 32px; }
  .auth-card { max-width: 100%; }
  .auth-title { font-size: 24px; }
  .auth-mobile-brand { max-width: 100%; }
}
